Solenoid driver MOSFET flyback protection - Page 1
Forum section: electronics / beginners

author: HwAoRrDk
author_rank: Super Contributor
timestamp: November 26, 2018, 05:07:23 pm
content: I want to drive a 12V vacuum solenoid with a MOSFET, and to drive it I had in mind to use a nice component I came across a while back, the ON Semi NUD3124 - an N-channel MOSFET, protection diodes and bias resistors all packaged conveniently in SOT-23. However, the solenoid I have draws more current (>420mA) than the NUD3124 can handle, so that is unfortunately out. What I thought to do instead was replicate the integrated parts of it with discrete components - a bigger MOSFET, diodes, resistors, etc.But, I am not quite 100% on understanding why some of the NUD3124's integrated component parts are like how they are, and I was hoping someone could offer some explanation.The diagram of the integrated components, from an associated app note, is as follows:As I understand it, this is an active clamping arrangement; when the solenoid's turn-off flyback voltage spike occurs, this passes through the 28V clamping zener and turns the gate back on, thus routing transient current through the MOSFET.My questions about this are:- Why are there two pairs of 14V gate zener diodes? Obviously, they are not exactly in parallel - there is a 10K resistor between - but it still seems to me the left-most pair is redundant.- Also, why are those zeners 14V when the datasheet says the Vgs has an absolute maximum of 12V?- What's stoppingallthe transient current flowing through the 28V and 14V zeners to ground, instead of partially through the FET as described?Also, if I want to reproduce this arrangement with discrete components, does it particularly matter what value of zener diodes I use on the gate, so long as it is above my gate drive voltage (5V) and below the maximum Vgs? I already have some 5.1V zeners, so was thinking of using those. Also an 18V bi-directional TVS diode for the clamping between drain and gate.

author: Benta
author_rank: Super Contributor
timestamp: November 26, 2018, 05:33:48 pm
content: The NUD3124 probably has a lot more protection than you need, it's designed for automotive applications where a load dump carries a lot of power.In the simplest application (like your solenoid), the upper 28 V Zener is likely all that's needed.The leftmost 14 V Zeners are not there to protect the device, but the circuit driving it. The next set of 14 V Zeners are for protecting the MOSFET gate. And the lower 28 V Zener is for clamping a negative spike during a load dump.You decide, it depends on your application.

author: HwAoRrDk
author_rank: Super Contributor
timestamp: November 26, 2018, 11:18:45 pm
content: Quote from: Benta on November 26, 2018, 05:33:48 pmAh, well, see, it will actually be used in an automotive application.Quote from: Benta on November 26, 2018, 05:33:48 pmOkay. I still don't understand why one set of 14V zeners doesn't serve as double duty for protecting both the gate and the driving device (i.e. MCU). Or this just a belt-and-braces approach?

author: Ian.M
author_rank: Super Contributor
timestamp: November 26, 2018, 11:36:09 pm
content: The left-most Zeners protect the 10K and 100K resistors against flash-over during ESD events which could erode the (presumably thin film) resistance element and eventually cause them to go open circuit.5.1V zeners are a *bit* too close to 5V CMOS logic levels. Consider what happens if they are 5% under their nominal zener voltage and also what happens if the5V rail is slightly higher than expected.A TVS diode, unless very low energy handling capacity, is likely to have excessive junction capacitance, resulting in significant extra dissipation in the MOSFET during switching due to the Miller effect.

author: HwAoRrDk
author_rank: Super Contributor
timestamp: November 27, 2018, 02:11:25 pm
content: Quote from: Ian.M on November 26, 2018, 11:36:09 pmI presume the resistors are susceptible to that because they are on-die and so are physically very small? So I guess that pair aren't at all necessary in a discrete component circuit, because there is little chance of such happening to an SMD or THT resistor.Quote from: Ian.M on November 26, 2018, 11:36:09 pmNot familiar with that phenomenon, will have to look it up.As a wild stab in the dark, I would guess capacitance in the diode causes turn-on and -off to be too slow, making the FET spend too much time in the linear region?I plan to PWM the solenoid to reduce hold current, so such a side-effect would probably be exaggerated under that condition?I have some regular 18V zeners, though - just thought a bi-directional TVS would be convenient as it's both diodes in one component.

author: Fludo
author_rank: Regular Contributor
timestamp: November 28, 2018, 01:11:07 pm
content: If you're considering other parts you may want to check out the ULN2003http://www.ti.com/lit/ds/symlink/uln2003a.pdf, it's an array of BJT's with built in flyback diode protection.500mA per channel with the ability to parallel the inputs/outputs for higher capacity.

