e011068.PDF

(267 KB) Pobierz
BASIC CIRCUITS
Relay Driver
Operation and design
By Karel Walraven
In many circuits the switching action is performed by a relay, which in turn
activates an external load. This part of the circuit is rarely covered in the
accompanying text, but there is more than meets the eye if you want to
design a relay driver properly.
We should really look at the relay driver as a
type of interface. After all, it forms the link
between the control circuitry or PC and the
outside world. The relay is used by the con-
trol circuitry to switch external appliances,
lamps, pumps, sirens, etc on and off.
Because they’re used so often, the relay
driver is as common as the integrated volt-
age regulator, an LED driver or a power-up
network. The description usually skims over
the operation of these basic circuits. We feel
we should look at the relay driver circuit in
more detail.
adapter should this be required.
Deriving this from a 6 V adapter
would be much trickier.
The manufacturer’s datasheet tells
us that the resistance of the coil of
the 12 V relay is 330 Ω (alternatively,
we could have found the resistance
using a multimeter). When we use
this 12 V relay, the current through it
will be 12 V / 330
= 37 mA.
Transistor
When the operating voltage of the
relay is 12 V, the transistor should be
able to cope with at least this volt-
age across the collector-emitter junc-
tion. To be on the safe side, we’ll
choose a value that is half as much
Supply voltage: Has to be equal to
the relay coil voltage and capable of
supplying sufficient current.
Just five components
Apart from the bypass capacitor, the circuit
for the relay driver contains only four or five
components, as shown in Figure 1 . It’s all
very simple really, but all components need
to be chosen according to their function. Next
we’ll look in detail at each of the components.
+V
Relay: Consists of a coil and
switching contacts. The coil
voltage is usually 6, 12 or 24 volts.
The switching contacts are
usually rated at 50 or 240 volts.
Suppressor diode:
Prevents damage to the
transistor caused by
back-emf surges when
the relay is switched off.
C1
10
µ
Relay
First we should determine what load we’re
switching; for example a 100 W lamp operat-
ing at 240 V AC. A suitable relay would be
the E-Card relay (made by Siemens) which
we’ve often used before. This can switch
500 VA at a maximum current of 4 A and a
maximum voltage of 250 V AC.
But note that you can’t just multiply the max-
imum current by the maximum voltage
(4 A x 250 V = 1000 VA), since the manufac-
turer rates the relay at a lower power.
This relay is available for many operating
voltages: 5, 6, 12, 24, 48 or 60 V. The 12 V
relay is often used, since the required voltage
can be obtained from an inexpensive mains
adapter. It is also very simple to derive a sec-
ondary voltage of 5 V from the 12 V mains
5V
Pull-up resistor:
Sometimes required
to ensure sufficient
base current.
K
D1
RE
R1
A
B
C
R2
T1
Transistor: Energizes the
relay.Allows a large current to
flow from C to E when a small
current flows from B to E.
B
E
Base resistor: Prevents
excessive base current
(>5 mA).
005124 - 11
Figure 1. Circuit of the relay driver. The values chosen for the components depend
on the size of the load to be switched.
Elektor Electronics
1/2001
855737816.026.png 855737816.027.png 855737816.028.png 855737816.029.png 855737816.001.png 855737816.002.png 855737816.003.png 855737816.004.png 855737816.005.png 855737816.006.png 855737816.007.png 855737816.008.png 855737816.009.png 855737816.010.png 855737816.011.png 855737816.012.png
 
