Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Search phillips site. They have an IC for compass, i believe that the part number is KMZ51 . But itsn't easy to build one, you need tho interface the Ic with a µC, just buy one already assembled for use. See at https://www.robot-electronics.co.uk/shop/Compass_CMPS032004.htm.
And they have many others modules for robotics.
I have been searching for information about this aslo. My result is that the sensor to use is the KMZ51 from philips (got 3 of them already) There are also simular sensors and a lot of theoretical info from Honywell but they are much more expensive and harder to buy.
As I understand there are two ways of bulding a compas, the simpel way with two sensor and always keep the unit in upright position, the oter variant is using 3 magnetics sensors and do a tilt compensation with a two axis gyro of some sort. The last solution would be rather complicated, and where to get gyros thet dont cost 100s of $?
Some links with information i found after much searching...
Use a circular fluxgate or two (may be three) orthogonal straight fluxgates.
You will get 2D/3D vectors for the magnetic field.
Search internet for fluxgate compasses. Fluxgate sensors can be home brewed.
I remember Practical Electronics had one design of home made Fluxgate compass in '70 or '80s.