Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: knossos on October 21, 2010, 01:09:23 PM

Title: Selecting a magnetic compass
Post by: knossos on October 21, 2010, 01:09:23 PM
I am looking through my options for a compass.  This is for a personal project that does not have any strict parameters, although the robot will be loaded with sensors so the type of interface will make a difference.  I am thinking I will probably go with I2C since I will already be using a Wii Motion+ and Nunchuck but am willing to consider other options.  I will eventually be adding GPS as well.  This will be on a chassis with wheelchair motors, most likely mounted on a plastic mast approx 12" above the metal frame (approx 18" above the motors).  In addition it will have 2 forms of wireless comm, one of which will likely be WiFi amplified to about 1w (mentioned in case of known issues with noise).

So far I am looking at this Devantech with tilt compensation:
(http://www.robotshop.com/Images/big/en/devantech-tilt-compensated-magnetic-compass.jpg) (http://www.robotshop.com/devantech-tilt-compensated-magnetic-compass.html)

Any recommendations?
Title: Re: Selecting a magnetic compass
Post by: madsci1016 on October 21, 2010, 01:17:51 PM
I have used both the HMC6352 (http://www.sparkfun.com/commerce/product_info.php?products_id=7915) and the HMC6343 (http://www.sparkfun.com/commerce/product_info.php?products_id=8656) on my SAGAR robot. The HMC6343 also gives roll and tilt data via it's 3 axis accelerometer.

On my robot, it surfers vibrational noise from the movement, and electromagnetic noise from the motors.

Watch the 3D render of the orientation in this video:

SAGAR Autonomous Robot Waypoint Mission Interface and Vehicle Video (http://www.youtube.com/watch?v=cNZccRC8Zek#ws)

I doubt in my application the Devantech would be any different, as it's the application, not the compass that's causing problems. I could mount it up on a mast, but would rather not. Instead, I'm going to add a 3 axis gyro as well and combine that data to filter out the noise.

It's not shown in this video, but is works well when I move SAGAR by hand, and the motors aren't running.

Title: Re: Selecting a magnetic compass
Post by: DUKELancelot on October 21, 2010, 01:18:23 PM
I like the parallax one. http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/compass/List/0/SortField/4/ProductID/98/Default.aspx (http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/compass/List/0/SortField/4/ProductID/98/Default.aspx)
(http://www.parallax.com/DesktopModules/CATALooKStore/MakeThumbImage.aspx?ID=%2fPortals%2f0%2fImages%2fProd%2f2%2f291%2f29123-M.jpg&PORTALID=0&W=120&H=120)
($29.95)

The one madsci1016 recommended  is also sold by parallax at a reduce price.

Also about the wifi. Have you considered a router on the robot.
The one in the pic is a Linksys WRT54GL router. It's very hacker-friendly in that it runs Linux.
(http://www.jbprojects.net/projects/wifirobot/wifirobot.jpg)
Title: Re: Selecting a magnetic compass
Post by: knossos on October 24, 2010, 08:25:43 PM
@DUKELancelot
I would probably prefer a wifi module as opposed to the router, but haven't found one with an SMA connector that I can attach my amp to.  If I don't find something I like, I have considered using one of my routers instead.

@madsci1016
I assume you upgraded to the HMC6343 for the added tilt compensation.  The one I was looking at has 3-4 degree accuracy instead of 2 degrees like yours.  From your experience, do you think the extra accuracy makes a significant enough of a difference?

As for mounting my compass, I was considering the mast method to avoid motor noise, but I hadn't really thought about vibrational noise which the mast may well amplify.  Also the mast may prove problematic depending on how I mount my pan assembly on top of the robot.
Title: Re: Selecting a magnetic compass
Post by: madsci1016 on October 25, 2010, 07:35:01 AM
@madsci1016
I assume you upgraded to the HMC6343 for the added tilt compensation.  The one I was looking at has 3-4 degree accuracy instead of 2 degrees like yours.  From your experience, do you think the extra accuracy makes a significant enough of a difference?

Held flat, not really. But when i tilted the cheaper one more then 10 degrees, it's reading would go crazy. Also my application didn't really need an compass that was super accurate.