Challenge

Week-7 Challenge: DC Motor Control

H-Bridge Motor Driver Using Bipolar Transistors

An H-bridge is an arrangement of transistors that allows a circuit full control over a standard electric DC motor. That is, an H-bridge allows a microcontroller, logic chip, or remote control to electronically command the motor to go forward, reverse, brake, and coast.

The H-bridge circuit (below) looks complicated at first glance, but it is really just four copies of a resistor + transistor + diode.



Schematic of a bipolar transistor hbridge circuit to drive a DC motor. Can you see the letter 'H'?

There are many different ways to draw the circuitry, but the above wiring diagram matches the model of most h-bridges.

  • Q1, Q3: These are NPN transistors. They connect the motor to ground (negative terminal of the battery).
  • Q2, Q4: These are PNP transistors. They connect the motor to +2.2V to +9.6V (positive terminal of the battery).
  • R1-R4: These resistors prevent too much current from passing through the base (labeled B) control pin of the transistor. The resistor value of 1 kilohm (1000 ohms) was chosen to provide enough current to fully turn on (saturate) the transistor. A higher resistance would waste less power, but might cause the motor to receive less power. A lower resistance would waste more power, but wouldn’t likely provide better performance for motors running on consumer batteries.
  • D1-D4: Diodes provide a safe path for the motor energy to be dispersed or returned to the battery when the motor is commanded to coast or stop. I notice many H-bridge circuits on the web lack these diodes. I suppose that’s safe enough for light loads at low voltages, but without diodes, a motor voltage spike can force its way through the unprotected transistors, damaging or destroying them.
  • M1: This is a direct-current (DC) motor. These are very common. You can find them in surplus stores online or in salvaged toys. The motor should have only two wires. Measure the resistance of the two motor wires using a multimeter. If the motor resistance is less than 5 ohms, then the transistor parts listed in this article are too weak to power the motor.

If you want complete information on how an H-bridge works, or if you want simpler or more powerful motor drivers, then please purchase a copy of my book, Intermediate Robot Building. Chapters 9 and 10 go into extensive detail and contain a lot of variations not shown here.

Controlling the H-Bridge Motor Driver

The resistors are the inputs that control the H-bridge. By connecting a resistor to either +VDC or GND, it turns on or off the corresponding transistor. (+VDC is the positive end of the battery. GND is the negative end of the battery.) When a particular pair of transistors is turned on, the motor does something.

Command

R1

R2

R3

R4

Forward:

GND or disconnected

GND

+VDC

+VDC or disconnected

Reverse:

+VDC

+VDC or disconnected

GND or disconnected

GND

Brake/Slow Down:

+VDC

+VDC or disconnected

+VDC

+VDC or disconnected

Since there are 4 resistors, there are actually sixteen possible ways this circuit can be commanded. Don’t sweat the other variations (they’re in the book if you’re curious). Except...

Never apply +VDC to R1 and GND to R2 at the same time! You'll short circuit the battery.

Never apply +VDC to R3 and GND to R4 at the same time! You'll short circuit the battery.

Next, let’s build the H-bridge circuit using real parts...

Simulation

The Bipolar Junction Transistor (BJT) when used for power switching applications, operates as an IGBT. When it is conducting (BJT operating in the saturated region), a forward voltage Vf is developed between collector and emitter (in the range of 1 V). Therefore, the IGBT block can be used to model the BJT device.

The IGBT block does not simulate the gate current controlling the BJT or IGBT. The switch is controlled by a Simulink® signal (1/0). The DC motor uses the preset model (5 HP 24V 1750 rpm). It simulates a fan type load (where Load torque is proportional to square of speed).

The armature mean voltage can be varied from 0 to 240 V when the duty cycle (specified in the Pulse Generator block) is varied from 0 to 100%.

The H-bridge consists of four BJT/Diode pairs (BJT simulated by IGBT models). Two transistors are switched simultaneously: Q1 and Q4 or Q2 and Q3. When Q1 and Q4 are fired, a positive voltage is applied to the motor and diodes D2-D3 operate as free-wheeling diodes when Q1 and Q4 are switched off. When Q2 and Q3 are fired, a negative voltage is applied to the motor and diodes D1-D4 operate as free-wheeling diodes when Q2 and Q3 are switched off.

Brushless DC Motors (BLDC)

A brushless DC motor (also known as a BLDC motor or BL motor) is an electronically commuted DC motor which does not have brushes. The controller provides pulses of current to the motor windings which control the speed and torque of the synchronous motor.

These types of motors are highly efficient in producing a large amount of torque over a vast speed range. In brushless motors, permanent magnets rotate around a fixed armature and overcome the problem of connecting current to the armature. Commutation with electronics has a large scope of capabilities and flexibility. They are known for smooth operation and holding torque when stationary.

Before explaining the working of a brushless DC motor, it is better to understand the function of a brushed motor. In brushes motors, there are permanent magnets on the outside and a spinning armature which contains electromagnet is inside. These electromagnets create a magnetic field in the armature when the power is switched on and help to rotate the armature.

The brushes change the polarity of the pole to keep the rotation on of the armature. The basic working principle for the brushed DC motor and for brushless DC motor are same i.e. internal shaft position feedback.

Brushless DC motor has only two basic parts: rotor and the stator. The rotor is the rotating part and has rotor magnets whereas stator is the stationary part and contains stator windings. In BLDC permanent magnets are attached in the rotor and move the electromagnets to the stator. The high power transistors are used to activate electromagnets for the shaft turns. The controller performs power distribution by using a solid-state circuit.

PLUSE GENERATOR

AT 75% OF DUTY CYCLE

AT 50% OF DUTY CYCLE

DC7 - Four-Quadrant Chopper 200 HP DC Drive

The 200 HP DC motor is separately excited with a constant 150 V DC field voltage source. The armature voltage is provided by an IGBT converter controlled by two PI regulators. The converter is fed by a 515 V DC bus obtained by rectification of a 380 V AC 50 Hz voltage source. In order to limit the DC bus voltage during dynamic braking mode, a braking chopper has been added between the diode rectifier and the DC7 block.

The first regulator is a speed regulator, followed by a current regulator. The speed regulator outputs the armature current reference (in p.u.) used by the current controller in order to obtain the electromagnetic torque needed to reach the desired speed. The speed reference change rate follows acceleration and deceleration ramps in order to avoid sudden reference changes that could cause armature over-current and destabilize the system. The current regulator controls the armature current by computing the appropriate duty ratios of the 5 kHz pulses of the four IGBT devices (Pulse Width Modulation). For proper system behaviour, the instantaneous pulse values of IGBT devices 1 and 4 are opposite to those of IGBT devices 2 and 3. This generates the average armature voltage needed to obtain the desired armature current. In order to limit the amplitude of the current oscillations, a smoothing inductance is placed in series with the armature circuit.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.