1

I want to build several different Arduino projects which use coils, magnets and/or solennoids. These projects include:

  • Magnetic door locks
  • 55 lb electromagnets
  • Magnetic door latches
  • Relay

I can buy a power supply designed for a magnetic security door lock, but I would rather use my simple 9 or 12 volt wall adapter.

Will I need to add some capacitance for early switch-on power? Will I need to limit the current after the magnet powers up? Will I need to add some sort of protection for the Arduino? Are there other concerns?

How do I build a good power supply for a coil?

Mister Mystère
  • 9,477
  • 6
  • 51
  • 82
Hoytman
  • 565
  • 2
  • 8
  • 25
  • 1
    "Celinoid" ? ;) First, determine how much power your various widgets will need and then determine how you'll be able to supply it. Or, if know how much power you have available, determine whether it's enough to run your widgets. – EM Fields Mar 02 '16 at 08:54
  • 2
    _Celinoid_, n. Electromagnetic device designed to pick up celery. (It didn't work.) – Transistor Mar 03 '16 at 19:47
  • Corrected typo. transistor, you made me laugh :) – Mister Mystère Mar 03 '16 at 19:59

2 Answers2

2

Inductors will oppose themselves to a change in current, in particular at startup. So there will not be an inrush current, it will build up quickly and settle at its nominal value. You might have thought it would be necessary because motors do have an inrush current, but it's relative to their rated current, which is reduced because of the back emf generated by the shaft rotation. Basically, your inductor is just like a blocked motor winding, the steady state current is only limited by the winding resistance, and at steady state both the stored magnetic energy and the Joule heating are maximum.

So as long as you design your power supply for the nominal current, you're fine: no brownouts due to voltage drops from the high current draw will occur. A basic NPN transistor in common emitter configuration in saturation mode can be sufficient since you probably do not need to reverse the current direction. See "relay drive", for example.

Be absolutely certain to include a freewheeling diode in parallel to the inductor, to protect the transistor (and its controller) against the high voltage which is generated by the inductor when the transistor shuts off - remember: inductors oppose themselves to a change in current.

Mister Mystère
  • 9,477
  • 6
  • 51
  • 82
  • So my only concern is to include a diode... zener or schottky? – Hoytman Mar 03 '16 at 20:03
  • Not a zener, a schottky is good if you want a low power but slow discharge, whereas a normal one is better if you want a faster discharge and the package can handle the increased dissipation (schottky have lower forward voltage drop). – Mister Mystère Mar 03 '16 at 20:05
  • Actually, a zener can be used but across the transistor, to make the collapsing of the field quicker: http://electronics.stackexchange.com/questions/26944/when-why-would-you-use-a-zener-diode-as-a-flywheel-diode-on-the-coil-of-a-relay – Mister Mystère Mar 07 '16 at 10:57
1

If you operate a 12V maglock with 9V power it will only come on at about three quarter strength, that may be enough for a demo.

Door latches are going to be unreliable at reduced voltage

Electromagnets will be weak like the maglock if under-powered.

Capacitors aren't likely to help, but a diode parallel with the coil will protect your switching device from the energy stored in the inductor, this diode is essential.