MOSFET H-Bridge unexpectedly shorts at specific voltage

Hi!

I’m making a Segway as an examination project and at the moment the only part I can’t get to work is the h-bridge. I’ve read quite a lot about them but even after much testing and many steps of redesign it just won’t function.

This is the design I’ve created:

The inputs are supplied controlled with the Arduino and all act as they should with PWM on the low side and high side MOSFETs open or closed.
The resistors on the transistor bases are 100 Ohm. The resistors on the MOSFET bases are 1k Ohm. For the high side P-MOSFETs are used and on the low side are N-MOSFETs. Specific parts listed at the end of the post.

The problem I’m seeing is that when i dial my supply current up to approximately 12V (the motors are 36V) regardless of duty cycle the motor starts shaking and stops spinning while the current goes up a little. When I attach my oscilloscope to the motor wires i see that they are both at supply voltage at given intervals:

Channel 2 (red) should be low when the PWM is active but this is not always the case as seen in the image. It should be added that this happens in both directions so one faulty component is not the case and I’ve also tested both the diodes and the MOSFETs afterwards and they all work as expected individually. All high current components are attached to a large heat sink.

The parts I’ve used:
P-MOSFET: P-Channel MOSFET 60V 27A - COM-10349 - SparkFun Electronics
N-MOSFET: https://www.sparkfun.com/products/10213
Transistor: 2N3904, https://www1.elfa.se/data1/wwwroot/assets/datasheets/lz2N3904_e.pdf
Diodes: SF1608G, https://www1.elfa.se/data1/wwwroot/assets/datasheets/sf1601g-8g_eng_tds.pdf

To me it seems like both the P-MOSFETs are open as the voltage on both sides of the motor is high. Is this because of how I control the MOSFETs, is it something anyone has seen before or is it something entirely different?

Thanks in advance!

DIY h-bridges are often difficult to get to work as desired. Inexpensive h-bridges are available on ebay. Below is a DIY h-bridge discussion that might be worth reading.

http://forum.arduino.cc/index.php?topic=53425.0

You should post your program. The timing of the various enable/PWM signals is critical, otherwise you can experience a phenomenon called "shoot through" in which the H-bridge short circuits the power supply. Note that the timing depends on the circuit resistances and the gate capacitances of the MOSFETs.

What is the stall current of the motor?

100 ohms is definitely too low for the base transistors, that's pulling 45mA from pins rated at 40mA absolute maximum. Use 220 ohms or so.

The pull-up resistors on the MOSFET gates need to be as small as you can get away with without overheating - if using 1/4W resistors and 12V use 560 ohms. They are the limiting factor in switching speed of the MOSFETs (which have large input capacitance).

You seem worried that both motor terminals are at 12V might mean the p-channel devices aren't switching on, yet these are the devices that pull the outputs high, so they are clearly working and on.

I can't see the time scale in your image, but the plateaus in output voltage are a real worry, it could indicate shoot-through which would explain complete failure to work. (or it could be back-EMF but the motor would need to be turning for that)

At all costs you must avoid both the high switch and low switch on one side of the H-bridge being simultaneously on, that shorts the supply rails together...

Thanks for the fast replies guys! I see now that my information might not be as clear as I intended so I’ll try to clear things up.

zoomkat:
I know but under the circumstances I don’t like the thought of investing so much money in a commercial h-bridge as I need something capable of 800W and those are not a little expensive.

jremington:
At this time I don’t change the direction of the motor, resulting in 1 N and one P always being in the off position, so there should be no problem with shoot through as far as I know. Right now the motor is not connected to any load so i read approximately 1A at all times. It is rated at 22A as far as I can see.

MarkT:
I am driving the transistors not using Arduino pins but rather a setup of couple of 74LS NAND, a NOR and a NOT gates which let me use 2 pins for forward/reverse and 1 pin for speed control in either direction, these draw their power from the 5V pin at the moment and I’m certain there is no problem here as I’ve checked these signals about a thousand times. Also, that setup is made so that shoot-through shall be impossible; in order to prevent the H-bridge from programming errors… See attached drawing for schematics. The thinking is that if both A and B are on then no P side shall be on; they shall inhibit each other. Also, the PWM only acts on the N side, leaving the P side on the whole cycle. Thereby the freewheeling phase of the motor shall go through the open P on one “upper” side and the diode on the other “upper” side. This is what is seen on the 'scope when both the red and blue are high.

Thanks for the info on the MOSFET gate resistors, I’ve changed them both up and down so what I wrote is the current configuration. Changing those don’t seem to help me at the moment though.

What I meant is that I’m worried both the p-channel MOSFETs are turning on (possibly due to reverse current from the motor?) and that’s what causes shoot through even though my signal from the Arduino sets it to the off position.

This is where I believe I wasn’t clear enough. Right around the 12V mark the motor is still spinning but once every few turns it “jumps” as though it has been shorted out. The few times I’ve increased the current even more the motor stops spinning entirely though so i can’t see how reverse current can cause that.

I will upload more 'scope images tomorrow showing more of the circuit during a “jump”.

A current guess of mine is that I’ve misunderstood the maximum Vgs of the MOSFETs and during spikes the voltage difference destroys or incapacitates the components. Could that be the case?

If you read the data sheet of the p-channel mosfets, you’ll find that they require 25V at the gate for switching. In the case of p-channel, you need 25V to turn them off, so shoot through occurs regardless of your code. Your shorting occurs due to the hardware design. You need a 25V source to switch to your fet gates for proper switching. You could use a charge pump circuit if operating at lower voltages. Cheers!

Jshwaa:
If you read the data sheet of the p-channel mosfets, you’ll find that they require 25V at the gate for switching. In the case of p-channel, you need 25V to turn them off, so shoot through occurs regardless of your code. Your shorting occurs due to the hardware design. You need a 25V source to switch to your fet gates for proper switching. You could use a charge pump circuit if operating at lower voltages. Cheers!

The p-channel MOSFETs quoted, namely FQP27P06 DO NOT REQUIRE 25V AT THE GATE.
THAT IS THE ABSOLUTE MAXIMUM GATE-SOURCE VOLTAGE.

10V or 12V drive is fine. The Rds(on) is quoted only for 10V so they are not logic level.

Below is a dual h-bridge board that appears rated for 36v, and might work for your Segway application. For $22 shipped, it would probably be cheaper in time and money in the long run.

http://www.ebay.com/itm/3-36V-10A-Peak-30A-Dual-Motor-Driver-Module-board-H-bridge-DC-MOSFET-IRF3205-/111109918734?pt=LH_DefaultDomain_0&hash=item19deaad00e