H-bridge: Working, Circuits and Applications (2024)

The H-bridge is a typical DC motor control circuit, named after its resemblance to the letter H. The four triodes form the four vertical legs of the H, and the motor is the horizontal bar in the H.

Catalog

Ⅰ H-bridge Concept Introduction

ⅡWorking principle

ⅢControl method

ⅣSwitching state

ⅤApplications

Ⅰ H-bridge Concept Introduction

An H-bridge is an electronic circuit that reverses the voltage/current at both ends of the load or output to which it is connected. These circuits are used in robots and other real-world applications for DC motor inversion control and speed control, stepper motor control (bipolar stepper motors must also contain two H-bridge motor controllers), most DC-AC converters in electrical energy conversion (such as inverters and inverters), some DC-DC converters (push-pull converters), and other power electronics devices.

H-bridge is a typical DC motor control circuit because its circuit shape resembles the letter H, so it is named with "H-bridge". 4 transistors form the 4 vertical legs of H, and the motor is the horizontal bar in H.

The H-bridge circuit can be built as discrete components or integrated into an integrated circuit and is often used in inverters (DC-AC conversion). Through the opening and closing of switches, DC power (from batteries, etc.) is inverted into AC power of a certain frequency or variable frequency, which is used to drive AC motors (asynchronous motors, etc.).

The H-bridge is shown in detail in the following figure.

H-bridge: Working, Circuits and Applications (1)

H-bridge circuit

Here there are four switching components Q1, Q2, Q3, Q4, in addition to a DC motor M. D1, D2, D3, D4 are MOS-FET continuity diodes.

ⅡWorking principle

The operating principle of a single-phase bridge inverter circuit as shown in the figure H-bridge inverter (single-phase)

H-bridge: Working, Circuits and Applications (2)

H-bridge inverter circuit (single phase)

Switch T1, T4 on, T2, T3 off: u0 = Ud.

Switch T1, T4 off, T2, T3 on: u0 = -Ud;

When switching switches T1, T4 and T2, T3 alternately at frequency fS, an alternating voltage waveform (square wave alternating positive and negative) is obtained at the load resistor R with period Ts=1/fS. In this way, the DC voltage E is turned into AC voltage uo. uo contains all harmonics and can be filtered by a filter if a sinusoidal voltage is desired.

The main circuit switches T1 to T4, which is actually an ideal model for various semiconductor switching devices. The common switching devices used in inverter circuits are fast thyristor, turn-offable thyristor (GTO), power transistor (GTR), power field-effect transistor (MOSFET), and insulated gate transistor (IGBT).

In practice, there are losses in switching devices: conduction losses and commutation losses, and gate losses. The gate losses are negligible, while the conduction losses and phase change losses increase with the switching frequency.

ⅢControl method

The control of the H-bridge is mainly divided into approximate square wave control and pulse width modulation (PWM) and cascaded multi-level control.

Approximate square-wave control

The output waveform has one more zero level (3-level) than the alternating positive and negative square wave, and the harmonics are greatly reduced.

The advantage is that the switching frequency is lower, but the disadvantage is that the harmonic component is high and the cost of the filter is large.

Pulse width modulation

Pulse width modulation is divided into unipolar and bipolar PWM. As the switching frequency increases, the output voltage and current waveform tends to be sinusoidal and the harmonic components are reduced, but the high switching frequency brings a series of problems: large switching losses, high insulation pressure on the motor, heat generation, etc.

Cascaded multi-level control

The multi-level inverter is a cascaded H-bridge, which minimizes harmonic distortion at the same switching frequency, even without a filter, to obtain a good approximation of a sinusoidal output waveform.

ⅣSwitching state

The following is a brief introduction to several switching states of the H-bridge, taking a DC motor as an example, where forward and backward are artificially specified directions, and the actual engineering can be divided according to the actual situation.

Forward

Usually, the H-bridge is used to drive inductive loads, here we drive a DC motor.

Turn on Q1 and Q4.

Turn off Q2 and Q3.

At this point, assuming the motor is forward, this current passes through Q1, M, Q4 in turn, marked in the diagram using the yellow line segment, as shown below.

H-bridge: Working, Circuits and Applications (3)

H-bridge motor forward circuit

Backward

Another state is the motor backward; at this time the state of the four switching components are as follows.

Turning off Q1 and Q4.

Turning on Q2 and Q3.

At this point the motor reverses (opposite to the case described earlier), which current passes through Q2, M, and Q3 in turn, marked in the diagram using yellow lines, as shown in the figure below.

H-bridge: Working, Circuits and Applications (4)

H-bridge motor reverse circuit

Speed regulation

If the DC motor is to be speed regulated, one of the options is.

Turning off Q2, Q3.

Turning on Q1, giving it a 50% duty cycle PWM waveform on Q4 so that the effect of reducing the speed is achieved, and if the speed needs to be increased, setting the duty cycle of the input PWM to 100%.

