Shop OBEX P1 Docs P2 Docs Learn Events
Boe Bot error — Parallax Forums

Boe Bot error

kevin.shen18kevin.shen18 Posts: 3
edited 2014-07-23 15:11 in General Discussion
I have purchased a Boebot and began following the tutorial/guidebook that came with it(Robotics with the BoeBot)

On page 106, in the Boebot Navigation chapter(4) it teaches you how to chance the PULSOUT width parameters in order to make Boebot move in a straight line.
' {$STAMP BS2}
' {$PBASIC 2.5}


DEBUG "Program running"
FREQOUT 4,2000,3000
counter VAR Word


FOR counter = 1 TO 122


  PULSOUT 13, 850
  PULSOUT 12, 650


  PAUSE 20
LOOP
END

When I try the values of 850 and 650 the left and right wheels spin and the boebot moves in a straight line. However when I chance the value of 13 to 780,and the value of 720(so I get a slower speed), and then run it, Boebot runs slower(which was expected) but veers of to the right as if was slowly turning right. The right wheel was turning slower than the left. I am sure the servos are centered(I even double checked. It was definitely not the batteries, I even tried replacing them, no luck.

So what could be causing this problem to the boebot. It worked for 850 and 650, but veered right for 780 and 720. I tried 750 for both pins/servos and the servos were still, which meant the servos were centered.

Comments

  • NWCCTVNWCCTV Posts: 3,629
    edited 2014-07-21 17:17
    Try 780 and 710 to see if that works.
  • Martin_HMartin_H Posts: 4,051
    edited 2014-07-21 17:22
    This is a common problem with all electric motors. Any two motors will generally have differences for speed at various pulse widths and that manifests itself as curving away from the wheel that's turning faster. I usually use trial and error calibration to find three or four forward and reverse pulse widths (L, M, H) that move the boe bot roughly forward. I then build a table of constants and use them when writing my programs as follows:
    MStop          CON 750 
    Speed100L      CON 870  ' Replace these values with the ones you found in testing
    Speed075L      CON 831
    Speed050L      CON 810
    Speed025L      CON 797
    Speed100R      CON 500
    Speed075R      CON 658
    Speed050R      CON 685
    Speed025R      CON 700
    

    Now these specific pulse widths vary from bot to bot and trial and error is generally the best way to find them. A pair of wheel encoders takes the guess work out of things, but that can wait until you gain more experience with the basics.
  • trookstrooks Posts: 228
    edited 2014-07-22 03:58
    Martin_H wrote: »
    This is a common problem with all electric motors. Any two motors will generally have differences for speed at various pulse widths and that manifests itself as curving away from the wheel that's turning faster. I usually use trial and error calibration to find three or four forward and reverse pulse widths (L, M, H) that move the boe bot roughly forward. I then build a table of constants and use them when writing my programs as follows:
    MStop          CON 750 
    Speed100L      CON 870  ' Replace these values with the ones you found in testing
    Speed075L      CON 831
    Speed050L      CON 810
    Speed025L      CON 797
    Speed100R      CON 500
    Speed075R      CON 658
    Speed050R      CON 685
    Speed025R      CON 700
    

    Now these specific pulse widths vary from bot to bot and trial and error is generally the best way to find them. A pair of wheel encoders takes the guess work out of things, but that can wait until you gain more experience with the basics.

    Also keep in mind that as the batteries get weaker there will also be changes needed to the pulse widths.
  • ercoerco Posts: 20,256
    edited 2014-07-22 07:32
    Per other responses, analog servos do not behave linearly wrt pulses. They are open loop devices without any feedback. Trial and error experimentation is required just to get you in the ballpark.
  • kevin.shen18kevin.shen18 Posts: 3
    edited 2014-07-22 13:43
    Thank you.So this is normal for a Boebot's servo to be slightly off. I will make some software calibrations
  • ercoerco Posts: 20,256
    edited 2014-07-22 21:04
    Yes sir, but first make sure both of your servos are nulled/adjusted to stop at PULSOUT 750. There is a trimpot adjustment on each servo.
  • kevin.shen18kevin.shen18 Posts: 3
    edited 2014-07-23 13:58
    erco wrote: »
    Yes sir, but first make sure both of your servos are nulled/adjusted to stop at PULSOUT 750. There is a trimpot adjustment on each servo.
    Yes, I made sure my servos were centered and they stopped at PULSOUT 750. Thank you very much!
  • ercoerco Posts: 20,256
    edited 2014-07-23 15:11
    Stable servo voltage will improve consistency. Consider using rechargeable batteries and or a voltage regulator. Duane likes 5V.
Sign In or Register to comment.