Picture of How to make an H-bridge
An H-bridge is a type of circuit that you can use to get a reversible DC motor to spin both clockwise and counterclockwise.

In other words, this circuit allows you to quickly reverse the direction a motor is spinning by using a switch or controller chip to change its direction.

I'm going to show you how to make the simplest and most reliable form of H-bridge that I know how to make. I must warn you that this is by no means the best H-bridge design and, in fact, it has a couple shortcoming which I will explain later.

Although, should you never have made an H-bridge before or simply need a circuit that can reverse the direction of a motor's spin, then this circuit is a quick and easy solution.

(You will notice the motor freaks out when I flip the switch. That is the motor changing directions!)

This H-Bridge was made with the love and support of Eyebeam
Remove these adsRemove these ads by Signing Up

Step 1: Go get stuff.

Picture of Go get stuff.
Here's what you need to get:

4 - SPST 5VDC Reed Relays (Radioshack Model: 275-232 Catalog #: 275-232)
1 - SPDT 5VDC Reed Relay (Radioshack Model: 275-240 Catalog #: 275-240)
1 - package of 9V battery clips (Radioshack Model: 270-324 Catalog #: 270-324)
1 - 9V battery
1 - Toggle or slide switch (SPST)
1 - 7805 Voltage Regulator (Radioshack Model: 7805 Catalog #: 276-1770)
1 - PC Board (Radioshack Model: 276-150 Catalog #: 276-150)
1 - reversible DC motor

(You can find a reversible DC motor inside a broken Walkman or Discman. For those of you in NYC, you can get a motor and/or broken Walkman at Argo Electronics - 393 Canal Street)
colin555 years ago
Of course you can make the project with a double-pole double-throw switch and not use any relays at all. The only problem is the motor is constantly turning in one direction or the other. The alternative is to use two double-pole push switches or 4 switches as shown in the following diagram. You need to push both of the forward switches at the same time. By pushing the reverse switches very briefly you will get braking when travelling in the forward direction.

You can find DPDT switches with a center-off position. I got one from radioshack.

colin555 years ago
There is a much-simpler way to reverse the motor using just one relay. Connect a double-pole double-throw relay as shown in the enclosed diagram. No other components are required! Just a switch to energise the relay for forward or de-energise the relay for reverse. Colin - TALKINGELECTRONICS.COM
colin55: then you would not be able to brake

Small motors like that don't need a brake. But if you insist on using one, I would recommend a friction brake. The motor here slows down too fast on it's own for an electric brake.

just add another switch from one of the wires that goes to the motor, and then no matter which way you turn the first switch, the motor will only spin if you have the second switch on.
if you really need braking you can tie in a relay somewhere else to cut power.
rip333 granjef35 years ago
use a center off DPDT
dillonxti1 year ago
shobo1 year ago
looks nice man,but i think is more effective with 2 pais of npn and pnp,some diodes ans is the one i made
MackeFeet2 years ago
So.. How would I go about this controlling it with arduino... I know I could drop the whole spdt relay and switch! Seeing is I want it to be person less.. (I'll be using force sensor to trigger it.) But I don't know for sure.. I need some help! Maybe a schematic, but I need simpler type terms since I'm only 13.. Help please!!!!
Robot Lover2 years ago
If you have a DPDT relay, the other relays are non-essential for making a motor reverser circuit.
ARJOON4 years ago
the relay is so expensive
laxhead944 years ago
do you really need a 7805 in there?
milsorgen4 years ago
I was just at Radio Shack and the relays alone for this project are going to set you back over 20 dollars.
Nu5 years ago
The relays are being counted from right to left. The fist relay is the one farthest to the right, the second is the next one to the left and so-on. Thanks Nu
you know you could just use a dpdt switch!!!!
colin555 years ago
Simply flick the switch to reverse the motor and it creates a brake function.
ijabi colin555 years ago
Hello colin:do you have any simple way to do h-bridge with mosfet(a Schematics by chance). thanks
colin55 ijabi5 years ago
There are lots of circuits on the web using MOSFETS in an H-bridge arrangement. These are generally high power circuits and you need to do your own research as there are so many designs.
Patented6 years ago
There should be a simpler way to do an H-bridge than this one
There is, a lot cheaper version too using four bi-polar transistors instead of relays.
can i just use transistors, and is the voltage regulator really that important? coz i cant get one :(
I dought that the 7805 is mportant. if you really feel the need to not burn out your motors, then order a few off of digi-key.
used continuous rotation servos, easier to work with lol
Or an IC.
awkrin6 years ago
there is a way of doing thing with a more complicated switch that's actually made by two separate switches and changes from one to another terminal, like a SPDT, but it's double: DPDT I mean:
dagenius awkrin5 years ago
colin55 has the same circuit.
Hydrotec6 years ago
I want to as a ? Can anyone help me ? I want a automatic timing switch that will change polarity back and forth as well do PWM on and of to speed a motor and slow a motor!
use a 555 timer circuit, and maybe use one of those fancy digital potentiometers to change the speed. Another 555 circuit would also help for that, if you don't want to use a digi-pot. just make the circuit have a very short cycle, and by changeing that, you may also more reliably change the speed of the motor.
Try this ask ewilhelm if that circuit doesn't suit u
raykholo5 years ago
really cool idea -- definitely gonna try this couple of questions though -- total cost? can this be done with dpdt relays so u wont have to use as many? cost of an actual h bridge circuit and anything important on those? thanks rak
cl0ney5 years ago
you rock. thank you for teaching for free.
PyroMonger6 years ago
I made a MUCH simpler H bridge by sumply using 2 AA batteries a SPDT switch and Voila! Of course i used a motor too or there would be no point of making it. I found it right here on instructables too. The BeetleBot
I know that's like that: but that uses only one battery, while a DPDT it's even simpler and uses both batteries
Hey awkrin.
I've posted a little instructable with it here.
Nice, but if you just wanna control the motors direction with a switch, there is a much simpler and easier alternative.
when I had to make one, I gutted a nes controller, and used it to control a little car. but I used the up arrow for one switch and the down arrow for the other switch. anyways here's the diagram
Rv-Pol moter sckeam.bmp
I did the same thing but with only 2 SPDT relays and a bipolar power supply. What you do is hook the motor to the common end of the relay's arm and the normally ON ends to one side of the supply. The normally OFF ends of the relays are hooked to the other side of the supply. When you activate ONE relay, the motor turns. Activate only the other, the motor reverses. Activate both, and the motor remains off. When I made this, you'll never imagine the use I made for it. I used the H-Bridge to control an old cordless drill with threaded rod chucked into it to open and close a window. A window with a remote!
randofo (author)  wi-fi astronomer7 years ago
You should post an Instructable of that window openeer. That sounds awesome.
Yeah, that was a cool invention. Until I made it I never heard of a "window servo". It did have a few problems, the most notable was that the whole assembly would vibrate severely so you'd want to let go of the button every few seconds when using it. It sure worked, but you had to know how to use it.
TerraPlop7 years ago
Elegantly complex solution to a simple problem that can be solved with half the parts and at less cost.
H Bridge.GIF
An H bridge gives you more control. You can interface with a microcontroller, using software to control the speed/direction. With a switch, the intelligence is left up to the operator.
randofo (author)  TerraPlop7 years ago
Not necessarily. The best solution isn't always the most technologically elegant. I found 15 year olds (and hopeless artists) who have no background in electronics pick up on this a lot easier than using transistors (NPN? PNP? huh?) or an H-bridge chip. At the very least, this is easy to debug even for people who don't really know what they're doing because they can hear the relays click. The only truly unnecessary part is really the SPDT relay, but this will come in handy for the next Instructable I'm going to post on how to make a really basic robot using a 741 op-amp and a photocell. However, feel free to show me up with an Instructable of your own H-bridge design. Instructables could always use more H-bridges to its credit.
If I have the time (I don't!) I'll make an instructable for solid state h-bridges. The simplest raw-parts version I know of takes just 4 bipolar transistors (2 pnp, 2npn), 4 fast diodes and some resistors. Of course this version has more parts and way more connections but it's a very nice example circuit for people who really want to learn about electronics. For people who just want immediate and easy directional control they can understand, I think you've given just about the easiest possible solution. Of course if you know how to use IC's there are plenty of IC h-bridges or combinations of IC's and components that will make quick, cheap, and small h-bridges. For any beginners wanting to jump right in to an IC h-bridge you should be aware of it's max voltage and current. Not all h-bridges are for motor control.
that's what i was thinking. you can do all this with a simple dpdt switch right?
You should be able to use a circuit like this to drive a two-color LED, one of the ones that goes red when positive current runs through it and green with negative current. There are instructions for making an H-bridge circuit with an IC on the site, for driving beambots.
treg7 years ago
People interested in this nice H-Bridge tutorial may take a look at the solution that is used on the Beetle Robot (I may be a welknown solution and havev its own name, I don't know ! : ) : It's basically the same thing, but the motor minus pole is not connected to the ground (or plus) of the powersource, it's connected to the middle point (U/2, which is between the 2 first batteries and the 2 last ones). Then, with this fixed connexion, you only have to swith the plus pole of the motor to either minus ot plus of the batteries pack.

Pro :
-You save half of the relays

Con :
-You only have half the voltage, and you may discharge the "forward" batteries faster than the "backward" ones if you usually drive foreward.
stevoIution7 years ago
+ for amusing artbot.
wouldn't two relays, one dpst and one dpdt, work in place of something like this? the later would be wired like a standard dpdt switch for reversable motors. such an arrangement could be used with an avr (or other pic type) microcontroller with two outputs, one output would control the dpst relay for on/off function and the other output would control the dpdt relay for current direction. that being said, i did like this instructable very much. i understand h-bridges better having seen one assembled. thanks!!
xnifx7 years ago
You should write an instructable on how to make an artbot!!!
randofo (author)  xnifx7 years ago
Patience... it's coming...