LC-WF-1-4

From LCWIKI
Revision as of 11:56, 24 November 2023 by Melody (talk | contribs) (Created page with "== '''Product name''' == 5V ESP8266 chip control four-way WIFI relay module<br> == '''Overview''' == LC 5VESP8266 4-way WIFI relay module uses ESP-01 as the WIFI module, an...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Product name

5V ESP8266 chip control four-way WIFI relay module


Overview

LC 5VESP8266 4-way WIFI relay module uses ESP-01 as the WIFI module, and cooperates with a mature and stable 8-bit MCU chip. It only needs a simple configuration process to realize the wireless control of 4-way relays in the LAN using the mobile phone APP.
LC-WF-1-4-1.png



Features

1. Onboard high-performance microprocessor and ESP-01WIFI module
2. The module has 2 working modes
Mode 1: The mobile phone is directly mounted on the WIFI module
Mode 2: The mobile phone and WIFI module are installed on the router at the same time
Additional function: It can also be used as a USB relay when the ESP-01 is unplugged

3. Transmission distance:
(1) In an open environment, when the mobile phone is mounted on the WIFI module, the maximum stable transmission distance is 100m
(2) When the WIFI module and the mobile phone are installed on the router at the same time, the transmission distance depends on the signal strength of the router.

4. Use the Smartconfig technology to complete the configuration of the ESP-01WIFI module account and password on the mobile APP. The configured account and password have a power-off memory function
5. Onboard 5V, 10A/250VAC10A/30VDC relay, which can continuously pull in and out 100,000 times, has diode effusion protection and short response time
6. Onboard mode selection and real-time working status indicators
7. With 4 optocoupler isolation, strong anti-interference ability
8. Reserve UART debugging interface and MCU program download interface



Interface Description

Board size: 60*63mm
Board function description:
1. Onboard resource introduction:
IN+, IN-: 5V power input
5V, GND, TX, RX: UART serial port pins
SWIM, PIN8, NRST: reserved MCU program download port
Button S1: mode switch, the default is mode 1
Button S2: restore factory settings
LED D1/D2/D3/D4 (red light): Relay working indicator light, lights up when turned on
LED D7 (red light): mode 1 indicator light
LED D5 (blue light): mode 2 indicator light
LED D6 (green light): working status indicator, described as follows:
(1) When it is off, it means that it is self-configuring or loses connection with the router
(2) When 0.5S flashes quickly, it means waiting for the mobile APP to configure the WIFI account and password for the ESP-01 module
(3) When 2S flashes slowly, it means that the configuration is complete, waiting to establish a TCP connection with the mobile phone
(4) When it is always on, it means that the TCP connection has been successfully established with the mobile phone

Reserved 2 jumper caps: Please insert them to the bottom during normal use (that is, RX connects to RX1, TX connects to TX1). Otherwise there may be interference).
COM1: public port
NC1: normally closed terminal, short-circuit with COM1 before the relay pulls in, and hang in the air after the pull-in
NO1: normally open, suspended before the relay pulls in, and short-circuited with COM1 after the pull-in
COM2: public port
NC2: normally closed terminal, short-circuit with COM2 before the relay pulls in, and hang in the air after the pull-in
NO2: normally open, suspended before the relay pulls in, and short-circuited with COM2 after the pull-in
COM3: public port
NC3: normally closed terminal, short-circuit with COM3 before the relay pulls in, and hang in the air after the pull-in
NO3: normally open, suspended before the relay pulls in, and short-circuited with COM3 after the pull-in
COM4: public port
NC4: normally closed terminal, short-circuit with COM4 before the relay pulls in, and hang in the air after the pull-in
NO4: normally open, suspended before the relay pulls in, and short-circuited with COM4 after the pull-in
Reminder:
The following uses the mobile phone APP to control the front 2 relays as an example. The third and fourth relays are used in the same way, but the relay control instructions are different.

  • Reserved 2 jumper caps: Please insert them to the bottom during normal use (that is, RX connects to RX1, TX connects to TX1). Otherwise there may be interference).
  • Relay control command (hexadecimal hex form):

