As an Amazon Associate we earn from qualifying purchases.
An H-bridge lets you run a DC motor in both directions from a single supply. Most designs use four transistors or MOSFETs, but you can also build one from relays. An H-bridge using relays is a low-cost way to get forward and reverse control when you do not need speed control. This article explains how the relay version works, how to set it up in a simulation, and where it fits best.
What an H-bridge does
A DC motor reverses direction when the polarity across its two terminals is swapped. An H-bridge is a circuit that makes this swap possible without rewiring anything. It gets its name from the layout: the motor sits in the middle (the crossbar of the “H”), and four switches surround it, two on each side.
Closing one diagonal pair of switches sends current through the motor one way. Closing the other diagonal pair sends it the opposite way. In a relay version, the switches are relay contacts and a small control signal energizes the relay coils.
Why use relays instead of transistors?
Using relays helps minimize the cost of bidirectional control of a DC motor, especially for simple projects. The main reasons to choose them are:
- Simple to understand: the contacts are real mechanical switches, so the current path is easy to trace.
- Electrical isolation: the coil side (control) is separated from the contact side (motor power).
- Easy to buy: relays and ready-made relay modules are common and inexpensive.
- Low voltage drop: closed contacts have very little resistance, so little power is lost in the switch itself.
How the relay H-bridge is wired
A common arrangement uses two SPDT (single pole, double throw) relays. Each relay controls one motor terminal.
- The motor’s first terminal connects to the common contact of Relay 1.
- The motor’s second terminal connects to the common contact of Relay 2.
- The normally open (NO) contact of each relay connects to the positive supply.
- The normally closed (NC) contact of each relay connects to ground.
With both coils off, both motor terminals sit at ground, so the motor is stopped. Energizing a relay moves its terminal to the positive supply.
Truth table
- Relay 1 off, Relay 2 off: both terminals at ground, motor stopped.
- Relay 1 on, Relay 2 off: terminal 1 at positive, terminal 2 at ground, motor turns in one direction.
- Relay 1 off, Relay 2 on: terminal 1 at ground, terminal 2 at positive, motor turns in the opposite direction.
- Relay 1 on, Relay 2 on: both terminals at positive, motor stopped.
Because each relay can only connect its terminal to one side at a time, this layout cannot short the supply through the bridge. That is a real advantage over a transistor bridge, where turning on both switches on one side by mistake causes a short circuit.
Driving the relay coils
A microcontroller pin or logic output usually cannot supply enough current for a relay coil. A typical driver stage for each relay includes:
- A small NPN transistor (or a driver IC) that switches the coil current.
- A base resistor between the control signal and the transistor.
- A flyback diode across the coil, such as a general-purpose 1N4007, to absorb the voltage spike when the coil turns off.
Check that the coil voltage matches your supply, and that the contact rating is comfortably above the motor’s running current and its starting current, which is higher.
Simulating the H-bridge using relays
Simulating the circuit before building it lets you check the wiring and the logic without risking components. The simulation file linked at the end of this article lets you test the relay H-bridge on screen. When you run any version of it, check the following:
- The motor stops when both relays are off.
- The motor direction flips when you swap which relay is energized.
- The flyback diodes are placed with the correct polarity.
- The motor supply and the control supply share a common ground where needed.
If you want a step-by-step build in a circuit simulator, see our post on H-bridge based DC motor direction control using relay simulation in Proteus.
Applications
- Wheel chair control: forward and reverse drive for the motors. One example is an accelerometer based wheel chair that uses Arduino and a relay H-bridge.
- Low cost electric vehicle direction control: simple forward and reverse switching for small vehicles and models.
Limits to keep in mind
Relays are a good fit for simple direction control, but they have limits that transistor bridges do not.
- No practical speed control: relays are too slow and wear out too quickly for PWM. If you need variable speed, use MOSFETs or a motor driver IC.
- Mechanical wear: contacts have a limited switching life, and arcing on inductive loads shortens it.
- Switching delay: relays take a few milliseconds to change state, and they make an audible click.
- Reversing at speed: switching directly from forward to reverse while the motor is spinning causes a large current surge. Stop the motor and wait a moment before reversing.
If clicking and contact wear are a problem, solid state relays are one alternative, although they have their own ratings and voltage drop to consider.
Download the simulation file
FAQ
Can I build an H-bridge with just one relay?
A single DPDT (double pole, double throw) relay can reverse a motor by swapping the supply polarity across it. However, it cannot give you a stop state on its own. You would need another switch, or you would cut power to the supply, to stop the motor. Two SPDT relays give you forward, reverse and stop.
Do I need flyback diodes?
Yes. A relay coil is an inductor, and when it switches off it creates a voltage spike that can damage the driver transistor or the microcontroller. A diode across each coil prevents this. The motor itself can also create spikes, so a suppression diode or capacitor across it is good practice.
Can I control the motor speed with a relay H-bridge?
Not in a practical way. Relays cannot switch fast enough for PWM, and doing so would wear out the contacts quickly. Use a MOSFET-based H-bridge or a motor driver IC when you need speed control.
Why simulate the circuit first?
A simulation lets you confirm the contact wiring and the control logic without risking a short circuit, a reversed diode or a burnt driver. It is especially helpful for beginners who are learning how the current path changes between forward and reverse.