LC 2 and 4 Channel WIFI Relay Module - ajumalp/General GitHub Wiki
Overview
LC 5V ESP8266 2/4-channel WIFI relay module equip with to ESP-01 WIFI module and 8 bit high performance MCU, Only need simple configurations and then you can control the relay with cellphone APP under LAN area.
The esp01 is pre programmed to work with local network. It has 2 working modes.
Working mode
Cellphone carry on WiFi module directly
- Maximum transmission distance is 100m
- Before connecting to power, keep switch S1 pressed and connect to power.
- This will start the device in Hotspot mode. The red LED indicates, it's in hotspot mode.
- Connect your mobile to this hotspot
- The device can be controlled through the ip. Normally the IP is 192.168.4.1. You can check this mobile WiFi config.
- Download app WiFi Controller ESP8266 from play store
- Enter above IP Address [
192.168.4.1
] and port8080
- Press the new added device to move to next page
- There you can see many buttons. Long press on any one of them
- Give a name, Select HEX, type command as mentioned below [
A0-01-01-A2
] - Save and press the button.
cellphone and WiFi module carry on router together
- Signal transmission distance depends on router signal
Control command for relay (hex format):
-
Relay 1:
- Open:
A0-01-01-A2
- Close:
A0-01-00-A1
- Open:
-
Relay 2:
- Open:
A0-02-01-A3
- Close:
A0-02-00-A2
- Open:
-
Relay 3:
- Open:
A0-03-01-A4
- Close:
A0-03-00-A3
- Open:
-
Relay 4:
- Open:
A0-04-01-A5
- Close:
A0-04-00-A4
- Open:
If you want to know how to control the relay, here is a Sample Code.
If you upload this code to esp01, your old code will be removed and you cannot use relay module to have initial working