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

From LCWIKI
Jump to: navigation, search
(Interface Description)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
=='''Product name'''==
+
== '''Product name''' ==
ESP8266 chip controls 2-channel WiFi relay module.<br>
+
5V ESP8266 dual-channel WiFi relay IoT smart home mobile APP remote control switch<br>
  
  
  
=='''Overview'''==
+
== '''About LC-WF-4-2''' ==
LC ESP8266 2-channel relay development board is equipped with an ESP-12F WiFi module, with all I/O ports and supports DC5V/8-80V power supply.<br>
+
LC 5V ESP8266 dual-channel WIFI relay module uses the ESP8266 chip. It only requires a simple configuration process to achieve wireless control of a dual-channel relay in the local area network using a mobile phone APP.<br>
Provides Arduino development environment reference code, suitable for ESP8266 secondary development learning, smart home wireless control and other occasions.<br>
 
[[File:LC-WF-4-2-1.png]]<br>
 
  
  
  
=='''Features'''==
+
== '''LC-WF-4-2 view''' ==
*Onboard mature and stable ESP-12F WiFi module, large capacity 4M Byte Flash<br>
+
Front view<br>
*The I/O port and UART program download port of the WiFi module are all lead out to facilitate secondary development<br>
+
[[File:LC-WF-4-2-01.jpg]]<br>
*Onboard WiFi module RST reset button<br>
 
*ESP-12F supports the use of development tools such as Eclipse/Arduino IDE and provides reference programs for the Arduino development environment<br>
 
*There are 5V 2-channel relays on the board, which output switching signals and are suitable for controlling loads with operating voltages within AC 250V/DC30V<br>
 
*Onboard power indicator, 1 programmable LED and relay indicator<br>
 
  
 +
Side view<br>
 +
[[File:LC-WF-4-2-02.jpg]]<br>
  
 +
Reverse view<br>
 +
[[File:LC-WF-4-2-03.jpg]]<br>
  
=='''Interface Description'''==
 
| class="wikitable" style="width=800px;"
 
|-
 
| Logo || Description
 
|-
 
| 7-80V、5V、GND || DC7-80V or DC5V power input
 
|-
 
| GPIO pin header port || ADC:A/D conversion results.Input voltage range 0~1V, value range: 0~1024<br>
 
EN:Enable pin, pull-up by default<br>
 
IO16:GPIO16<br>
 
IO14:GPIO14、HSPI_CLK<br>
 
IO12:GPIO12、HSPI_MISO<br>
 
IO13:GPIO13、HSPI_MOSI、UART0_CTS<br>
 
IO5:GPIO5<br>
 
IO4:GPIO4<br>
 
IO0:GPIO0<br>
 
IO2:GPIO2、UART1_TXD<br>
 
IO15:GPIO15、MTDO、HSPI_CS、UART0_RTS<br>
 
TXD:UART0_TXD、GPIO1<br>
 
RXD:UART0_TXD、GPIO1<br>
 
GND:power ground<br>
 
5V:5V power<br>
 
3V3:3.3V power<br>
 
RY1/RY2:1-way relay drive port can be short-circuited using a short-circuit cap and IO5/IO4;To use other I/O to drive relays, use Dupont wire jumpers<br>
 
|-
 
| UART program download port || Burning port<br>
 
The GND, RX, TX, and 5V of the ESP8266 are connected to the GND, TX, RX, and 5V of the external TTL serial port module respectively.<br>
 
When downloading, IO0 needs to be connected to GND. After the download is completed, disconnect IO0 and GND.<br>
 
|-
 
| S1 || Reset button
 
|-
 
| D5 || Power switch indicator light
 
|-
 
| D1、D4 || Relay switch indicator light
 
|-
 
| D7 || Programmable LED
 
|-
 
| NC1、NC2 || Normally closed end, short-circuited to COM before the relay is closed, and left floating after the relay is closed.
 
|-
 
| NO1、NO2 || Normally open, the relay is left floating before closing, and short-circuited to COM after closing.
 
|-
 
| COM1、COM2 || Public end
 
|}
 
  
=='''Connection instructions'''==
 
'''Arduino development environment setup:'''<br>
 
ESP8266 supports development tools such as Eclipse/Arduino IDE. Using Arduino is relatively simple. The following is how to set up the Arduino development environment:<br>
 
1. Install Arduino IDE 1.8.9 or the latest version<br>
 
