Shop OBEX P1 Docs P2 Docs Learn Events
Compass AppMod Question — Parallax Forums

Compass AppMod Question

Chris SavageChris Savage Parallax EngineeringPosts: 14,406
edited 2004-12-07 01:14 in Robotics
Before I ask this, I have plenty of Electronics Experience (Engineer) in Electronics (For those who don't know me), and plenty of experience with the BS2 and many Parallax products.· However, I have zero experience with the Compass AppMod, and while I haven't tried to run any code for it yet, in simply plugging it into a BOE-Bot, I am left with a puzzling question...

The AppMod header on the BOE-Bot faces backward.· Thus plugging the Compass AppMod in has everything reading backwards.· This is of course just plugging it in and powering it up.· It appears to function as a normal Compass in this mode, with the exception of it being backward.· Is this a normal function?· Obviously in code I could compensate for this, but I thought maybe there was a command to "flip" the readings without decoding them different.

Also, I think (based on observation) that the direction is off just a little, but this particular unit has glue holding the adjustment screw in place.· Is the glue normally there?· I'd love to start using this Compass AppMod.


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage

Knight Designs
324 West Main Street
P.O. Box 97
Montour Falls, NY 14865
(607) 535-6777

Business Page:·· http://www.knightdesigns.com
Personal Page:··· http://www.lightlink.com/dream/chris
·

Comments

  • jakjrjakjr Posts: 88
    edited 2004-08-11 08:17
    You could turn the BOE board around so that the breadboard is facing the rear of the BOE bot, should work fine unless you have stuff on the breadboard that needs to be facing forward (such as IR sensors or for whiskers use, etc.).
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-11 13:39
    jakjr said...
    You could turn the BOE board around so that the breadboard is facing the rear of the BOE bot, should work fine unless you have stuff on the breadboard that needs to be facing forward (such as IR sensors or for whiskers use, etc.).
    That's exactly the problem...I have all my sensors mounted, but wanted to add the Compass AppMod, and I was hoping not to have to code everything "backwards", so to speak.· Since I'm not getting any feedback on this, I am going to assume that nobody else knows either.· I will go download the datasheet from the Parallax Website and see if I can answer my own question.· I watched enough discussion on the Yahoo Group to know for the most part how this thing works, but I wasn't sure if it was intentional design to be "backwards" on the BOE-Bot.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-11 15:48
    Okay, has anyone even used the Compass AppMod?· Or am I the first?· rolleyes.gif



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    ·
  • jakjrjakjr Posts: 88
    edited 2004-08-12 02:31
    Youve probobly already seen this, but check out page 9 of this document http://www.parallax.com/dl/docs/prod/appmod/compass.pdf apparently its supposed to be mounted backwards.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-12 13:50
    jakjr said...
    Youve probobly already seen this, but check out page 9 of this document http://www.parallax.com/dl/docs/prod/appmod/compass.pdf apparently its supposed to be mounted backwards.
    Yeah, I have that document, however, the example code in there kind of implies that the device works as mounted.· There is no mention in the code or anywhere of having to compensate for backward mounting.· Quite the opposite.· One example mentions sending a command to tel the AppMod that you want to go North, then turning the "Bot" until you are aiming north...Now on my particular bot, I would be heading South after turning, since my Forward routine would take over there.

    I guess I just was hoping for someone who had used it to confirm that this is intentional (Being backward) or if I am supposed to be able to re-calibrate the device when it's connected to a Boe-Bot.· But nobody knows, and mine came glued in place.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-12 17:31
    Well, just to put an end to this thread, I didn't get the information I was looking for, so I called Parallax Tech support.· Bottom line is, in the Boe-Bot application, the compass will always be backward from reality, so you have to compensate in your code for this issue.· If you want to go South, you tell the compass North, since that's the direction the compass will be facing when your bot is heading South.· This I knew.· As for re-calibration, I guess it can't be done.
    sad.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    ·
  • jakjrjakjr Posts: 88
    edited 2004-08-12 19:30
    Maybe you could get something like this http://www.parallax.com/detail.asp?product_id=450-02003 plug it into the appmod header on the compass appmod, and just solder hookup wires to the pins coming off that adapter thing and plug the other ends of the hookup wires into your BOE-board.

    It should work fine but youll have to find a different way to mount the compass onto your BOE-bot.

    Maybe it can be mounted between the chasis and carrier board. Only problem with mounting it there would be the fact that you couldnt see the LED's on the appmod.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-12 19:46
    jakjr said...
    Maybe you could get something like this http://www.parallax.com/detail.asp?product_id=450-02003 plug it into the appmod header on the compass appmod, and just solder hookup wires to the pins coming off that adapter thing and plug the other ends of the hookup wires into your BOE-board.
    It should work fine but youll have to find a different way to mount the compass onto your BOE-bot.
    Maybe it can be mounted between the chasis and carrier board. Only problem with mounting it there would be the fact that you couldnt see the LED's on the appmod.
    A software fix would be easier...Besides, the part number you posted is part of all the AppMods.· I have them on the breadboard versions as well...I guess, as I said, the main thing I was hoping to be able to do, was flip the readings via some config option, or re-calibrate the device.· But neither option are viable, so I will just do everything backward.· N=S, E=W, SE=NW, etc...


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-12 20:25
    I've not ever used our Compass AppMod but I believe that it can only resolve 1-of-8 directions. If this is the case, your direction will be 0 to 7. To adjust by 180 degrees, simply add four and use the modulus operator:

    direction = direction + 4 // 8

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-13 14:23
    Jon Williams said...
    I've not ever used our Compass AppMod but I believe that it can only resolve 1-of-8 directions. If this is the case, your direction will be 0 to 7. To adjust by 180 degrees, simply add four and use the modulus operator:
    direction = direction + 4 // 8
    Thanks Jon, once I get it re-connected, I will see if that will be a simple way to interface it to existing code.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    ·
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2004-08-15 16:45
    HOW ABOUT A RIBBON CABLE 'FIX'

    I am guessing, but this may be worth a try.

    It seems that if this is a symmetrical reversal, you could just put together a short ribbon cable -- then bend it into a U-shape -- and have the problem solved.

    By the way, I am very interested in adding a compass module to my toddler eventually as I think that it might be far more useful in having the little guy learn to roam autonomously than GPS.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-15 17:37
    ;-) Herzog said...
    HOW ABOUT A RIBBON CABLE 'FIX'
    I am guessing, but this may be worth a try.
    It seems that if this is a symmetrical reversal, you could just put together a short ribbon cable -- then bend it into a U-shape -- and have the problem solved.

    By the way, I am very interested in adding a compass module to my toddler eventually as I think that it might be far more useful in having the little guy learn to roam autonomously than GPS.
    Well, this particular Bot will have more than one AppMod when I am done, so I don't think that would be a clean way.· As Jon Williams says, if it's just numbers, I could use that in reverse.· As for GPS, I was actually thinking about GPS for the Tank Tread Boe-Bot that we have.· You can see the Bots at:

    http://www.lightlink.com/dream/chris/boebots.htm

    I want to have one Bot (Presumably the Crawler Bot) work off the Compass AppMod.· And one from GPS (The Tank Tread Bot).· I have one Bot that has the Digital Encoder Kit, so I want to add something to that, but I am thinking maybe a more precise Compass Module of some sort.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    ·
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2004-08-18 10:21
    One question.
    As mentioned above, I was thinking of putting the compass unit on my Toddler, but I fear that it must remain flat and level to function.

    Since the Toddler swings from side to side, I am worried that I would have to figure out a platform for it.

    Is that correct?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan
  • WhelzornWhelzorn Posts: 256
    edited 2004-08-18 15:30
    well, the feet of the toddler remain pretty level, but you may have to build a platform off of them if the compass app mod is too big.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-18 23:21
    Herzog,

    ·· I do believe it would affect the Compass AppMod being on a Toddler Bot.· I tried it today on the Crawler, and it was even a little screwy when you're kinda between two directions...It kinda jumps a little...Which makes me think it's a good thing the Compass AppMod doesn't have better resolution or it would be more prone to glitching like that.· As it stands, due to only 8 directions of resolution, when the Crawler corrects, it doesn't do it much after that until it turns significantly again...Of course, I am using sloppy beta code right now...Testing routines to use it.· So much to do, so little time!

    I wanted to add...I know there are gimbled compass modules available that adjust for axis, but I don't know how easily they'd interface to the BS2...


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    ·
  • LarryLarry Posts: 212
    edited 2004-08-20 02:49
    One of the guys in our club put a compass on a toddler clone and just made sure he took his measurements when the 'bot was in a level orientation. as I recall, he had to wait a bit for the compass to settle down, so he took readings every couple steps. It ran OK except that the contest it was in was on a metal stage, so it followed the steel girders.

    Larry

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-20 03:13
    Yeah, I noticed it's very sensitive to certain types of metal...And you would need to settle it a bit, since it's response time is rather slow.· But yeah I guess it could work if you compensated for the tipping.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    ·
  • WNedWNed Posts: 157
    edited 2004-09-16 16:58
    ·· Howdy,

    ·· I just started playing with my compass Appmod yesterday and found out just how sensitive it is to tilting. I actually want to use this thing in the great outdoors, so I'm going to try to build a Very Simple gimbal for it. If I get it working, I'll post pictures.
  • ToadToad Posts: 5
    edited 2004-12-07 01:14
    ok
    I have the appmod compass...went through all the problrms...as for a ribbon cable...if you connect it to the bottom as to change the "stack" its wrong no matter what you do.....my problem wa with the speech board...I wanted it to be the first board, then the BOE on top so the
    IR sensors - the work area - was on top..then I added the compas mod.....

    First the BOE board has no pins on the bottom...the fix was to solder a male-male header to the bottom of the board..now the BOE board can sit on the speach board.......you need spacers and screws to get this done.

    second now I want to get the compass to go to the speech board to speak the compass headings .. guess what -- no words for the headings..
    still working on the
    ill take any help..

    hope this helps out..!!
Sign In or Register to comment.