Shop OBEX P1 Docs P2 Docs Learn Events
compass — Parallax Forums

compass

sjptechsjptech Posts: 2
edited 2006-09-04 03:08 in Robotics
I am having a problem getting the BOE-BOT to turn to an exact compass angle. The servo pulsout commands for the turn (PULSOUT 12 & 13, 850) are nested in a·DO LOOP·that reads the compass setting. Once the desired angle is reached, the loop is exited and servos are commanded to stop (PULSOUT 12 & 13, 750). The loop executes correctly and exits at the proper angle, but the BOE-BOT continues to turn·· 5 - 10 degrees past that angle. I have verified that the angle that the loop exits at is the correct angle. Why does the BOE-BOT continue the turn an extra 5 - 10 degrees before executing the stop command?

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-01-02 07:00
    If you post your code someone might be able to spot something.· Without the code there's no way to know what is happening.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • sjptechsjptech Posts: 2
    edited 2006-01-02 15:37
    Chris:

    I think I discovered the problem on my own this morning. It seems that my problem is magnetic interference from the servo motors. When the compass is mounted on the BOE-BOT breadboard, I receive different readings from the same position depending on whether the motors are on or off. I removed the compass from that breadboard and attached it to the BS2 pins further away from the motors and the problem disappeared. Any ideas on how I could shield the compass from servo motor interference?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-01-02 16:43
    Well, you could raise the compass module further from the board, or you could use a metal plate as a backplane magnetic shield.· Personally I would try raising the compass module higher first.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • linuxgeeklinuxgeek Posts: 45
    edited 2006-09-04 03:08
    sjptech said...
    Chris:

    I think I discovered the problem on my own this morning. It seems that my problem is magnetic interference from the servo motors. When the compass is mounted on the BOE-BOT breadboard, I receive different readings from the same position depending on whether the motors are on or off. I removed the compass from that breadboard and attached it to the BS2 pins further away from the motors and the problem disappeared. Any ideas on how I could shield the compass from servo motor interference?

    There is also a mast designed to hold the compass above the robot chassis that can be found at www.superdroidrobots.com/shop/item.asp?itemid=144.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I can handle complexity.. It's the SIMPLE things that confound me.
    The Dynaplex Network - Home of The Octabot Project
    http://www.thedynaplex.org
Sign In or Register to comment.