Electronic – arduino – use tinkerkit hall sensor as compass

arduinocompass

I'm using Tinkerkit shield in combination with an Arduino standard board. I need a simple compass sensor in order to determine the direction (I don't need a great precision), unluckily similar sensor that works "out of the box" with Tinkerkit does not exist. Can I use the standard Tinkerkit hall sensor (http://www.tinkerkit.com/hall/) as a compass? If not, can you suggest me how to connect a standard Arduino compass in Tinkerkit?

UPDATE

The hall sensor does not work

Best Answer

The TinkerKit hall sensor is essentially a standard 3-pin ratiometric Hall sensor, on a cutesy PCB.

Of the 3 pins on it, the - pin goes to the GND pin of your Arduino, the + pin goes to the 5V pin, and the pin in the middle can be connected to any of the analog input pins of the Arduino, say A0. Jumper wires can be used to connect these up.

As long as there are no magnets near the hall sensor, the PCB can be held upright, and rotated, to receive the sensed value from the Hall sensor. The Arduino code provided on the TinkerKit site will work for this.

As the Hall Sensor module is rotated, the analog input value will change from approximately 512 (or some bias value around that) to a higher value for one polarity and a lower value for the opposite. The value received will provide an approximate magnetic compass reading.

Note that this is not going to be very precise, but for an experiment it should serve the purpose. Also, the variation from the middle value will probably be very small, as the hall sensor IC used is not a very sensitive one: 1.3 mV/Gauss.