H-Bridge on a Breadboard by gzip


The H-Bridge is a circuit which can drive a motor in forward and reverse. It can be a very simple circuit that requires only a handful of components to build. This Instructable demonstrates how to breadboard a basic H-Bridge. Upon completion you should be familiar with the basic operation of an H-Bridge and be ready to move on to more complicated versions that can support larger, more powerful motors.
 
Remove these adsRemove these ads by Signing Up

Step 1: Gathering the Parts

parts.jpg


Only a handful of parts are needed.

1) A bread board
2) A small DC motor capable of operating at ~7 volts
3) A 9-volt battery and battery snap
4) Four small signal NPN transistors. We're using the 2N2222A here. 2N3904 is another common part number and thousands of others will do.
5) Four 22k ohm resitors
6) Two push button switches
7) Jumpers or spare wire to hook everything up
American2020 says: Apr 2, 2013. 2:46 PM
Thanks for this guide. I made the schematic on Crocodile Technology and the emulation works perfect.

http://i46.tinypic.com/34t95ia.jpg
dff3bc says: Mar 22, 2013. 4:56 AM
I actually have been messing around with H-bridges lately and have had a lot of success (when the FETs are in working condition) with the attached configuration. It delivers a large current using a small "base" voltage.
Schematic.jpg
Pranjal Joshi says: Dec 20, 2011. 5:54 AM
this is totally awesome..!!
can i use it in my light following robot for forward and revers movement???
plz explain how it the bridge get activated for both movments..
in my robot circuit, current flows when light above certain limit is fall on LDR..
plz explain how and where do i connect this bridge in circuit??? if possible then show diagram..
Roshy10 says: Mar 18, 2013. 9:22 AM
you could replace the buttons with SPST relays (or any type really) and your robot circuit can control them, but there will be slight delay.
cslatton says: Jan 16, 2013. 5:41 PM
So I cannot get this to work. I have rebuilt it twice now and still get the same problem. When no button is pushed each switch is passing about 1.8 volts and then passes the full amount when pushed. So even when you push a switch there is still some positive current to each motor terminal, preventing it from spinning either direction. Any help would be appreciated! Thanks! :D
electro18 says: Dec 20, 2012. 9:52 AM
I have used 2n4401 NPN for this but it won't work. The output voltage is just 0.47v....... Please help me!
lean04 says: Oct 9, 2012. 3:21 PM
hi, great instructable. I made a h bridge circuit following a schematic i found on internet somewhere. I used 2n3904 and 2n3906 transistors and 1 k resistors. When i try it with a 1.9v dc motor it works, but with a 3v dc motor it heats up the transistors and barely move. I tried with 3, 5, 9, 12 v but none of these worked. I made it to move a tray about 2 inches foward and back. I don t know if i have to change the transistors, the resistors, everything??
Sorry for my dumb question, i m begining to learn about electronics, self teaching for now (not very well apparently)
thanks for the help
EvrttGrn says: Sep 26, 2012. 6:31 PM
Thank you for this instructable. I used it to make a motorized focuser for my telescope. I still need to tweak a few things but it works good.
cgmalantonio says: Sep 25, 2012. 5:38 PM
When trying to replicate your project (using 2N3904 NPN instead, all other parts were identical) i noticed the image in "Getting a Clear Picture" is off. According to the image, you have the emitters on power, and the collector's on ground. If the image is correct than according to the pin layout in the image, your actual project is hooked up the same way (emitter to + and collector to - ).

