Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

A motor driver lets a low-power controller, such as an Arduino or microcontroller, control a higher-current motor safely. The H-bridge is one of the most important motor driver circuits in robotics because it can make a DC motor spin forward or backward. It uses four electronic switches arranged around the motor so the voltage across the motor can be reversed.

This matters because mobile robots, grippers, wheels, and actuators all need controlled motion, not just simple on and off power.

In an H-bridge, turning on opposite pairs of switches sends current through the motor in one direction or the other. Speed is usually controlled with pulse-width modulation, or PWM, which rapidly switches the motor voltage on and off so the motor responds to the average power. Real motor drivers also need flyback diodes or internal protection circuits because motors are inductive loads that can produce dangerous voltage spikes.

Common driver ICs package the H-bridge switches, protection features, and control pins into a compact part that is easier and safer to use.

Understanding Robotics: Motor Driver and H-Bridge

A DC motor does not behave like a small lamp. When its shaft is stopped, it can draw a very large starting current. This is called stall current.

It may be many times larger than the current measured while the motor is turning freely. A driver must survive that current, especially when a robot starts moving, pushes an object, or hits an obstacle. Motor torque is closely linked to current.

More load slows the motor, which reduces its back voltage and lets more current flow. This can heat the motor, battery wires, and driver chip quickly. Check both the continuous current rating and the peak current rating before choosing a driver.

A driver can produce more than forward motion, reverse motion, and speed control. It can often let the motor coast or brake. Coasting means the driver removes the driving force, so the shaft slows naturally from friction.

Braking connects the motor terminals in a way that makes the spinning motor resist its own motion. Braking is useful when a robot needs to stop near a line, hold a position briefly, or make accurate turns. PWM changes the motor's average input, but the motor does not stop and start with every pulse because its spinning parts have inertia.

The PWM frequency matters. A low frequency may cause buzzing or jerky movement. A very high frequency can increase switching losses and heat.

The most dangerous fault in this circuit is shoot-through. It happens when the upper and lower switches on the same side conduct at the same time. That creates a near-direct path across the power supply.

The current can damage a driver in a short time. Good driver chips insert a tiny delay called dead time during switching to prevent this. A microcontroller should never be connected directly to a motor supply without care.

Motors create electrical noise that can reset the controller or disturb sensors. Use short, suitably thick motor wires, place capacitors near the driver supply pins, and connect grounds correctly. A separate motor battery supply is often useful, though the control ground usually still needs a shared reference.

Students often meet these ideas in wheeled robots, conveyor models, robotic arms, small pumps, and battery-powered vehicles. A motor that runs in the wrong direction may simply have its leads reversed, or the control inputs may be interpreted differently by the driver. A motor that will not move may have too little supply current, a disabled enable pin, or a stalled mechanical load.

Test with the wheels lifted off the ground first. Measure the supply voltage while the motor starts, since a large voltage drop points to a weak battery or thin wires. Learn the driver's truth table carefully.

It shows which input states mean drive, coast, brake, or standby. That table is often more useful during debugging than the circuit diagram alone.

Key Facts

  • An H-bridge uses four switches to reverse the polarity across a DC motor.
  • Forward drive: close the high-side switch on one side and the low-side switch on the opposite side.
  • Reverse drive: close the opposite diagonal pair of switches.
  • Motor speed is controlled by PWM duty cycle: Vavg = D V supply, where D is from 0 to 1.
  • Motor electrical power can be estimated by P = V I.
  • Flyback diodes protect switches by giving inductive current a safe path when switching changes suddenly.

Vocabulary

H-bridge
A four-switch circuit that can reverse the direction of current through a DC motor.
Motor driver
An electronic circuit or chip that lets a control signal operate a motor using a separate higher-power supply.
PWM
Pulse-width modulation is a method of controlling average motor voltage by rapidly switching the supply on and off.
Flyback diode
A diode that provides a safe path for current from an inductive load when the switching circuit turns off or changes state.
Shoot-through
Shoot-through is a dangerous condition where the high-side and low-side switches on the same side turn on together and short the power supply.

Common Mistakes to Avoid

  • Turning on both switches on the same side of the H-bridge, this is wrong because it creates shoot-through and can destroy the driver or power supply.
  • Connecting a motor directly to a microcontroller pin, this is wrong because motors usually need far more current than logic pins can safely provide.
  • Forgetting flyback protection, this is wrong because a spinning or switching motor can generate voltage spikes that damage transistors and ICs.
  • Assuming PWM changes motor direction, this is wrong because PWM mainly changes average speed while the selected switch pair determines current direction.

Practice Questions

  1. 1 A 12 V motor is driven with PWM at a 25% duty cycle. Estimate the average voltage applied to the motor.
  2. 2 A motor draws 0.8 A from a 9 V supply while running. Estimate the electrical power delivered to the motor using P = V I.
  3. 3 In an H-bridge, explain which diagonal switch pair should be on to reverse the motor direction and why turning on two switches on the same side is unsafe.