Is this MOSFET driver circuit ok? - Page 1
Forum section: electronics / projects

author: Chriss
author_rank: Frequent Contributor
timestamp: January 12, 2020, 09:46:58 pm
content: Hi!I'm working on a small project where I have to achieve to control an injector solenoid with 3ms ON and 10ms OFF signal.I should also have the ability to speed up and slow down the pulse but not to affect the 3ms ON time.That part is ok for me, I did it with an Attiny85...The input voltage is 12V and the injector consume around 2A current.If this is needed.What about I care, is the part where I drive the MOSFET.Is this circuit good enough to handle the task?Maybe some suggestion to improve this section or any other ?I would appreciate any idea and help how to make my circuit/hardware more stable.I have to say, I realized the whole project and it is working well, but I'm also wish to have some info fromyou guys who are dealing with electronics design every day or from technicians who are more in this stuff then I.Thank you very much.My best regards.

author: silverback
author_rank: Contributor
timestamp: January 12, 2020, 09:52:43 pm
content: Hi, there should be NO connection between the opto coupler collector and the FET drain, turn off time can be improved by using an additional Zener in the fly back diode. This increases the voltage at fly back therefore reducing the off time.

author: Chriss
author_rank: Frequent Contributor
timestamp: January 12, 2020, 10:05:39 pm
content: Thank you for your time.Can you pls show me maybe a right way how to connect the fet with the opto the right way?I'm also a bit confused with that part, so a schematic about how to connect it would be nice.Thank you.My best regards.

author: Chriss
author_rank: Frequent Contributor
timestamp: January 12, 2020, 10:19:19 pm
content: Ok.I decided the collector from the opto to connect to the 12v but cut the trace between the collector and the fet. The LED2 would be still connected to the fet, to have a visual feed back about the speed of the fet on/off state.Would this be a good mod?Thank you.

author: Etesla
author_rank: Regular Contributor
timestamp: January 12, 2020, 10:54:10 pm
content: I am not sure what you mean by connecting the LED to the fet, but the rest of it sounded OK. In an Ideal world I think your circuit would look like this.

author: Zero999
author_rank: Super Contributor
timestamp: January 12, 2020, 10:59:07 pm
content: Why do you plan to use an opto-coupler? The MOSFET driving the solenoid is on the same ground as the microcontroller, so there's no need for isolation. All the opto-coupler is doing is slowing the switching down, especially the turn off time, with that 10k resistor. Get rid of it and connect the MOSFET gate to the MCU via a low value resistor, say 47R. The injector only uses 2A and the IRF1010N is capable of passing more than that, with a gate-source voltage of 5V.

author: Chriss
author_rank: Frequent Contributor
timestamp: January 12, 2020, 11:01:54 pm
content: Wow! Thank you for this.I really like your mod.The led you connected is really good, I was focused to get the signal to the LED2 from the fet, but I like your design much more.I'm already making the mod on the board... :-)What would the best way to protect the MOSFET from short on the output?Zero999:I will try that too.I was hoping the uC would be better protected if I use an opto, but as you wrote the fet and uC are on the same gnd, so the opto makes no sense anymore...Thank you.

author: floobydust
author_rank: Super Contributor
timestamp: January 12, 2020, 11:44:17 pm
content: Just a few observations;The LM7805CT has a minimum load requirement of 5mA and I'm not sure you have that?ATTiny85 in a car, I use LP2950 for a 5V reg. I also add transient protection (series 1N4004, TVS) to the input at C1.Best to look at a logic-level N-ch mosfet that is OK with 5V drive. IRF1010 needs well over 5V drive.I also turn on internal pullups and have pushbuttons go to GND, to save a few parts.You would want a fast-recovery diode across the solenoid, not a slow 1N4001. Like UF5404.

author: DBecker
author_rank: Frequent Contributor
timestamp: January 13, 2020, 01:42:33 am
content: Are you talking about driving an automotive high impedance fuel injector?You don't want a freewheel diode. That will unpredictably delay turn-off. You want a protected driver with clamp. The clamp will allow the voltage to rise to 40V-70V at turn-off, and then turn on the MOSFET slightly to limit the voltage spike. 70V is preferred for injectors, but a 40V clamp will work well.

