continuous rotation servo position control
Okay, so I'm very new to Basic Stamp, but I've used other programming applications so I can figure most of the things out.
·My real problem is that I need to get a Parallax Continuous Rotation Servo (CRS from now on) to move at fairly precise positioning Using BSII.· Ultimately,·i need to get a cycle going where one CRS rotates 360 degrees, and another one just after rotates exactly 60 degrees (hysteresis would be very bad.)· I tried using the PULSOUT command, but of course, getting the servo to rotate to a precise location is very difficult, I.E. I either get over rotation or under rotation, and this then translates.· So if I run my code, it will say rotate 358 degrees instead of 360, and then 354 and then 352 and so on.· Is there any way to get a CRS to run without this sort of instability?· Heres the code i've been working with, excuse its simplicity.
' {$STAMP BS2}
' {$PBASIC 2.5}
counter VAR Word 'Work space for FOR NEXT
Servo_pin CON 0 'I/O pin that is connected to servo
FOR counter = 0 TO 397
PULSOUT servo_pin,3
PAUSE 2
NEXT
STOP
I think the pulsout option is not good for this application, but i have no idea what else could be done.
·
·My real problem is that I need to get a Parallax Continuous Rotation Servo (CRS from now on) to move at fairly precise positioning Using BSII.· Ultimately,·i need to get a cycle going where one CRS rotates 360 degrees, and another one just after rotates exactly 60 degrees (hysteresis would be very bad.)· I tried using the PULSOUT command, but of course, getting the servo to rotate to a precise location is very difficult, I.E. I either get over rotation or under rotation, and this then translates.· So if I run my code, it will say rotate 358 degrees instead of 360, and then 354 and then 352 and so on.· Is there any way to get a CRS to run without this sort of instability?· Heres the code i've been working with, excuse its simplicity.
' {$STAMP BS2}
' {$PBASIC 2.5}
counter VAR Word 'Work space for FOR NEXT
Servo_pin CON 0 'I/O pin that is connected to servo
FOR counter = 0 TO 397
PULSOUT servo_pin,3
PAUSE 2
NEXT
STOP
I think the pulsout option is not good for this application, but i have no idea what else could be done.
·
Comments
You could use a DC motor with a gearbox and position encoder or a stepper motor with a gearbox and the appropriate driver hardware. There are also some more sophisticated servos like those from CrustCrawler that have a digital controller and better position feedback. I don't know if they have a continuous rotation equivalent.