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.
Hardware:
Software and Services:
Hand Tools :
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
Linux -> https://www.arduino.cc/en/Guide/Linux
Mac -> https://www.arduino.cc/en/Guide/MacOSX
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.
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.
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 ->
For this project, I have used Cayenne IoT Cloud server to operate the device. To create an account visit link: https://cayenne.mydevices.com
For this step will use the final code of the project given below-> SmartPowerStripv2_finalcode.ino
Below video shows the process to Setup and configures Cayenne cloud for smart power strip project:
Scheduling Feature - to automate device switching operation:
You can also use the mobile app to operate the device. Click here to download Android app
Above shown is the basic wiring connection to control four Electrical appliances (here 4 Light Bulb for demo).
You can go with wiring convention as followed in your countries. I have shown the most basic configuration.
Case 1:Neutral is given to all appliances while Live/Phase is connected via Switch
Case 2:Live/Phase is given to all appliances while Neutral is connected via Switch
Let us proceed for packaging. Using a screwdriver and wire cutter make an electrical connection shown in the next steps. I will be showing with and without 2way switch connection, you can go as per choice.
The first image shows the layout of the connection for understanding the wiring while rest are actually implementation.
Once done, so now you can test your smart wireless power strip.
But if you are interested to add a physical switch for two way connection, so follow further instructions given below.