author: Chriss
author_rank: Frequent Contributor
timestamp: January 13, 2020, 06:55:24 am
content: DBecker:Yes, I wish to drive a car fuel injector, but only on the bench and nothing to do about driving or etc. with my design.More to learn, designing, programming stuff...I didn't understand correctly what you mean by the clamping circuit vs the fly back diode.Can you pls give a circuit about that?Thank you.

author: magic
author_rank: Super Contributor
timestamp: January 13, 2020, 11:41:02 am
content: Quote from: DBecker on January 13, 2020, 01:42:33 amAny particular advantage over using, say, a 55V MOSFET and letting it avalanche?Quote from: Chriss on January 13, 2020, 06:55:24 amIt's about the need to apply reverse voltage to an inductive load to stop current flow through it. This voltage is helpfully produced by the load itself when the FET turns off (the - connection to the load starts to rise above 12V) and the more you allow it to rise above 12V, the faster will the load turn off. The 1N4001 diode permits only about 0.7V.

author: Chriss
author_rank: Frequent Contributor
timestamp: January 13, 2020, 01:21:55 pm
content: Ok.I understand now the clamping...If I just replace the D1 with a fast recovery one, like someone wrote before, does that would be enough to make the proper clamping circuit?

author: Zero999
author_rank: Super Contributor
timestamp: January 13, 2020, 07:28:11 pm
content: Quote from: floobydust on January 12, 2020, 11:44:17 pmI agree it's not ideal, but it's rated for 60A and the original poster is only using it for 2A, which it can happily do, even with only 4.5V of gate drive.https://www.infineon.com/dgdl/irf1010npbf.pdf?fileId=5546d462533600a4015355da754e188bQuote from: Chriss on January 13, 2020, 01:21:55 pmIf you want to turn the solenoid off as quickly as possible, then any freewheeling diode will slow it down. When the transistor switches off, the current keeps flowing through the inductor and diode. The voltage drop across the diode will be just over a volt or so, at 2A, so the current will decay very slowly. A zener diode in reverse parallel with the MOSFET will dissipate the energy more quickly than a free-wheeling diode. You need to choose a zener diode with a slightly lower breakdown voltage, than the MOSFET.

author: Chriss
author_rank: Frequent Contributor
timestamp: January 13, 2020, 07:50:45 pm
content: Ok.What you mean by " A zener diode in reverse parallel with the MOSFET" the zen should be connected between S&D of the mosfet? Assume not. Or?Should I leav the D1 and add the zener in paralell with the mosfet S&D?Thanks.

author: Zero999
author_rank: Super Contributor
timestamp: January 13, 2020, 08:43:22 pm
content: The higher the voltage across the inductor, the quicker the current will decay. An ordinary diode has a voltage drop of a volt, at high currents, compared to its rating, so the current will decay slowly. When the MOSFET turns off, the voltage on the negative side of the inductor is just a bit higher than the supply voltage. A zener diode clamps the voltage across the MOSFET to around 55V in this case, so the current falls more rapidly. The voltage across the inductor will be the zener voltage (the 1N5369B is a 51V, but the voltage is higher, at higher currents) minus the supply voltage.

author: Chriss
author_rank: Frequent Contributor
timestamp: January 13, 2020, 09:46:31 pm
content: I can say only big THANK YoU!The diagram shows everything.Thanks again to all of you to put me in the proper direction.My best regards.

author: langwadt
author_rank: Super Contributor
timestamp: January 13, 2020, 11:19:02 pm
content: Quote from: Zero999 on January 13, 2020, 07:28:11 pmor depending on the rating of the FET skip the zener and let the FET do the clampingsomething like a VND7N04 has clamping and temperature/short circuit protection