2. Open Arduino IDE, click 文件--首选项 in the menu bar, enter the 首选项, and click Add Network in "附加开发板管理器网址"<br>
 
http://arduino.esp8266.com/stable/package_esp8266com_index.json;<br>
 
[[File:LC-WF-1-8-3.png]]<br>
 
  
3. Click 工具--开发板--开发板管理器 in the menu bar, and then search for "ESP8266" to install Arduino's support package 2.5.2 or the latest version for ESP8266<br>
+
== '''Introduction instructions''' ==
[[File:LC-WF-1-8-4.png]]<br>
+
Board size:42.8*62.4mm/30g<br>
'''Note: '''Since the download URL is from abroad, the access speed is relatively slow, and download errors may occur. Just try a few more times when the network is good.<br>
 
  
 +
1.IN+, IN-: 5V power input<br>
  
'''Program download:'''<br>
+
2.5V, TX, RX, GND, IO0: program download interface<br>
1.Use a jumper cap to connect the IO0 and GND pins, and prepare a TTL serial port module (for example: FT232) to be plugged into the computer USB; GND, RX, TX, and 3.3V are connected to the GND, TX, RX, and 3.3V of the external TTL serial port module respectively.<br>
 
2.Click 工具--开发板 in the menu bar and select the development board as ESPino (ESP-12 module);<br>
 
3.Open the program you want to download, click 工具--端口 on the menu bar and select the correct port number;<br>
 
4.After clicking "上传", the program will be automatically compiled and downloaded to the development board;<br>
 
[[File:LC-WF-1-8-5.png]]<br>
 
  
5.Finally, disconnect IO0 and GND, power on the development board again or press the reset button to run the program.<br>
+
3. Button S1: short press to switch mode, long press for 2S to clear password<br>
 +
 
 +
4. Button S2: reset button<br>
 +
 
 +
5.LED D4 (red light): relay working indicator light, lights up when turned on<br>
 +
 
 +
6.LED D2 (red light): power indicator light<br>
 +
 
 +
7.LED D1 (green light): mode indicator light, described as follows:<br>
 +
(1) When turned off, it is mode 1<br>
 +
(2) When 1S flashes once, it means waiting for the mobile APP to configure the WIFI account and password for the ESP8266 module.<br>
 +
(3) When it is always on, it means the TCP connection has been successfully established with the mobile phone.<br>
 +
 
 +
8. Relay output terminal<br>
 +
COM1: public terminal<br>
 +
NC1: Normally closed terminal, short-circuited with COM1 before the relay is closed, and left floating after closing.<br>
 +
NO1: Normally open, the relay is left floating before closing, and short-circuited with COM1 after closing.<br>
 +
 
 +
9. Relay control instructions (hexadecimal hex format)<br>
 +
Open the first relay: A0 01 01 A2<br>
 +
Close the first relay: A0 01 00 A1<br>
 +
 
 +
 
 +
 
 +
== '''Function features''' ==
 +
*Onboard ESP8266 chip<br>
 +
 
 +
*The module has 2 working modes<br>
 +
(1) Mode 1: The mobile phone is directly mounted on the ESP8266 chip<br>
 +
(2) Mode 2: The mobile phone and ESP8266 chip are mounted on the router at the same time<br>
 +
 
 +
*Transmission distance<br>
 +
(1) In an open environment, the maximum stable transmission distance is 100m when the mobile phone is mounted on the ESP8266 chip<br>
 +
(2) When the ESP8266 chip and the mobile phone are mounted on the router at the same time, the transmission distance depends on the signal strength of the router.<br>
 +
 
 +
*Use Smartconfig technology to complete the configuration of the ESP8266 chip account and password on the mobile APP,The configured account number and password have a power-off memory function.<br>
 +
 
 +
*Onboard 5V, 10A/250V AC 10A/30V DC relay, which can be connected continuously for 100,000 times, has diode overflow protection and short response time<br>
 +
 
 +
*Onboard mode selection indicator light<br>
 +
 
 +
*Reserved ESP8266 chip program download interface<br>
 +
 
 +
 
 +
 
 +
== '''Use description''' ==
 +
'''1.Tool software'''<br>
 +
(1) EspTouch_Demo software is used to configure the WIFI account and password for the ESP8266 module when using working mode 2 for the first time.<br>
 +
[[File:WF-5-1-5.png]]<br>
 +
 
 +
(2)EasyTCP_20 software, used to send relay control instructions<br>
 +
[[File:WF-5-1-6.png]]<br>
 +
 
 +
 
 +
