Switching an electromanet
In order to switch off an electromagnet quickly, you need to dissipate the energy stored in its magnetic field. The best way to do this is to apply a large reverse voltage. This voltage can come from the stored energy itself.







simulate this circuit &ndash; Schematic created using CircuitLab

Pick a transistor for Q1 that can withstand a reasonably high voltage on its collector when off. Pick the voltage of Zener diode D1 to be comfortably less than that limit. Note that the voltage across Q1 will be V+ plus Vz!

When Q1 switches off, I_coil will flow through the two diodes, creating a reverse bias across the coil equal to V_z that will stop the current quickly.

Note that D2 needs to be able to handle the peak coil current.

Note that D1 will be dissipating the coil energy each time Q1 switches off, so make sure that its peak and average power ratings are suitable.



You can also substitute a resistor for D1. The value depends both on the blocking voltage you want (Vz) and the actual operating current through the coil (I_coil).

This would be a better choice if you need to dissipate a lot of power &mdash; power resistors are cheaper than power Zener diodes.