Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Cheap digital compass

Status
Not open for further replies.

Mosaic

Well-Known Member
Ok, I need a rough digital magnetic direction finder.

I am considering using an actual compass such as this:
**broken link removed**

Compass needle sensed by a linear hall sensor, perhaps this:
https://www.jameco.com/Jameco/Products/ProdDS/1915940.pdf

Hall signal fed to a PIC ADC.
I am thinking I could profile the ADC values to reflect the compass needles orientation and thus be able to derive a passable direction finder perhaps +/- 5° (a guesstimate). Also by tracking turn direction I could differentiate between the two perpendicular orientations of the needle to the hall sensor.

I haven't tried to evaluate the gauss of a compass needle magnet , but it should be of reasonable strength to work with I think.
Sounds doable?
 
Google Flux Gate sensor no moving parts. This is what some auto pilots use, as well as digital compases. They sense the earths magnetic field rather than use a magnetic compass.
 
A magnetic needle compass is very sensitive to metal objects I have one for camping and hiking. The needle gets all crazy from the metal on my belt buckel and I need to be 50 feet from my vehicle to get an accurate reading. The larger the metal object is the farther away you need to be from it. A cheapo kids toy compass is less sensitive to metal objects than a nice Boy Scout compass. You can use a cheapo compass to find nails in the wall but you can not do that with a good compass it finds every pieces of metal in the whole house and the needle goes crazy.
 
I dont know if the hall sensor sould generate a field and mess up a compass, doesnt matter now.

I have developed a project using a i2c compass module, they are 3 quid each, the circuit generates the heading from x and y vectors.
The maths involved gets complicated, you get x and y readings from the magnetometer, which are vector variables, and you need to convert them to a polar heading, tricky stuff.
There are some examples on the net using lookup tables.
My circuit produces a heading in degrees so might be over accurate, you might be able to use something simpler to get a rough heading.

If yu look through my posts someone here gave me guidance and some pic code a while back.
 
Status
Not open for further replies.

Latest threads

Back
Top