Shop OBEX P1 Docs P2 Docs Learn Events
Boe-Bot troubles (turning on the beginning of the program) — Parallax Forums

Boe-Bot troubles (turning on the beginning of the program)

roksrakaroksraka Posts: 19
edited 2008-08-20 19:22 in Robotics
I programmed my Boe-Bot to make a tone and then drive forward for 10s. However, before the piezo speaker turns on, the entire robot turns left slightly. (Right servo turns a bit. When it starts to drive forward it drives slightly RIGHT (but that's not the problem).

Do you happen to know what causes this problem and how could I fix it? If you know anything please REPLY!

Thanks for help!
roksraka

Post Edited By Moderator (Chris Savage (Parallax)) : 8/20/2008 8:02:09 PM GMT

Comments

  • SRLMSRLM Posts: 5,045
    edited 2008-08-19 11:49
    Could you post your code? Without that it's very difficult to help and the best that we can do is theorize. My guess is that your BS2 is sending out a pulse or series of pulses to the servo. However, this is all hypothetical without the code.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-08-19 16:09
    Servo motors, particularly when modified for continuous motion (as in the BoeBot wheel servos), are not exact things. There's some slippage and no feedback. The closest thing to a "fix" is to get and install wheel encoders that provide wheel position feedback to the Stamp (www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/List/1/ProductID/80/Default.aspx?txtSearch=wheel+encoder&SortField=ProductName%2cProductName). These still don't account for wheel slippage where one wheel slips on the floor ever so slightly and the other does not. The wheel encoders also require additional code in your program to track the wheel position.
  • roksrakaroksraka Posts: 19
    edited 2008-08-19 19:49
    ' Robotics with the Boe-Bot - BoeBotForwardTenSeconds.bs2
    ' Make the Boe-Bot roll forward for three seconds.

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

    counter VAR Word

    FREQOUT 4, 2000, 3000

    FOR counter = 1 TO 407

    PULSOUT 13, 850
    PULSOUT 12, 650
    PAUSE 20

    NEXT

    END
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-08-19 21:10
    Try inserting the following code in your program just before the FREQOUT:

    LOW 12 : LOW 13
    
    
    


    This will make sure that both P12 and P13 are low and not floating while the speaker is sounding. Without this, the servo may be getting some noise through its input. Also, be aware that servos often twitch a little when first powered up. This may also be what you're seeing.

    -Phil
  • roksrakaroksraka Posts: 19
    edited 2008-08-20 19:19
    Thanks for your help! By the way, I forgot to mention one thing - this servo movement only occur averytime when the robot is turned on. If the programm ends and you reset, I won't happen.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-08-20 19:22
    In that case, what you're seeing is the normal power-on servo twitching. There's not much you can do about it. We all have to live with it! smile.gif

    -Phil
Sign In or Register to comment.