Hi, I have this https://www.aliexpress.com/item/1PCS-NE ... 49680.html which want to control with ESP32. But not sure how do I connect to this relay to ESP32.
Anyone knows how to do connection ?
How to connect ESP32 to relay
Re: How to connect ESP32 to relay
It looks like a clone of the v1 Wemos Relay Shield.
So, looking at the schematic, the control pin is D1 and you'll need to connect 5V and GND.
Note that the v2 Relay Shield allows the control pin to be selected; a little nicer.
Also, while you can easily wire this to any ESP32 - or indeed any micro - if you want to use the Wemos Shield form factor you can use ESP32 boards that supports that pinout. I've used the TTGO Mini 32 for this use - the inside row of pins is a superset of that Wemos shield layout. Then you can just plug the shield directly into the micro board.
So, looking at the schematic, the control pin is D1 and you'll need to connect 5V and GND.
Note that the v2 Relay Shield allows the control pin to be selected; a little nicer.
Also, while you can easily wire this to any ESP32 - or indeed any micro - if you want to use the Wemos Shield form factor you can use ESP32 boards that supports that pinout. I've used the TTGO Mini 32 for this use - the inside row of pins is a superset of that Wemos shield layout. Then you can just plug the shield directly into the micro board.
Re: How to connect ESP32 to relay
Please do not use that V2 shield https://wiki.wemos.cc/products:d1_mini_ ... lay_shield for switching mains voltage, if the other parts of the circuitry, like the ESP8266 pins or USB, can be touched. It is NOT safe! If you want to use it, put everything in a box with proper isolation and do not connect USB.
-
- Posts: 18
- Joined: Sun Sep 16, 2018 6:33 pm