My H-bridge doesn't seem to be working

I've designed and built the following circuit using a stripboard and an arduino. But, the out across the motors measures in the mV rather than ~7V. Can anyone advise to what I'm doing wrong?

Is the Arduino GND connected to the driver GND?

You need series resistors in the base and gate connections to protect the port pins.

Is there any code running on the Nano? If so, post it, using code tags.

Arduino is not connected to the driver ground. Good point.

Ah I thought the internal resistor would be adequate. Do you think 10kOhm would be sufficient?

digitalWrite(12, LOW);
digitalWrite(10, HIGH);
digitalWrite(11, LOW);
digitalWrite(9, HIGH);

The required base resistors go in series between the Arduino output and the transistor base, so the internal resistors are not useful in this case. Leave them off.

No, 10K is much much too high. Values on the order of 180 - 330 would be more appropriate.

The resistors are used to limit the current that can flow from the Arduino output through the base and to ground through the emitter. The recommended maximum current from an output is 20mA for a mega328 based Arduino.

image
R2 is the required base resistor.

This is very enlightening, thanks for the thorough explination.

Here is a typical schematic for an Arduino, low side, logic level MOSFET switch. The 10K gate resistor is needed in case the Arduino pin is floating (which is always the case when the Arduino starts up).

Okay, thanks for your information. I've implimented resistors on the arduino outputs and made sure that it's connected to the ground of the driver.

Now the outputs are reading ~300mV (alternating when in arduino inputs are reversed), I'm using an arduino uno to run this at the moment, running of a 9V battery.

Also, the FQP27P06 MOSFETs are getting very very hot, which is concerning.

Any more suggestions?

Your 9v battery is a bad move . Transistors should not be getting hot , suggesting they not be turning fully on , or you have the wrong transistors switched at any moment and causing a short circuit - the transistors invert the signal.
I’d suggest taking the top right and bottom left transistors out ( so a short is not possible ) and see if you can get the motor to run . Then swap over top left, bottom right and see it then works . Must avoid having say top and bottom on either side being on at the same time .

Okay, I'm running the driver and the arduino off of the same supply now. I'm still getting the overheating and 300mV output (across the motor).

I may have figure out a massive mistake, which is that I have my N-channel (RFP12N10L) mosfets wired the wrong way round, drain-source.

Whats the probability they're broken and need to be replaced?

48,3%.

Very accurate, thanks.

I've swapped around the drain-source on the n-channel MOSFETs, the over-heating issue remains on the P-channels, and the output voltage is now circa 500mV.

Any further suggestions?

Try a simple circuit to check the transistors work as expected.

Try the circuit without Arduino with hardwired inputs. Try it with a weak or supply and light load.

If it passes add features.

Replace the unidentified motors with a 1K resistor and retest everything.

Overheating MOSFETs suggest that you are observing "shoot through", basically short-circuiting the motor power supply, a very common and serious problem with that circuit.

If shoot-through isn't the problem, the transistors are damaged or destroyed.

Okay interesting, Ill do some reading around shoot-through. I'm not using any PWM control btw.

I'm also going to do as Smajdalf recommended and separate out some of the MOSFET switches and see if they work independently.

Will report back.

Thanks for all your help so far!

It appears to me that you have paired the Arduino pins incorrectly and both mosfets in the right hand half bridge are fully on. Only one mosfet should be on in each half bridge at any one time to avoid shoot through.

When the top p-channel resistors are set to high, then are closed, and when they are low they are open. The lower n channel resistors are high open, low closed. The logic seems okay to me?

Results from testing P and N channels in isolation:

  • As 6v6gt suggested, it seems that the logic level for the transistor/P-channel MOSFETs were incorrect. HIGH = On, LOW = off.
  • Otherwise, the top-side of the bridge (transistor/P MOSFET)s work well.
  • In testing the N side, it worked as expected.

Here is a good tutorial on interfacing mosfets to an Arduino: Gammon Forum : Electronics : Microprocessors : Driving motors, lights, etc. from an Arduino output pin
You have to look again at the state of pin D10 and how it affects the state of mosfet Q6