OwenDuffy.net 


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.

Module

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

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

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

Example config file:

{
"cfgver": 1,
"wifi": {
"ssid": "",
"pwd": ""
},
"staticip":{
"address":[0,0,0,0],
"mask":[255,255,255,0],
"gateway":[192,168,0,20]
},
"hostname": "EspRelay-2x30A",
"login": {
"user": "",
"pwd": ""
},
"outputs": [
["Radio",16,false,false],
["Computer",14,false,false]
],
"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.

Links

 

Changes

Version Date Description
1.01 08/04/2022 Initial.
1.02    
1.03    
1.04    
1.05    
1.06    
1.07    
1.08    


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