Buddy said:
Hm. The maglock I have is packaged with a small circuit board. I haven't
pulled it out (it's glued down) but it includes a +24V connector, a +12V
connector, and GND. There is a large resistor and a normal size disk
capacitor on the board. I figured out that the resistance of the coil
is ~ the resistance of the large resistor, so that's just a voltage
divider.
So, what's the best way to power this on and off with my TIP120? Or is
there something I should pick up that will work better? Honestly I used
these because I had them laying around and was anxious for a prototype.
Fear not, good sirs, this is not a production unit
Actually it's not a solenoid. Just a big electromagnet.
Do I need to add a diode somewhere to make this a little safer/etc?
Thanks for the advice.
--buddy
You say the board has both 12 and 24 volt power supplies. If you are
only using the 12V power supply, then you can just switch on and off the
ground with your TIP120. Connect the ground of the card to the collector
of the TIP. Connect the emitter of the TIP to the real ground. Now,
connect the base to your microcontroller using a 1k resistor.
(This is what Fields meant when he said 'low side switching'.)
When you make the port high, it'll turn on the TIP120, which should
completely saturate, thus not dissipating too much power (it won't get hot.)
When you make the port low, it'll turn off the TIP120, which will allow
your load to float up to 12V, which isn't a problem.
If you are supplying both 12 and 24 volts, though, it's possible that
there may be current flow between these two rails, so I'd only do this
if you are using one or the other. Or, you could use a diode into the
12V rail, which would prevent reverse current flow.
If the board has a coil on it, connect a 1N4001 from the point where the
collector attaches to the ground on the board, to the 12V rail. Then,
the current generated by the inductor will just circulate through the
diode until it dissipates, rather than generating a huge voltage spike
which could kill the TIP120. The TIP120 can only withstand about 60V
between collector and emitter.
--
Regards,
Bob Monsen
If a little knowledge is dangerous, where is the man who has
so much as to be out of danger?
Thomas Henry Huxley, 1877