# Solenoid fastest possible release - for how long should reversed polarity be applied?

If I understand correctly, a regular solenoid like this one

does not have a permanent magnet as core and as such it doesn't matter with what polarity it is activated (please correct me if that's wrong).

Since the current in the winding takes some time to decay, it's apparently possible to release the solenoid faster by applying reverse voltage (to "flush out" the current)

but since the polarity doesn't matter to activate the solenoid, I assume that there is a specific duration for which this reversed polarity should be applied or otherwise the magnetic field just builds up again in the other direction and pulls the solenoid back in.

How can I compute the duration for which the reversed polarity should be applied (based on rated voltage and current of the solenoid as well as number of windings) in order to achieve fastest release?

• When the current wil stop flowing, it will return itself. It has spring to do it, no need for reverse polarity. – Jakey May 15 at 15:49
• I know that, my question is how to release it the quickest way possible (since the current takes a moment to decay) – user1282931 May 15 at 15:52
• Estimate activate time and release time spec limit needed with voltage and DCR of solenoid. – Sunnyskyguy EE75 May 15 at 16:10
• I'm only a digital electronics engineer and I might not know whole lot about electromagnetics and electromechanics but perhaps something with a very small amount of positioning hysteresis would be a good design goal. There's an interesting article about this. – KingDuken May 15 at 16:10
• Applying reverse voltage would get rid of the resonance with distributed capacitance in the winding, but you'll get most of the benefit by just allowing the voltage to rise very high, which means the peak power loss into the clamp is very high so the current decays quickly (there is a fixed amount of energy present in the charged inductor at a given operating current). – Spehro Pefhany May 15 at 17:42

Achieving the fastest possible release time for a solenoid or relay

To get the fastest possible release time you need to dissipate the stored energy in the inductor used in both solenoids and relays.

Most typical drive circuits place a Diode across the coil to allow dissipation of the energy, however this results in the longest dropout time for solenoids and relays. The dropout time constant depends mostly on L and L(R) with some additional dissipation in the diode.

To dissipate the stored energy more rapidly you have to increase dissipation of the backEMF suppression circuit.

A typical drive circuit might look like method A shown below:

simulate this circuit – Schematic created using CircuitLab

Method B shows the BackEMF being allowed to rise to about 34V
Method C shows the BackEMF being allowed to rise to about 75V
Method D shows a BackEMF and current for a snubber.

Update: I added a fourth method due to comments from @Sunnyskyguy that the snubber would be effective. This is NOT correct, since a snubber forms a tuned circuit, so the current reverses and will still hold the solenoid in for much longer than the Zener based solutions. A snubber works well for a physical switch but as you can see in the above circuit I had to add a Diode to catch the swing below zero which will destroy transistors and their driving circuits. An FET has an internal body Diode, so a snubber can work for those ….but it will NEVER be more effective than the Zener methods.

The waveforms for the 3 methods show the time for the current to fall to zero for the inductor I chose:

Method A took 1.3ms while method B and C reduced to less than 40us.

Here is the second waveform view showing the comparison with a snubber circuit (Method D):

Note that you have to select a drive transistor that is able to support the voltage you allow the BackEMF to rise to, but the higher you can tolerate the shorter the field collapse time.

It is worth noting that there are many solenoid/relay drivers today that use a similar configuration to dissipate the stored energy from an inductive load. A great example is the On Semi NIF9N05CL which includes back to back Zener's between Drain and Gate.

Here the energy is dissipated by the FET itself and not in the Zener diodes. This results in fewer external components. Once you provide external elements to dissipate the power the resistance of the solenoid itself becomes irrelevant.

• Try 4H for a solenoid of this size. – Sunnyskyguy EE75 May 15 at 17:37
• It is 40 Ohms worth of coil and I estimated 4H . It will be at least 1H . – Sunnyskyguy EE75 May 15 at 17:57
• @SunnyskyguyEE75 Your point being? The solenoid is an unknown as the OP did not specify its inductance. What I showed simply shows the methodologies used to shorten the dropout time. That will depend not only on the inductance, but also any physical springs and mechanical load. – Jack Creasey May 15 at 20:18
• I think "The dropout time constant depends mostly on LR " should be replaced with "L/R" – Sunnyskyguy EE75 May 15 at 20:35
• @SunnyskyguyEE75 That is only true with a single diode across the solenoid. For any system which dissipates the energy external to the inductor the inductor resistance is irrelevant. – Jack Creasey May 15 at 22:23

There is a way to skin this automatically, you force the collapsing flux to develop a highish voltage across your catch diode circuit and thereby to dump the energy more quickly, The major limit is how high a peak voltage your switch can handle.

simulate this circuit – Schematic created using CircuitLab

