Multiple RC servos simultaneous control
mrbillhol
Posts: 2
I have developed a 3 axis robotic camera arm. I want to control all three RC continuous rotation servos simultaneously, I have the pulse out code snippet but I wonder if the PAUSE function stops all other running code so I am limited to one servo at a time? I am also using a reluctance tooth sensor and doing a continuous count for feedback. the feedback monitoring is eating many cycles.
Currently I am using the Yost Engineering ServoCenter 4.1 board but it runs slow and can't keep up with the tooth count and the 3 axis RC control servos simultaneously.
Currently I am using the Yost Engineering ServoCenter 4.1 board but it runs slow and can't keep up with the tooth count and the 3 axis RC control servos simultaneously.
Comments
It sounds like you are trying to use a Basic Stamp. While a Basic Stamp can control three servos, that' probably the max.
Looks like you need input also at the same time. The stamp will not do the input and out put at the same time.
Sounds like you need a Propeller chip.
a: pulsout 0,750 'servo 1
pulsout 1,850 'servo 2
pulsout 2,650 'servo 3
pause 15
goto a
Note that the traditional pause 20 is reduced since each pulsout burns up some time. You may have to reduce below 15.
Also, you will reduce (or eliminate) that pause with your read input routine, depending on how long that takes. The main idea is to send a pulse to every servo each 20 ms or less.
The question of how many servos a Stamp can handle comes up all the time. I had 3 servos working just fine here: http://www.youtube.com/watch?v=-Z8lTSX4PHs No input there, granted, but there was certainly time.
I'll have to hook up 3 servos and 3 control pots just for testing when I get a chance. I suspect it can be done. Dare I hope for 4?
Edit: I just re-read the OP and saw the CR servo info. Yep, the reluctance encoders (which as you said, must be continuously monitored) are a dealbreaker with CR servos, which require continuous pulsouts. Two ServoPals might help in your application, but no guarantees.
Regular servos could probably work.
Multitasking (Propeller or PicAxe 18M2) is the way to go for you.
Erco is the master of Stamps and Servos. My input was
@mrbillhol: I glanced at the specs for that YOST board: http://tech.yostengineering.com/servoFolder/servoFolder/servocenterUSB/servocenter41_hardware_manual_mini.pdf
That looks far more capable than any Stamp can ever hope to be. Are you certain it's not up to your task?
If you used potentiometers at your joints instead of the reluctance sensor, you'd be done already.That board has analog inputs.