Increase BOE Arlo’s Top Speed in Pulse Mode

Increase BOE Arlo’s Top Speed in Pulse Mode

The DHB-10 defaults to a speed control scale from 1000 to 2000 us.  That’s PULSOUT duration values from 500 (full speed clockwise) to 750 (stop) to 1000 (full speed counterclockwise).  The DHB-10 has a scale command for adjusting that range.  For example SCALE 200 would make it fit PULSOUT durations from 650 to 850.  The result: Arlo goes a lot faster!  This also means it’ll travel and turn more for a given number of pulses, so some recalibration may be in order.

  • Put the Arlo up on blocks so it cannot run away while connected to the computer.
  • MAIN and MOTORS power on, BOE power to 2.
  • Run Change Pulse Scale.bs2.
  • MOTORS power off.
  • Run ForwardLeftRightBackward.bs2.
  • MAIN & BOE powers off.
  • Take Arlo to your navigation area.
  • Make sure you’ve got enough room for the Arlo to go more than twice the distance of last time.
  • Turn Main, Motors, and BOE powers on.
  • Optionally, note the turn angle and recalibrate.
  • Optionally, to go back to the slower speeds, uncomment the commented SEROUT and SERIN commands and re-run the ChangePulseScale.bs2.
' Arlo - Change Pulse Scale.bs2
' Change pulse scale from 1000...2000 us to 1300 to 1700 us so that
' Robotics with the Boe-Bot examples can run the Arlo at top speed.

' {$STAMP BS2}
' {$PBASIC 2.5}

DEBUG "Program Running!", CR

FREQOUT 4, 2000, 3000                        ' Signal program start/reset.

DEBUG "SCALE 200", CR                        ' Display SCALE message
SEROUT 13, 32800, ["SCALE 200", CR]          ' Full speed in 650-850
SERIN  13, 32800, 50, ERR, [WAIT(CR)]        ' Wait for DHB-10's confirmation

' Uncomment to return to default
' DEBUG "SCALE 1000", CR                     ' Display SCALE message
' SEROUT 13, 32800, ["SCALE 1000", CR]       ' Full speed in 500-1000
' SERIN  13, 32800, 50, ERR, [WAIT(CR)]      ' Get DHB-10's reply

DEBUG "STORE SCALE", CR                      ' Display STORE SCALE message
SEROUT 13, 32800, ["STORE SCALE", CR]        ' Remember scale
SERIN  13, 32800, 50, ERR, [WAIT(CR)]        ' Get DHB-10's reply

SEROUT 13, 32800, ["PULSE", CR]              ' Exit from serial to pulse mode
SERIN  13, 32800, 50, ERR, [WAIT(CR)]        ' Get DHB-10's reply

DEBUG "Done!"

END

ERR:                                          ' Error routine
  DEBUG "ERROR, no reply from DHB-10.", CR    ' Error message
  STOP                                        ' End program