This instructable shows how you can build your own easy or simple DIY Internet-connected Smart Power Strip to control Electrical Appliances from remotely.
You can also automate the daily repetitive task with scheduling feature, so the appliance will automatically be turned on and off on set timings.
WARNING: This project includes work around HIGH VOLTAGE 230V and HIGH CURRENT 5A. Electricity is dangerous so please be careful!!! You must have at least basic knowledge of Electricity or electrical wiring otherwise attempt this project under the supervision of an electrical expert. I will not be responsible for any damage caused due to improper handling.
Step 1: Things Required for Project
- Smart Power Strip Controller Board (4Channel) x1
- Electrical Components(Purchased from local Electrical shop)
- Electrical Switch box x1
- Electrical Socket 3pin (you can also use 2 pins) x4
- Live/Phase indicator x1
- Plug wire 2 pin x1
- 2Way Electrical Switch (optional, needed only if interested to control device from the physical switch also) x2
- Some electrical wires for connection (10-12AWG or around 2mm diameter).
Software and Services:
Hand Tools :
- Multitool, Screwdriver Wire
- Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Step 2: Arduino IDE Installation and Wemos/ESP8266 Configuration
Pre-Requisite: We need Arduino IDE software installed in PC/laptop and configure Wemos D1 board to IDE for programming.
1) Arduino IDE setup:
Follow the Arduino official link below to install Arduino IDE on your respective OS:
Windows -> https://www.arduino.cc/en/Guide/Windows
For Windows and Mac, it is pretty straight forward to install, no major problem faced during installation. But Linux user especially beginners find some issue regarding Arduino installation of which most common serial upload error issue (“avrdude: ser_open(): can’t open device” ) during the first time installation. So, I recorded a video which you may follow as shown below.
2) Configure Wemos D1 board to Arduino software:
Actually, Wemos D1 board is made using the ESP8266 chip. So, to add Wemos to boards list we will have to follow steps given on esp8266 GitHub link: https://github.com/esp8266/Arduino
The process is simple but While configuring it in Arduino on Linux/Ubuntu I got an error related to python. So I recorded video on how to resolve and configure properly which you may checkout as well.
Step 3: More About Controller Board
Control the board is equipped with most familiar ESP8266 based Wemos d1 microcontroller and 4 Relay to operate 4 Electrical devices.
No headache of jumper wires and separate power adapter. This board is equipped with onboard AC(230V AC) to DC power module (5W and DC5V).
Check out the details of pin connection going from Wemos D1 to the various part on the baseboard and other breakouts which are available is shown in the above images.
Wemos D1 —> Relay
GPIO15 (D8) — R1
GPIO13 (D7) — R2
GPIO12 (D6) — R3
GPIO14 (D5) — R4
Breakouts are provided in case if you are interested to experiment i.e want to add some sensor like temperature, humidity or security PIR motion sensor.
Step 4: Initial Test
So, now let us first check the working of control board before proceeding for the next steps. For this just copy and paste code to Arduino IDE provided below -> smartpowerstrip_testcode.ino
Verify and upload it to the control board by selecting the proper board and configuration as shown in the video ->
Read more: Smart Power Strip With Cayenne Cloud