I just tried out Devantech CMPS03 with BS2
It works as advertised, but, a word of warning:
I had unrealistically high hopes for it helping with robot navigation. I
imagined i'd just read heading data from it, and be able to execute perfect
90* and 180* turns with my Lynxmotion Carpet Rover. Unfortunately, this was
not to be.
The problem is, the compass module has to be positioned _perfectly level_,
to get proper directions from it. If its tilted even a wee tiny bit, the
compass circle becomes "elongated".
For example, you might be facing perfectly north. Take the compass reading.
Now you want to turn east. Just adding 90* to reading and then running
servos until compass reading matches your new value will not work, you are
going to get 80* or 100* turn. But if you do 360* turn, you will end up
facing precisely the previous direction. So, the reading is accurate and
repeatable ( as long as there are no metal parts nearby) , just not linear
( "unlinearity" depends on how much the compass is tilted from level
Of course, if you know that your entire floor is level or sloped in one
direction, then you can save compass readings for all four directions (
calibrate ) and you can probably use it anyway.
Thats my experience with it, perhaps somebody can confirm or refute this ?
You are right. "Sophisticated" compassing systems are compensated for
tilt with an inclinometer. The Honeywell website may have documents
explaining how to correct this. But it means you will need an accelerometer
or some other sensor for tilt-sensing wrt the horizontal.
And don't forget the so-called soft and hard iron effects: the effect of
permeable (magnetic) objects near the compass.
How about using a couple of accelerometers on the same board as
If you know the equations to convert the tilt and compass reading
to a perfect circle it could be done.
Even if the equations are unknown, then you could use a
neural network to do this.
Of course, you'd have to adjust for physical acceleration so that
you get the true tilt.
It may not be perfect, but it should be fairly close.
D. Jay Newman
I've just been trying the CMPS03 with a breadboard lately, but
my problem with it is jitter. I wrote code to poll it once a
second, and if I leave it running, I get values that can change
as much as +/- 10 degrees over time!
It's on a wood bench and the only electronics/metal near it is
a 5v supply about 2 feet away and a PC about 3 feet away. I
don't think that should affect the part, but perhaps it does.
Depending on your "5V supply" , this could affect the readings, but from 2
feet away it shouldnt affect it so much. Im not getting any jitter at all,
my readings are rock stable and repeatable down to a degree or even less (
im anyway using one-byte value to represent heading, BRAD system, so im
getting about 1,5 accuracy )
Are you using PWM reading or I2C interface ? I'd think I2C gets you more
reliable readings. What uC are you using ?
Dell running Linux, bit banging I2C on the parallel port via this:
I'm using the two byte value, not the one byte. When everything is
built on my robot, it will be a PIC running native I2C.
When mounting the compass you also have to be careful regarding
interference from motors and other magnetic sources. You might look at
- dan michaels
The best compass that you will find to easily use with the RCX is the
wiltronics roboball compass. www.wiltronics.com.au
I have used this with both the RCX and the HB and although it is only a
dinsmore (8 points of accuracy) it is really easy to use if you just happen
to need a compass solution.
: The best compass that you will find to easily use with the RCX is the
: wiltronics roboball compass. www.wiltronics.com.au
: I have used this with both the RCX and the HB and although it is only a
: dinsmore (8 points of accuracy) it is really easy to use if you just happen
: to need a compass solution.
I too have used this and found that it is the least susceptable to iron
and other oddities of them all. It is also tolerant of slight tilts. You
only get 8 points, but if that is good enough, go for it. This is the
Dinsmore 1390 compass. I've got a project on my website that uses a PIC
12C508 to decode the compass and send back positional data on a 2400
baud serial link. http://www.techtoystoday.com
The one major drawback (other than granularity) is that it is pretty
slow to respond to changes - Meaning that you could wait 200ms for it to
settle down from a change in direction.
* Dennis Clark email@example.com www.techtoystoday.com *
Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here.
All logos and trade names are the property of their respective owners.