Boe-Bot won't run the same way twice
New to Boe-Bot.
I have executed the following code:
' Robotics with the Boe-Bot - BoeBotForwardThreeSeconds.bs2
' Make the Boe-Bot roll forward for three seconds.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "Program Running!"
counter VAR Word
FREQOUT 4, 10000, 3000 ' Signal program start/reset.
FOR counter = 1 TO 122 ' Run servos for 3 seconds.
PULSOUT 13, 850
PULSOUT 12, 650
PAUSE 20
NEXT
FOR counter = 1 TO 70
' Run servos for 3 seconds.
PULSOUT 13, 750
PULSOUT 12, 750
PAUSE 100
NEXT
FOR counter = 1 TO 122 ' Run servos for 3 seconds.
PULSOUT 13, 850
PULSOUT 12, 650
PAUSE 20
NEXT
FOR counter = 1 TO 73 ' Run servos for 3 seconds.
PULSOUT 13, 750
PULSOUT 12, 750
PAUSE 100
NEXT
END
Boe-bot doesn't run consistently. He overturns or underturns but doesn't do the same thing each time.
Any troubleshooting suggestions?
I have executed the following code:
' Robotics with the Boe-Bot - BoeBotForwardThreeSeconds.bs2
' Make the Boe-Bot roll forward for three seconds.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "Program Running!"
counter VAR Word
FREQOUT 4, 10000, 3000 ' Signal program start/reset.
FOR counter = 1 TO 122 ' Run servos for 3 seconds.
PULSOUT 13, 850
PULSOUT 12, 650
PAUSE 20
NEXT
FOR counter = 1 TO 70
' Run servos for 3 seconds.
PULSOUT 13, 750
PULSOUT 12, 750
PAUSE 100
NEXT
FOR counter = 1 TO 122 ' Run servos for 3 seconds.
PULSOUT 13, 850
PULSOUT 12, 650
PAUSE 20
NEXT
FOR counter = 1 TO 73 ' Run servos for 3 seconds.
PULSOUT 13, 750
PULSOUT 12, 750
PAUSE 100
NEXT
END
Boe-bot doesn't run consistently. He overturns or underturns but doesn't do the same thing each time.
Any troubleshooting suggestions?
Comments
Dead reckoning is an art & science, some patience and persistence is required. There's an bolt-on kit to add encoders and a companion PDF by my hero and forumista favorite PhiPi, which adds the accuracy you seek to Boebot: https://www.parallax.com/product/28107
Another way to improve the BOE-Bot's repeatability is to use a voltage regulator between the batteries and the servos.
I was having a heck of a time trying to get my cheap-bot to perform a figure 8. I was using a couple Li-Ion batteries but the dropping voltage changed the way the motors behaved each run. Adding a regulator made the motor speed much more consistent. I include information about the regulator I used in this thread.
Now might also be a good time to check your batteries.