'''2.Preparation'''<br>
 +
(1) 5V/1A power adapter, connect the positive and negative poles of the power supply to the IN+ and IN- of the module respectively.<br>
 +
(2) Install the APP "EspTouch_Demo" on the Android mobile phone, which is used to configure the WIFI account and password for the ESP8266 module when using working mode 2 for the first time.<br>
 +
[[File:WF-5-1-7.png]]<br>
 +
 
 +
(3) Install the APP "EspTCP_20" on the Android mobile phone, a TCP transmission tool, used to send relay control instructions, click "SWITCH"<br>
 +
Then long press the gray square in the interface to enter the name and content of the relay control command (the command format is HEX format)<br>
 +
[[File:WF-5-4-4.png]]    [[File:WF-5-1-9.png]]<br>
 +
 
 +
[[File:WF-5-4-5.png]]    [[File:WF-5-4-6.png]]<br>
 +
 
 +
 
 +
'''3.Use description'''
 +
'''(1) Working mode 1 (the mobile phone is equipped with the ESP8266 module)'''<br>
 +
①Power on the module<br>
 +
②The mobile phone is connected to the AP hotspot signal sent by the ESP8266 module<br>
 +
[[File:WF-5-1-12.png]]<br>
 +
 
 +
③Open the "EasyTCP_20" APP, click "CONNECT", enter the IP address: 192.168.4.1 and port number 8080, and then click "Connect"<br>
 +
After the connection is successful,Click the gray square to send instructions to control the switch of the relay.<br>
 +
[[File:WF-5-4-7.png]]    [[File:WF-5-4-8.png]]<br>
 +
 
 +
[[File:WF-5-4-9.png]]    [[File:WF-5-4-10.png]]<br>
 +
 
 +
'''(2) Working mode 2 (mobile phone and ESP8266 module are mounted on the router at the same time)'''<br>
 +
①When the module is powered on, press the KEY key to switch to mode 2. The green light will change from off to on once every 1 second, indicating that it is waiting for the "EspTouch_Demo" APP to configure its WIFI account and password.<br>
 +
②At this time, connect the mobile phone to the router first, open the "EspTouch_Demo" APP, enter the router password, and click "Confirm"<br>
 +
[[File:WF-5-1-19.png]]    [[File:WF-5-1-20.png]]<br>
 +
 
 +
③ Wait for the configuration to be successful. When the IP address of ESP8266 (such as 192.168.0.189) appears on the APP interface, it means that the ESP8266 module has successfully connected to the router and automatically memorized the account and password. It will automatically connect to Mode 2 next time.<br>
 +
[[File:WF-5-1-21.png]]    [[File:WF-5-4-12.png|300px|]]<br>
 +
It should be noted that the IP address 192.168.0.189 is dynamically assigned to the ESP8266 module by the router.
 +
The address may change after the next reconnection,You can check the real-time IP address of the ESP8266 module in the router's device list.<br>
 +
 
 +
④Open the "EasyTCP_20" APP, click "CONNECT", enter the IP address of the ESP8266 module: 192.168.0.189 and port number 8080, and then click "Connect"<br>
 +
After the connection is successful, the green light will flash slowly for 1 seconds and turn solid. Click the gray square to send instructions to control the switch of the relay.<br>
 +
[[File:WF-5-4-13.png]]    [[File:WF-5-4-14.png]]<br>
 +
 
 +
[[File:WF-5-4-15.png]]    [[File:WF-5-4-16.png]]<br>
 +
 
 +
 
 +
 
 +
== '''Download LC-WF-4-2 user manual''' ==
 +
