LC-WF-9-1

From LCWIKI
Jump to: navigation, search

Product name

ESP8266 ESP-01/01S 1-channel WIFI relay module.


Overview

LC 5V ESP8266 1-channel WIFI relay module uses ESP-01 as the WIFI module and cooperates with ST's mature and stable 8-bit MCU chip. It only requires a simple configuration process to achieve wireless control of the relay in the local area network using the mobile phone APP.
LC-WF-9-1-1.png


Features

  • Onboard high-performance microprocessor STM8S103 and ESP-01WiFi module
  • The module has two working modes

1.The mobile phone is directly mounted on the WiFi module
2.The mobile phone and WiFi module are mounted on the router
Additional function: Can be used as a USB relay when ESP-01 is unplugged

  • Transmission distance

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

  • Using smartconfig technology, you can complete the configuration of the ESP-01 WiFi module account and password on the mobile APP. The configured account and password have a power-off memory function.
  • Onboard 5V, 10A/250V AC 10A/30V DC relay, which can be continuously switched on for 100,000 times. It has diode overflow protection and short response time.
  • Onboard mode selection and real-time working status indicators.
  • Reserved UART debugging interface and STM8 SWIM program download interface.



Interface Description

Logo Description
IN+、IN- 5V power input
TX、RX UART serial port pins
S1 Mode switch, default is mode 1
S2 Restore factory mode
D2 Relay switch indicator light (red light)
D7 Mode 1 indicator light (red light)
D5 Mode 2 indicator light (blue light)
D6 Working status indicator light (green light)
Off means self-configuration is in progress or the connection with the router is lost.
Flashing quickly for 0.5S means waiting for the mobile APP to configure the WiFi account password for the ESP-01 module.
When it flashes slowly for 2S, it means the configuration is completed and waiting to establish a TCP connection with the mobile phone.
When it stays on, it means the TCP connection is successfully established with the mobile phone.
COM Public end
NC Normally closed end, short-circuited to COM before the relay is closed, and left floating after the relay is closed.
NO Normally open end, the relay is left floating before closing, and short-circuited to COM after closing.
  • 2 reserved jumper caps:During normal use, please plug them both to the bottom (that is, RX is connected to RX1, and TX is connected to TX1). If you want to use the USB to TTL serial port module alone to debug the ESP-01 module, please plug them both to the top (otherwise there may be interference).
  • Relay control instructions (hexadecimal hex form):

Open relay: A0 01 01 A2
Close relay: A0 01 00 A1



Instructions for use

Preparation before use
1.5V/1A power adapter, the positive and negative poles of the power supply are connected to the IN+ and IN- of the module respectively.
2.Install the APP "EspTouch_Demo" on the Android phone, which is used 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 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 2-way relay control instructions (the instruction format is in HEX format)
LC-WF-9-1-3.png LC-WF-1-2-4.png

LC-WF-9-1-5.png


Mode 1:
1.Plug in the ESP-01 module and power on the module. After about 4 seconds, the green light will change from off to slow flashing for 2 seconds, indicating that the configuration is complete.
LC-WF-9-1-6.png

2.The mobile phone is connected to the AP hotspot signal emitted 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 slow flashing for 2 seconds to solid light. Click the gray square to send instructions to control the switch of the relay
LC-WF-9-1-8.png LC-WF-1-2-10.png

LC-WF-9-1-10.png LC-WF-9-1-11.png


Mode 2:
1.Plug in the ESP-01 module, power on the module, wait for the green light to flash slowly, and then press the S1 key to switch to mode 2. The blue light will light up. After about 1 minute, the green light will turn from off to flashing quickly for 0.5S, indicating that it is waiting "EspTouch_Demo" APP configures WIFI account and password for it.
LC-WF-9-1-12.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 memorized the account and password. It will automatically connect next time it enters mode 2 ( it will take about 20-60 seconds 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. 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 the port number 8080, and then click "Connect". After the connection is successful, the green light will flash slowly for 2 seconds and become solid. Click on the gray square to send commands to control the switch of the relay.
LC-WF-9-1-17.png LC-WF-1-2-18.png

LC-WF-9-1-10.png LC-WF-9-1-11.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, wait for the green light to flash slowly for 2 seconds, then open the serial port debugging software (such as SSCOM32) on the computer, select the baud rate of 115200,Send A0 01 01 A2 in hexadecimal (hex) form to turn the relay on; send A0 01 00 A1 in hexadecimal (hex) form to turn the relay off.
LC-WF-1-2-22.png