back to index

Relay Powerstrip


The device is a three-plug powerstrip, with each plug independently controlled by a 12V relay. The purpose of the device is to control three power devices in a future home automation system.

The device uses relays rated to 10 amps on 220V AC, with diodes over their coils in the standard way used to protect the switching transistors from induced spikes.

Indication of power-on is done by a green LED connected in series with a 1k resistor over the relay coil.

The relay coils are connected together on the positive end, in order to use NPN transistors between their negative end and the ground.

The mechanics is made of three installation boxes designed to be mounted into the walls during installing electricity in houses; they are mounted together by pairs of M4 bolts, with holes for the power and relay wires drilled through their adjanced walls. The plugs are the ones designed to fit in them, the cheapest plainest kind.

The relays are mounted into the boxes using hot glue on their two sides (which holds them there surprisingly firmly). The same glue is also used to cover the unused pin from the relays (which is hot when the relay is off), and to hold the isolation tubes on the joints where the tube diameter wasn't suitable for snug fit and there was a risk of it sliding off. Great pain was undergone to keep the insulation distances between the hot parts and the relay control parts at minimally 6 millimeters; the relays used were US-made, according to lousy specifications, as Americans have more relaxed electrical safety specs. (I screwed up the purchase, next model will have better ones.)

Sample switch circuit

There are many possibilities for switching the relays. Here is a sample circuit for controlling the relays over a parallel port, using D0, D1, and D2 data lines.

The circuit requires external source of 12V DC, for the relays. It may be a wall wart, or the computer power supply - borrowing the juice from one of the unused disk power connectors is popular solution. The transistors Q1-Q3 are common NPN switching transistors. They have to be rated to the relay current, in this case about 50-100 mA. Some reserve is advised; 200-250 mA will be optimal middle ground. The R1-R3 resistors limit the base current of the transistors; about 2.2-4.7 kiloohm should be just about enough. Less if the transistors have low beta, more if high. The diodes D1-D3 are optional; their role is to protect the port in case something would happen with the transistors and the 12V power would attempt to sneak to the TTL circuitry of the port.

Modification using RS232 port is easy. Use DTR, RTS, and Tx signals instead of D0-D2; Tx signal can be controlled using the BREAK function of RS232 API; when break is set, Tx goes HI until break is reset.DTR and RTS are controlled as usual.


boxes before assembly

assembled box bottom

faceplates with LEDs before and after assembly

power strip attached, relays built in

detail of the power strip attachment

electronics done, plugs to go

detail of the relay

partially assembled plugs

fully assembled

detail of mounted plug

finished device

If you have any comments or questions about the topic, please let me know here:
Your name:
Your email:
Leave this empty!
Only spambots enter stuff here.