if anyone could help me that would be great. im trying to control a DC motor and decided to use a h-bridge i saw one online and tried to duplicate it on a breadboard, however it hasn't worked. the transistors i am using are BD139, BD140 and the arduino pin iam using is 9 and 10 set to either high or low. no matter what i do my motor doesn't spin, i have switched the transistor BD140 with BC337 and it worked for a bit. so if anyone could help me to solve this issue i would be grateful. i have attached images of my breadboard hopefully someone can understand it. if anyone knows of another H-Bridge that would absolutely work with a 9v battery im willing to try that.
I don't see any resistors, don't use it or you might damage the Arduino board.
Using a 9V H-bridge with a 5V Arduino requires two more transistors.
Where did you see that online ?
Do you have a schematic ? You can make a drawing with a pen and make a photo of it.
i have tried adding two NPN transitors but doesnt seem to work i will attach the images to show you the one i followed i cant seem to tell if iam putting the transistors the wrong way round
1 : is the one i followed first
2 : is the one i followed by adding 2 npn transistors
3 and 4 : are images of how i put them on the breadboard
JimboZA:
Unless this is an exercise to help you understand how these things work, I can't think of any reason not to use an "h-bridge-in-a-chip" off the shelf.
i know i can get a chip its just i wanted to see for myself if i could do it so i can get a better understanding of what im doing wrong i have gone through many different schematics trying to understand but it doesnt seem to work
Do you have a small 5V or 6V motor ? The version in picture 1 is when the power is 5V and the Arduino is 5V. I would add two resistors of 150 ohm (150 ohm to 1k) from Arduino output to the H-bridge.
The voltages in picture 1 follows the emittors. It is a nice and safe circuit. But only if the red +V label at the top is 5V.
In picture 2 is a full circuit for 9V or 12V motors. But it is also dangerous. When both inputs are high, you get a shortcut current.
I can't see if your breadboard circuit is okay. Both circuits in the pictures should work (picture one only for 5V). Can the battery make the motor run ? Did you damage the Arduino or any transistor ? It is hard to tell from a distance what could be wrong, sorry.
Peter_n:
Do you have a small 5V or 6V motor ? The version in picture 1 is when the power is 5V and the Arduino is 5V. I would add two resistors of 150 ohm (150 ohm to 1k) from Arduino output to the H-bridge.
The voltages in picture 1 follows the emittors. It is a nice and safe circuit. But only if the red +V label at the top is 5V.
In picture 2 is a full circuit for 9V or 12V motors. But it is also dangerous. When both inputs are high, you get a shortcut current.
I can't see if your breadboard circuit is okay. Both circuits in the pictures should work (picture one only for 5V). Can the battery make the motor run ? Did you damage the Arduino or any transistor ? It is hard to tell from a distance what could be wrong, sorry.
hi
thanks for getting back to me i believe the motor i have is a dc 12v motor but i cant be sure as i got it a long time ago, as for the power right now im connecting two double AA batteries i have connected the motor to the batteries and it makes it spin. as for my arduino its not damaged as i just used it for something else, and the transistors im not sure if they are damaged i have ordered new ones
Circuit 1 isn't going to work well with high current loads, give up on it, use
circuit 2.
Circuit 1 in particular isn't going to cut it with darlington's as you'll get almost no voltage
out at 5V (you'll only get about 3V out anyway with BJT's.
With a single stage of BJT's you won't have enough gain to drive direct from Arduino
pins, high current transistors typically give a switching current gain of 10x or maybe
20x, and Arduino pins are best not loaded beyond about 20 to 30mA.
Super-beta transistors can help (more gain in saturation, lower on-resistances
in saturation), but ancient devices like BD139's are really poor.
The modern/efficient approach however is to use MOSFETs for an H-bridge, especially
when coupled with MOSFET high-low driver chips.