So this is my H-bridge: enter image description here Every time I start using it in one direction the P-channel MOSFET and the NPN BJT which belong to the used direction die in seconds. The killed MOSFET and the BJT developing a short circuit so I can use the other direction no more. They die without noticeable heat or smoke!
The controller is an arduino uno, and only the N-channel MOSFETs are driven with PWM signal, the P-channels are connected to simple digital output pins. PWM frequency is the default 490Hz for digital pins 9 and 10 (each PWM output is individual). I've already killed 4-5 P-channel MOSFET + BJT pair, it could happen on both side. (It depends which direction I use first.) The motor is a 12V car windshield wiper DC motor, the power supply is 12V 5A. 12V and 5V power supply grounds are connected.

There are two things which may be true, but I am not 100% sure as I did not test it thoroughly:

  • in the former version I was using 1k resistors for R7 and R8, and I did not have any problems. I will try it again but I am running low on P-channel MOSFETs now..
  • when I cut out the fried MOSFET + BJT pair, I can use the other direction without killing the remaining MOSFET + BJT pair.

Please help me, what is happening here :)

  • Should I use a resistor between the NPN BJT and the P-channel MOSFET?
  • Should I use a 2n7000 MOSFET instead of the 2N2222 BJT?

UPDATE: I've just tested the H-bridge with a 12V 55W light bulb instead of the wiper motor. The P-FET and NPN were killed during the test. The N-channel side was driven with a 40% PWM signal. Without a load it did not have any problem.

UPDATE2: I changed back R7 and R8 to 1k from 150R. Now the bridge is working again without any components failing. (I didn't run it for days, but with the 150R resistors the reproducing of the fault only took a few seconds.) I will add some decoupling capacitors on the bridge between the GND and +12V anyway as Brian suggested. Thanks for the answers to everyone!

  • \$\begingroup\$ Have you ruled out a programming mistake? Does it still die when you manually control your H-bridge? \$\endgroup\$
    – rve
    Commented Mar 8, 2016 at 13:04
  • \$\begingroup\$ I tried to rule it out. I did not try it manually but I was doing a lot of tests with a smaller power supply without any load connected the the H-bridge. I will try manually control the bridge next time though. \$\endgroup\$
    – gOldie_E36
    Commented Mar 8, 2016 at 13:22
  • 1
    \$\begingroup\$ For testing, and to reduce the chance you kill another mosfet, try replacing your motor with something much smaller. Like a pair of leds, or a small toy motor or something. \$\endgroup\$
    – Passerby
    Commented Mar 8, 2016 at 17:43

6 Answers 6


How are you decoupling the 12V supply?

One possible failure mode is that inductive spikes from switching off the motor current (i.e. at the PWM rate) are dumped into the 12V supply via the flyback diodes. Yes, that's supposed to happen, but...

If the 12V supply is not decoupled, and is sourced from a PSU not a rechargeable battery, or is sourced via a long (inductive) cable, it is not actually a 12V supply, but momentarily driven up to that inductive spike voltage. Which could be well above the MOSFET ratings...

Monitor the 12V supply with a fast oscilloscope. If it shows signs of over-voltage spikes, increase its decoupling until it doesn't. (That should include 0.1uF ceramic capacitors for low HF impedance as well as an electrolytic reservoir capacitor. And possibly a 16V or 25V zener diode just in case...).

I don't know that this is your actual problem, but it is one base you MUST cover.

  • 1
    \$\begingroup\$ This is the most plausible explanation. Such a spike could easily exceed the 20V absolute max Vgs specification of the IRF4905. The resulting gate-to-source short would then allow a large current to flow though the NPN driver, destroying it as well. \$\endgroup\$
    – Dave Tweed
    Commented Mar 8, 2016 at 12:34
  • \$\begingroup\$ Good point, I am not using any decoupling. I have a cheap 20Mhz oscilloscope I will give it a try to monitor the supply. I have some ceramic and also electrolytic capacitors so I can connect them. I do not have zeners though. (I will get some.) \$\endgroup\$
    – gOldie_E36
    Commented Mar 8, 2016 at 12:35
  • \$\begingroup\$ Hold off on the zeners; in automotive apps, 16V zeners won't be enough because of everything else that can drive up the supply (while charging, it'll be perilously close to 16V anyway). And if those FETs are really 20V Vgs they won't last long in a car, though they will be fine on a (decoupled) 12V lab PSU. \$\endgroup\$
    – user16324
    Commented Mar 8, 2016 at 12:38
  • \$\begingroup\$ The motor is coming from a car but I planning to use it with a 12V "lab" supply (actually it is a cheap chinese AC to DC switching PSU). \$\endgroup\$
    – gOldie_E36
    Commented Mar 8, 2016 at 12:59
  • 1
    \$\begingroup\$ I didn't add the capacitors yet because I was curious what will happen with the same circuit but instead the inductive load with a light bulb. It still behaves the same way. \$\endgroup\$
    – gOldie_E36
    Commented Mar 8, 2016 at 21:57

