Archives

WiFi enabled multiplug

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.

Introduction

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:

Using my dremel, I cut a slot in the screwdriver in order to remove the security 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.

cutting the linefive separate pieces, I removed a bit of metal on each part so they wouldn’t seat too close to each other.

The next step is about putting the pieces back into the case, for that I used plastic spacers and some hot glue.

the height I need is roughly 1.5 spacer, as they are made of nylon I could just cut them using a knife.

the adapted support with the groove for the metal bit

Cleaning up a piece of the metal bit and put some solder on it, so the cable can be soldered on it

Result, each bit is insulated and a wire is soldered and routed towards the back of the multiplug

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.

Cutting a plexiglas piece that I will use as a support – using a knife to make a groove on it then breaking it works wonders!Checking out the layout of the components

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.

gluing the two relay board together in order to use the holes form the board on the left to attach the relays to the plexiglas

soldering the esp8266 + power module together

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:

looking good – still using the logic converters (bottom PCB) that I will soon change for transistors.

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>

Final assembly

The relay board acts as simple switches, so one pin is connected to the phase of the input. I used a metal ribbon to connect all these together.The other pin of the relay is then connected to a cable that will be connected to the multiplugDrilling the junction box to pass the cablessoldering the cables from the control board to the multiplug

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.