Open the first relay: A00101A2
Close the first relay: A00100A1
Open the second relay: A00201A3
Close the second relay: A00200A2
Open the third relay: A00301A4
Close the third relay: A00300A3
Open the fourth relay: A00401A5
Close the fourth relay: A00400A4



Instructions for use

Note: The following uses the mobile phone APP to control the front 2 relays as an example. The third and fourth relays are used in the same way, but the relay control instructions are different.

  • Preparation before use

1. 5V/1A power adapter, the positive and negative poles of the power supply are respectively connected to the IN+ and IN- of the module
2. Install the APP "EspTouch_Demo" on the Android phone to configure the WIFI account and password for the ESP-01 module when using working mode 2 for the first time
LC-WF-1-2-2.png

3. Install the APP "EasyTCP_20" on the Android mobile phone, a TCP transmission tool for sending relay control commands, click "SWITCH", and then long press the gray square in the interface to input the name and content of the 2-way relay control commands (the command format is HEX format)
LC-WF-1-2-3.png LC-WF-1-2-4.png

LC-WF-1-2-5.png LC-WF-1-2-6.png


Mode 1:
The mobile phone is equipped on the ESP-01 module) Instructions for use, take the previous 2-way relay as an example:
1. Plug in the ESP-01 module, power on the module, and after about 4S minutes, the green light changes from off to 2S slow flashing, indicating that the configuration is complete;
LC-WF-1-4-2.png

2.Connect the mobile phone to the AP hotspot signal sent by the ESP-01 module;
LC-WF-1-2-8.png

3. Open the "EasyTCP_20" APP, click "CONNECT", enter the IP address: 192.168.4.1 and port number 8080, and then click "Connect". After the connection is successful, the green light will change from flashing slowly for 2 seconds to always on, and click the gray box to Commands can be sent to control the switch of the relay
LC-WF-1-2-9.png LC-WF-1-2-10.png

LC-WF-1-2-6.png LC-WF-1-2-11.png

LC-WF-1-4-3.png


Mode 2:
1. Plug in the ESP-01 module, power on the module, wait for the green light to flash slowly, then press the S1 key to switch to mode 2, the blue light is on, and the green light changes from off to 0.5S fast flashing after about 1 minute, indicating Waiting for the "EspTouch_Demo" APP to configure the WIFI account and password for it
LC-WF-1-4-4.png

2. At this time, the mobile phone is connected to the router first, open the "EspTouch_Demo" APP, enter the router password, and click "Confirm";
LC-WF-1-2-14.png LC-WF-1-2-15.png

3. Wait for the configuration to be successful. When the IP address of ESP-01 (such as 192.168.0.174) appears on the APP interface, it means that the ESP-01 module has successfully connected to the router, and automatically remembers the account and password. The next time you enter mode 2, it will automatically Connection (about 20-60S to connect)
LC-WF-1-2-16.png LC-WF-1-2-17.png
Note: The IP address 192.168.0.174 is dynamically assigned to the ESP-01 module by the router, and the address may change after the next reconnection. You can check the real-time IP address of the ESP-01 module in the device list of the router.

4. Open the "EasyTCP_20" APP, click "CONNECT", enter the IP address of the ESP-01 module: 192.168.0.174 and port number 8080, and then click "Connect",After the connection is successful, the green light will change from flashing slowly for 2 seconds to always on, click the gray square to send instructions to control the switch of the relay
LC-WF-1-2-9.png LC-WF-1-2-18.png

LC-WF-1-2-6.png LC-WF-1-2-11.png

LC-WF-1-4-5.png

  • Additional features:

Prepare a USB to TTL serial port module, connect the GND, TX, RX of the TTL module to the GND, TX, RX of the relay module respectively, unplug the ESP-01 module, select mode 1,After the green light changes to 2S slow flashing, open the serial port debugging software (such as SSCOM32) on the computer, and select the baud rate as 115200
Send A0 01 01 A2 in hexadecimal (hex) form to turn on the relay; take the first relay as an example, send A00101A2 to turn on the first relay
LC-WF-1-2-22.png

LC-WF-1-4-6.png