As shown below.

H-bridge: Working, Circuits and Applications (5)

DC motor speed control circuit

Stop state

Here the motor is switched from forward to stop state as an example.

  • In the case of forward,Q1 and Q4 are open.

  • At this time, if Q1 and Q4 are turned off, the DC motor internal can be equivalent to an inductor, that is, inductive load, the current will not change suddenly, then the current will continue to maintain the original direction of flow.

Now,we hope that the current in the motor can be quickly decayed.There are two approaches here.

The first: close Q1 and Q4, when the current will still flow through the reverse continuity diode, then briefly open Q1 and Q3 so as to achieve the purpose of rapid decay of the current.

H-bridge: Working, Circuits and Applications (6)

Motor stop state circuit (1)

The second: when preparing to stop, turn off Q1 and turn on Q2. At this time, the current does not decay very quickly. The current circulates between Q2, M, and Q4, and the power is consumed by the internal resistance of the MOS-FET.

H-bridge: Working, Circuits and Applications (7)

Motor stop state circuit (2)

ⅤApplications

The actual use of discrete components to make an H-bridge is very troublesome, there are already many more commonly used IC solutions on the market, such as the commonly used L293D, L298N, TA7257P, SN754410, etc... Connect the power supply and the motor, and then the motor can be driven by inputting the control signal.

The following is the L298N module, which is relatively common, very friendly to novice players, and the wiring is very simple.

H-bridge: Working, Circuits and Applications (8)

L298N module

This module has an on-board 5V regulator, which can be enabled using a jumper.

If the motor supply voltage is up to 12V, we can enable the 5V regulator and the 5V pin can be used as an output, for example to power the Arduino board.

However, if the motor voltage is greater than 12V, the jumpers must be disconnected because these voltages can damage the on-board 5V regulator.

In this case, the 5V pin will be used as an input, since we need to connect it to the 5V supply in order for the IC to work properly.

We can notice here that the voltage drop of the IC is about 2 V. Therefore if we use a 12V supply, the voltage on the motor terminals will be about 10 V, which means that we will not be able to get the maximum speed from the 12V DC motor.

Here using Arduino as an example, which is a demo found online. The overall framework is shown in the figure below.

H-bridge: Working, Circuits and Applications (9)

H-bridge application Arduino demo

#define enA 9

#define in1 6

#define in2 7

#define button 4

int rotDirection = 0;

int pressed = false;

void setup() {

pinMode(enA, OUTPUT);

pinMode(in1, OUTPUT);

pinMode(in2, OUTPUT);

pinMode(button, INPUT);

// Set initial rotation direction

digitalWrite(in1, LOW);

digitalWrite(in2, HIGH);

}

void loop() {

// Read potentiometer value

int potValue = analogRead(A0);

// Map the potentiometer value from 0 to 255

int pwmOutput = map(potValue, 0, 1023, 0 , 255);

// Send PWM signal to L298N Enable pin

analogWrite(enA, pwmOutput);

// Read button - Debounce

if (digitalRead(button) == true) {

pressed = !pressed;

}

while (digitalRead(button) == true);

delay(20);

// If button is pressed - change rotation direction

if (pressed == true & rotDirection == 0) {

digitalWrite(in1, HIGH);

digitalWrite(in2, LOW);

rotDirection = 1;

delay(20);

}

// If button is pressed - change rotation direction

if (pressed == false & rotDirection == 1) {

digitalWrite(in1, LOW);

digitalWrite(in2, HIGH);

rotDirection = 0;

delay(20);

}

}

A brief description: First we need to define the pins and variables needed for the program.

In setup(), we need to set the pin mode and the initial rotation direction of the motor.

In loop(), we first read the potentiometer value and then vary the value obtained from it from 0 to 1023, linearly mapping it to the PWM signal's value from 0 to 255, taking it from 0 to 100% duty cycle.

The PWM signal is then sent to the Enable pin of the L298N board, which actually drives the motor, using the analogWrite() function.

Next, we check if the button is pressed, and if so, we invert the state of input 1 and input 2, thus changing the direction of rotation of the motor. This button will be used as a toggle button and each time it is pressed it will change the direction of rotation of the motor.

H-bridge: Working, Circuits and Applications (2024)
Top Articles
Latest Posts
Article information

Author: Merrill Bechtelar CPA

Last Updated:

Views: 6439

Rating: 5 / 5 (70 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Merrill Bechtelar CPA

Birthday: 1996-05-19

Address: Apt. 114 873 White Lodge, Libbyfurt, CA 93006

Phone: +5983010455207

Job: Legacy Representative

Hobby: Blacksmithing, Urban exploration, Sudoku, Slacklining, Creative writing, Community, Letterboxing

Introduction: My name is Merrill Bechtelar CPA, I am a clean, agreeable, glorious, magnificent, witty, enchanting, comfortable person who loves writing and wants to share my knowledge and understanding with you.