When reading your tutorial, you said to connect emitter's to ground, and collectors to positive. So i first tried mine this way and i couldn't get it to work. I then switched my NPN's around to match your image (emitter on + / collector on - ) and that didn't work either. Maybe I am missing something but i tried every combination and then some until my transistor exploded (started putting power where it didn't belong =P).

Should i be using the same transistor as you? (is something wrong with 2N3904?) i am trying to create an h-bridge which inputs 12 volts and outputs as close to that as possible to the motor. I was using 9 volts however when i blew up the NPN.


deathsmileyinc says: May 3, 2012. 6:12 AM
i have two questions.
1. i see the buttons share one pole, would it be possible to use a Single pole changeover switch to switch between directions and keep it going without pushing the buttons?

2. how significant is the resistance? i want to use this for a tape player and im afraid i have to do a lot more modding to give it enough power
gzip (author) says: May 3, 2012. 5:53 PM
1. Yes, that's possible.
2. That depends largely on the components and power supply you choose to use.
deathsmileyinc says: May 6, 2012. 12:54 PM
well, i found out you cant just make the motor spin backwards in a tape player. but thanks anyway
Terr0rb0t says: Feb 20, 2012. 10:39 AM
Could I make this circuit using just TIP-102:s (NPN) with a load of 0,4 A (motor) at 12V? or would I also need TIP-107(PNP)?
Thx.
gzip (author) says: Feb 20, 2012. 7:52 PM
The addition of PNPs makes for a better circuit but that's not covered here. NPNs will work fine. Just be careful not to short the circuit as outlined in step 1.
Terr0rb0t says: Feb 21, 2012. 9:57 AM
Cool, Thx!
David97 says: Feb 19, 2012. 12:36 AM
imm I think I have one of those motors out of a printer.
Terr0rb0t says: Feb 13, 2012. 9:05 AM
Did I understand correctly that this circuit keeps the motor running only as long as long as one of the buttons is pushed, but when you release it, the motion stops? If so, what would be needed for a continuos motion? In other words, that the motor would keep running until the other button is pushed? Thxs.
gzip (author) says: Feb 13, 2012. 6:06 PM
Yes, you understand correctly. You might want to take a look at a bistable multivibrator circuit using a 555 timer.
ProBodger says: Jan 15, 2012. 6:18 AM
great instructable, I first had some problems with only one button working however, this proved to be a dodgy transistor. It now works great, I made a copy of this on stripboard, really easy to do. Here are some photos:
H bridge on stripboard.JPGUnderside of H bridge on strip board.JPG
gzip (author) says: Jan 15, 2012. 10:14 PM
Cool, thanks for sharing your photos.
lkien says: Nov 10, 2011. 5:18 PM
I have just gotten familiar with programming MCU, and I really want to make some hw to play with.
Great intruction, I will make one and post the result here after the midterm exams. :))
mattadamsnet says: Jul 21, 2011. 5:58 PM
I used your instructable to build 2 dual h bridges to drive 2 bipolar stepper motors, works very well. Thank You
gzip (author) says: Jul 21, 2011. 9:24 PM
Nice. Care to share more info about what you did?
LeumasYrrep says: Mar 26, 2011. 9:54 PM
Yah a use for all those NPN transistors I have pulled.
effixe says: Nov 22, 2010. 6:14 AM
i did one with 4 2N2222 NPN

http://www.flickr.com/photos/effixe/5194395629/

thx for the tutorial.
the_burrito_master says: Sep 24, 2010. 11:43 AM
ok I'm 99% sure this is the right way.


h- bridge 2.jpgh- bridge.jpg
the_burrito_master says: Sep 24, 2010. 11:46 AM
black = -
red = +
green = motor
blue = buttins/arduino/micro controller as well as a resistor.
the_burrito_master says: Sep 22, 2010. 11:11 PM
This is great I'm gonna hook it up to my arduino, and use it to power my roller coaster

I made a 3d model of this circuit minimized to it's smallest possible state.

Red blocks connect to a motor

Blue blocks connect to an Arduino/AVR/or buttons.
h- bridge 2.jpgh- bridge.jpg
gzip (author) says: Sep 23, 2010. 9:46 PM
This is cool. Post some pics if you build a working circuit.
the_burrito_master says: Sep 24, 2010. 10:54 AM
yeah I will, I think i did but i haven't fully tested it yet. only one side seems to be working.
the_burrito_master says: Sep 23, 2010. 9:08 PM
Oh noes i just made this and it didn't work i screwed up a tiny bit :P
benjgvps says: May 14, 2010. 9:06 PM
 A few questions, I want to control a motor from an Arduino board, which would require me to replace the buttons for 2 more transistors, how would I end up hooking that up? I also lack 22K Ohm resistors, what would be the range that I could use without burning anything out? I have some really weird resistors laying around.
gzip (author) says: May 15, 2010. 9:45 AM
You don't need additional transistors to control the H-Bridge from an Arduino. Take a look at the graphic in step 7 and replace the switches with Arduino write pins connected to the blue dots.

As for resistor values, 22k is quite high. Divide 5 volts by the resistor value to get the number of amps, in this case around 0.22 milliamps. That's a small current but its still enough to open the transistor. The resistor value depends on what transistor your're using so you can experiment with resistors, starting high and reducing the ohms until you get something satisfactory.
benjgvps says: May 17, 2010. 7:21 AM
 Thanks, I'll look into it.
jan.p says: Apr 12, 2010. 12:58 PM
 Can you please post a circuit diagram of your breadboard?
Thank you!
eshneto says: Feb 19, 2010. 5:14 AM
I guess you should have used fly back diodes. The inductive load should be high there, specially if using PWM to control the motor speed.
gzip (author) says: Feb 19, 2010. 10:49 AM
Flybacks are mentioned in the last step for higher power motors. They're not really needed in the breadboard circuit demonstrated here so I omitted them for simplicity.
jamwaffles says: Dec 12, 2009. 6:53 AM
Its a good instructable - im glad you can just use NPN for an H-Bridge :)

James
admin says: Sep 1, 2009. 12:06 PM
This is a great Instructable, but you need to add a main image of the final project to the intro step. Please do that and leave me a message when you have so that we can publish your work. Thanks!
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!