I have created an H-bridge as shown in the schematic below. The PWM signal to the MOSFET driver is generated by a microcontroller running on 5 V. The MOSFETs are screwed to heat sinks.

To control the motor direction I set either one of the driver inputs to 0 and another driver input to PWM.

I am using a 10 kHz frequency for PWM.

For clockwise rotation, I use a 40% duty cycle PWM signal on IN1 and 0 V input on IN2. For anticlockwise rotation, I use a 20% duty cycle PWM signal on IN2 and 0 V input on IN1.

Now, in the code, I turn the motor clockwise for 1 second, Set both IN1 and IN2 0 for 50 ms for braking, and turn the motor anticlockwise for 1 second.

The circuit worked fine for 3 minutes, but later Q3 MOSFET was smoking first, and the other MOSFETS followed, and the motor was stuck at the braking condition.

MOSFETs don't get warm during normal operation. I don't understand what I am missing here. Even the frequency is not that high. The rise and fall times of the MOSFETs are at worst 150 ns according to the datasheet.

Am I missing a snubber circuit? If yes, how to properly design one?

Motor nominal current is 1.5 A and the stall current is 8 A.

enter image description here

  • 2
    \$\begingroup\$ Try 1R serial resistors on the gates. Even maybe 0R. Most probably you have terrible switching losses. Turning on/off faster would help. Although, you could also have just some very high current on your motor. Do you measure the current? Is it controlled? \$\endgroup\$
    – user76844
    Commented May 5, 2020 at 3:51
  • 4
    \$\begingroup\$ Add large 100uF+ capacitors across your motor power supply. \$\endgroup\$
    – DKNguyen
    Commented May 5, 2020 at 4:02
  • 4
    \$\begingroup\$ "The rise and fall times of Mosfet are at worst 150ns according to the datasheet." No. This depends on your gate driver, gate resistors, and gate-source capacitance. Not just your gate driver. \$\endgroup\$
    – DKNguyen
    Commented May 5, 2020 at 4:03
  • 7
    \$\begingroup\$ You can also just trying running it with an open-circuit instead of a motor. If it still eventually blows then you have shoot-through problems. Since IR2104 has built in dead-time, that would mean your switches are taking too long to turn on and off. Longer than the built-in 520ns dead-time. After, if you have a 20W, 8 Ohm resistor, you can replace the motor with that and if it blows again then you your rise/fall times are fast enough to not have shoot-through, but are still too slow. If it does not blow, then the issue is probably ringing, or voltage spikes from your motor inductance. \$\endgroup\$
    – DKNguyen
    Commented May 5, 2020 at 4:08
  • 1
    \$\begingroup\$ You don't have a scope, huh? It should be pretty obvious with a scope what is going on. \$\endgroup\$
    – DKNguyen
    Commented May 5, 2020 at 4:12

3 Answers 3


As the OP user3030 never came back to answer this post, it seems this will be a suitable substitute. From their comments:


Removed gate resistors, added 0.1uF and 470uF across the power supply and tested with no load, the circuit works fine. No issues till now and MOSFETs are cool as a cucumber.


I had to put the whole device to test run. So the motor is running in both forward and reverse for about 8hrs continuously now. Mosfet Heat sink is not even getting lukewarm.

Since comments should not be used to post answers, the approach explained here has been applied to post someone else's comment(s) as an answer. The answer is set to "Community wiki" so that site members don't earn any points from this reposting of someone else's material.

  1. When you drive in brake mode, you motor just regenerate current back to power source there for you need big capacitor whit proper frequency response to PWM frequency to absorb voltage spike.
  2. Add R_gs to all fet for safety
  3. I’m not sure about fet diode if it can handle regenerate current. The regenerate current peak is about you load peak. If not you need external diode.
  4. Try to check V_gs to see if shoot through occur or any overlap many be you need to set mor dead time.
  5. Ramp input is great idea to reduce current spike.

Motors are like capacitors. When running they (partially) copy the supply voltage with their back emf and this reduces the current draw. when the supply is disconnected this back emf voltage remains, reducing as they spin down.

In this voltage copying and current reducing behavior they are like capacitors.

When a motor is short circuited it is like applying the brakes.

Using IN for PWM speed control will cause high currents to flow as the motor speeds up form a low speed. and then current will flow the other way as both lower FETs are on and the motor is short-circuited.

Use PWM on the ~SD pin instead.

This will open-circuit the supply allowing the motor to coast while the PWM has the driver in shutdown, instead of convertin all that input power into heat.

PWM is good, but don't drive it a rally car (foot alternately hard on the accelerator and hard on the brakes), let it coast between pulses.

  • \$\begingroup\$ Can you please elaborate. What would be the difference? \$\endgroup\$
    – user3030
    Commented May 5, 2020 at 6:15
  • \$\begingroup\$ The motor is an inductive load BTW. In order to limit the inrush current, I am providing a ramp input. \$\endgroup\$
    – user3030
    Commented May 5, 2020 at 6:21
  • \$\begingroup\$ Inductors don't have inrush. just because it's made with coiled wire does not make it an inductor. \$\endgroup\$ Commented May 5, 2020 at 10:22
  • \$\begingroup\$ "Using IN for PWM speed control will cause high currents to flow." How so? The IR2104 has built-in deadtime so shoot-through should not be a problem if implemented properly. If used as the OP has it, the low-side MOSFET acts as a synchronous rectifier relieving the flyback diode, unless it is this which you are referring to where low-side conducting longer than it needs to starts to brake rather than relieve the flyback spike. \$\endgroup\$
    – DKNguyen
    Commented May 5, 2020 at 15:25
  • \$\begingroup\$ @DKNguyen short answer: Because motors are more like capacitors than they are like inductors. \$\endgroup\$ Commented May 5, 2020 at 20:56

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.