This holds the reverse voltage across the solonoid at the sum of the diode voltage drop and zenner voltage until the current falls to zero.

• +1 Right, or just a zener across the switch. – Spehro Pefhany May 15 at 16:49
• @SpehroPefhany True, but if you do that make good and damn sure that you decouple anything that needs it, the loop can get annoyingly large. – Dan Mills May 15 at 16:54
• @SunnyskyguyEE75 , dI/dt = U/L, seems to me that forcing U to be a large value by reverse biasing the zenner will force a high rate of decay in the current. – Dan Mills May 15 at 17:00
• right, but 1/2LI^2 = Pd in Zener – Sunnyskyguy EE75 May 15 at 17:01
• @SunnyskyguyEE75, Right, the energy stored in the magnetic field has to go somewhere, might as well burn it off heating the zenner and thereby obtain a far faster field collapse then you do if you just burn in in a 0.7V drop of a diode and the resistance of the coil winding. – Dan Mills May 15 at 17:04

Several other answers have addressed ways to automatically and passively dissipate the energy in a highly effective fashion. I'm going to answer the exact question you asked: how long should reverse voltage be applied, if applying reverse voltage is how we're going to do it?

Let's consider the solenoid as an inductor, without the effects of the moving core. Then the goal is to drive the current through the solenoid to zero.

simulate this circuit – Schematic created using CircuitLab

The magnitude of the current assuming that the solenoid has been on for a while is $$\I_{\text{on}} = V_{\text{in}}/R\$$, because it is determined by the coil resistance and not at all the inductance.

Now suppose we reverse the polarity. This is readily done with a H-bridge as would be done for reversing a motor — a solenoid is electrically the same kind of thing. Then we have applied a step voltage change (of $$\2V\text{in}\$$) to the solenoid. How do we know how it will respond to this? It's an RL circuit! The step response of such a circuit, in the usual form of “applied voltage was zero at $$\t=0\$$ and is now a constant $$\V\$$”, is

$$I(t) = \frac{V}{R}(1 - e^{-(R/L)t})$$

In this case we're considering not going from $$\0\$$ to some $$\V\$$ but from $$\+V_{\text{in}}\$$ to $$\-V_{\text{in}}\$$, but since this is a linear system it doesn't matter where we start; to use this equation we just need to double the applied voltage. Then the condition we are looking for is when this curve is equal in magnitude to the steady-state on current $$\I_{\text{on}}\$$, which is the same time as when the actual decreasing current will equal zero. (We could do this with less fiddling by starting from the differential equation $$\I = dv/dt\$$ and solving it, but I figure reusing existing well-known solutions is a more practical-intuition approach.)

\begin{align*} \frac{2V_{\text{in}}}{R}\left(1 - e^{-(R/L)t}\right) &= I_{\text{on}} \\ \frac{2V_{\text{in}}}{R}\left(1 - e^{-(R/L)t}\right) &= \frac{V_{\text{in}}}{R} \\ 2\left(1 - e^{-(R/L)t}\right) &= 1 \\ 2 - 2e^{-(R/L)t} &= 1 \\ e^{-(R/L)t} &= 1/2 \\ -(R/L)t &= \ln 1/2 \\ (R/L)t &= \ln 2 \\ t &= (\ln 2)\left(\frac{L}{R}\right) \\ \end{align*}

That is, you should apply reverse voltage for $$\(\ln 2)\left(\frac{L}{R}\right)\$$, or about $$\0.7\$$ times $$\L/R\$$, seconds.

$$\L\$$ and $$\R\$$ can be found from the specifications of the solenoid or, if documentation is not available, using an LCR meter or other methods of measuring inductance and resistance.

However, this theoretical answer makes several assumptions:

• The moving, temporarily-magnetized iron has no effect.
• Your power supply is an ideal voltage source which doesn't blink at this inductive load. (I'd think of having a big decoupling capacitor, sized to store a few times more energy than we're putting into/out of the coil, right next to the input of this drive circuit. That way, the current and voltage surge flows mostly through the capacitor rather than the rest of the supply circuit.)
• The H-bridge or other reversing device is also ideal.

In practice, if you wanted to do it accurately, you would want to apply the reverse voltage until you detect that the current through the coil has hit zero, then open the circuit.

And, in practice, the various passive energy-dissipation circuits posted in other answers are common and better solutions. Instead of dumping the energy into power supply rails, it is dissipated through a large semiconductor voltage drop. Since this can be a higher voltage than the power supply normally uses (on the principle that an inductor will produce as much voltage at its terminals as needed to cause the current to flow), the decay of the current is even faster than using reversed supply voltage.

