DPRG
DPRG List  



[DPRG] Compass Circuit

Subject: [DPRG] Compass Circuit
From: Dodd Gatsos dgatsos at hotmail.com
Date: Tue Nov 17 13:12:14 CST 2009


Rud,

 

I just got the Devantech Compass CMPS03 last week and an HP Mini netbook the week before and finally got around today to hooking the compass up to my Sanguino board and it to the netbook.  I used this link as an example: http://www.robot-electronics.co.uk/htm/arduino_examples.htm

 

And it worked picture perfect.  I'm trying to do a very similar approach to yours and using the Neuroph libraries http://neuroph.sourceforge.net/ to capture and process the images.  I'm adding in the compass so that when I tell it where it is to learn it can use the compass reading for a directional bearing so rather than me telling it "You're in the study facing north."  I should be able to tell it (BTW, keyboard input for now not voice recognition) "You're in the study." and it can use the compass bearing to label the image correctly so I am expecting to only need around +-5 to 10 degrees accuracy at best.
 

One note, the Sanguino uses the ATMega644p so the SCL and SDA lines are pins 16 and 17 instead of 5 and 4 on the Arduino respectively.  But the Arduino Wire.h code handles this so I didn't have to modify any of the code for I/O just had to use the correct pins.

 

Also, thank yous to Paul Bouchier and John Dolecek for your input as well.

 

-Dodd


 


From: k5rud at arrl.net
To: dgatsos at hotmail.com; dprglist at dprg.org
Subject: RE: [DPRG] Compass Circuit
Date: Wed, 11 Nov 2009 19:05:09 -0600




As I mentioned previously I have the Devantech Compass (URL below) and their USB to I2C interface. I got it all working last weekend on my laptop. I also got it working with an IR range finder (Sharp unit enhanced for I2C by Solarbotics). 
 
The USB interface handles all the details of the I2C protocol. All you need to to is give it commands, the sensor address (modified for reading when appropriate), the register and data when appropriate. It would be useful to have for anyone just wanting to check out the operation of an I2C device that is going to be part of a robot. My goal is to use it with a Fit PC Slim unit which is a 500 MHz Geode PC in a tiny box.
 
There was some example code for the USB interface for the PC but not for my devices. I was able to modify it easily enough. Now I'm making some C++ classes to handle I2C and these devices. Given the ease of use I'll look at using it for other robot devices.
 
The compass works as described providing raw (0-255) and degree (0.0-359.9) measurement. I'm not setup where I am (out of town) to test the accuracy of the compass. The main problem is making sure the board is level when doing measurements. It is still unmounted with just the cable plugged in. 
 
I am holding it against the room desk to maintain a steady orientation. But the slightest movement in the pitch changes the raw reading. Any of the pitch positions 'feel' level but obviously are not. Moving around in a house or office the pitch should not be changing much so that should not be a problem. Outside the readings might be more approximate than is useful. 
 
Somewhere I read the suggest ion of using two of these units at right angles. One of them gives orientation and the other a pitch measurement. By manipulating the two values you should get a good measurement for both. 
 
For my purposes, even outside, I think this unit will do what I want. My experimentation is on the idea of integrating approximate measurements for location and navigation, as opposed to accurate measurements as done by odometry. For my purposes, I'm looking for the robot to say, "I must be _here_ because my vision shows me this image (say a door outline) and my orientation is roughly pointing NE".
 
 

Rud Merriam K5RUD
ARES AEC Montgomery County, TX 
http://TheHamNetwork.net 



-----Original Message-----
From: Dodd Gatsos [mailto:dgatsos at hotmail.com] 
Sent: Thursday, November 05, 2009 3:44 PM
To: dprglist at dprg.org
Subject: [DPRG] Compass Circuit

 
Anyone have any suggestion on a good compass circuit to use with an Arduino/Sanguino board?
 
Saw the Honeywell HMR3100, but I don't think I want to have to deal with the Serial Tx/Rx.
 
Don't know if this would work: http://www.robot-electronics.co.uk/acatalog/Compass.html
 
Or maybe a Dinsmore 1490 or 1525: http://www.acroname.com/examples/10064/10064.html
 
 
Thanks
Dodd
 
 

 



Bing brings you maps, menus, and reviews organized in one place. Try it now.  		 	   		  
_________________________________________________________________
Windows 7: I wanted simpler, now it's simpler. I'm a rock star.
http://www.microsoft.com/Windows/windows-7/default.aspx?h=myidea?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_myidea:112009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.dprg.org/pipermail/dprglist/attachments/20091117/194bfe20/attachment.html

More information about the DPRG mailing list

Copyright © 1984 - 2006 Dallas Personal Robotics Group. All rights reserved.
Website Design by NCC

For the latest robot news visit robots.net