Servo Motors, please help
No
Posts: 26
Hey guys, Is it possible to have to servo motors (both a left and a right side) to turn in the same direction? I tried using
counter VAR Word
for counter = 500 to 1000
pulsout 12,counter
pulsout13, counter
pause 20
next
for counter =1000 to 500
pulsout 13, counter
pulsout12, counter
pause 20
next
-when i did it this way they spin together but in the opposite direction.
if i set the program up with two seperate counters they wont spin at the same time but will go in the right direction. sorry i cant post the actual program since im at work. but any help would be appreciated.
Is there a command i can nest to make this work? or do i have to add circuitry?
thanx in advance
counter VAR Word
for counter = 500 to 1000
pulsout 12,counter
pulsout13, counter
pause 20
next
for counter =1000 to 500
pulsout 13, counter
pulsout12, counter
pause 20
next
-when i did it this way they spin together but in the opposite direction.
if i set the program up with two seperate counters they wont spin at the same time but will go in the right direction. sorry i cant post the actual program since im at work. but any help would be appreciated.
Is there a command i can nest to make this work? or do i have to add circuitry?
thanx in advance
Comments
If so, then take a look at them and how they are mounted. One on each side, the exact mirror opposite placement.
You really want them to spin in opposite directions in order for the robot/whatever to go forward.
Also, if you ARE talking about Parallax's continuous rotation servos, your ranges are too high and too low. I'd be
worried that it'd damage the servos with that high of a range.
750 should be dead stop for the servos, and your range of usable movement should be 650-850
So... to make the robot move forward or backward (depending on how you have the servos mounted) at full speed
for a short distance with no "ramping" to slowly speed up or slow down...
for counter = 1 to 50
pulsout 12, 650
pulsout 13, 850
next
To make it go the other way, just swap it like this:
for counter = 1 to 50
pulsout 12, 850
pulsout 13, 650
next
Now this will only work correctly with tuned servos. For instructions on how to tune the servos you need to read Robotics
with the Boe-bot available free for download at this site, or supplied with every BOE-bot kit.
If you meant standard servos, please ignore everything I said as I've never had a standard servo.
Hope this helps.
for counter = 500 to 1000
pulsout 13, counter
pulsout 12, (1500-counter)
Pause 20
Next
I assume this is using a BS2 for the counter values. Also if these are right and left, you do want one motor turning clockwise and the other counter clockwise for the left and right sides of a robot, like the BOE-BOT.
Which PBASIC Stamp are you using?
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When all else fails, try inserting a new battery.
Post Edited (Bruce Bates) : 12/2/2008 12:12:21 PM GMT
thanx again
·
Can You list the spec.s for Your servo,I've never used the "GWS Pico".With some spec.s this should be pretty easy to fix.Also the $stamp Your useing...
_______$WMc%______
http://www.parallax.com/Portals/0/Downloads/docs/prod/Servos/GWSServo.pdf
Naro HP/STD
BS2
thnx
·
which would work fine if the servos were to move in the same direction. To get them to move in opposite directions, do
the way MSDTech suggested for a BS2.
Post Edited (Mike Green) : 12/2/2008 9:18:21 PM GMT
A little info helps alot
________$WMc%___