Driving a high current DC Motor using an H-bridge

From Mech
Revision as of 23:44, 14 December 2008 by ErikChubb (talk | contribs) (→‎Overview)
Jump to navigationJump to search

Overview

An H-bridge is a common circuit used to control the speed and direction of a brushed DC motor. The convenience of an H-bridge is that a low current PWM signal can be used to control a high current motor (or other device). Full H-bridge circuits capable of a few Amps can be purchased in convenient IC packages (see PWM and H-bridge chips). The H-bridge described in this write-up is capable of currents up to about 40A at 24V.

In the circuit diagram we see that the 4 mosfets surrounding the motor form an “H” shape. The mosfets are used as switches and are activated in diagonal pairs. To apply a forward voltage across the motor, mosfets 1=4=on and 2=3=off, causing the motor to spin in the forward direction (PWM=100% duty cycle). To make the motor spin in reverse, 1=4=off and 2=3=on (PWM=0% duty cycle).

To keep the motor stationary, forward voltage is applied half of the time and reverse voltage is applied half of the time (PWM=50% duty). If the voltage reversals are at a high enough frequency, the cycling is unnoticeable. Generally 20kHz is a good choice for PWM frequency because it is well beyond of the dynamic range of motors and just beyond the range of human hearing. For more information on PWM, see Driving a DC Motor using PWM and Pulse Width Modulation

While the concept of a high current H-bridge is fairly simple, many practical considerations complicate implementation.

Hbridge schem v1.jpg

Parts List MOSFETS = Half Bridge Driver = DC to DC converter = Regulator C_B = 0.01 uF C_1 = C_2 = C_3 = 1 uF R_G = 22 R_1 = 100\Omega

Component Name . Value/Part#
MOSFETS
Half Bridge Driver IR2109
DC to DC converter VBSD1-S24-S12-SIP
Regulator 78L05 (5V)
C_B 0.01 uF
C_1 1 uF
C_2 2200 uF
C_3 4.7 uF
R_G 22
R_1 100

Implementation Considerations

Noise

The motor can create significant noise because

1.it can draw a great deal of current causing dips and spikes in the power supply

2.its windings are inductive so that when current is abruptly cut off by the mosfets, the inductance creates voltage spikes (as predicted by: V = L*di/dt)

To prevent the noise from having a deleterious effect on the mosfets, there is significant capacitance in close proximity to the mosfets. The diodes (that often come integrated into the mosfets) also play an important role here. If the motor is being driven forward (1=4=on) and then all mosfets are turned off, there will be a voltage spike due to the inductance of the motor. This spike can dissipate by drawing current through the diodes in mosfets 1 and 3, effectively sending the current into the capacitors and battery.

To prevent the noise from affecting the other circuits in the system, the PWM input to the H-bridge is optically isolated. Since the opto-isolator does not produce a square wave with crisp transitions, it is advisable to add a comparator. In our example we needed an inverter chip for the second half-bridge so we used an inverter as a comparator. Even without optical isolation, it is wise to including these two inverters to ensure crisp, unambiguous transitions between states.


Shoot Through

It is important to ensure that the two mosfets on the same half-bridge are never on at the same time. This condition called “shoot through”, shorts the power supply and will likely damage the mosfets. The IR2109 half bridge driver chip contains logic to prevent this condition from occurring. It takes a PWM input and outputs that signal to the high mosfet gate while sending an inverted version of the signal to the low mosfet gate. To be certain that shoot through does not occur during the transient, it also adds a 540ns dead time where both signals are low.


High Mosfet Gate Voltage

To turn an N-channel mosfet to its “on” state, it is necessary to raise its gate voltage (Vgs) 2-10V above the source voltage (note that the pins on a N-channel mosfet are deceivingly named: the low-voltage side of the mosfet is the “source”). In our example this means that when the high mosfet is turned on, the voltage at its source pin (and the high side of the motor) is 24V so the voltage at the gate must be about 34V. The half-bridge driver chip is able to supply this high voltage by using a bootstrapping circuit.

The gate for a mosfet acts like a capacitor, and once the “gate charge” is reached, the mosfet is in its “on” state. Gate charge can be found on the data sheet and is usually in the units of nanocoulombs (nC). To estimate the half-bridge driver current demand we only need to consider how many times this charge will be applied each second.

Half_Bridge_Driver_Current (A) = Gate_Charge (C) * PWM_freq (Hz)

The bootstrapping method for turning the gate on has two important design consequences. 1. The bootstrapping capacitor should be sized such that it can provide enough charge to keep the gate open for the duration of the PWM duty cycle. But if the bootstrapping capacitor is too large and the mosfet is held in the on state for a long period of time, the capacitor will slowly discharge and Vgs will slowly transition from 10V to 0V. Keeping Vgs in the half-on state for a long period can damage the mosfet because the large voltage drop between the drain and the source will dissipate significant energy. In the example circuit we found a good compromise for the bootstrapping capacitor was Cb = .01uF. In general, increasing the PWM frequency or the mosfet “gate charge” will necessitate an increase in the Cb value. 2. For the bootstrapping to work, there needs to be time to recharge the bootstrapping capacitor. That means that this H-bridge cannot be run at 0% or 100% duty cycle. At 20kHz, the maximum forward and reverse speeds occur at about 10% and 90% duty cycle.


Gate Resistors

It is generally important to have crisp transitions between the off and on states of the mosfet so that it does not spend significant time in its half-on state dissipating energy. Unfortunately it can also be detrimental to switch the state too quickly. To prevent this from occurring, a small amount of gate resistance is added. On some mosfet data sheets there is a maximum “dv/dt” rating that refers to the maximum allowable time derivative of Vgs.