WiFi relay controller - ESP12F_Relay_30A X2_V1.1

*** DRAFT ***

This article describes a WiFi connected remote relay controller implemented using a ESP12F_Relay_30A X2_V1.1 board.


Fig 1: 

Fig 1 shows the top side of the module. The SM regulator is a LM2596 on this board.

Datasheets are availble online for the SLA relay. Though rated at 30A, that is for resistive loads, its motor rating is 1HP, 16A. The relay has 1xC form contacts, single pole with NO and NC contacts.

Fig 2: 

Fig 2 shows the under side of the module after resolding a couple of pins, removing solder splashes from manufacture, inserting the header pins, cleaning the flux and a heavy coat of clear acrylic PCB lacquer. This stuff is Chinese Quality, you need to go over it with a magnifier... especially in areas subject to mains voltage. This is actually a fairly good board design, lots of distance between the relay tracks, and the board routed out to reduce the risk of tracking where the distance is smaller.

Programmer hardware

There is lots of programmer hardware that may suit, this article describes two options.

Improved ESP01S programmer

This programmer is designed and sold for the ESP01S target, it is quite cheap (<$10 shipped) and quite suitable to this project.

Fig 3: 

Fig 3 shows an improved programmer for the ESP01S costing <$10 online and incorporating the auto program circuit. The above module has a CP210x USB chip and contains the auto program circuit (note the two small transistors at the top edge).

This programmer can be used with many of the ESP relay boards, the following pics show the cabling for this particular board. The target board must be powered separately to enable programming.

Fig 4: 

Fig 4 shows the relay board connections.

Fig 5: 

Fig 5 shows connections to one side of the programmer header.


Fig 6: 

Fig 6 shows connections to other side of the programmer header.


ESP-Prog is from Espressif.

Fig 7: 

Fig 7 shows board connections.

Fig 8: 

Fig 8 shows an ESP-Prog costing <$25 online and incorporating the auto program circuit. The above module has a FTDI chip and contains the auto program circuit. The pic shows individual jumpers (ie 6 x 1W), but you can extract the pins and fit them to a 6W shell for convenience (as I did after the pic).


Configuration is read from file config.json in the LittleFS on-board file system.

Example config file:

"cfgver": 1,
"wifi": {
"ssid": "",
"pwd": ""
"hostname": "EspRelay-2x30A",
"login": {
"user": "",
"pwd": ""
"outputs": [
"inputs": [

Web interface

Fig 9: 

Fig 7 shows the web form for interacting with the controller.

With four relays operated, it draws 150mA @ 13.8V. The board contains a SMPS which does not seem to have serious RF emissions.




Version Date Description
1.01 08/04/2022 Initial.

© Copyright: Owen Duffy 1995, 2021. All rights reserved. Disclaimer.