Difference between revisions of "LC-WF-2-4"

From LCWIKI
Jump to: navigation, search
(Product name)
(Overview)
Line 3: Line 3:
  
 
== '''Overview''' ==
 
== '''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.<br>
+
LC 12VESP8266 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.<br>
 
[[File:LC-WF-1-4-1.png]]
 
[[File:LC-WF-1-4-1.png]]
 
 
 
  
 
== '''Features''' ==
 
== '''Features''' ==

Revision as of 15:37, 24 November 2023

Product name

12V ESP8266 chip control 4-way WIFI relay module.

Overview

LC 12VESP8266 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.


Description for interface

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


Description 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 mounted on the ESP-01 module), taking the first 2 relays 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) The mobile phone is connected 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 on the gray square You can send commands 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 two:

(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. It means 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. Automatic 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 changes from 2 seconds slow flashing 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, and RX of the TTL module to the GND, TX, and RX of the relay module respectively, unplug the ESP-01 module, select mode 1, and wait for the green light to flash slowly for 2 seconds before running on the computer Open the serial port debugging software (such as SSCOM32), 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

Kind tips:
1. It will take a little longer (about 1 minute) for the first use to configure the WIFI password, etc. After the configuration is completed, it only takes 20 seconds to automatically connect to the next startup.
2. If you want to replace the router, you can power off and restart or press the S2 key (pressing the S2 key will clear the previously memorized WIFI account and password), and reconfigure the WIFI account and password for ESP-01 in mode 2.
3. When the signal of the router remembered by ESP-01 is weak or the connection is interrupted because it is not in the service area, the green light will go out and automatically try to connect. During this process, the button is invalid. When the green light changes to 2S slow flashing, it means that the connection has been resumed .
4. In mode 1 and mode 2, the button is only available when the green light flashes slowly or is always on for 2 seconds. In other cases, the chip is self-configuring or waiting for the configuration process, and the button is invalid.
5. ESP-01 has a timeout mechanism. If there is no data exchange between the mobile phone and ESP-01 for more than 6 minutes, the TCP connection will be automatically disconnected. At this time, click "CONNNECT" in the upper right corner of the "EasyTCP_20" APP to re-establish the connection.
6. Regarding the onboard UART interface: when debugging 8266, the TX, RX, and GND of the USB to TTL module are respectively connected to the RX, TX, and GND of the relay module; when the relay module is used as a USB relay, the USB to TTL module’s TX, RX, and GND are respectively connected to TX, RX, and GND of the module.
7. Regarding the reserved MCU program download port: when the onboard MCU is STM8S003/STM8S103, NRST and SWIM are the programming interfaces; when the onboard MCU is N76E003, NRST, SWIM, and PIN8 correspond to the Nu-Link programmer’s RST, CLK, DAT interface.
8. The serial port baud rate of the onboard MCU is 115200, so when the APP and ESP-01 cannot be connected, please ensure that the baud rate of the ESP-01 module used is also 115200.