View Full Version : Need Precise Electronic Compass

08-11-2006, 06:09 AM
I'm working on an application that requires a compass. I need to read within 0.5 degrees. The output needs to be linear and repeatable. By repeatable I mean, if I sweep 30 degrees and then return to my starting point, the result will be read as my original heading +/- 0.5 degrees.

The electronic units I've been looking at don't appear to meet these requirements. I'm wondering about mounting a supermagnet on the end of a 10 bit encoder. If encoder friction is low enough the super magnet may follow magnetic North.

I can design my application so the compass apparatus is always parallel to the ground, so tilt isn't a problem.

I can also live with an absolute error or 1 or 2 degrees, provided the readings are consistently linear, or an algorithm can be created to adjust for the error to a final value of +/-0.5 degrees.

The apparatus can be placed to eliminate the impact of ferrous objects. But it needs to be moveable, typically within +/- one degree of longitude or latitude.

Any ideas out there?

08-12-2006, 05:09 AM
How about this?


- Stephen

John R.
08-13-2006, 12:18 AM
From references on the same site, see also the 3100 (at only $100.00 vs. $675.00)


John R.

8 + 8 = 10

Loopy Byteloose
08-13-2006, 03:27 AM
Having lived in Oregon for 15 years, I learned a lot from woodsmen. In particular, I used a compass to hike a straight line of 15 miles for timber cruising [inventorying the trees in a forest].

A compass is a fundamental tool for them, but the tool has its limits. Anything ferrous that is nearby can throw them off by quite a bit. For example, if you have a roving robot and it passes a metal table leg, you are not going to get a good reading.

When hiking in the woods, metal buttons on a Levi jacket can make for lost woodsman. Or a metal watchband. A good woodsman will set the compass down on a rock and look at it from a bit of distance.

So think about it. Nickel is ferrous [as in NmH batteries], and their case is Iron [also ferrous].
If you look at ships and sail boats, even they have compensation for the ferrous metals around them.

That seems to be 'the way of the compass'.

"If you want more fiber, eat the package.и Not enough?и Eat the manual."ииииииии

ииииииииииииииииииии Tropical regards,иииии G. Herzog [и黃鶴 ]иin Taiwan

08-13-2006, 04:58 AM
My application calls for me to set up my compass unit. I then make readings on a distant moving object. This process will be repeated on a later date but at a slightly different longitude and latitude.

The comment about moving a degree of latitude or longitude was in recognition that electronic earth field sensors require new calibration with significant longitude changes.

08-14-2006, 10:14 PM
www.robot-electronics.co.uk/ (http://www.robot-electronics.co.uk/)

or maybe in the states at:
www.acroname.com/index.html (http://www.acroname.com/index.html)

Should be around $50-$60

The software side is easy, here is a full workout of what the unit does:

' {$STAMP BS2px}
' {$PBASIC 2.5}
'************************************************* **********
'** **
'** CMPS03 Demonstration Software for the Basic Stamp **
'** **
'** **
'************************************************* **********
' Working on July 31 2006 Tim

SDA CON 8 ' Define Data pin
SCL CON 9 ' Define Clk pin
Compass CON $C0 ' Compass I2C Address
CmdReg CON 0 ' Command register
BearingReg CON 2 ' dir register

Bearing VAR Word ' 16 bit variable for Bearing
Version VAR Byte ' should return low digit number like 9
LowRes VAR Byte ' 8 bit Bearing

DEBUG "*** Compass Test Program Ver1 ***", CR
I2COUT SDA, Compass, [0]
I2CIN SDA, Compass, [Version]
DEBUG "CMPS03 Version: ", DEC version, CR

' get High Res 0-360.0 scale
I2COUT SDA, Compass, [BearingReg]
I2CIN SDA, Compass, [Bearing.HIGHBYTE, Bearing.LOWBYTE]

' get data on 0-255 scale
I2COUT SDA, Compass,
I2CIN SDA, Compass, [LowRes]

'DEBUG "Compass: ", DEC Bearing/10, " Degrees", CR ' Use terminal window
DEBUG DEC Bearing, " Degreesx10, OR 0-255: ", DEC LowRes, CR ' Use terminal window

PAUSE 1000 ' slow down
GOTO main