Wednesday, December 19, 2012

Solid State Relay Switched Mains Rig


For a number of my upcoming projects I need a rig to test the functionality of a solid state relay that would be driven by a microcontroller and switch the mains for other devices. Having done projects with similar requirements in the past I remembered how much pain it was to test the solid state relay (SSR) with naked mains cables running around, etc. This time I decided to create a marginally more sophisticated setup that would allow a quick, easy and safe way to do this. Also, now that I have made this once, I can reuse this rig in any future project with zero effort. Making this took about a day's work - most of the time was spent on finding materials that suited my needs.

This mains output is switched by a solid state relay, baby! :)


Most of the parts I have recycled from old, discarded household devices, computers, etc. The only item that got specifically for this project is the solid state relay or SSR: it's a cheap one that can handle 25A on its switched end.

An old, non-working printer (?) power supply has kindly donated its enclosure for this project. I just needed to make some minor adjustments for the sockets and cables passing through it and the enclosure story - the most difficult part of any project (for me) - was over!

As the mains input I chose a PC power cable, just cut off the end (that usually goes into the PC) and connected it directly to the appropriate terminals.

For the switched output I salvaged a female, panel-mounted 3 pole socket, recycled from an old and unusable UPS.

The control signal arrives to the unit through another cable borrowed from a non-working printer - I even left the barrel plug on it, so that I can easily connect to my bread boards easily.
Finally, I used some sticky rubber feet salvaged from some old satellite receiver so that it can stand nicely, without scratching whatever it is on.


First I gutted the power supply - I kept some parts from it for future projects and threw away the rest. Then I laid out all the components in it to make sure everything fits nicely. Using a Dremel I widened and deepened the hole on the sides for the (output) socket and the (input) cable.

Also, with the Dremel I created 3 new holes: one on the side for the cable of the control signal and two on the bottom for fixing the solid state relay.

These two screws hold the solid state relay in place.

The solid state relay is already secured and the control signals are attached.

It turned out that the output socket was too high and did not have any support at its bottom, so I cut a couple of rectangle shapes (of the dimensions of the socket profile) out of some left over 1mm thick polystyrene sheet and I superglued them to the bottom of the socket to provide a solid base for the socket.

While the glue was drying a huge "peg" was holding it in place.

When dried the base is so strong I couldn't tear them apart with my hands.

After this only the connections had to be made which are trivial:
Yellow-green: connected between the input and output as well as the back of the solid state relay.
Brown: goes straight from the input to the output.
Blue: the input is connected to one of the relay's switched terminals. Another piece of blue cable goes from the other terminal to the switched output.
Red and grey: control signals.

All the mains connections in place.

I created a small circle of hot glue on the input and control cables to prevent accidental cable strain.

The input and the control cables.

After attaching the sticky rubber feet it's ready for the next experiment!

I could have complicated the circuit a bit further. An LED on the enclosure showing if it's on or off would be nice (the enclosure even has a dedicated place for it), but in my case it's not necessary as the switched circuit will give feedback on the state of the relay. I could have used sockets and connectors on all IO. I decided not to so that it's simple and compact.