The servo does not move...at all When using USB, but it does turn when using the 9volt
When i am using the 9volt it turns randomly for a while...then turns how i specified in the code. Then after the first 180....it stops..then spins quickly back to the original position...then repeats....and sometimes moves around randomly :-?
All i need this servo to do is turn back and forth.....and it would be great if i could get it to go back and forth 90 degrees
USB most likely cannot supply enough current to drive a servo.
When i am using the 9volt it turns randomly for a while...then turns how i specified in the code. Then after the first 180....it stops..then spins quickly back to the original position...then repeats....and sometimes moves around randomly
9v batteries likewise.
The arduino also may not be able to source enough current from its 5v pin.
The random moving and jumping around may be due to the arduino browning out, and resetting.
so do you think i could hook up two 9volts to a 5volt reg. (2 9volts to make it last longer) then just hook that up the 5volt wire, and the battery ground to the ground on the servo?
so do you think i could hook up two 9volts to a 5volt reg. (2 9volts to make it last longer) then just hook that up the 5volt wire, and the battery ground to the ground on the servo?
If you mean in "parallel" (NOT series), then yes, this could help, but you will still be fighting with the fact that a 9V stinks as a current source. Most 9V alkaline batteries have at best around a 500 maH rating, which is really small. Double it up (like you posted), you might get 1 AH.
Some of that is going to be lost in the voltage drop on the regulator (as heat); even so, your servos likely will use a bit of current, especially if turning slowly (or little) - let's say around 200 ma (could be higher or lower, depending on the servo); with a one amp hour battery, you can see that we won't get much in the way of use (5 hours continuous, roughly).
9V batteries stink for just about anything other than transistor radios and small handheld games (oh, and powering multimeters). Instead of a 9V battery, use something better like a battery pack made from AA or C-cell batteries; or an R/C pack (7.2 or 9.6 V) made from sub-C rechargeables.
ok...i have a AA battery pack, it holds four....should i use this to hook up to the 5 volt reg.?
Read up on your 5v regulator to see what the dropout voltage is. The 4 AA batteries should directly power the servo for a little while. I have some of that type servo (below) and it should work ok off of 6v.