My arduino controlled power strip build

timekiller

New member
Just finished my power strip and wanted to share. I'm very happy with the results. Special thanks to tastydog in this thread.


First, the parts list:

1 x Relay Board - Found here. This is an 8 port SSR relay board that can handle up to 6 amps per channel. It is also Opto-isolated and supports pwm (you'll see why this matters later).
8 x NEMA 5-15R 15AMP 125v 2-Pole 3-Wire Grounded Receptacles http://parts.digikey.com/1/parts/993...-208697-2.html
8 x SWITCH ROCKER SPDT 10A 125V - SRB24A2HBBNN http://parts.digikey.com/1/parts/970958-switch-rocker-spdt-10a-125v-srb24a2hbbnn.html. 3 position gives me the ability to override each outlet individually (I'll explain later)
2 x terminal blocks (found at lowes)
2 x solderable serial port
1 x serial cable
lots of 14AWG wire (black, white, green)
a little 22AWG wire (red,black)

And finally I needed an enclosure. Ideally, I would have liked to used something like this, however, at $100 a pop this was not realistic. I wound up gutting an old 100Mb/s switch I had in the closet. I used a grinder to cut out the original face plate and replaced it with some 16AWG sheet metal and held it together with some epoxy. If I happened to have a spot welder I would have used that and gotten a cleaner face.

On to some pictures:
Full album here.

The 100Mb/s switch before I gutted it.
20120328_200111.jpg


The back:
20120328_200122.jpg


The inside:
20120328_200413.jpg


The relay board hooked up to my arduino, controlling a single outlet
20120328_213916.jpg


Cut the faceplate and a new piece of sheet metal to replace it:
20120329_203741.jpg


New faceplate is epoxy'd in and I've marked where I will cut for the outlets. Also, you can see I've epoxy'd down the terminal bars. One for ground and one for Hot, which has a piece of plexiglass separating it from the chassis:
20120331_184156.jpg


All the outlets are in!
20120331_202548.jpg


I made similar cuts to get the switches in place and started wiring everything up. Because of spacing I had to have some wires closer to the heat sink than I would have liked. I am keeping an eye on the heat to make sure it isn't an issue.
20120401_014729.jpg
 
Here's another view of the switches:
20120401_014737.jpg

The serial port is in place and it's how I will control the relay board.

Here's a closeup of the terminal blocks:
20120401_014756.jpg


Closeup of the 5v wiring. The serial port has 9 wires coming in (8 +5v and 1 common). With the arduino, I set the common to LOW and can control each plug by setting it's corresponding pin to HIGH. Alternatively I can do an analog_write to set a pwm value.
20120401_014811.jpg


Here I have everything wired up except the actual plugs. These are connected to the lid, so I saved it for last:
20120401_024557.jpg


You may be wondering where my neutral lines come in. Here they are. There is a common Neutral bus on the relay board.
20120401_024611.jpg


Plugs wired up
20120401_111714.jpg


All closed up. You'll notice an extra hole here. I miscounted my switches and made an extra hole :(
20120401_113418.jpg


The other side
20120401_113433.jpg


Wired up to the arduino:
20120402_001518.jpg



So, there you have it! I still need to get the arduino and the lcd into a proper enclosure, but it is fully functional.
 
Couple of notes on why I did it this way:

First, by going the opto-isolated SSR route I have a much quieter power strip. No clicking from physical relays. Plus, as I said, the board supports PWM which means I can ramp up and down anything plugged in. I will use this feature to create an artificial wave/current with my powerheads. By ramping the powerheads up and down on a sine wave I should get some nice waving and flow on any corals I put in.

Next, the 3 position switch. Positions are "Relay, Off, On". Normal use will have everything set to "Relay". However, if I want to override anything, either on or off, I have that ability. This will be especially handy as I upgrade what the arduino is doing. I can manually set each outlet on or off, pull the arduino, reprogram it, then plug it back in and set the switches back. All seemless to the tank.
 
Great work. Your relay board looks like a good simple solution for this effect. Is this going to be part of a larger control project? I'm noticing the addition of the port for the arduino rather than integration.
 
Plus, as I said, the board supports PWM which means I can ramp up and down anything plugged in. I will use this feature to create an artificial wave/current with my powerheads. By ramping the powerheads up and down on a sine wave I should get some nice waving and flow on any corals I put in.

Unfortunately you'll soon find out that it doesn't quite work that way with AC motors. Controlling the speed of an AC motor is not a trivial exercise.

It also doesn't work that way with triacs. Those are the switches in the SSR. Once you turn a triac on, it doesn't turn off again until the next zero crossing. So you can't really PWM it.

But otherwise it's a nice build.
 
Great work. Your relay board looks like a good simple solution for this effect. Is this going to be part of a larger control project? I'm noticing the addition of the port for the arduino rather than integration.

Yes, the arduino will be a complete controller once finished. So far I have the power strip, and 2 temperature probes. I have a PH probe in the mail.

Right now the powerstrip is used to turn my lights (2x T5 bulbs) on and off. I will eventually do a custom LED build and simulate sunrise/sunset. I've already programmed in 5 normal modes and 2 overrides:

Normal modes:
Sunrise - simulated sunrise
Day - Fully lit
Sunset - simulated sunset
Night - simulated moolight
Sleep - all lights off

Overrides:
Feeding - powerheads off for 15 minutes
Maintenance - all pumps and heaters off, lights fully on

Once I have everything the way I want I'll post a full build with my sketch.
 
Unfortunately you'll soon find out that it doesn't quite work that way with AC motors. Controlling the speed of an AC motor is not a trivial exercise.

It also doesn't work that way with triacs. Those are the switches in the SSR. Once you turn a triac on, it doesn't turn off again until the next zero crossing. So you can't really PWM it.

But otherwise it's a nice build.

Hmm, that's a bit disappointing. The PWM function was not the only reason I bought this board, but it was a perk. I'm playing with the speed control sketch now. I'll still write it up and test and see what happens...
 
You could switch relay boards... I'll try to grab the model, but I'm using an opto-isolated set of relays. They use a 5v control for a 15Amp/125v load. They respond well to PWM and generate no heat.
 
Back
Top