What is the purpose of the diode in the solenoid controlled valve circuit? (From what I read, without the diode, the MOSFET will break down but I don't know why)enter image description here

  • \$\begingroup\$ Flywheel/Flyback diode serves as a protection to prevent a spike in voltage. If you look at WhatRoughBeast's equation, you see why. I had an interview question one time that asked me about the purpose of the flywheel diode :) \$\endgroup\$
    – user103380
    May 4, 2018 at 2:35

1 Answer 1


Once the ON current is established, the inductance will try to keep the current flowing. As a result, if you turn the transistor OFF very quickly, the inductor will cause a voltage spike (which, if it works by, for instance, destroying the transistor, will cause the current to continue flowing). For a transistor voltage greater than Vcc, the diode will be forward biased, and the transistor voltage will be clamped to a bit above Vcc.

This is called a flyback diode, and is a cheap and easy way to protect the transistor.

For what it's worth, although it's cheap and easy, it gives the worst performance in terms of speed. This is precisely because it clamps the voltage at Vcc. The appropriate equation is $$V =L \frac{di}{dt} $$ where di/dt is the rate of change of the solenoid current. Since what you want to do is change the current to zero, the lower the clamping voltage the slower the response. While this is almost certainly not a problem in your case, there are other approaches available which will give better performance.

  • \$\begingroup\$ There is the option of using a Schottky diode, and one to ground as well, though a MOSFET will have one built in. \$\endgroup\$
    – user105652
    May 4, 2018 at 5:14
  • \$\begingroup\$ @Sparky256 - Nope. Schottky's have lower forward voltage drop than regular diodes, so the coil will respond more slowly And using the body diode will only help to suppress negative voltages such as you get if the system rings. However, you can use a zener diode to ground, or a resistor in series with the flyback diode to allow greater voltage at the instant of turn-off. \$\endgroup\$ May 4, 2018 at 14:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.