Building an Arduino-controlled power strip

Visit this project on GitHub.

This post is part of a series:
  1. Building an Arduino-controlled power strip
  2. Arduino power strip: More enclosure & more wiring
  3. Arduino power strip: Finishing touches, problems, and future improvements

My desk is a mess. When I built it I wanted to be able to switch every device on and off at a central location, so I bought a power strip with lots of switches and ran wires from there. Initially that worked fine, but with an increasing number of devices on and around my desk the mess started to increase as well. To solve this problem for now and (hopefully) forever, I want to build a power strip where each outlet is controlled individually by an Arduino. This allows me to run a single power line to the power strip from any outlet in the room while I’m still able to control every outlet from my desk and, if everything works as planned, even via network from everywhere else.

Let’s start with the “high voltage” side, the main components of which are a connector for the power cord, a relay module with eight channels, and eight power outlets. To protect the components, I use a connector with an integrated fuse holder and a 10 A fuse because the relays and the connector are rated for this current. Everything is wired together using stranded wire, wire connectors, and ferrules.

electrical components for the "high voltage" side

For the assembly, I started by making the front plate out of 6 mm (≈  1/4″) plywood. I cut it to size, which I chose as 220 × 220 mm (≈ 8 1/2″ × 8 1/2″), and laid out eight holes in two rows for the outlets. I also wanted to be smart and marked the positions of the screw holes with dividers and a square – nice try, but that didn’t quite work out as we will see later…

layout for the holes of the front plate

With a 44 mm (≈ 1 3/4″) hole saw, I drilled out the holes for the outlets and with a 4 mm (≈  5/32″) drill the holes for the screws. Instead of using my marked positions I just placed the outlets into the holes, aligned them by eye, and then marked the hole positions with a 4.5 mm (≈  3/16″) drill through the holes of the outlets. This worked pretty well and as you can see my previous markings weren’t quite at the right position, so this method was definitely the better choice. You should also use a backer board when drilling the holes to avoid tear-out, that didn’t avoid it completely in my case but I’m sure it helped.

finished holes from the back ... and from the front

Then I inserted the outlets, screwed them in place temporarily (of course I forgot to buy screws of the right size…), and wired neutral and ground in groups of four outlets together.

inserted and wired outlets

I then did the same thing with the inputs of the eight relays.

wired relays

The wire connectors will later be connected to the power input connector—that’s why there’s one free connection in the center of each connector—but that has to wait until the enclosure is finished and I know how long the wires need to be. The same is true for the wires connecting the outputs of the relays to the live terminal of the outlets. But that’s it for this post, stay tuned for updates.

Visit this project on GitHub.

This post is part of a series:
  1. Building an Arduino-controlled power strip
  2. Arduino power strip: More enclosure & more wiring
  3. Arduino power strip: Finishing touches, problems, and future improvements