1Setting up ESP32 and relay module
1. ESP32 WiFi chip installation on Arduino IDE and sketch file
- Add the Arduino core for ESP32 WiFi chip (Click for steps to install Arduino ESP32 support on Windows)
I modified the WifiClientBasic example under the File >> Examples >> Examples for DOIT ESP32 DEVKIT V1 >> WiFi menu. Change the SSID and Password in sketch and upload it to the ESP32 board.
2. Connect the ESP32 PINs to relay module:
- 3.3V to +PIN
- GND to -PIN
- D23 to S (Signal) PIN
3. Connect the jumper cables to DC power jack supply sockets:
- Connect +PIN of the female socket with red cable to C (Common) PIN on relay module.
- Connect -PIN of the female socket with green cable to 12V out cable
- Connect NC (Normally Closed) PIN of relay module to 12V out cable
4. Connect the power cables
Plug the 12V adapter power cable to female power jack socket on the breadboard and 12V out cable to modem power socket.