compass

Does anybody know where i could get a compass that works with the handy board or rcx? I need to be able to reset the direction and then be able to progam so that i know which way i am facing.

thanks

Reply to
FLVIDEO
Loading thread data ...

I just tried out Devantech CMPS03 with BS2

formatting link
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 position ). 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 ?

-kert

Reply to
Kaido Kert

When mounting the compass you also have to be careful regarding interference from motors and other magnetic sources. You might look at this appnote:

formatting link

- dan michaels

formatting link
===============================

Reply to
dan michaels

Kaido -

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.

Bill

Reply to
Bill Turnip

The best compass that you will find to easily use with the RCX is the wiltronics roboball compass.

formatting link

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.

Reply to
Fr335tyl3r

How about using a couple of accelerometers on the same board as the compass?

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

formatting link

Reply to
D. Jay Newman

Fr335tyl3r wrote: : The best compass that you will find to easily use with the RCX is the : wiltronics roboball compass.

formatting link

: 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.
formatting link
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.

DLC

Reply to
Dennis Clark

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.

Thoughts?

-Shane

Reply to
Shane Bouslough

Shane,

I have never used one, so this is just a guess. Do you have supression/filter caps right next to the unit, and on the output?

Jonathan

formatting link

Reply to
Jonathan Peakall

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 ?

-kert

Reply to
Kaido Kert

Wow... then I must be doing something wrong.

Dell running Linux, bit banging I2C on the parallel port via this:

formatting link
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.

-Shane

Reply to
Shane Bouslough

That's because this is a two-axis electronic compass which reads a planar projection of the field. If you use a three-axis sensor (or two orthogonal two-axis ones) you can read magnetic field direction in 3D and compensate for tilt to any degree you like.

-- Chris Malcolm snipped-for-privacy@infirmatics.ed.ac.uk +44 (0)131 651 3445 DoD #205 IPAB, Informatics, JCMB, King's Buildings, Edinburgh, EH9 3JZ, UK

formatting link

Reply to
Chris Malcolm

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.