ESP-01/ESP-01s relay board

Lastly I grabbed some of these ESP-01(s) relay boards from AliExpress.


 

The board is cheap and nice, but offers room for improvement. The board comes with a reset button, but not a switch/button to toggle the relay. 🤦

First of all, when the ESP restarts or starts up the relay shortly switches on and off. This may not be an issue in all situations but switching relays for fun and especially that quickly will just wear it off much faster over time. And another noise in our noise polluted civilization that can be omitted is in my POV always a plus.

The solution: a 440µF 6V3 (6.3V) capacitor between the two pins of the PC817 opto-isolator (optocoupler). The positive side of the capacitor goes to the Anode(1) and the negative side goes to the Cathode(2) of the optocoupler. Also a 16V cap is ok, but the closer you can stay to the voltage you use, the better.

You need:

  • the relay board
  • a 440µF 6V3 capacitor (that you harvest from some old devices)
  • a soldering iron
  • ~ ten minutes

In this case I flipped the reset button to the bottom of the module to make room for the capacitor to be still able to fix the board in a case, but you can also solder the cap to the 2 pins on the bottom of the module.

 

Additionally, the other available GPIO, GPIO2 is not routed to some available pin on the board, which would be nice to use as a switch.

Just make sure that this GPIO2 is not HIGH during boot, otherwise the ESP will not come up. Reading a sensor is fine, but when you have a flip switch connected that is HIGH during boot, you will wait forever to finish the boot procedure.

And obviously there is more room for improvement, check out: https://www.instructables.com/How-to-use-the-ESP8266-01-pins/ 

Comments

Popular Posts