R1 R2 are far too big for all but the smallest nonexistant mosfets.This means that they are turning of much slower than they are turning on .This means that even if you think that you have included some sensible deadtime you will still get shoot through and eat fets.I use a extra transistor to do a fast turn off ,its worth it .

  • \$\begingroup\$ I was using 100ms dead time between changing direction, but at the last try I was not changed direction at all. (To rule out the possibility of shoot through at changing directions.) And the transistors fried anyway. What size of resistors do you recommend for R1 and R2? And how should I connect the extra transistors for turn off? \$\endgroup\$
    – gOldie_E36
    Commented Mar 8, 2016 at 10:55

One of the top P channel MOSFETs is active - this determines direction. When you apply PWM to both N channel MOSFETs (as implied in your circuit), you get shoot-thru on one half of the H bridge.

You must NOT apply PWM to both N channels devices - only apply it to the bottom right when the top left P channel device is activated OR only apply it to the bottom left when the top right P channel device is activated.

EDIT - also, your P channel MOSFETs are upside down.

  • 1
    \$\begingroup\$ And next time, test it with a current limited power supply so that if for some reason you have an error, at least your transistors don't destroy themselves. \$\endgroup\$ Commented Mar 8, 2016 at 10:09
  • \$\begingroup\$ I do not apply PWM to both N-channel in the same time. Only to one at a time. I can use both direction for the first time, but during the operation the P-channel MOSFET and the BJT which belongs to the used direction die. \$\endgroup\$
    – gOldie_E36
    Commented Mar 8, 2016 at 10:10
  • \$\begingroup\$ No shoot-thru is happening, and for the last couple of times I was using an 12V 55W light bulb in series with the power supply. So I can detect shoot-thru (the bulb gets bright) and in the same time I can protect my MOSFETs from shoot-thru situation. The problem is that the transistors die during normal operation. \$\endgroup\$
    – gOldie_E36
    Commented Mar 8, 2016 at 10:13
  • \$\begingroup\$ @gOldie_E36 if so why did you say this "the N-channel MOSFETs are driven with PWM signal" and why does your diagram show "PWM" as a name on both N channel MOSFETs? Also, your P channel MOSFETs are upside down. \$\endgroup\$
    – Andy aka
    Commented Mar 8, 2016 at 10:45
  • 1
    \$\begingroup\$ People can only help you if you provide accurate information. If you provide bad information you waste people's time. Given what has happened how can anyone trust that your physical placement of components is any more accurate than your diagrams? \$\endgroup\$
    – Andy aka
    Commented Mar 8, 2016 at 11:51

One thing that stands out to me is the lack of flyback diodes across your FETs. As your motor is an inductive load, it can very easily generate high voltages across your FETs when there is a change in current (V = L dI/dT in an inductor). These voltages can easily exceed the breakdown rating of the source-drain junction in your FETs.

To solve this, a diode is normally put in parallel with the junction to keep the voltage in check like so:

H bridge diodes

(Image from: http://www.modularcircuits.com/blog/articles/h-bridge-secrets/mosfets-and-catch-diodes/)

This "clamps" the voltage across the FET.

  • \$\begingroup\$ Ah sorry it is my bad. I forget it from the picture. There are flyback diodes for each of the MOSFETs between the source and the drain. 1N4007 diodes aiming in the right direction. I will update the picture. I've already tested and replaced the diodes at the P-channel MOSFETs but the situation is the same. :( \$\endgroup\$
    – gOldie_E36
    Commented Mar 8, 2016 at 10:17
  • \$\begingroup\$ MOSFETs have built-in diodes which are usually sufficient. The 1N4007 is a low frequency rectifier diode not suitable for fast switching. If you use external diodes they should be Schottky type. \$\endgroup\$ Commented Mar 8, 2016 at 14:44
  • \$\begingroup\$ So MOSFEts do not need flyback diodes at all? I am only using ~490Hz, is this too fast for the 1N4007 diodes? \$\endgroup\$
    – gOldie_E36
    Commented Mar 8, 2016 at 14:58

@Autistic is right about R1 and R2 - this arrangement will lead to very slow switching times on the P fets. You may consider using a dedicated P Fet driver charge pump instead of the BJT+Pullup.

Some sanity checks

Can you check the driving signals? It is very important which FET is turned on or off.

p1 on    p2 off 
n1 off   n2 on

p1 off    p2 on 
n1 on     n2 off

p1 off    p2 off
n1 on     n2 on

Try the followings:

  • stop any PWM
  • disconnect any load
  • drive from your code as: p1 on n1 off, wait 500ms, p1 off n1 off 100ms (dead time), p1 off n1 on 500ms, p1 off n1 off 100 ms (dead time) and repeat. This produces a test signal which is easy to debug.
  • now the p1 n1 output of the h-bridge shall switch from GND to 12V nicely. Use a scope to test it, or you can use a small light bulb as well. Connect the bulb between GND and the p1 n1 output - it shall blink so p1 is good. Connect it to 12V and p1 n1 output - it shall blink so n1 is good.
  • if you have a scope, verify if p1 and n1 is not cross-conducting. Checking this signal you shall not see any other value than clean GND, clean 12V, and some floating GND in the 100ms dead time.
  • if you have no scope, you can set a quite big dead time, e.g. 500ms - it can not hurt :) but can save your P fet.
  • now connect your motor instead of the light bulb, it shall run and slow/stop like the bulb. This verifies that the fets are ok.

