Electronic – How to build a good power supply for a coil

coilpower supply

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?

Best Answer

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.