Author Options:

Need help with MOSFET h-bridge; gets hot when using PWM frequency of ~500Hz. Answered

I recently bought an Arduino and used it to control a MOSFET h-bridge circuit.Everything worked fine until I started using PWM to drive the motors.The PWM frequency is about 500 Hz and I've already tried switching out the 1N4004 flyback diodes in the h-bridge circuit for 1N5819 shottky diodes but it didn't help. The schematic of the h-bridge can be found here ( https://cdn.instructables.com/FDQ/NF1D/GWF60U03/FDQNF1DGWF60U03.MEDIUM.gif )

What should I do?




Best Answer 5 years ago

Which of the inputs are you sending PWM ?
You do realize only one half of a leg needs the PWM..


oh ok, my circuit looks like this:


Here you are...
Only PWM the Fast direct MOSET the other NPN to a P-FET is Slow
So it is simply on and they are crisscrossed for current to flow through the motor.

And the diodes should be 1N4004.  Keep in mind each MOSFET has a
built in Fast inverse diode..  The 1N4004 can be slower and it is there
to take the heavier reactive inverse current that could damage or over heat
the MOSFET !!!   .   .   .   .   A


Thanks, but I have one question, can I connect the PWM A and PWM B to the same PWM output on my Arduino and select the direction with ON B and ON A?
That would not take up as many PWM outputs on my arduino.

I think that was the reason for the overheating!


nnnno because ...... You do understand that would cause two mosfets shorting the 12v supply !!

Yes sir, that was two years ago. I then designed the circuit so that the direction pins and the PWM were seperate.

You must know you helped me out very much back then. I used that circuit in my robot I built with my friend. It turned out very well.

Can I get the h bridge circuit with the direction control pin? That would be very useful for my project...

What rating are the Mosfets ?

What current are you taking ?

What voltage are you supplying ?

Does the motor drive ?

I'm using IRF9540N and IRF540N.

I'm supplying the circuit with a 12V SLA battery.

Now's the interesting part I just now found out: I tried switching the transistors without load and they still heated up so I don't think it has anything to do with current. What do you think?


That 22k on the NPN transistors seems very small to me. Make it 4.7K.

Your IRF 540 must be IRL540 if you're driving them from a 5V source.


Wait, you find the 22k is too small and recommend a smaller 4.7k resistor?
Is that a typo or am I not getting it?

Its too little current into the base, so its too small. Use a 4k7.


You should say the resistor is too big or the current is too small, what you said is confusing.

i made this circuit on proteus....it work well for few instants than give follwing errors

proteus file is given below.


I can't help you with that, I never touched Proteus and don't know anything about it

Almost every case of transistors getting hot is because you not turning them fully on.

In this case I expect the MOSFET isn't well matched to your needs at 500 HZ

Respond to Steve's questions & we may be able to advise further.

Do you have a better circuit for an MOSFET h-bridge using IRF9540's and IRF540's?
That way I could use it on my next project.


You'll probably get away with it, if you change out the bits I suggested. Otherwise., as I said before, what current are you expecting the motors to take ?