Arduino Uno R3: PWM problem with IRF630 / IRF9630 H-Bridge

Hello Everybody!

I am having some trouble with my Arduino Uno Rev3 and a H-Bridge made by me.

First, let me introduce the landscape:

  1. The H-Bridge was made by me, so, I have almost sure that the problem lies on it. I've taken the schematics from this site: More specifically, from the image attached below. The mosfets I am using are: IRF630 and IRF9630.

  2. I am trying to run a 12V DC motor which draws a variable current (depending on the load), but it ranges from 100mA to 900mA as I've measured with a multimeter.

  3. To control the motor, firstly and before all the problems, I was using a Motor Shield bought from DX. It features two L9110 microchips on it, but it seems like it cannot handle much current. It has two channels (For two DC motors), one of them got burned (literally, it catches on fire) after some test run on heavy load. Now I have just one channel.

  4. I read both of the following posts, which are similar to my problem. Unfortunately, they don't solved my problem:

  5. If somebody is curious, my project is a simple toy (hobby). A RC boat controlled by Arduino + Android. So when I say 'load', I mean, the effort that the motor have to do to push the boat.

Well, now lets go to the 'movie':

As I said, firstly I was running on Arduino Motor Shield, which works perfectly on tests without load, discarding coding problems. Then, I've burned one of the channels and realized that I needed a mosfet H-Bridge. I took some examples from the internet, ending up with the schematics below. After I built it, was time to burn my finger, because with Q5 and Q6 beeing two 2N2222 transistors, don't know how, a shortcut took place and I've touched the mosfet to check how hot they were. They were very hot. After that, I've got the idea to hook up both the inputs directly to the Motor Driver, as it outputs PWM too (The module is connected to ports 5 and 6). Well, it doesn't work perfectly. It does work by turning the motor on and off, clockwise and counterclockwise but it does not PWM. I can only turn to maximum, as if the PWM is at 255, or minimum, as 0. For example, it doesn't matter how much my PMW actually is, when is greater than 0, say 20, it turns on my motor to the maximum.

I think the problem is buffer, or capacitance, or something like that. I don't know how to solve. So simplifying, the problem is: I can't drive my motor using PWM. In my head, I am thinking that: When the PWM is HIGH, it 'charges' the Mosfet's Gate making it conduct from Source to Drain, then, when PMW is LOW, the Mosfet got no time to interrupt and PMW got HIGH again, thus making the motor to runs at maximum all the time. Do I need to replace the Mosfets with faster ones? Obs.: I have pull down resistors of 10K from the mosfet's Gate to Ground. Also, I tried to hook up the inputs directly to arduino digital pins with a 1K resistor in between, but the behavior stills the same.

Folks, first of all, I want to thank you for your attention by reading all of this. Second, sorry by my English, it is not my mother language. And third, I need your great expertise to help me find where the problem lies.

Below is the so called schematics:


You can't PWM with that because as soon you turn on Q1, Q2 turns off, and if you turn off Q1, Q2 turns on and tries to the opposite direction, vs letting the motor coast a little while Q1 is off. For PWM, you really need Q2/Q3 controlled separately from Q1/Q4 so that you can PWM in one direction without the other direction being turned on in the middle.

Hi CrossRoads!

Thanks for your reply. Do I have to decouple Q1/Q2 gates from the same input pin and use one pin for each gate? If so, I'll have to use 4 PWM pins to control the bridge. Is this it?

Best regards!

Hello CrossRoads,

After your explanation I realized that the problem is not with switch on / off speed of the MOSFETs. Now I understand... I will try to do something like this: Control both inputs with simple digital pins (To Forwards, Backwards and Stop the motor) and put a IRL44Z from load (entire circuit) to ground. Then I will use a single PWM pin to control this MOSFET. I think that should work.

I will try this tomorrow, then I'll post results here.

Thanks a lot for your support! Kindly regards!

It worked pretty well!

I have limited the connection to ground with another MOSFET, now I use two input pins (simple digital pins) to control the h-bridge itself (clockwise, counterclockwise and stop) and a PWM pin to control the h-bridge connection to ground. Now it works by turning on and off the entire bridge with PWM.

@Fernando Melo can you give me the revised schematic of your H-bridge, which will solves my PWM problem.