Maximum number of servos the BS2 can control?
Renny
Posts: 3
Is there a maximum number of servos that the BS2(on the rev c board of education) can control? It seems to work ok to control 4 servos but as soon as the·5th one is added it acts erratically and doesn't run the program.· Just doing a simple program like this will even cause problems:··
· PULSOUT 11, 750
· PULSOUT 3, 750
· PULSOUT 4, 750
· PULSOUT 15, 750
· PULSOUT 8, 750
I've tried putting several servos on one pin to see what happens and it acts the same way with the fifth servo throwing everything out of whack....
thanks for any info!
· PULSOUT 11, 750
· PULSOUT 3, 750
· PULSOUT 4, 750
· PULSOUT 15, 750
· PULSOUT 8, 750
I've tried putting several servos on one pin to see what happens and it acts the same way with the fifth servo throwing everything out of whack....
thanks for any info!
Comments
You need a PAUSE in there somewhere. The servo's require a 15ms to 25ms pause in-between each PULSOUT it receives.
So try something like this...
MainLoop:
PULSOUT 11, 750
PULSOUT 3, 750
PULSOUT 4, 750
PULSOUT 15, 750
PULSOUT 8, 750
PAUSE 13 ' <--- 5 servos at 1.5ms = 7.5ms ... 20ms - 7.5ms = 12.5 or 13
GOTO MianLoop
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
The number of servos that a BS2 can control depends on timing. Control pulses are at most 2-2.5ms in width and have to be repeated about every 20ms. That means that a BS2 (or any Stamp) can control at most 8 servos. Other microcontrollers (like the SX or Propeller) are able to control more than that by controlling several simultaneously (overlapping).