Hello, I am making a collision avoidance robot for a project. I’m making two h-bridges out of TIP 120, TIP 125, and P2222A transistors. I am following this schematic by Bob Blick http://www.bobblick.com/techref/projects/hbridge/hbridge.html. My power source is a 12V 3.8Ah lead acid battery and I am not using the 470uf capacitor in the schematic. My motors are 12 VDC .09A 6.8RPM No load. The confusing thing is that I’ve had one h-bridge working and I was controlling the motor by PWM. The other wasn’t so I thought it was a wiring problem so I rewired and switched out components, but now neither work and there’s only a humming noise from my motors instead of rotating in both directions. Not sure if this will help, i’ve attached a picture of my h-bridge. The TIPs pins are B C E and the p2222A pins are E B C and the parallel resistors coming from the bases of the p2222A go to PWM pins on my Arduino Mega 2560. Any ideas why my motors are only humming instead of spinning? Oh yeah, I test my motors by using my parallax PING sensor. Basic code, spin forward when distance > 12 inches and reverse when distance < 12 inches.
I suppose it would be silly to ask if you have any electronics experience. Let me approach this with an analogy. Suppose you’re driving your car one day (if you had one I mean) and all of a sudden it stopped working. Would you get out of the car and start swapping components ? Do you see my point. Obviously something is wrong. How should you solve this problem. I did not see any mention whatsoever in your post that you immediately proceeded to dismantle your circuit and test every component one by one with a meter and then removed all the wires from the breadboarded and started over carefully checking the wiring as you went along. Clearly there is something wrong. Is the arduino ? If it were would you know how to test it ? If it even occurred to you to test it (not that it ever would mind you ) how would you go about it ? What is that 470uF capacitor for ? Any ideas ? Have you tested all the components ? Do you know how to ? Do you have a meter ? Did you post your code with your original post ? Are we to assume that the code in your IDE is in fact the same code in the link ?
Oh yeah, I test my motors by using my parallax PING sensor. Basic code, spin forward when distance > 12 inches and reverse when distance < 12 inches.
How can they be working if you just said they are not turning ? Did you mean you tested them before you had the problem ?
Did you measure the current after the problem occured ?
My motors are 12 VDC .09A 6.8RPM No load.
Is this what they should be ? Is this what they are now that it is not working ?
I apologize for lack of all details. Yes I tested all components. The arduino works and I didn't post the code because it's not my code for my robot and it's not a code problem. I just figured it was a detail to mention how I was testing my motors so people wouldn't wonder if I were using push buttons, pots, etc to control my motors. The next thing I was going to do was connect to an oscilloscope when I go back to school tomorrow. I may be wrong, but I thought the capacitor was for noise. Since I use equipment at school, I don't have 24 hr access so there are some things I have not checked yet and I don't work on it everyday. I was thinking maybe saturation was my problem.
Did you post your code with your original post ? Are we to assume that the code in your IDE is in fact the same code in the link ?
No one should assume anything about code because I didn't post any. I just gave a small description of what I was doing.
My motors are 12 VDC .09A 6.8RPM No load.
Just the description of the motors.
I suppose it would be silly to ask if you have any electronics experience.
If it even occurred to you to test it (not that it ever would mind you ) how would you go about it ?
I may not have a 4.0, but I do have a bit of experience and I don't appreciate your approach. I never used a forum before so I left out some things, but you came off very rude. I'm learning and independently trying to improve. I thought forums were friendly environments where people help each other and provided as an extra avenue of learning.
The H-bridge will not work as described. The inputs must be driven with complementary voltages. When input A is high input B must be low. So both inputs must be driven with complementary PWM voltages. One input cannot be held high or low while the other is driven with a PWM signal.
Test to see if your circuit works DC. Put A high, B low and see if OUTA is high and OUTB is low. Then reverse and test again.
Thanks, When I was controlling with analogWrite depending on which direction it would turn based on the distance values of the sensor, I had (lets use forward as an example) input A at 255 (100%) and input B 0. When it did work I was also able to change the duty cycle to slow the motor for example input A 64 (25%) and input B 0. Now that im having problems i get the humming regardless. When I tried digitalWrite and put input A HIGH and input B LOW the humming is still there but very faint. Still no spinning of the motor.
If you do not have a voltmeter you need to get one. You should test the DC operation of your circuit with a voltmeter as the first step in debugging. You need to verify you are getting the expected voltages at the outputs given applied voltages at the inputs. If not, you need to step through the voltages at the internal nodes. Can't help you without that info.
Ok maybe I will have time to work on it after my classes today and I will go to the lab and test it. Thanks.
I tested my circuit. I applied 5V to my input and on my output I get 11.6 V. When I switch the leads on my input I get -11.6V. So when I decided to connect my motor in the h-bridge the voltage drops down to nearly nothing and my pn2222a transistors slowly start to heat up. I take the motor out, the voltage across the collectors of the TIP 125s goes back to normal.
I left out some things, but you came off very rude. I'm learning and independently trying to improve. I thought forums were friendly environments where people help each other and provided as an extra avenue of learning.
Be advised the forum has a small population of some what rude know-it-alls, but they can't help themselves with their help. Just give them some sympathy. As to your h-bridge, I think the h-bridge is not turning on. The "I am not using the 470uf capacitor in the schematic" may be a critical part of the issue. The way the capacitor is in the circuit it may be acting somewhat as a voltage charge pump or PWM enhancement for the bases of the transistors.
Thanks for the input. I did have one out of the two h-bridges working without the capacitor and that reason sort of make me feel like it's something I am just overlooking. Next thing i'll do is add the cap though. Thanks
Definitely add the capacitor. 470uF is an absolute minimum and if your motors have low inductance them you might well want a bigger value. Lack of the capacitor in conjunction with inductive spikes from the motor (at 500Hz with Arduino PWM) could easily have damaged several things.
It sounds like you've blown up one of the output transistors - I suggest putting them in a transistor tester and making sure nothing has a collector/emitter short. Worst case, you need to replace about $3 of silicon, but try to figure out why it blew up or it will happen again.
PS opto-isolators between your Arduino and motor driver are a very good idea. They're very cheap and will save you from blowing up a $10+ microcontroller and/or all the expensive stuff it might be connected to (your PC?).
I see you've met our troll.
You said you applied 5V to the input. You must realize you must apply voltages to BOTH the INA and INB nodes. When INA is 5V, INB must be 0V. When INB is 5V, INA must be 0V. Complementary voltages must be applied to the inputs to get complementary voltages at the outputs. This is how an H-bridge works. It allows the differential output voltage to swing from +12V to -12V so the motor can go from forward to reverse. You will need to have a circuit to convert your single ended input voltage signal to a differential voltage signal to drive the input of the H-bridge.