Let's Make Robots!

Homemade digital compass

Some time ago OddBot posted this circuit for a homemade digital compass based on hall effect sensors:


Unfortunately CircuitBurn couldn't make it work. However I'm inclined to try again. A cheap DIY compass would be great.

So if anyone has ANY idea as to how this could be achieved let's hear it. It could be an improvement on OddBot's circuits or something completely different and wacky :D

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I'm aware that the circuit you posted was theoretical and that you never tried it out. So it seems it's up to me because I really need a compass and can't afford to buy one between all the other parts/tools I need.

It would off course be easier to feed the circuit with 5V, but if it significantly improves the result I'll be willing to try more, though anything above 9V would be quite a hassle. And if I feed it from a 9V battery it would be unregulated and shared with the Arduino. Hope that will suffice?! Besides the maximum output voltage should never exceed the 5V that the ADC can handle.

The low noise precision op amps I've just checked out (eg. this one) seem to require a minimum of 10V. But I'll do some more research later. And how about this one for instance? It doesn't say "low noise precision" just "ultralow offset voltage", but requires only 3V as a minimum. Would that offer any improvement over the CA314?

Thanks for the input :)

The OP07 sounds like a perfect op-amp for a compass. It will run on 5V and the factory trimmed offset will make it far easier to calibrate. I would still use their suggested offset null circuit with a 25 turn 20K pot as even the smallest offset will be amplified greatly.

Don't quite know what "offset null circuit" means but I'll read up on that :P

Allthough I'm starting to think this project is over my head if it's even possible at all (see my comments below)...

Just experimented with single hall effect (and multimeter) on globe compass and it does infact work (though signal would need amplification)

Just experimented with single hall effect (and multimeter) on globe compass and it does infact work (though signal would need amplification)

using a RS-304-267 (its a bit expensive but all i had for testing) hall effect mounted by the side of a globe compass.

Heres my set up . (firstly ignore 5volt reg supporting globe and the mass of wire-ing behind)

The hall effect i have placed just below the globe (right 4 pin black square thingy for those who not know what they look like) - magnetized pointer appears to be mounted low)

I am using (as proof of concept) a multimeter set to mV range and it works - signal has to amplified though.



Does anyone know if the HES itself is magnetic? If so it may affect the compass heading..

Just a thought..

The HES is predominantly made from plastic, silicon and aluminium - nothing magnetic there. If parts of the HES were susceptible to being magnetised then it'd be very hard to get consistent readings.

I suspected you (the hardware wiz) to drop an answer quickly :D

Thanks for clearing that up

I had something similar in mind but I didn't have a compass to try it out with.

And as you wrote it the shout box 2 hall effect sensors should be enough. They should give off a unique combination of readings from any compass heading if you mount them in 90 degree positions like this:


That is off course unless the compass is TILTED. Which leads me to another thought...what if you placed another HES in a 90 degree angle to the other 2 above or below the compass (=a z axis HES). In theory you should then have a TILT COMPENSATED compass, given the right math. Which actually makes me think that perhaps it may even be used as a poor man's GYROSCOPE too (?).

I was thinking of buying these little thingies from DealExtreme. I was gonna order some stuff from them a while ago but didn't because I found out that they have a lousy reputation...they're often extremely slow to ship off the orders and often send broken stuff, the wrong stuff or even empty boxes (according to the reviews I read). But perhaps this 1.60$ order would be a good way to try out that reputation. On the other hand I think that a globe compass like yours may actually be the only way to go given my thoughts about tilting. That is if I can find a cheap one.

Anyway keep up the good work, Gareth. I'm anxious to see how this experiment of yours turns out :D

UPDATE: Just saw that DealExtreme also has this compass among others..

That's why they make op amps :P