For more information about the use of LC-WF-4-2, please view the [https://pan.baidu.com/share/init?surl=M1p8ADqn1WTMjlSyXm9skA  Baidu network disk] extraction code: cp3d<br>

Latest revision as of 10:52, 16 August 2024

Product name

5V ESP8266 dual-channel WiFi relay IoT smart home mobile APP remote control switch


About LC-WF-4-2

LC 5V ESP8266 dual-channel WIFI relay module uses the ESP8266 chip. It only requires a simple configuration process to achieve wireless control of a dual-channel relay in the local area network using a mobile phone APP.


LC-WF-4-2 view

Front view
LC-WF-4-2-01.jpg

Side view
LC-WF-4-2-02.jpg

Reverse view
LC-WF-4-2-03.jpg


Introduction instructions

Board size:42.8*62.4mm/30g

1.IN+, IN-: 5V power input

2.5V, TX, RX, GND, IO0: program download interface

3. Button S1: short press to switch mode, long press for 2S to clear password

4. Button S2: reset button

5.LED D4 (red light): relay working indicator light, lights up when turned on

6.LED D2 (red light): power indicator light

7.LED D1 (green light): mode indicator light, described as follows:
(1) When turned off, it is mode 1
(2) When 1S flashes once, it means waiting for the mobile APP to configure the WIFI account and password for the ESP8266 module.
(3) When it is always on, it means the TCP connection has been successfully established with the mobile phone.

8. Relay output terminal
COM1: public terminal
NC1: Normally closed terminal, short-circuited with COM1 before the relay is closed, and left floating after closing.
NO1: Normally open, the relay is left floating before closing, and short-circuited with COM1 after closing.

9. Relay control instructions (hexadecimal hex format)
Open the first relay: A0 01 01 A2
Close the first relay: A0 01 00 A1


Function features

  • Onboard ESP8266 chip
  • The module has 2 working modes

(1) Mode 1: The mobile phone is directly mounted on the ESP8266 chip
(2) Mode 2: The mobile phone and ESP8266 chip are mounted on the router at the same time

  • Transmission distance

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

  • Use Smartconfig technology to complete the configuration of the ESP8266 chip account and password on the mobile APP,The configured account number and password have a power-off memory function.
  • Onboard 5V, 10A/250V AC 10A/30V DC relay, which can be connected continuously for 100,000 times, has diode overflow protection and short response time
  • Onboard mode selection indicator light
  • Reserved ESP8266 chip program download interface


Use description

1.Tool software
(1) EspTouch_Demo software is used to configure the WIFI account and password for the ESP8266 module when using working mode 2 for the first time.
WF-5-1-5.png

(2)EasyTCP_20 software, used to send relay control instructions
WF-5-1-6.png


2.Preparation
(1) 5V/1A power adapter, connect the positive and negative poles of the power supply to the IN+ and IN- of the module respectively.
(2) Install the APP "EspTouch_Demo" on the Android mobile phone, which is used to configure the WIFI account and password for the ESP8266 module when using working mode 2 for the first time.
WF-5-1-7.png

(3) Install the APP "EspTCP_20" on the Android mobile phone, a TCP transmission tool, used to send relay control instructions, click "SWITCH"
Then long press the gray square in the interface to enter the name and content of the relay control command (the command format is HEX format)
WF-5-4-4.png WF-5-1-9.png

WF-5-4-5.png WF-5-4-6.png


3.Use description (1) Working mode 1 (the mobile phone is equipped with the ESP8266 module)
①Power on the module
②The mobile phone is connected to the AP hotspot signal sent by the ESP8266 module
WF-5-1-12.png

③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,Click the gray square to send instructions to control the switch of the relay.
WF-5-4-7.png WF-5-4-8.png

WF-5-4-9.png WF-5-4-10.png

(2) Working mode 2 (mobile phone and ESP8266 module are mounted on the router at the same time)
①When the module is powered on, press the KEY key to switch to mode 2. The green light will change from off to on once every 1 second, indicating that it is waiting for the "EspTouch_Demo" APP to configure its WIFI account and password.
②At this time, connect the mobile phone to the router first, open the "EspTouch_Demo" APP, enter the router password, and click "Confirm"
WF-5-1-19.png WF-5-1-20.png

③ Wait for the configuration to be successful. When the IP address of ESP8266 (such as 192.168.0.189) appears on the APP interface, it means that the ESP8266 module has successfully connected to the router and automatically memorized the account and password. It will automatically connect to Mode 2 next time.
WF-5-1-21.png WF-5-4-12.png
It should be noted that the IP address 192.168.0.189 is dynamically assigned to the ESP8266 module by the router. The address may change after the next reconnection,You can check the real-time IP address of the ESP8266 module in the router's device list.

④Open the "EasyTCP_20" APP, click "CONNECT", enter the IP address of the ESP8266 module: 192.168.0.189 and port number 8080, and then click "Connect"
After the connection is successful, the green light will flash slowly for 1 seconds and turn solid. Click the gray square to send instructions to control the switch of the relay.
WF-5-4-13.png WF-5-4-14.png

WF-5-4-15.png WF-5-4-16.png


Download LC-WF-4-2 user manual

For more information about the use of LC-WF-4-2, please view the Baidu network disk extraction code: cp3d