This is only a preview of the May 2006 issue of Silicon Chip. You can view 39 of the 112 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "Lead-Acid Battery Zapper & Condition Checker":
Articles in this series:
Items relevant to "Universal High-Energy LED Lighting System, Pt.2":
Items relevant to "A Passive Direct Injection Box For Musicians":
Items relevant to "Remote Mains Relay Box":
Items relevant to "Vehicle Voltage Monitor":
Articles in this series:
Purchase a printed copy of this issue for $10.00. |
Remote Relay
By Ross Tester
This has to be one of the simplest projects ever:
it’s basically just a power supply, a relay and a
switch. Yet if you’ve ever had to safely switch
mains voltages, you’ll know this can also be
one of the handiest projects ever.
S
witching mains voltages is
pretty simple. All you have to
do is make sure the switch you
use is rated at 240VAC (or more) and
that it will handle the current you
expect to switch – with a little bit of
margin for safety.
Oh, then you have to ensure that
all the “bitey” bits are fully insulated.
And that the switch can’t work its way
loose. And that if one of the wires
breaks or works its way off, it can’t
touch anything else and make it live.
And that . . .
And what if you wanted to switch
240VAC mains some distance away
– say switching some garden lights
at the back of your yard from inside
the house?
Sure you can run mains cables from
the lights all the way to the switch
and back again but apart from the
expense, you now have mains-carrying cable which has to be properly
72 Silicon Chip
conduited, buried and marked with
locating tape so someone doesn’t put
a shovel through it somewhere down
the track!
Of course that means getting an
electrician in because you can’t
legally install fixed mains wiring
yourself . . .
It’s not quite as simple as you first
thought, is it?
All this assumes a mechanical
switch: one that is actuated by the
pressure of your fingers (or something
similar). But what if that switch needed to be actuated by something else – a
sensor of some sort, a computer output
or another relay in another project?
It’s now a whole new ball game.
Instead of a switch, you now need a
relay, rated to handle that same mains
voltage and current we talked about
earlier.
Here’s a good example: the famous
Dick Smith Electronics “Fun Way Into
Design by
Bill de Rose*
Electronics” books have quite a number of projects with relay-switched
outputs.
But none of those relays are suitable
for switching mains voltages. In fact,
there are specific warnings about doing so (apart from the fact that beginners and mains don’t mix well!).
The relay contacts in most cases
aren’t rated for 240VAC mains and
even worse, there are exposed tracks
on the PC board which were never
designed to carry mains.
If you need to have one of the “Fun
Way” projects – or anything like them
– switch a mains device on and off,
you need the project we are describing here.
As we said in the introduction, it
is very simple indeed: a power supply which will energise a relay if the
“switch” is in the on position.
That relay is rated to carry mains
voltages and it’s also rated to carry
siliconchip.com.au
Fig.1: when we said it was simple, we meant it! Just a simple mains power supply to drive a relay – and some form
of remote switch make up the project.
fairly high current – we’ll look a little
closer at this aspect later.
The “switch” can be any form of
device capable of closing and opening
the circuit. That includes a switch, a
relay or some form of switching semiconductor, such as a transistor – and
again, we’ll see how in a moment.
Because the switch is in the lowvoltage section of the circuit, it is
completely safe. So you can run a pair
of wires down the back yard – even
along the fence if you like – and they
can never hurt anyone. Importantly,
because they carry only the small relay
coil current (~60mA), the wires can
be quite thin, subject to voltage drop
over the distance.
The relay contacts are rated at
240VA and 10A – which, not coincidentally, is the maximum current
you can draw from a domestic power
outlet. The mains lead, too, is rated
at 10A.
But we’d be hesitant about drawing
10A through any “normal” extension
lead – we’ve seen too many melted
plugs and sockets.
Why the diode?
Most of the time, diode D1 does
absolutely nothing. And if you only
ever switched this circuit with a
mechanical switch, it isn’t even necessary. But if you switch it with any
form of semiconductor (a transistor,
for example, or a PC output), it becomes essential.
Normally (ie, with the relay energised) the diode is reverse-biased
(because the cathode is connected to
the positive supply), so it is turned off.
It’s only when power is disconnected
(ie, the switch is turned off) that the
diode briefly comes into play.
When the switch is opened, the
current which was holding the relay
coil energised suddenly drops to zero,
so the magnetic field around the relay
coil collapses.
This induces a brief but significant
The circuit
Now have a look at the circuit
in Fig.1. Mains power (240VAC) is
stepped down to a safe level (9V) by
transformer T1. This transformer has
a centre tap which is not used, so the
full 9V AC from the two red leads is
applied to the bridge rectifier, BR1. If
the 470mF filter capacitor was not in
circuit, we would have a DC voltage of
about 12V peak at the bridge output,
pulsating at 100Hz (double the mains
frequency of 50Hz).
The filter capacitor charges up to
the full peak voltage and tends to stay
charged at or near this voltage while
ever the current drawn is kept to a
reasonably low level. Therefore you
end up with close to 12V DC from a
9V AC transformer.
When switch S1 (whatever form it
takes) closes, current flows through
the relay, to switch whatever is connected to the mains output.
siliconchip.com.au
Fig. 2: the PC board overlay shows the components mounted on the top side (ie, non
copper side) as if in an X-ray looking through the board. Note how the board top
edges are shaped – these allow the lid to fit on the box. None of the external wiring is
shown in this diagram – this is to help you solder all components in the right places!
Compare this diagram with the photograph helow.
May 2006 73
Fig.3: follow this wiring exactly when
connecting the PC board, before putting it in
the case.
And never apply power to the PC board
when it is outside the case or if the lid is not
screwed firmly on. It is dangerous!
voltage in the relay coil with the reverse polarity to what was there under
power. You may see this described as
a back-EMF (EMF stands for electromotive force).
It’s called a “spike” and it can briefly
measure several hundred volts! Even
though the voltage is high (and you
can feel it tingle if you get your hands
across the relay coil terminals), it is
of such short duration that it is quite
harmless to us.
But it is not so harmless to any
semiconductor which happens to be
switching the device. The spike may
greatly exceed the safe working voltage of the semiconductor and can (and
often does!) destroy it.
So we include a reverse-polarity
power diode across the relay coil
which effectively short-circuits that
voltage spike, making it harmless.
Building it
The first thing to do is check your
PC board for any defects. What you
are looking for is under-etching, where
tracks might be shorted together; overetching, where tracks might be broken,
or sometimes holes which haven’t
been drilled or haven’t been drilled
to the right size. Fix any defects that
you find.
You’ll also need to shape two corners of the PC board with a file to enable it to fit into the case – this is best
done before soldering any components
on. Fig.2 shows the component layout
of the PC board.
There are only four components to
solder on, one of which is the relay and
it will only fit one way. The other three
are all polarised; that is, they must be
soldered in the right way around or the
project won’t work. All components
should be mounted as far down on the
PC board as they will easily go – but
don’t force them.
On diode D1, note which end the
band (cathode) is – it’s easy to get
right. Likewise, the polarity marks on
the capacitor: most have a row of “-”
symbols down the side closest to the
negative lead. Sometimes, though, you
will find capacitors with + markings
instead – but they too are pretty easy
to identify.
The last polarised component is
the bridge rectifier, BR1. It will have
either moulded or printed “~” (tilde)
symbols on two of the legs marking
the AC inputs. Get these right and
the + and – leads, which should also
Fig. 4: where to drill the holes in the side and end of the Zippy Box for the switch terminal block (left) and cables glands.
74 Silicon Chip
siliconchip.com.au
Compare this photograph with the diagram at right. In this shot, you can clearly see four of the five cable ties we added
around wiring to keep it all together, along with the nylon screws and nuts which secure the two-way terminal block.
be identified, should drop into the
right holes.
The only two bits left are the relay,
which we have already mentioned and
the power transformer. It screws to the
PC board with M3 bolts and nuts –
make sure you tighten them well and
also use a star washer under the nuts
to prevent them vibrating loose.
The two red wires from the transformer (the 9V AC secondary) solder
to the PC board alongside the transformer, next to the bridge rectifier.
Switch wiring
The remote switch connects to the
circuit via a pair of spring-loaded
terminals mounted on the outside of
the case. To do this you will first need
to drill some access and mounting
holes in the case – see Fig.4 for drilling details. The terminal block should
be mounted on the case with Nylon
screws and nuts.
Inside the case, these connect to the
appropriate point on the PC board via
short lengths (say 70mm) of hookup
wire. Normally, using a standard
switch, polarity will not be important.
But if you are going to switch the relay
via a PC, transistor switching, etc,
polarity is important so you should
use red and black wires on the same
(Left): the input and output
mains leads (which are an
extension lead cut into two)
pass through cable glands
which grip the cables and
hold them tight.
(Right) the switch
connections, being low
voltage, use a speaker
terminal with wires going
off to the switch
siliconchip.com.au
May 2006 75
The PC board is not screwed in but slides down two pairs of guides adacent to the corner posts. The edges of the board
are shaped to allow the lid to fit on. The final cable tie, added after the PC board is slid into place, is the one which goes
around all accessible mains wires – the one right in the middle of the picture.
colour terminals, with the red wire
going to position A1 on the PC board
and black to B1.
Fit short lengths of heatshrink sleeving over the entire length of each wire,
including the solder terminals and
shrink them on with a hot-air blower
or with your soldering iron brought
very close to (but not touching) the
sleeving.
Mains wiring
The kit will be supplied with a 2.5m
mains extension lead, which must be
cut and the various wires soldered
to the appropriate points on the PC
board. It doesn’t matter where you cut
the lead – ours was half way but your
application might require the relay
box closer to the power point or closer
to the other end – it’s up to you.
Start by drilling the mains input
and output gland holes in the case
(see Fig.4).
Then cut the mains lead where you
want to and remove about 70mm of
outer insulation. Take extreme care
when you do this that you do not nick
or damage the insulation of the mains
wires underneath. Remove the inner
insulation of all wires so you have
about 20mm of bare wire.
Fit the two glands to the case and
tighten them. Now slide the gland cov76 Silicon Chip
ers over the wires and then pass the
wires through the appropriate glands
(input to the bottom, output to the top
with the switch connector on top of
the case) but do not tighten the gland
covers yet.
You will find it easier if you pull
at least half a metre of cable through
the glands to allow you room to solder
the wires to their respective places on
the PC board. They are all identified
– just make sure you don’t mix up the
input and output cables or the Active,
Neutral and Earth wires: Active wires
are the brown ones, Neutral are blue
and the Earth wires are green with a
yellow stripe.
Push the bare ends of the mains
wires through their appropriate holes
in the PC board but before soldering
the mains wires in place, twist the bare
ends of adjacent wires together under
the PC board using a pair of pliers. This
gives them some mechanical stability
in case the soldered joint gives way.
Before soldering, check that you
have only twisted together pairs of
actives (brown) and pairs of neutrals
(blue). If you are satisfied that all is
well, solder the twisted pairs to the
PC board.
When soldered, pull the cables back
out through the glands so that only a
couple of millimetres of outer insula-
tion shows inside the case. Tighten the
gland covers which will then grip the
cables tightly.
The PC board is not screwed into
the case – it slides down a pair of PC
board guides, closest to two of the
corner pillars. As you slide the board
in, tuck any of the mains wires in and
make sure that none emerge outside the
case when the lid is placed in position.
Cable ties
Five small cable ties are fitted to the
wiring inside the case – their positions
can be seen in the opened out and
“assembled” photographs.
They’re not just there to make it all
neat – though they do that! The reason
for fitting these ties is to ensure that
any loose ends cannot move around
in the unlikely event that any of the
wires comes loose.
As well as a cable tie securing
the “switch” wiring (ie, from the PC
board to the spring terminals) we
also covered both of these wires with
lengths of heatshrink tubing – up to
and including the solder terminals on
the back of the terminals.
You might wonder why this is
needed, as these wires are in the low
voltage part of the circuit. The reason,
once again, is safety: because these
wires are likely to be hookup wire,
siliconchip.com.au
Parts list –
Remote Mains Relay
1 UB3 Zippy Box (130 x 68 x
44mm); [DSE H-5003] with
front panel label
1 PC board, code ZA-0017,
125mm x 38mm
2 cable glands, 4-6mm diameter
1 polarised spring terminal block
1 mains extension cord with
moulded 240V plug and
socket, length to suit
1 mains transformer, 9V AC
secondary (DSE M-2840)
1 relay, 12V (200W) coil, SPDT
contacts rated at 10A, 240V
(DSE P-8010)
1 1N4004 silicon power diode
1 W04 bridge rectifier, 400V <at>
1.5A (DSE Z-3304)
1 470mF, 25V electrolytic
capacitor
2 10mm M3 screws with nuts
and shakeproof washers
2 10mm M3 nylon screws with
nuts and shakeproof washers
5 small cable ties
Short lengths red and black
insulated hookup wire
Short lengths heatshrink tubing
2-core cable and switch as
required for remote switching
(see text)
Where to get the kit . . .
This project was devised and produced by Dick Smith Electronics,
who retain copyright of the PC
board pattern. A full kit of parts
(Cat. K-3041) is available from
all Dick Smith Electronics stores
and DSE online (www.dse.com.
au) for $34.80
their insulation is almost certainly
not mains rated. If any of the mains
wires come loose and happen come
into contact with the switch wires, we
want to ensure that their insulation is
more than good enough to prevent any
possibility of mains voltages getting
through to the switch terminals, the
switch or its external wiring.
That’s also the reason we use nylon
screws and nuts to hold the spring
terminal plate in place.
Finishing off
The kit should be supplied with a
siliconchip.com.au
Just some switching options . . .
Here we show three different possibilities for using the relay box (yes, there are
many more!).
At the top is conventional switching, using virtually any form of switch you can lay
your hands on. Or, as we said in the article, even twisting together two bare wires!
Next down is using a project relay circuit to switch this relay (as we mentioned, many
relays used are not mains rated – this is the way to switch mains using these relays).
You would normally connect as shown to have the circuit operate when the project relay
pulls in; however you can have the reverse with the relay box relay operating when the
project relay drops out simply by connecting to the “NC” and “COM” terminals instead
of the “NO” and “COM” as shown here.
The third circuit shows how to use a transistor to switch the relay box. With an NPN
transistor as shown applying bias to the base will cause the transistor to turn on and the
relay box relay to pull in. Again, this could be reversed by switching with a PNP transistor
with its base normally held down to earth via a resistor; a voltage applied to the base
would turn the transistor off and the relay box relay would drop out.
self-adhesive label; if so, fix it in place
and put the lid on the box. The four
screws are hidden by small pips. Apart
from testing, you have now completed
the Relay Box.
Testing
Don’t plug it in yet!
With your multimeter on a low
Ohms range, check to see that you have
continuity (zero ohms or close to it)
between the two earths on the plug and
socket and between the two neutrals
on the plug and socket. Check that you
have no reading between the actives
on the plug and socket and between
any pins on the mains plug and socket
and the switch spring terminals.
If you have the opposite on any of
these tests, something is seriously
wrong and must be fixed before powering up.
If all is well, plug into power and
use, say, a 240VAC bedlamp or other
240V device on the socket end. Turn
power on – both on that device and the
mains outlet to which the relay unit is
plugged in – and absolutely nothing
should happen!
Now short out the switch terminals
with a short length of wire and the
light should come on. Remove the
short and the light should go out. It’s
that simple!
SC
*Dick Smith Electronics
May 2006 77
|