• I considered this but rejected it as the reverse voltage would need to be -24V or much greater than +12V to be as fast as a 33V Zener – Sunnyskyguy EE75 May 15 at 17:36
• @SunnyskyguyEE75 I was going to ask, where are you getting the 33V from — but then I remembered that the inductor will generate the voltage as needed, of course. I'll update my answer. (But, as noted at the top, this is primarily about answering the question that was asked, not alternative solutions.) – Kevin Reid May 15 at 17:39
• This answer is very complicated. The H-bridge can work, but when you initially toggle the drive voltage you MUST not have both upper and lower pairs on at the same time (dead time). This means extensive logic to ensure that the drive is correct to prevent shoot-through. During this dead time you need diodes to protect the H-bridge or else the BackEMF will kill the switch devices. While this certainly can work, it's certainly not usual to see a non-polarized (soft iron core) solenoid driven like this. You also have to measure the current direction and magnitude to get any accuracy. – Jack Creasey May 15 at 22:54

The other answers focus on the electrical techniques to get rid of the magnetic field (and resulting coil pull force on the armature) as quickly as possible. They're correct, and important, but they're only half the picture - even if the field can be made to dissipate "instantly", the mechanical spring-mass system will take some substantial number of milliseconds to return to the armature to the released position.

This time for mechanical motion is likely more significant than the difference between the various electrical techniques (with the exception of the freewheeling diode circuit, which will be super slow).

If you need it to move faster than this lower bound, you could substitute a stronger spring, though that might have an adverse effect on lifetime cycle endurance and may require a higher operating voltage/current.

# How does this solenoid work?

A soft iron rod end leaves an air gap in the coil end in the retracted position. WHen any polarity current is applied this offset iron rod is pulled to fill the air gap inside and balance the flux at each end.
The soft iron is always pulled to the centre regardless of which side of the coil it is positioned. The applied current and inductance both increase the pulling force of offset ends towards the centre of the magnetic coils. A thin magnet wire (eg. AWG30) with 1000+ turns adds 40 Ohms resistance which limits the current. Non-magnetic extension rods are used to make it mechanically push or pull to suit the application. In this case it pushes to the left.

Thus the only force available to make it retract is the spring and the faster current is cut off, the faster the magnetic force can be removed and the sooner the spring can act.

There is no electromagnetic solution to reverse the force. ( unless you had a dual solenoid in opposing directions or change the part to one with a stronger spring.)

Thus to reduce the electrical decay time as fast as possible the energy must be dissipated as fast as possible by diverting the current to an external circuit.

To divert the energy to some external circuit, the choices are;

1. open circuit high voltage arc. Fast, but destructive V=LdI/dt so V rises to kV when dt reduces to ms for L=1H
2. reverse diode clamp across coil, slow but reduces BEMF voltage to a minimum and minimizes EMI by reducing dI/dt due to low diode resistance and slow L/R = from conservation of energy as slow as activation.
• E = ½LI²= stored energy = energy dissipated=t*(I(t)² * DCR + Vf*If)
3. Zener clamp across switch - fast but depends on zener voltage and power dissipation. Must be high voltage TVS Zener to get the fastest speed.
4. Resistor or RC snubber across coil or switch Faster or equal to Zener utilizing low L/R time due to high R value but needs non-polarized cap or protected cap

The electrical factors that make the fastest possible return speed are :

• high reverse voltage from BEMF i.e. higher switch voltage rating
• higher resistance the faster the stored Joules are dissipated with higher pulse power.

• dI/dt = V(t)/L = I(t)*R/L

• or dt= L/R * dI/I(t) thus reducing numerator or increasing denominator makes it faster. !!
• thus increasing flyback voltage and flyback resistance results in faster decay.

Below using 1uF + 100R snubber on 1H coil at -258mA current collapse to 0V in 1ms and rises to 244V on collector which causes coil current to reverse to a max of 208mA.

The 100 ohm R here dissipates 6.6W in about 1~2ms. This is the fastest so far. But requires a bipolar cap and a power resistor.

• Tau= L/R is the electrical decay time constant which corresponds to decay of activation force. During this time of 4ms, the net rise of opposing spring force will begin to accelerate the rod back to the home position.

The return time then is added due to the spring force constant, k and mass,m which will control the return acceleration, a=k/m, thus max velocity from displacement and time,t to return to the end stop position. Without these parameters, it is unknown.

# Alternative design with Zener across switch.

Vz=33V, Zzt=10 Ohms, Coil = 1H, 40 ohms

Found same photo from Adafruit with DCR spec of 40 ohms. Although assuming L=4H (typ) Tau=L/(DC+Zzt) is still 4/50=80ms the 33V Zener stops conducting reduces the conduction time to 45ms.