Shop OBEX P1 Docs P2 Docs Learn Events
servos on various surfaces — Parallax Forums

servos on various surfaces

rotary9krotary9k Posts: 26
edited 2008-06-01 22:41 in BASIC Stamp
Hi,

In my code, I am trying to make my BoeBot turn either left or right by 90 degrees. To do so, I simply trial and error'd different pulse counts. On the surface of my desk, it seems that 20 pulses at 650/650 will make it turn left by 90 degrees. However when I place it on my carpet, it only turns about 60 degrees.

This is obviously due to the friction of the surface. Is there any way to make it turn 90 degrees on any surface?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-01 18:49
    There's no simple way because the friction and slippage of the wheels varies from surface to surface. Even if you had some kind of wheel encoder which would give feedback to the Stamp on the amount of rotation of the wheels, the wheels can slip on the surface. There are ways to reduce this. For example, you could have teeth on the wheels that would dig in the surface, like a carpet, and mostly prevent slippage, but the kind of wheel that would work best would vary from surface to surface. You could use a gyroscope or a compass to track direction or use obstacles in the room or other space as landmarks and ultrasound or infrared for obstacle detection after building some kind of map of the BoeBot's surroundings.
  • rotary9krotary9k Posts: 26
    edited 2008-06-01 19:10
    Yeah that's what I suspected.· I worked with an iRobot and it had an integrated device that measured how many degrees it has rotated. Does parallax have a similar solution?
  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-01 19:24
    Parallax does sell a compass, but it is not accurate enough to be used this way.
    SparkFun sells a variety of rate gyros and accelerometers that can be used for inertial guidance.
    These cost $100 or more and require more computational power than a Stamp can supply.
  • rotary9krotary9k Posts: 26
    edited 2008-06-01 21:15
    Thanks for the response Mike, can always count on you =)
  • Steve in NMSteve in NM Posts: 54
    edited 2008-06-01 22:41
    rotary9k said...
    Yeah that's what I suspected.· I worked with an iRobot and it had an integrated device that measured how many degrees it has rotated. Does parallax have a similar solution?
    Hmm... Would an RC piezo gyro do what you want? They're around $40.

    I guess the real question is, would it have the resolution?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I'm not a complete idiot! Some of my parts are missing.
Sign In or Register to comment.