author: HwAoRrDk
author_rank: Super Contributor
timestamp: November 29, 2018, 11:37:32 pm
content: So I've been doing some experimentation and decided not to go with the previously shown active-clamping arrangement - or indeed anything involving a zener diode.Firstly I tried using just a zener to clamp flyback to ground, but quickly realised that when PWM-ing the solenoid (to reduce the hold current), this makes the zener diode have to dissipate far too much power, due to the amount of current going through it all the time. Yeah, that zener diode got mighty toasty!Maybe it's not so much of an issue at lower PWM frequencies, but in order to avoid audible buzzing from the solenoid, I was running the PWM at 25 kHz.That then got me thinking about whether it was even worth trying the active clamping arrangement, as PWM-ing would surely increase the power dissipation in the MOSFET too. In fact, I suspect that a part such as the NUD3124 that uses active clamping is not actually suitable for PWM control of an inductive load. The datasheet doesn't even mention it. And the fact it has a 10K series resistor on the gate probably wouldn't help either (increases turn-on time?).In the end I've just gone back to an anti-parallel diode across the solenoid, and that works very well with PWM.What kind of diode best to use, though? I've never really given it much thought in the past when doing basic on/off relay control. I read that when you're PWM-ing an inductive load, the reverse recovery time of the diode should ideally be as small as possible, otherwise there can be detrimental side-effects. Don't quite understand why or what those effects would be, but heeding that advice I went to check some datasheets for the variety of diodes I had to hand. Okay, 1N4007 not so good (in the microseconds); 1N4148 great (nanoseconds), but possibly not stout enough; 1N5819, wait, what's this, no Trr spec on this Schottky diode?Ohhh... they don't have a reverse recovery time.I was already using one in the experiment, so I should probably keep it.By the way, while doing some more reading into active clamping, I came across this circuit:If I am interpreting it correctly, the high flyback voltage causes the zener to conduct, turning on the PNP transistor, which dumps the remainder of the transient through to ground. I suppose you would use it when you want the fast turn-off of a zener, but need a higher capacity.But one thing is puzzling me: what is keeping the base of the PNP off the rest of the time?Edit:No, I'm a dumbass - I realise now. That resistor is acting as both a pull-up on the transistor base and a current-limiter for the zener.

author: KE5FX
author_rank: Super Contributor
timestamp: November 29, 2018, 11:52:11 pm
content: The current through the free-wheeling diode after the solenoid turns off will not exceed the current that was flowing into the winding when it was powered on. So while a 1N4148 is too wimpy, a 1N4007 is likely to be a good fit.The freewheeling diode doesn't have to respond in nanoseconds, it just has to keep up with the collapse of the magnetic field, which takes a while. In fact, the diode has the effect of making the collapse take much longer.I don't understand the motivation behind the active clamp, either. That will just dump the unwanted energy into the power distribution network (and its associated loop inductance), making it somebody else's problem. The correct strategy is to use a free-wheeling diode across the winding.

author: HwAoRrDk
author_rank: Super Contributor
timestamp: November 30, 2018, 12:20:18 am
content: Well, the active-clamping circuit in my previous post was part of an example for a fuel injector driver, so for that I could understand why you would want the solenoid to slam shut as fast as possible in that scenario - at the expense of wasting power.But in the scenario, like mine, of using PWM to reduce holding current for a continuously-on solenoid - where at each turn-off of the MOSFET you don't care if the energy takes some time to dissipate - I do agree now it seems it doesn't really make sense. Odd that I've not so far found written anywhere anything that explicitly states "you don't want this for that".

author: langwadt
author_rank: Super Contributor
timestamp: November 30, 2018, 12:34:51 am
content: Quote from: HwAoRrDk on November 27, 2018, 02:11:25 pmif you want to use PWM use a diode in parallel with the solenoid, otherwise you will be dumping lots of energy in your clampinghigh voltage clamping is good for closing a solenoid fast, but it means dumping all the energy in the clamp rather that letting it circulate in the solenoid

author: Ian.M
author_rank: Super Contributor
timestamp: November 30, 2018, 08:01:55 am
content: Yep, if you are using PWM to manage the solonoid current, you probably should be letting it recirculate through an anti-parallel diode across the coil during the PWM off period for less current ripple. If you aren't using PWM and you do need fast turnoff, its preferabe to dump the energy into a resistor in series with the diode across the coil, as power resistors have much better pulse overload ratings than semiconductors, and can be safely run at a much higher temperature.