I really love these esp8266 modules, they allow me to automate my home for cheap. Some weeks ago I made a WiFi enabled multiplug, that can individually drive the 5 ports of a power bloc.
As my home automation system progresses, I’m looking for new ways to control my appliances. I got a couple of RF controlled plugs, they are great and very cheap:
The downside of these devices is that they are really large, they take several spots on a multiplug and stick out quite a bit. It makes it almost impossible to control several plugs at the same place.
Here comes the solution, with my trusted esp8266 and a couple of relays, I should be able to modify a multiplug to separately control each plug on it. With WiFi of course!
Modifying the multiplug
first off, opening up a multiplug is not an easy task – it is NOT made to be opened. All of mine were using security screws, and I had to modify a screwdriver in order to remove the screws:
Once open, the multiplug looks like this:
on top you can see the ground metal bit, and on the bottom the two lines. My goal here is to cut the bottom one into 5 different pieces that would allow me to control each plug separately.
The next step is about putting the pieces back into the case, for that I used plastic spacers and some hot glue.
After that I installed a vinyl sleeve for the cables so it looks nice and closed the multiplug back.
At this point I have 7 cables going out of the plug, one “earth” one “neutral” and 5 “phases”.
The control board
Now that the multiplug is ready, let’s start on the control board, it will contain 5 relays, an esp8266 for the control part and finally a power module for the boards.
The components I used are:
- (top left) AC-DC power supply – gives you 5V/1.6A
- (bottom left) DC-DC converter to convert 5V to 3V for the esp8266
- (bottom, x2) logic level converters – they allow you to convert a 0/3.3v logic level to 0/5v – I ended using transistors instead.
- (bottom right) the esp8266 WiFi module
- (top right) the relay board, one with 4 ports and one with one port.
- you can see the two 1×8 headers for the esp8266in the middle of the board
- the header connected to the orange cables is to control the 5 relays
Now let’s install the spacers on the plexiglas:
Now that the board is ready, let’s program it so we can control the plugs individually.
Programming the board
I use a similar structure for the software as for my other projects, check the GitHub project here: <link>
Warning: I used “hearth” cable color (green/yellow) for a phase, this is extremely hazardous and should never happen – In the final version of this project I switched these cables for brown cable.
Next time I’ll write about the software and give some pictures of the final version.