# What's happening in my H-bridge? (N-ch MOSFETS)

I have made such circuit as shown in schematics:

I have connected 1k resistor between HB1 & HB2. When I connect GPIO1 to the +5V and GPIO2 to the ground(both sources do have same ground), I get only about 3.1V at the resistor. These are the voltages between D and S for all MOSFETs: Q1: 11.9V (there is something wrong here, but I do not know what) Q2: 3.1V Q3: 15V Q4: 0V

I have tried doing everything I can think of, including stupid things as rewiring. This is just simple H-bridge which should work. The 100ohm resistors at gate are there because I intend to use this with 100kHz PWM(after I prove that H-bridge works).

This is the MOSFET I use: http://www.infineon.com/dgdl/irlr2905.pdf?fileId=5546d462533600a40153566cbd072676

• Have you done the math yet? Commented Sep 21, 2016 at 13:01
• So you are driving the high-side NMOS with 5V and you expect 15V at the output? Commented Sep 21, 2016 at 13:02
• Your top MOSFETS are acting in source-follower configuration. The voltage at their source will never be higher than the voltage at the gate minus the MOSFET's gate threshold. You need a high-side driver to make them turn on properly. Commented Sep 21, 2016 at 13:02
• @Matea - "So I should go with P-channel MOSFETs as high side drivers?" Yes. However, you will then need to buffer your GPIOs to produce 0 to 15 volts. Given your 15 volt bridge supply, a GPIO of 5 volts will turn the p-types on just as well as zero volts. And unless you have picked logic-level FETs for your n-type, you need to drive them with 0-15 as well. 5 volts will not reliably drive them. Commented Sep 21, 2016 at 13:13
• @Matea - Stop asking for easy answers and start thinking about how you would drive your FETs. How would getting logic-level p-types help? Could you do level shifting with MOSFETs? Would this be different than using BJTs? Commented Sep 21, 2016 at 13:40

There's nothing wrong with the H-bridge itself, assuming that it is wired correctly. The H bridge will work fine when driven properly.

N-channel MOSFETs begin conducting when the voltage between the gate and the source (called Vgs) exceeds the treshold voltage.

The problem with your circuit is that you aren't driving the MOSFETs properly.

• The low side MOSFETs (Q2, Q4) have their sources connected to ground trough a low-value resistor, so supplying 5 V relative to ground will turn the MOSFET on.
• The high side MOSFETs (Q1, Q3) are a bit different. As their sources aren't connected to ground directly, providing 5 V relative to ground doesn't necessarily cause the gate-to-source voltage to be 5 V, as the voltage at the source isn't necessarily 0 V.

The high side MOSFETs are unintentionally being driven as common drain (AKA source follower) amplifiers: When the gate is driven to 5V and the other side of the bridge is driven to ground, the MOSFET initially conducts. As the current increases, eventually the voltage at the source will start to rise so high that the gate-source voltage falls close to the treshold voltage of the MOSFET (somewhere between 1 V and 2 V), and the MOSFET starts to restrict current flow, eventually reaching an equilibrium. Thus the circuit reaches a state where the source sits at a voltage equal to the gate voltage(5V) - threshold voltage(between 1 V and 2 V), so 3.1 V makes a lot of sense. The MOSFET also dissipates a lot of power in this state.

To properly drive MOSFETs you need to supply a gate voltage that is significantly above the source voltage. Since the high side MOSFETs will bridge the 12 V supply at their drain to their source when fully on, their source will also stay at approx. 12 V. You need to supply a voltage relative to ground significantly larger than 12 V to the gate to fully turn a high side MOSFET on.

There are other issues with your approach.

• You just cannot drive a MOSFET at reasonable switching loss at 100 kHz from a microcontroller IO pin. The usual IO drivers integrated to most microcontroller outputs can source or sink a few tens of milliamps or less. As the MOSFET you are using has a total gate charge of about 48 nC, switching the MOSFET on or off will take approx. 2.5 μs at 20 mA. Your poor MOSFET will be in a high power loss swithing state 2.5 μs * 2 switchings * 100 kHz = 0.5 seconds out of every second, or 50%.
• While the MOSFET does have a fairly low threshold voltage, it is still better to drive the gate at higher amplitudes, with about 15 V being optimal. The switching transition will be faster and the on-state resistance (Rds_on) will be lower. You might even get away without a heatsink entirely.

Designing a good gate driver from discrete components is relatively difficult. While gate driving can be made easier by using P-channel MOSFETs for the high side, dedicated gate driver ICs are commonly available and in many ways a better option.

There are thousands to choose from. A few datasheets, for example: IR2110, LM5109A, MIC4604

### EDIT: More details on gate driving.

A coloumb (C), the SI unit of electric charge, is simply current (A) multiplied by time (s). The Ampere-hour is another commonly used unit of charge. For example, charging a battery with one ampere for one hour would supply the battery with 3600 C, or 1 Ah. The same is applicable for the paracitic capacitance of a MOSFET gate; if we know how many coloumbs are needed (48 nC) and how many amperes we can charge with (20 mA) we can calculate how long this takes (0.000000048C / 0.02mA = 0.0000024s) by simple division. This isn't the full story however. Total gate charge is only an approximation of the effort required from the gate driver, and unlike a capacitor the gate voltage rise or fall isn't even close to linear with time:

For more details on gate drivers, this application note on gate driving is reasonably understandable and fairly short.

• Wow! Really nice answer and explanation, including the example! How did you calculate the time needed for a MOSFET to switch on or off? Oh, and I could use those gate drivers at high frequencies without hassle? Commented Sep 21, 2016 at 19:47
• @Matea Sure, that's what gate drivers are for. They can often supply several amps to switch the MOSFET in the tens of nanoseconds, permitting frequencies up to about 1 MHz (with careful design and well selected parts). See the updated answer on gate driving requirements.
– jms
Commented Sep 21, 2016 at 20:39