Technology Remaking the World

Basic H-Bridge with switches
Figure 1 very basic H-bridge.

H-Bridge Motor Control with Power MOSFETS

by Lewis Loflin

  
  

Learning how to use power MOSFETs by building an H-bridge motor control. Includes schematics and circuit examples.

Update July 2018.

New video at Power MOSFET H-Bridge Update at YouTube.

Update October 2016: note the updated pages related to this subject. Also when constructing these circuits DO NOT leave the input pins floating or unconnected to a micrcontroller. See the following for safety tips:

And the following two videos:

Also study the links below on transistor switching circuits before you attempt to build any of these devices.

Permanent magnet DC motors have been around for many years and come in a variety of sizes and voltages. Their direction of rotation is dependant upon the polarity of the applied voltage. Reverse the voltage, the direction of rotation reverses. One of the most common solid-state controls is known as the H-bridge.

In figure 1 we have a very basic H-bridge using two spring-loaded, single-pole, double-throw switches. The normally closed (NC) contacts are grounded and normally open (NO) contacts are connected to +12 volts. A DC motor is connected between the two commons. In its normal state, both motor connections are grounded through the switches. Both switches are spring loaded.

If we press SW1 the NC contact opens and the NO closes supplying +12 volts to one side of the motor while the other side is still grounded through SW2. The motor will spin at full speed say counter-clockwise. Release Sw1 and press SW2 and +12 volts is supplied to the '+' side of the motor while the negative side is grounded through SW1. The direction now is clockwise. Press both switches and both sides of the motor will be at +12 volts and won't run.

Spec sheets to transistors used here.

Now we will look at practical MOSFET H-bridge circuits. Check the above links if not familiar with transistor switching circuits.

MOSFET H-Bridge with motor voltage isolation.
Figure 2 MOSFET H-Bridge with motor voltage isolation.

In Fig. 2 illustrates how the use of opto-couplers OC1 and OC2 allows electrical isolation of motor voltage from the microcontroller circuits.

MOSFET H-Bridge with motor voltage common with control circuit.
Figure 3 MOSFET H-Bridge with motor voltage common with control circuit.

Fig. 3 illustrates a common ground between microcontroller control circuits and the h-bridge common ground.

MOSFET H-Bridge control truth table.
Figure 4 MOSFET H-Bridge control truth table.

This was based on a Toshiba TA8050P H-bridge. See the spec sheet ta8050p.pdf.

MOSFET H-Bridge motor control in break mode.
Figure 5 MOSFET H-Bridge motor control in break mode.

In break mode both sides of the motor are grounded through the lower N-channel MOSFETs. Counter EMF from the motor motion acts to break the motor direction of rotation..

MOSFET H-Bridge motor control clockwise rotation.
Figure 6 MOSFET H-Bridge motor control clockwise rotation.

When a HIGH turns on opto-coupler OC1, Q1 is turned off while Q3 is turned on. This creates a current path for the motor through Q2 and Q3. The motor will rotate I'll say clockwise.

MOSFET H-Bridge motor control counter-clockwise rotation.
Figure 7 MOSFET H-Bridge motor control counter-clockwise rotation.

Here we turned off opto-coupler OC1 (turns Q1 on and Q2 off) and turned on OC2. This turns off Q3 and turns on Q4. Q1 and Q4 provide a current path for the motor, but in the opposite direction for the current flow. This results in counter-clockwise or reversal of rotation of the motor.

MOSFET H-Bridge motor control in stop mode.
Figure 8 MOSFET H-Bridge motor control in stop mode.

Fig. 8 illustrates stop mode - the motor is simply turned off as Q2-Q4 are turned on while Q1-Q3 are turned off.

MOSFET H-Bridge motor control with shoot-through.
Figure 9 MOSFET H-Bridge motor control with shoot-through.

Now I'll address the problem of shoot through. This is a condition where a transistor, let's say say Q2, has not switched fully off as Q1 is switched on. This creates power supply overload and possible damage to MOSFETs. I've used this circuit without problem, but we can't ignore this problem.

This can be a particular risk with high speed motor direction change or using pulse-width modulation to control motor speed.

MOSFET H-Bridge motor control with motor power on-off control.
Figure 10 MOSFET H-Bridge motor control with motor power on-off control.

Fig. 10 illustrates the use of a motor power switch to turn off a generic h-bridge circuit. Based on the above schematics simply switch motor voltage off, change direction, then motor voltage back on. That prevents any chance of shoot-trough. We can also pulse-width modulate the switch to control motor speed.

MOSFET H-Bridge motor control with motor power on-off control circuit.
Figure 11

Fig. 11 illustrates a possible power switch circuit.

The circuit above: Design 10-Amp 2N3055 Based Power Switch

MOSFET H-Bridge motor control circuit issues.
Figure 12

Now I will address other issues.

I will be normal for the p-channel MOSFET to get hotter than the n-channel. This is due to higher DS-on resistance of the p-channel.

Rb serves to discharges the gate-source circuit to turn off Q2. In the past I used a 10K resistor, it can be dropped to 1000 ohms. This can result in faster turn off.

The 1N914 diode across Rb suppresses any gate-source discharge noise with Rb.

Finally we can use a NPN transistor instead of an opto-couple.