I am completely stumped as to why this circuit isn't working:
PLEASE DISREGARD THE PINOUTS ON THE MICROCHIP. The power is coming in through the 21mm power jack, and the pins connected to the servos/transistors are A0-4 and D0-4 respectively.
On 5v, the circuit works when R1 is 470 Ohm, (and no LED in line with the arduino), but there is not enough power to power the servo. So I switched to a 9v wall-wart.
On 9v,
The transistor is leaking. No matter how high the value of the resistor, the resistor leaks. Strangely, the higher the value of R1 (I tried up to 10M), the brighter the LED's get.
The LED's light regardless of the polarity? (Hmm, breakdown voltage for LED is ~5v...maybe I'm overloading it)
The voltage drop across the LED and R1 is 11.2v (I'm guessing the 9v wallwart is actually 13v)
Servo's read 6v, but still don't move (Hopefully I didn't brun them out after the revelation from issue 3)
And if you stopped reading at the LED polarity issue, the circuit still works when the transistor is removed. I've tried the circuit in multiple breadboards (albeit they were from the same purchase from china) assuming that might be the issue, but same result. I put an led in line with the analog pin as to not allow voltage to complete the circuit and this stops this behavior, but it drops the voltage from the analog pin to an unusable level to signal the servo.
I know I need to find a 7.2 wall wart (so it can put out 9v), but that can't be the only issue. I know how breadboards work...I quadrupal checked that everything was hooked up correctly. Is there something I'm missing? Am I forgetting any diodes or pull-down resistors?
That is not the way to provide power to either the micro's Vcc voltage input nor the servo's voltage input. Have you ever seen a creditable circuit design utilize your method of powering devices through a series led/resistor network?
I am powering the arduino through the 21mm jack. I did not have an arduino in eagle to show this. (EDITED ORIGINAL POST) I am using an led to drop the power some (instead of it getting wasted by the voltage regulator). And what's wrong with powering a device through a series LED? It calls for a diode, and I see no harm using an LED as I also need to drop the voltage. 2 Birds, 1 stone, no?
dberm22:
I am powering the arduino through the 21mm jack. I did not have an arduino in eagle to show this. (EDITED ORIGINAL POST) I am using an led to drop the power some (instead of it getting wasted by the voltage regulator). And what's wrong with powering a device through a series LED? It calls for a diode, and I see no harm using an LED as I also need to drop the voltage. 2 Birds, 1 stone, no?
What is the maximum forward current rating for the leds? The series resistor on the servo power line will starve the servo of current due to voltage drop as the servo needs to draw more current when moving.
This is simply the wrong way to power arduino boards and servos. Use voltage regulator chips or modules.
retrolefty:
What is the maximum forward current rating for the leds? The series resistor on the servo power line will starve the servo of current due to voltage drop as the servo needs to draw more current when moving.
This is simply the wrong way to power arduino boards and servos. Use voltage regulator chips or modules.
Lefty
Max current rating for the LED? Not sure, but I did blow one up when I accidentally hooked it up using the wrong resistor. lol
I suppose the regulator is the way to go, I just didn't want to have to purchase extra stuff. I don't know if that would solve my transistor problems (circuit working regardless whether I hook it up EBC or CBE), but I guess I will have to order it and see.
Will I need an extra diode on the transistor if I remove the LED? The fact that the LED stays on when I remove the transistor has me worried.
Servos may draw upto 1 or 2A peak depending on size/make - they cannot be powered this way at all as
at least 4.8V is required during operation at these current levels.
Plenty of examples on these forums about how to do it properly.
MarkT:
Servos may draw upto 1 or 2A peak depending on size/make - they cannot be powered this way at all as
at least 4.8V is required during operation at these current levels.
Plenty of examples on these forums about how to do it properly.
Ahh, I see now how the servos are starved and why the pull down resistor is affecting the circuit the way it is. I just didn't have the parts so I was trying to be ingenius and go about it a different way. I just purchased a ton of different components on ebay, so I'll report back in about a week or two when they arrive and I fool around with it a bit more.
I figured it out. It wasn't a problem with the circuit at all...it was with the power supply. The circuit with the 5v regulator and the transistors didn't work because the current draw was too much for the 9v wall wart I was using, and the Arduino kept restarting. And it wasn't working with the 2A 5v supply because I wasnt supplying enough voltage to the servos. A higher rated 9v supply made it work but since the servos are only drawing 5mA when idle, using a 9v supply with the 5v regulator/transistors only wastes more power than getting rid of the transistors/regulator completely. I will just go with the simple, no regulator, no transistor approach. It could have saved me tons of time if I had just measured the current to begin with.