author: Chriss
author_rank: Frequent Contributor
timestamp: January 14, 2020, 01:22:14 am
content: Hmmm. This fet what mentioned the VND7N04 looks very interesting. I think I could save several parts with changing from my fet to the VND7N04.Thanks for this info.

author: DBecker
author_rank: Frequent Contributor
timestamp: January 14, 2020, 02:46:28 am
content: You probably want something with a little more power handling capability so you don't have to be so careful with the gate voltage and heatsinking. The VND14NV04 is an older part that is now inexpensive. I recently bought a few on Aliexpress for 0.40 each.Note that because the fault feedback shorts the gate input, it requires a resistor in series with the gate.The gate is best driven with 5V, but it's still usable at 3.3V.

author: MagicSmoker
author_rank: Super Contributor
timestamp: January 14, 2020, 12:37:33 pm
content: Quote from: langwadt on January 13, 2020, 11:19:02 pmI'd advise against this as not every FET is going to be happy with being repetitively avalanched, meaning a careless replacement could result in the immediate release of the precious magic smoke. Instead, replacing the freewheeling diode with a 24-36V bidirectional TVS* is a much safer alternative that will still achieve very speedy turn-off of the solenoid yet allow almost any MOSFET to be used in the circuit (well, any MOSFET with a Vds rating >50V or so, depending on what voltage the TVS clamps at, exactly).* - e.g., SA24CA, SMAJ24CA, P6KE36CA, etc.

author: langwadt
author_rank: Super Contributor
timestamp: January 14, 2020, 01:47:23 pm
content: Quote from: MagicSmoker on January 14, 2020, 12:37:33 pmAnd if you carelessly replace parts with random parts that happens to have the same number of pins the circuit might not work ....

author: DBecker
author_rank: Frequent Contributor
timestamp: January 14, 2020, 05:53:55 pm
content: Quote from: MagicSmoker on January 14, 2020, 12:37:33 pmA clamping driver, such as the OMNIFET parts mentioned above, does not use avalanche behavior. It uses a zener diode from the drain to the gate. This turns the MOSFET on to limit the inductive "kick" voltage. It is more compact and effective than a traditional snubber circuit, and is much less sensitive to the load characteristics.

author: Chriss
author_rank: Frequent Contributor
timestamp: January 14, 2020, 07:56:59 pm
content: For sure guys I won't just pop out parts and replace them just so, I will check datasheets and infos about compatibility of the device and pinout arrangement etc.But thanks for the precaution.Reading your writings I slightly realized something what is maybe a better solution for my project than this what I built up and posted in my first post.Maybe it is a better solution to avoid an active clamping circuit and using the avalanche behaviour of a proper mosfet.I think from reading on the net and datasheets, to use the avalanche characteristic of a mosfet is more safer for the mosfet than to use an active clamping circuit.From my perspective a mosfet which is suitable for driving inductive loads with internal protection etc. is a better option to use by me,cos it is more precise calculated and built up compared to my calculations and maybe perspective of view.Team of engineers done a much better protection and clamping for the specific mosfet than I can do as an average guy who has lot of electronics and programming knowledge but still not an official electronic engineer - part designer.So, a mosfet let's say like the VND7N04 has a clamping circuit, a thermal and short protection circuit and a really dummi feedback but in conjunction with my dummy Attiny85 I could use that feedback to trigger an alarm and shut down immediately the circuit.That sound so to me a more safer circuit than I did with all my mess of opto, clamping diode etc...What do you think about this thinking path?Maybe you can advice me a better or newer mosfet for my purpose?btw. in what software was done that nice simulation what was posted by Zero999 ?Thank you all of you for your time and help.I learned lot of things from you.My best regards.

