This is only a preview of the November 2006 issue of Silicon Chip. You can view 37 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 "Build A Radar Speed Gun, Pt.1":
Items relevant to "DC Relay Switch For High-Current Loads":
Items relevant to "LED Tachometer With Dual Displays, Pt.2":
Items relevant to "PICAXE Net Server, Pt.3":
Purchase a printed copy of this issue for $10.00. |
By JOHN CLARKE
Con t r ol h i gh - cur r en t loa ds w i t h t h is
DC Relay Switch
Want to switch power to a high-current load
using a circuit capable of supplying just a
few milliamps? No problem – build and use
the SILICON CHIP DC Relay Switch.
I
T’S OFTEN NECESSARY to switch
power to a device that requires a
current of several amps in order to
drive it. The problem is, the device
that’s required to do the switching
may only be capable of supplying just
a few milliamps. Such a circuit might
be capable of switching on a LED but
that’s about all.
The way around this problem is to
use a relay with heavy-duty contacts
to switch the power. However, your
electronic switching circuit may not
even have sufficient power to drive a
relay coil – at least not directly.
This DC Relay Switch board is the
answer to that type of situation. It
utilises a heavy-duty relay with 30A
Main Features
•
•
•
•
•
•
•
•
Automotive-style high-current relay
Operates from 12V DC power supply
Suitable for low-voltage switching only (up to 50V DC)
Activated by low current
Isolated input to provide flexible switching options
Can be activated using a low-voltage AC signal or an oscillating signal
Relay-on LED indication
Normally open (NO) and normally closed (NC) relay output terminals
76 Silicon Chip
contacts, runs from a 12V supply and
requires just 400mA of signal to trigger the relay. That’s made possible
by using an optocoupler and some
simple electronic circuitry to drive
the relay.
What’s more, the input trigger signal
does not have to be ground referenced.
This means that you can drive the relay
board from just about any DC signal,
whether it normally sits at around
12V, 5V or 0V. It can even be driven
by low-voltage AC or by a signal that
is rapidly switching on and off.
Current drive
In practice, the DC Relay Switch
requires a current to drive it rather
than a voltage. A signal current of just
400mA or more switches the relay on
and when there is no current, the relay
switches off.
In practice, this means that you can
drive the relay switch board using an
external circuit that normally drives
a LED. When the LED is on, the relay
is on and vice versa. Alternatively,
the relay board can be connected so
that the relay is off when the external
LED is lit.
If the LED is multiplexed (ie, switch
ed on and off) at a fast rate, then the relay
board can be configured to switch on the
siliconchip.com.au
Parts List
Fig.1: the circuit is triggered by applying a signal to optocoupler OPTO1.
When the phototransistor in OPTO1 turns on, it turns on transistor Q1 and
this then turns on transistor Q2 which drives the relay and LED1.
relay while ever the LED is being driven
by the switching circuitry. A LED on the
DC Relay Switch board provides on/
off indication for the relay (ie, it lights
when the relay switches on and goes
off when the relay is off).
As shown in the photos, the DC
Relay Switch comprises a small PC
board that includes the relay, the optoisolator, two transistors and various
other minor components. It is powered
from a 12V DC supply via an on-board
screw terminal block. A second 2-way
screw terminal block is used for the
trigger signal inputs.
External connections to the relay
contacts can be made using either PCmount spade connectors or a 3-way
screw terminal block. The spade
connectors are best for high-current
applications.
Finally, the PC board can be fitted
inside a small plastic (UB5) utility
case, if this is required.
OPTO1 from breaking down and dissipating too much power if a reverse
voltage is applied. In this case, D3
conducts and limits the voltage across
the LED to a safe value (ie, to about
0.6V).
When current flows in the optocoupler LED, the optotransistor
conducts and supplies base current
to transistor Q1 via the 22kW resistor
from the 12V supply rail. This switches Q1 on which in turn switches Q2
on via its associated 1kW base resistor.
And when Q2 switches on, relay RLY1
also switches on, as does LED1.
The 10kW resistor between Q1’s base
and ground ensures that Q1 switches
off when the phototransistor in OPTO1
turns off. Similarly, the 1kW resistor
between Q2’s base and emitter ensures
that this transistor switches off when
Q1 switches off.
The 1mF capacitor on Q1’s base is
necessary if the input is driven using
How it works
OK, let’s see how the circuit works
– see Fig.1.
As shown, the input trigger signal is
applied to the LED inside optocoupler
OPTO1 via a 1kW resistor. This resistor limits the LED current to less than
12mA for a 12V signal and to less than
5mA for a 5V signal.
Diode D3 prevents the LED inside
siliconchip.com.au
1 PC board, code 05211061, 46
x 61mm
1 UB5 box, 83 x 54 x 31mm
1 SPDT PC mount horn relay
(Jaycar SY-4072, Altronics S
4206A or equivalent) (RELAY1)
2 2-way screw terminal connectors (5.08mm pin spacing)
1 3-way screw terminal connectors (5.08mm pin spacing)
3 PC mount 6.4mm spade connectors
1 2-way pin header (2.54mm pin
spacing)
4 M3 x 12mm countersunk Nylon
screws & nuts
4 3mm Nylon washers
4 M3 nuts
1 jumper shunt
Semiconductors
1 4N28 optocoupler (IC1)
1 BC549 NPN transistor (Q1)
1 BC327 PNP transistor (Q2)
2 1N4004 1A diodes (D1,D2)
1 1N4148 diode (D3)
1 3mm red LED
Capacitors
1 220mF 16V PC electrolytic
1 1mF 16V PC electrolytic
Resistors (0.25W, 1%)
1 22kW
1 2.2kW
1 10kW
3 1kW
an AC signal or some other switching
signal. This capacitor is connected into
circuit using link LK1 and filters the
resulting signal on pin 4 of OPTO1
to produce a steady DC voltage. This
ensures that Q1 remains on while ever
the input signal is applied.
Note that LK1 is only necessary for
AC input signals. It can be left out of
circuit (ie, the 1mF capacitor is disconnected) for DC trigger signals.
Operating The Circuit From 24V DC
Want to operate the DC Relay Switch from 24V DC? Here’s how to do it:
•
•
•
Use a 24V relay instead of a 12V relay – eg, the Altronics S 4208A 24V
30A relay (Jaycar do not have a 24V version).
Increase the voltage rating of all capacitors to 35V.
Change the 2.2kW resistor in series with LED1 to 4.7kW 0.25W.
November 2006 77
Fig.2: install the parts on the PC board as shown in this layout diagram. Be
careful not to get transistors Q1 & Q2 mixed up – they may look identical
but Q1 is a BC549 (NPN) while Q2 is a BC327 (PNP).
Diode D2 provides spike protection
for transistor Q2 when the relay is
switched off. It shunts the back-EMF
voltage spike generated when the relay
switches off – a necessary precaution
to prevent “punch-through” of the
transistor.
Power for the circuit can be derived
from any suitable 12V DC supply
(eg, a plugpack or battery). Diode D1
provides reverse polarity protection,
while a 220mF capacitor decouples
the supply.
Construction
The DC Relay Switch is built on a
Warning!
DO NOT use this DC Relay
Switch to switch 240V AC mains
voltages. The relay is not designed
to do this and it is dangerous to connect mains to the bare PC board.
If you do need to switch mains
voltages, then use this board to trigger an external mains-rated relay. A
suitable mains switching relay was
published in the May 2006 issue of
SILICON CHIP.
PC board coded 05211061 and measuring 46 x 61mm. This fits inside a UB5
box and is secured using four M3 x
12mm countersink Nylon screws and
nuts. A 3mm Nylon washer is used
between the PC board and the case at
each mounting point, to lift the board
clear of the base.
Fig.2 shows the parts layout on the
PC board. Begin by checking the PC
board for any defects such as broken
tracks and shorts between adjacent
tracks. That done, check the corner
hole sizes – these should all be 3mm
in diameter. In addition the holes for
the relay pins and the screw terminal
blocks must be large enough to accept
these parts.
Once all the hole sizes are correct,
begin the assembly by installing the
resistors. Table 1 shows the resistor
colour codes but it’s a good idea to also
check them using a digital multimeter,
just to make sure.
Next, install the diodes and the
optocoupler (OPTO1), making sure
they go in with the correct polarity.
Follow these with the capacitors,
transistors Q1 & Q2, the LED and the
relay. Take care with the polarity of
the capacitors and LED.
Transistors Q1 & Q2 come in iden-
tical (TO-92) packages so be careful
not to get them mixed up. Q1 is an
NPN BC549 type, while Q2 is a PNP
BC327 and the circuit won’t work if
you transpose them or install them
the wrong way around.
As mentioned previously, you can
use either a 3-way screw terminal connector or PC-mount spade connectors
to make the external connections to
the COM, NO & NC relay contacts.
Use the spade connectors if the relay
terminals are to carry currents in excess of 2A via.
Finally, install the 2-way pin header
for LK1. The link itself can be left out
if you intend to trigger the board using
a DC input signal. Alternatively, install
the link if you want delayed switch-on
and switch-off for the relay, or if you
intend using an AC input signal (see
below).
Testing
OK, now for the smoke test. You
will need a 12V DC supply rated at
about 150mA to power the board.
Connect this to the +12V and 0V
terminals, making sure you get the
polarity right.
Initially, when you apply power,
nothing should happen. You can now
Table 1: Resistor Colour Codes
o
o
o
o
o
No.
1
1
1
3
78 Silicon Chip
Value
22kW
10kW
2.2kW
1kW
4-Band Code (1%)
red red orange brown
brown black orange brown
red red red brown
brown black red brown
5-Band Code (1%)
red red black red brown
brown black black red brown
red red black brown brown
brown black black brown brown
siliconchip.com.au
Fig.3: the various triggering options. In (a) the relay board is triggered by a signal that goes from low to high (+5V or
+12V); in (b) by a signal that goes to 0V; and in (c) by an external circuit that turns on an indicator LED.
check if the circuit works by connecting the negative (-) signal input to 0V
and the positive (+) input to the +12V
rail. When you do so, the relay should
immediately switch on and the LED
should light.
How to use it
Fig.3 shows three different circuit
configurations that can be used to
trigger the relay board.
Fig.3(a) shows how to turn the relay
on using a signal output that goes high
(ie, to 5V or 12V). Conversely, Fig.3(b)
shows how to rearrange the wiring
so that the relay turns on for a signal
output that goes low (ie, to 0V).
Fig.3(c) shows how to drive the relay board from a circuit that normally
powers a LED. Note that if the LED is
multiplexed when it is lit (ie, switched
on and off at a fast rate), the relay may
chatter on and off. Inserting link LK1 to
connect the 1mF capacitor into circuit
should stop this chattering.
In all three above cases, if you want
delayed switch-on and switch-off for
the relay, increase the value of the 1mF
capacitor. A value of 220mF will give
a nominal 1-second delay.
Note that it is important that the
trigger circuit be capable of providing
the required current to the relay board
input. The relay board will draw about
3mA when there is 5V between its “+”
and “–” inputs and 10mA when there
is 12V between these terminals.
If this exceeds what the trigger circuit can deliver, then the 1kW resistor
in series with pin 1 of the optocoupler
can be increased. Doubling this resistor (eg, to 2.2kW) will halve the current
requirement but if you ultimately go
too high in value, the optotransistor
may not turn on sufficiently to drive
the relay circuit.
The minimum recommended trigger
current is 400mA. This corresponds to
using a 22kW resistor in series with
OPTO1 for a 12V power supply and a
SC
7.5kW resistor for a 5V supply.
Looking for real performance?
NOT A REPRINT – Completely NEW projects – the
result of two years research & development
• Learn how engine management systems work
• Build projects to control nitrous, fuel injection and turbo
160 PAGES
23 CHAPTE
RS
Fr om the
pu bli sh er
s of
boost systems
• Switch devices on and off on the basis of signal frequency,
temperature and voltage
Intelligen
• Build test instruments to check fuel injector duty cycle, fuel mixture and brake and coolant temperatures
• Speedo Corrector, Turbo Timer, Nitrous Fuel Controller & Digital
Thermometer Projects
t
turbo timer
I SBN 095
852
9 7809
5
294 - 4
8 5229
4
$19.80 (inc GST)
TURBO B
OOST
& ni
trous fuel
6
NZ $22.00 (inc
GST)
controllers
How eng
in
managemene
t works
Mail order prices: Aust. $A22.50 (incl. GST & P&P); Overseas: $A26.00 via airmail.
Order by phoning (02) 9939 3295 & quoting your credit card number; or fax the details to (02) 9939 2648; or mail your
order with cheque or credit card details to Silicon Chip Publications, PO Box 139, Collaroy, NSW 2097.
siliconchip.com.au
November 2006 79
|