...
Along the same lines of avoiding wastage, I notice that my supposedly
30mA (at 12v) relay coil is actually drawing 50mA. I suspect this is
because my supply voltage is a tad high. I measure 19.3 volts with an
open circuit, and 16.3 under load. I'm using a transformer I had lying
around, which fits nicely into my enclosure. I originally measured it
at about 14v AC, but it seems that the smoothed average DC is quite a
bit higher. This might also account for high-ish values of the
resistors I've added lately too.
To avoid waste and possibly safely convert to an LM311 one day (sinks
50mA max through output), what is the best way to regulate the voltage
down to say, 13-14 under load? I don't know much about the way that
voltage regulators and zeners work, but I hate the thought of a
component constantly throwing away power.
...
Since the LM311 can safely handle supply voltages up to about 36VDC,
and its output can handle about 50V, there's really no need for a
regulated supply there. Neither is there a need for a regulator if
you choose the proper relay to use with the supply you have at hand.
If you measured the unloaded output voltage from the transformer and
it was 14VAC, then there's a good chance it's a 12V transformer with a
regulation of about 17% from no-load to full load.
With a 14VRMS output, rectifying that in a full-wave bridge and
smoothing it should result in about 18.4VDC across the filter cap,
with no other load across it. A 19VDC output smacks of half-wave
rectification, which is kind of OK for the light loads you're using,
but it makes the filter cap need to have twice the capacitance as if
you used a full-wave bridge, plus its ripple-current requirements also
double (or something like that, anyway).
Assuming that a 50mA load isn't really enough to change the output
voltage from the transformer, knowing that you're using a half-wave
rectifier, a reservoir capacitor and that your load varies from 0mA to
50 mA, with a 3 volt change in the output voltage we can figure out
what your filter cap looks like from:
I t
C = -----
Vr
Where C = capacitance in farads
I = the steady-state current into the load in amperes
t = the period of the ripple waveform in seconds
Vr = the amplitude of the ripple in volts
I t 0.05A*0.017s
so, C = ----- = --------------- = 0.0028F ~ 3000µF
Vr 3V
Pretty close?
Now, here's a shocker for ya; if you switch from a half-wave rectifier
to a full-wave bridge, you won't need to use filtered DC to run the
relay, you can do it like this:
12VAC>-----------------------+
|
12VAC>--------------------+ |
| |
+-[1N4002>|]--+--|--[1N4002>|]-+
| | |
+-[1N4002>|]-----+--[1N4002>|]-+
| |
GND>--+-----+---[C1+]--------+--[|<1N4002]-+
| | |
| IN |
+-------------------[78L12] |
| OUT |
| | |
| | |
| | |
| +--------+--------+ +-------+
| | | | |K | O--> |
| [R1] [10.7K] | [1N4001] [COIL]- | - -|
| | | | | | | O--->COM
| | +-[634K]-------+-+-----+ |
| | | | | +-------->NO
| | | +------+ |
| | +----|+ C|----+
| | | |LM311 |
| [1000]<-----|----|- E|--+
| | | +------+ |
| | | | |
| [R2] [RT1] | |
| | | | |
+----+--------+--------+-----+
The reason being that the full-wave rectified AC will be pulsing on
and off 120 times a second, and the spring trying to return the
relay's armature to the non-energized position won't have enough time
to do it in between pulses. You may not need the 78L12 either, but
it's nice to have a steady voltage to drive the reference and the
thermistor string, and if you're going to do that you may as well
regulate the supply voltage to the comparator since it won't cost any
more to do that as well.
Looking at the relay supply, since you've got 14VRMS coming out of the
transformer, that would rectify and filter to about 19.8VDC with
perfect diodes and a perfect cap, but with the reality of two diode
drops that'll go to about 18.4V, which is about 13VRMS, which is what
will be driving the magnetic field being generated in the relay coil.
That may be fine, but you'll need to look at the relay spec's to make
sure that 1V of overdrive won't hurt the coil. Otherwise, what you'll
need to do is put a resistor in series with the relay coil to drop the
extra voltage. Since you'll want to drop 1 volt at 50 mA, you can
figure out the resistance you'll need from:
E 1V
R = --- = ------- = 20 ohms
I 0.05A
and the power the resistor must dissipate from:
P = I E = 0.05A*1V = 0.05W
so a standard 20 ohm, +/-5%, 1/4 watt resistor would be fine.
All that's left is to figure out the capacitance of the reservoir cap,
C1, and to do that we can use
I t
C = -----
Vr
if we can determine the load current of the circuitry attached to it
and specify the ripple coltage we can stand.
For the LM311 we'll have 7.5ma worst case, for the thermistor string
something less than 1mA, for the reference string (I'm not going to
figure it out, but assuming there'll be no more than 5V dropped across
the pot puts that current at 5mA), and 5.5mA for the 78L12 brings the
total to 19, say 20, mA. Just for grins let's say that we can live
with 50 millivolts of ripple. Then, plugging that in gives us
0.02A*0.0083s
C = --------------- ~ 0.0033F = 3300µF
0.05V
Interestingly, just about what you had before!
Now, however, you've got a nice little supply with almost no ripple
and a pretty reliable relay driver.
We still need to look at the power the 78L12 is going to dissipate,
and if we look at the worst case unloaded DC across the filter we'll
have 18.4V into the 78L12 (so we'll have no headroom problems,
anyway!) and 12V out of it, so the voltage across it will be 5.6V, and
with 20mA flowing through it that'll be 112mW it needs to get rid of.
The 78L12 has a worst case junction-to-ambient thermal resistance of
160°C/watt, so with a 25°C ambient and 112mW being dissipated by the
device its junction temp will rise by
160°C
Tj = -------- * 0.112W ~ 18°C
1 watt
With an ambient temp of 25°C, then, the junction temp will go to 43°C.
Piece of cake! The thing won't even _think_ about going into thermal
overload protection there and, BTW, that's the _only_ power that'll be
wasted in the circuit, (except for the 50mW being dissipated in the
relay's series resistor, if you have to use one) which isn't too bad.