author: MagicSmoker
author_rank: Super Contributor
timestamp: January 14, 2020, 08:37:33 pm
content: Quote from: DBecker on January 14, 2020, 05:53:55 pmI didn't look up the datasheet for the above part, but my warning about not blithely relying on avalanching the mosfet with inductive loads applies to this as well: if a generic load switching circuit like this relies on a specific mosfet to not blow up then it's not a very robust design.Quote from: Chriss on January 14, 2020, 07:56:59 pmErf, no, you got that backwards: only some MOSFETs are characterized for repetitive avalanche, and there are always strict limits on the amount of energy per avalanche regardless of whether it occurs regularly or just occasionally. My earlier suggestion to use a bidirectional TVS diode across the load (or the Zener across the MOSFET drain-source, as Zero999 shows) is the safest for both load and MOSFET, allows a wide variety of MOSFETs to be used, and enables much more rapid demagnetization of inductive loads than either a conventional freewheeling diode or the clever little MOSFET mentioned above that automatically turns itself back on when an inductive load "kicks" during turn-off.P.S. - the simulation software Zero999 - and most of the rest of us here - use isLTspice

author: DBecker
author_rank: Frequent Contributor
timestamp: January 14, 2020, 09:43:17 pm
content: Quote from: MagicSmoker on January 14, 2020, 08:37:33 pmIt's a very robust design. It's one of the standard ways to drive an injector.A protected driver is not just a MOSFET, it has additional functions. You wouldn't expect to substitute a simple MOSFET in its place.The trend is toward using larger chips with multiple drivers and integrated diagnostics, such as the TLE8888 or L9788. They all use similar clamped drivers. You don't see 1990s-style discrete solutions.

author: MagicSmoker
author_rank: Super Contributor
timestamp: January 14, 2020, 11:20:16 pm
content: Quote from: DBecker on January 14, 2020, 09:43:17 pmOr like the BTS5231, a smart high side switch for automotive applications which was available for all of 3 years before Infineon abruptly discontinued it. That's the game you play when you rely on specialized ICs rather than "1990s-style discrete solutions."Besides, the OP doesn't appear to be making a fuel injection system - rather, using a single fuel injector for some other purpose - and it's safe to say he isn't doing this on behalf of an automotive OEM. THAT is why I steered him towards a more conventional approach.

author: DBecker
author_rank: Frequent Contributor
timestamp: January 15, 2020, 01:55:37 am
content: Quote from: MagicSmoker on January 14, 2020, 11:20:16 pmThe first version of the VND14NV04 is listed as 2004. Digikey currently has 11,300 in stock. It's hardly a specialized part with uncertain availability.

author: Chriss
author_rank: Frequent Contributor
timestamp: January 15, 2020, 04:52:06 pm
content: I got the point of the avalanche using mosfet stuff. Now it is cleare for me how bad can that be especially when the mosfet avalanche mode is repetitive used.That could kill the mosfet very quickly...Ok.Would somebody be honest and draw a circuit just with the mosfet, load and the clamping so I can be sure I got all the major point how to do it the right way.Thank you.My best regards.

author: DBecker
author_rank: Frequent Contributor
timestamp: January 15, 2020, 08:05:57 pm
content: Delete D1, the optocoupler and R2.Use a VND14NV04 (or similar protected driver) in place of Q1.Change R3 to about 1 Kohms. It now serves the input resistor.You likely will initially bench test with no diagnostic feedback.Implementing diagnostic feedback is best done just before or during turn-off.The obvious way to implement diagnostic feed back is using an input pin to monitor the input of the driver. If you are outputting a high level, the input should be high. If it's low, the input is being pulled down by the protection circuitry.Alternatively you can monitor that without using an additional pin. Change the pin from output high to input with pull-up and immediately read back the pin level. If it's still high, then the driver is operating normally with the internal protection circuitry being supplied their 100uA draw through the ATTiny pull-up resistors of about 25 KOhms. If it's low, the protection circuitry has pulled the input low and the 1K series resistor is dominant over the internal pull-up and circuit capacitance.You might consider the LED2 activity indicator circuit. LEDs are generally robust with reverse voltage well over their rating (typically only 5V). Some circuits expose them to 120VAC through just a high value resistor. But to meet datasheet specs you'll want a diode in series. For automotive use you would want to move it to the 5V rail for consistent brightness, but for bench testing the 12V supply is OK. I suggest that you increase the resistance substantially if you are going to be using 12V.