# How does flyback diode decrease the response time of a solenoid valve

Dear all StackExchange users,

I want to make a circuit consisting of 8 valves. Each valve has 55mH and 33 ohm. I want to control them with an Arduino board and a proper MOSFET. Valves reaction time is 0.05ms and I want to drive them about 10 times per second, 5 times off and 5 times on. Valves are 12Vdc. The battery is also 12 Vdc.

I know that I have to add a sort of flyback diode to protect the MOSFET from high voltage while I switch each of the valves off. I know how a single flyback diode, flyback diode + resistor and a Zener & diode can protect it.

Also I know that Zener is much faster than a single diode.

My main problem is that I don't know which part of I-t or V-t signal I should look to see the valve is turned off. I am using LTSpice. So I'd be thankful if you could guide me through this. In other words, When the valves are off after 5vdc is gone?!

Also in the simulation when I generate the 5vdc to MOSFET I see that the Voltage of the line that goes to ground is going from 12VDC to 0VDC. I really don't understand what's happening. Because when I connect the 12VDC directly to the coil and the coil to the ground, it remains 12VDC and doesn't go from 12VDC to zero!!

It is about 10 years since I passed electronics course in my bachelor years... so please forgive me if I am asking for the obvious.

Also I am coming from here "Can a Zener diode that protects a switch against inductance when the switch opens, affect turn on speed of the valve while you close it again?" Isn't the energy dissipation normal?

UPDATE: I checked the response time experimentally: 70v Zener = 8ms, with simple Diode 25ms.

You must model the solenoid valve as a resistor (33$\Omega$ in your case) in series with an inductor. If you like you can include a bit of parallel capacitance, but the resistance is required.

Otherwise the simulated current after a long time will be limited only by the MOSFET (maybe to something like 30A) and the voltage will approach zero.

For the operation time of the valve, you can consult the data sheet. Normally they will specify it without a diode, so whatever time you get with the zener will be a bit longer. You can guess that the difference in the current through the coil will give you an idea of the operation time, but there is no guarantee that even if the coil current drops to 10% or 5% of normal that the mechanical parts will have moved in that time. Some valves are fairly complex ('pilot valves', for example that operate indirectly), and the inductance of electromechanical systems often varies significantly during operation.

Edit: Below is a PSPICE simulation I did with similar parameters to yours (I used a 1N4740 Zener and a PHD23NQ10T,118 MOSFET to save me time). Green trace is the gate drive signal (before the resistor), red is the MOSFET drain. As you can see the MOSFET drain rises to a peak voltage of around 24V.

In the below close-up, you can see where the bulk of the energy is dissipated and the ringing afterward. The violet trace is the coil current (scaled so you can see it on the same graph).

• Dear Sphero, I added the 33 ohm resistor in series and still the voltage after the 33 ohm resistor is zero! I don't know why?! What's happening?! Also I don't understand if adding a resistor in series is different than adding the value to Solenoid's block itself like this: postimg.org/image/6om7syd25 Did I do anything wrong? Which one is correct? Adding the 33 ohm to the Solenoid block itself? or do I have to put a separate 33 ohm resistor block in series? Thanks Commented May 28, 2015 at 7:54
• With reference to the graphs, could you make it clear exactly what each trace represents? Is the trace supposed to represent the exact circuit shown? You can out the resistance in the inductor definition, but I don't think it is very clear that way for a solenoid. Commented May 28, 2015 at 10:31
• Yes it is the exact circuit. Commented May 28, 2015 at 13:29
• The red line is the 5v "on command", Blue line is the voltage at the MOSFET. Oscillations are happening after the 5v is gone or in other words when the switch is open. The green line is the battery voltage. If you mean the blue square on the circuit, they are nothing... I am not familiar with LTspice... this is the first circuit I have every simulated in LTspice. I don't know why the blue line plunges to zero when I give the 5v command. It only makes the connection to the ground. When I delete the 5v voltage, and MOSFET and make a direct connection to the ground this doesn't happen! Commented May 28, 2015 at 14:21
• See edit above with simulations. It might be more clear if you plot the coil voltage rather than drain voltage and the coil current. Commented May 28, 2015 at 15:17