The problem

  • Be very cautious about the PWM arrangement above. You can very easily fry your fets. You can turn on the P side while you're switching the N side, therefore you make shorts (smaller or bigger - it may survive with 20% PWM depending on the quality of your power source).

Normally, microcontrollers have a dedicated 4 output PWM driver with deadband control. The 4 PWM signals can drive the 4 fets, and these signals are synchronized and inverted, plus the dead time is taken into account. See the PIC microcontrollers' PWM for more. http://www.ermicro.com/blog/wp-content/uploads/2009/01/picpwm_03.jpg

Since the Arduino is not built for that purpose, you may wish to use some basic logic to produce the right PWM signals. The goal is to ensure that n1 and p1 are always driven complementary, as well as n2 and p2. You can get it by using some more BJTs: http://letsmakerobots.com/files/YG_H-Bridge1.jpg Then you have the two pins which you can PWM drive.

You might rather use some logic gates, like this: https://e2e.ti.com/blogs_/b/motordrivecontrol/archive/2012/03/26/so-which-pwm-technique-is-best-part-2 and then you have a clean forward/reverse, plus one PWM pin which drives the speed.

This article may worth of checking: http://www.modularcircuits.com/blog/articles/h-bridge-secrets/h-bridge_drivers/

  • \$\begingroup\$ Thanks for the answer. This part is still unclear to me: "Do NOT try the PWM arrangement above. It is just wrong. You can not control the P side while you're switching the N side, therefore you make shorts." Is this still valid if I am not switching the P side with PWM, only the N side, and if I use a big deadtime between changing directions? If so, how? \$\endgroup\$
    – gOldie_E36
    Commented Mar 12, 2016 at 8:24
  • 1
    \$\begingroup\$ Sorry I was to strict on that. There are multiple ways to drive PWM. The standard way is to drive P1 N2 from a complementer PWM output, and drive P2 N1 from another pair of complementer PWM output, this way you need 4 pwm outputs driving everything properly. Your solution could work, if you're very cautious, and don't need to brake the motor. E.g. p1 on, n1 off, p2 off, n2 PWM is a valid arrangement - albeit you can not brake the motor, and final motor speed will depend on the PWM plus the mechanical load. (If n2 is off during PWM, there is no drive voltage on the motor.) \$\endgroup\$
    – Gee Bee
    Commented Mar 12, 2016 at 21:30
  • \$\begingroup\$ I've rephrased my answer. If it is not an educational task, I would suggest using a ready made H-bridge controller, or a H-bridge controller with external FETs. \$\endgroup\$
    – Gee Bee
    Commented Mar 12, 2016 at 21:36

Are you sure that you are switching on the top left P-FET when you are apply PWM to the bottom right N-FET?

You should double check your P-FET orientation. It seems like the P-FET is backwards and you are getting excessive power dissipation when the P-FET body diode conducts. Measure the voltage across the P-FET under your fault conditions. If you see around 0.6 V across the FET when the 2N2222 is on, then the P-FET is reversed. Also check the P-FET gate voltage during the fault condition to ensure it is seeing less than 0.2 V.

Do you still see the fault current if you remove your motor from the circuit ?

  • \$\begingroup\$ Hi, thanks for your answer. I will check the orientation again. The problem is that I can't really do anything during the reproduction, cause it takes only a few seconds to kill the MOSFET (silently, without any excessive heat). And of course it costs me a MOSFET :) Without the motor and with an 1A power supply I did a lot of measurement though. If I turn on the P-FET the voltage accross the drain-source is minimal (something like 0.01 V). I will retest the circuit in the evening with the 5A power supply and without the inductive load (motor). I am planning to use just a light bulb instead. \$\endgroup\$
    – gOldie_E36
    Commented Mar 8, 2016 at 13:15
  • \$\begingroup\$ Try not turning on the P-FET (do not drive the 2N2222) and see if you hit the current limit when you PWM the N-FET. If so, the P-FET body diode is conducting. Also Try replacing your motor load with a 100 ohm resistor AND put a 10 ohm or so resistor between the power supply and your circuit. You will limit the current if the N-FET is shorting the P-FET body diode to ground. The resistors will also give you time to take some measurements before over heating. \$\endgroup\$ Commented Mar 8, 2016 at 14:43
  • \$\begingroup\$ Good ideas for testing, thanks. I was already using a resistor between the PSU and the H-bridge for protection. \$\endgroup\$
    – gOldie_E36
    Commented Mar 8, 2016 at 15:00

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.