# Calculate magnetic north

1. Jan 26, 2009

### purejoker

hi there, hope im posting in the right place...

im trying to calculate the direction of magnetic north, using electronic curcuits.
what i want to do is have a board with a circle of led lights and when i place the board in different places; the light pointting to the direction of north should light up.

i can work out all the electronic, what im stuck with is how to calculate the magnetic north.
ive looked into fluxgate, but they are to diffcult to build, is there any way of doing this with a hall sensor, or any other components.

i just need a idea to get me going...

thanks alot...

regards
pure

2. Jan 26, 2009

### MATLABdude

Digital compass IC?

If that's a little too pricey, here's a cheaper (and less accurate) one:
http://www.hvwtech.com/products_list.asp?CatID=114&SubCatID=214 [Broken]

Last edited by a moderator: May 3, 2017
3. Jan 26, 2009

### mgb_phys

Yes a linear hall effect sensor is fine.
If you want to just put the board down you need a 2d device (or two 1d devices at right angles) if you can rotate the board around and just find a maximum then you only need 1.

BUT the board must be horizontal - if you want this to work while tilted you have a much more complicated problem.

4. Jan 27, 2009

### purejoker

if i use a hall sensor, that means i require a magnet. but then how do i get the direction of magnetic north?

pure!

5. Jan 27, 2009

### mgb_phys

Measure the X and Y magnetic fields from two sensors at right angles and take the arctan
Think about if the board was pointing North, the y sensor would read a maximum and the X sensor would read zero , if it was pointing east they would be the other way around.

6. Jan 27, 2009

### purejoker

if i use one of these, will it do the job! if yes, which is the best to use??

http://www.dinsmoresensors.com/index.html [Broken]

thanks
pure!

Last edited by a moderator: May 3, 2017
7. Jan 27, 2009

### MATLABdude

Sure, but it depends on whether you're happy with 8 directions (the digital one), or if you need finer grain resolution (via an A/D converter). Not that you necessarily get a result that's any more accurate, however (the specs seem kind of sparse). If you choose one of the analog ones, note that one (the 1525) has a lower voltage swing than the other (1655). That means that you get less of a voltage change between, say, north and south.

Last edited by a moderator: May 3, 2017