Simple Servo Help
Trinitrogen Oxide
Posts: 4
Im building my own robot based off the Boe Bot with a BS2 and two servo's for the locomotion. Im using the small breadboard purchased from parrallax along with the 360 degree servo's. Im really not good with the specific terms for this stuff but bear with me, I've got 4 AA's in a pack powering the two servo's by putting the positives and negetives of all three in the same respective columns of the breadboard (does that make sense?). Then I plugged one servo's white wire into the pin 12 column and the others into Pin 13's column. I made a simple
DO
pulsout 12, 750
LOOP
so I can calibrate the servo's but this is where Im having trouble. First of all BOTH servo's turn, even though I only pulsout to 12. I even disconnected the white wire of the other servo so just the one was on 12 is connected·and they both still spin. Very weird. Secondly I can't seem to get either to stop spinning by messing with the potometer, but I feel as though these problems might be related?
Post Edited (Trinitrogen Oxide) : 1/13/2005 2:54:42 AM GMT
DO
pulsout 12, 750
LOOP
so I can calibrate the servo's but this is where Im having trouble. First of all BOTH servo's turn, even though I only pulsout to 12. I even disconnected the white wire of the other servo so just the one was on 12 is connected·and they both still spin. Very weird. Secondly I can't seem to get either to stop spinning by messing with the potometer, but I feel as though these problems might be related?
Post Edited (Trinitrogen Oxide) : 1/13/2005 2:54:42 AM GMT
Comments
Also, make sure to calibrate servos with a PAUSE 20. Your loop should look like this:
DO
PULSOUT 12, 750
PAUSE 20
LOOP
The basic stamp is in the breadboard, I have 9V with the positive connected to VIN and the negative to the stamps ground. The servo's white wire is connected to pin 12. On a seperate column of the breadboard I have a 4AA battery pack with the positive in one column and the negetive in another. I then put the positive and negetive wires in each of the they're respective columns. Both servo's are powered, but only the one is connected to pin 12. Anybody see any glaring flaws here?
' {$STAMP BS2}
DEBUG "Program Running!"
counter VAR Word
FOR counter = 1 TO 122
PULSOUT 12, 650
PAUSE 20
NEXT
DEBUG "Finished 1..."
FOR counter = 1 TO 40
PULSOUT 12, 750
PAUSE 20
NEXT
DEBUG "Finished 2..."
FOR counter = 1 TO 122
PULSOUT 12, 850
PAUSE 20
NEXT
DEBUG "Finished 3..."
END
It goes through it all, the servo spins non stop, doesn't stop for the 1 second its supposed to in the middle, and never switches directions, it just keeps going then stops. Can I get a little help with this.