BASIC CIRCUITS
Table 1
Transistor
VCE0 (V)
Ic (mA)
Hfe (times)
BC546
65
100
110-800
BC547A
45
100
110-220
BC547B
45
100
200-450
BC548C
30
100
400-800
BC517
30
500
30000
BD139
100
1500
40-250
Table 1. Some characteristics of suitable
transistors
Figure 2. The relay driver is easily built on a UPBS-1 board.
Table 2
Logic family
again, which is at least 18 V.
The transistor also has to be capable
of switching the required current; in
our example that is 37 mA. In this
case we’ll use a safety margin of
100%, so choose a transistor which
can switch at least 74 mA.
In this example it makes sense to
use the smallest and most commonly
used transistor: the BC547. This can
switch 45 V and 100 mA.
resistor is calculated as follows:
Determine how much current is
required for the logic family used. If
we used LS logic the value for our
example would be
0.34 mA – 0.4 mA = –0.06 mA. The
negative result means that there is
enough current, so we don’t need a
pull-up resistor in this case. Had we
used a 6 V relay with an 80
Sink (mA)
Source (mA)
TTL
16
0.4
LS
4
0.4
4000 (CMOS)
0.5
0.5
HC/HCT
4
4
Table 2. The source- and sink-currents of
several well known logic families
coil we
would need a base current of
75 mA / 110 = 0.68 mA. The differ-
ence of 0.68 – 0.4 = 0.28 mA would
then have to be provided by the pull-
up resistor. From our earlier rule of
thumb we know that the voltage
across the pull-up resistor is
5 V – 3 V = 2 V. This gives a resis-
tance of 2 V / 0.28 mA = 7140 Ω.
Again we choose the nearest value
in the E12 series, which is 6k8.
We just have to check that the dri-
ver IC can pull the base and pull-up
resistor to ground. The current flow
would then be 5 V / 6800 Ω =
0.735 mA. This value has to be less
than the given sink current. In our
example for the LS-family that is the
case. But note that we couldn’t have
used a device from the 4000 series!
In this case we would have to
choose a transistor for T1 with a
higher gain, as that would reduce
the required base current.
that at the point when the transistor is
switched off the coil becomes a generator
and will supply a voltage with a reversed
polarity. That causes a voltage to appear at
the collector that is equal to the supply voltage
plus the voltage that is induced across the
coil. A risky business really, but the diode lim-
its the induced voltage to 0.7 V, which pre-
vents the transistor from being damaged.
Base resistor (R2)
Table 1 shows the most important
characteristics of several popular
transistors. The BC547 is made avail-
able in two versions; the A-type has
a gain (H fe ) of 110-220 and the B-
type 200-450. To be certain that the
circuit will work under all conditions
we’ll use the lowest gain (110) when
calculating the value of the base
resistor (R2). The relay current goes
into the collector and is 37 mA in our
example. The gain of the transistor is
110, so we’ll need a base current of
37 mA / 110 = 0.34 mA. As a rule of
thumb we’ll assume that the output
that drives the transistor can deliver
at least 3 V. The voltage across the
base resistor is then 3 V minus the
base-emitter voltage (0.65 V). The
value for the resistor is therefore
(3 V – 0.65 V) / 0.34 mA = 6910
Construction
Usually the relay driver will be part of another
circuit and will not be built independently.
But in the case when an existing circuit has
to be extended with a switched output, it
should be fairly easy to mount the five com-
ponents of the relay driver onto a piece of Ver-
oboard. We’ve figured out how to mount the
circuit onto a Universal Prototyping Board
size 1 (UPBS-1). As you can see from Figure 2
it went very well and you’ll be pleased to
know that the (unstuffed) UPBS-1 may be
obtained through our Readers Services.
.
We’ll round this down to the nearest
value resistor in the E12 series,
which is 6k8.
Flyback diode (D1)
The function of the flyback (or ‘sup-
pressor’) diode is to protect the tran-
sistor. The relay coil has the property
(like all inductors) that it resists a
change in the current flow through
it. So when a voltage is applied
across a coil it will take a while for
the current to flow, but the reverse is
also true: when the voltage across a
coil is suddenly removed the coil will
attempt to keep the current flowing
at all costs. In practice the means
Conclusion
Pull-up resistor (R1)
T able 2 shows the source and sink
current capabilities of several popular
logic families. When the source cur-
rent is less than the required base cur-
rent, the difference has to be supplied
by a pull-up resistor (R1). As you can
see in Figure 1 it’s not connected to
the 12 V relay supply, but to the 5 V
logic supply! The value of the pull-up
These explanations and instructions make it
fairly simple for anyone to design a relay dri-
ver module to their own specification. We
would just like to point out that all calcula-
tions include a reasonable safety margin. The
ICs can usually provide a higher current, so
you don’t have to worry that something will
go up in smoke when the calculations have
been a bit tight.
(005124-1)
1/2001
Elektor Electronics
69
855737816.013.png 855737816.014.png 855737816.015.png 855737816.016.png 855737816.017.png 855737816.018.png 855737816.019.png 855737816.020.png 855737816.021.png 855737816.022.png 855737816.023.png 855737816.024.png 855737816.025.png
Zgłoś jeśli naruszono regulamin