Arduino Magnetometer Testing

I LOVE finding out about different ways to appreciate the Sun and light in general. Use this forum to post your info or questions about various outside the mainstream ways to appreciate our life giving star!
carlosjackal
Oh, I get it now!
Oh, I get it now!
Posts: 36
Joined: Sat Oct 29, 2016 6:38 pm
Location: Antrim

Arduino Magnetometer Testing

Post by carlosjackal » Sun Feb 11, 2018 11:45 am

Hi I have been playing with Ardruino boards over the last few months. These are very cheap and very versatile. They literally can control or monitor anything.

One project was a weather station which updates to the internet every 5 mins, measuring pressure, temp and humidity and all can fit into a matchbox!

I have purchased an Ardruino Uno R3 which can be bought for as little as £6.00. this board can measure the frequency of a pwm signal from a sensor ie the FGM 3 with a program literally a few lines long called "freqcount".

Loads of other boards can be added to the R3 like an ESP8266 which is a WiFi Board which again are only a few pounds.

The signal can the be sent to a site called Thingspeak which then puts the data in graph form and can be easily accessible by mobile phone app or any device really.

The plan is to put this together and see how it performs. The main thing I need to test is temperature and timing on the board and it's effects.

If this is a problem I think it can be solved by adding a very accurate real time clock board to it. This RTC board has a built in temperature monitor which compensates for temp effects on the quartz crystal and again is the size of a stamp!

Very early stage of this but if it works it's tiny, excellent price range and data can be seen from anywhere.
IMG_20180211_110753.jpg
IMG_20180211_110753.jpg (2.13 MiB) Viewed 943 times
Carl

User avatar
Montana
Way More Fun to Share It!!
Way More Fun to Share It!!
Posts: 19039
Joined: Mon Oct 17, 2011 5:25 pm
Location: Cheshire, UK

Re: Arduino Magnetometer Testing

Post by Montana » Sun Feb 11, 2018 11:54 am

Very interesting! keep us posted with how you get on :hamster:
Alexandra

carlosjackal
Oh, I get it now!
Oh, I get it now!
Posts: 36
Joined: Sat Oct 29, 2016 6:38 pm
Location: Antrim

Re: Arduino Magnetometer Testing

Post by carlosjackal » Sun Feb 11, 2018 1:30 pm

Will do Alexandra.

User avatar
marktownley
Librarian
Librarian
Posts: 23668
Joined: Tue Oct 18, 2011 5:27 pm
Location: Brierley Hills, UK
Contact:

Re: Arduino Magnetometer Testing

Post by marktownley » Sun Feb 11, 2018 2:34 pm

Sounds cool!
Image
http://brierleyhillsolar.blogspot.co.uk/
Solar images, a collection of all the most up to date live solar data on the web, imaging & processing tutorials - please take a look!

highfnum
Almost There...
Almost There...
Posts: 1193
Joined: Sat Nov 24, 2012 2:33 pm

Re: Arduino Magnetometer Testing

Post by highfnum » Sun Feb 11, 2018 3:23 pm

Real small
Keep us posted

User avatar
Carbon60
Way More Fun to Share It!!
Way More Fun to Share It!!
Posts: 5049
Joined: Wed Mar 07, 2012 12:33 pm
Location: Lancashire, UK

Re: Arduino Magnetometer Testing

Post by Carbon60 » Mon Feb 12, 2018 7:02 am

Cool. Looking forward to seeing more from this little (and cheap) device.

Temperature fluctuations are the main issue I've found with my magnetometer. I've had to go to significant lengths to protect the integrity of the signal data using close temperature control at both the sensor and the receiver. The other issue is the effect of sporadic 'noise'; odd glitches caused by everyday objects or stray electromagnetic signals which I filter out of the data to eliminate spurious spikes. You'll need to address these in order to clean up the output charts.

Cheers.

Stu.
Lunt LS60THa B1200 PTFT
150mm H-alpha Solar telescope with Lunt35 mod
DMK41, Basler acA1920-155
NEQ6 Pro-mount
Fluxgate Magnetometers (1s and 150s Cadence)
More images at http://www.flickr.com/photos/solarcarbon60/

User avatar
rsfoto
Almost There...
Almost There...
Posts: 709
Joined: Mon Jun 18, 2012 8:30 pm

Re: Arduino Magnetometer Testing

Post by rsfoto » Mon Feb 12, 2018 5:24 pm

Interesting and where can I buy those FGM Magnetometers ?

In order to understand it a bit more
...this board can measure the frequency of a pwm signal from a sensor ie the FGM 3 with a program literally a few lines long called "freqcount".
So you do not read an analog Signal but a frequency and if I understand it correctly the higher the frequency is, the stronger the magnetic field ?

Thanks and regards Rainer
regards Rainer



Observatorio Real de 14 San Luis Potosi Mexico




carlosjackal
Oh, I get it now!
Oh, I get it now!
Posts: 36
Joined: Sat Oct 29, 2016 6:38 pm
Location: Antrim

Re: Arduino Magnetometer Testing

Post by carlosjackal » Mon Feb 12, 2018 8:58 pm

Carbon60 wrote:
Mon Feb 12, 2018 7:02 am
Cool. Looking forward to seeing more from this little (and cheap) device.

Temperature fluctuations are the main issue I've found with my magnetometer. I've had to go to significant lengths to protect the integrity of the signal data using close temperature control at both the sensor and the receiver. The other issue is the effect of sporadic 'noise'; odd glitches caused by everyday objects or stray electromagnetic signals which I filter out of the data to eliminate spurious spikes. You'll need to address these in order to clean up the output charts.

Cheers.

Stu.
Yes Stu I use your design but had to disconnect due to room being redecorated etc. So while down I can play with the fgm3 and the boards. As the sensor is still underground and regulated power I can isolate temperature issues at the processor.

First is to regulate power to the board and start getting some data to look at and see what problems there are.

I still have the cooler box and temperature controller setup to use as well.

Looking at software to eliminate spikes and vehicles.

Plenty to do
Regards Carl

carlosjackal
Oh, I get it now!
Oh, I get it now!
Posts: 36
Joined: Sat Oct 29, 2016 6:38 pm
Location: Antrim

Re: Arduino Magnetometer Testing

Post by carlosjackal » Mon Feb 12, 2018 9:36 pm

rsfoto wrote:
Mon Feb 12, 2018 5:24 pm
Interesting and where can I buy those FGM Magnetometers ?

In order to understand it a bit more
...this board can measure the frequency of a pwm signal from a sensor ie the FGM 3 with a program literally a few lines long called "freqcount".
So you do not read an analog Signal but a frequency and if I understand it correctly the higher the frequency is, the stronger the magnetic field ?

Thanks and regards Rainer
Hi Rainer the FGM 3 outputs a 5 Volt square wave and the frequency correlates with the magnetic field both higher and lower. They are very sensitive and react to temperature fluctuations and voltage fluctuations as well.

The sensor FGM3 and voltage regulator board are best buried around a meter underground to keep a stable temperature. The reading circuit also needs to be temperature controlled as well wherever it is indoors.

Stu (Carbon60) has a design that works extremely well and has a great writeup on the build using a bat detector to measure the frequency.

I'm trying out this microcontroller which can measure the frequency using a digital input.

The sensors come from https://www.fgsensors.com.

Regards Carl

User avatar
rsfoto
Almost There...
Almost There...
Posts: 709
Joined: Mon Jun 18, 2012 8:30 pm

Re: Arduino Magnetometer Testing

Post by rsfoto » Tue Feb 13, 2018 9:01 pm

carlosjackal wrote:
Mon Feb 12, 2018 9:36 pm
rsfoto wrote:
Mon Feb 12, 2018 5:24 pm
Interesting and where can I buy those FGM Magnetometers ?

In order to understand it a bit more
...this board can measure the frequency of a pwm signal from a sensor ie the FGM 3 with a program literally a few lines long called "freqcount".
So you do not read an analog Signal but a frequency and if I understand it correctly the higher the frequency is, the stronger the magnetic field ?

Thanks and regards Rainer
Hi Rainer the FGM 3 outputs a 5 Volt square wave and the frequency correlates with the magnetic field both higher and lower. They are very sensitive and react to temperature fluctuations and voltage fluctuations as well.

The sensor FGM3 and voltage regulator board are best buried around a meter underground to keep a stable temperature. The reading circuit also needs to be temperature controlled as well wherever it is indoors.

Stu (Carbon60) has a design that works extremely well and has a great writeup on the build using a bat detector to measure the frequency.

I'm trying out this microcontroller which can measure the frequency using a digital input.

The sensors come from https://www.fgsensors.com.

Regards Carl
Hi Carl,

Thank you. I found FGM 3 and will order one. They are in Slovenia. I have som contacts in Germany and so I can let it send to them and from there to Mexico.

FGM 3 costs 32 Euro and shipping to Mexico would cost 55 Euro :lol:

One more question. I have a pier which at the base is 1m x 1m and quite high. Could I drill a hole into the pier and bury it there ? The pier year in year out has quite a similar temperature. Look at the pier construction.

I could spare burying in my garden ¿?

regards
Torre-Este-03.jpg
Torre-Este-03.jpg (98.17 KiB) Viewed 870 times
Este-Oeste-03.jpg
Este-Oeste-03.jpg (173.29 KiB) Viewed 870 times
regards Rainer



Observatorio Real de 14 San Luis Potosi Mexico




User avatar
marktownley
Librarian
Librarian
Posts: 23668
Joined: Tue Oct 18, 2011 5:27 pm
Location: Brierley Hills, UK
Contact:

Re: Arduino Magnetometer Testing

Post by marktownley » Tue Feb 13, 2018 9:26 pm

That's a hefty pier Rainer! :D
Image
http://brierleyhillsolar.blogspot.co.uk/
Solar images, a collection of all the most up to date live solar data on the web, imaging & processing tutorials - please take a look!

User avatar
rsfoto
Almost There...
Almost There...
Posts: 709
Joined: Mon Jun 18, 2012 8:30 pm

Re: Arduino Magnetometer Testing

Post by rsfoto » Wed Feb 14, 2018 1:19 am

marktownley wrote:
Tue Feb 13, 2018 9:26 pm
That's a hefty pier Rainer! :D
Each pier weighs 7000kg :-) and finished they look like this

Este-Oeste-15.jpg
Este-Oeste-15.jpg (186.7 KiB) Viewed 855 times
regards Rainer



Observatorio Real de 14 San Luis Potosi Mexico




User avatar
marktownley
Librarian
Librarian
Posts: 23668
Joined: Tue Oct 18, 2011 5:27 pm
Location: Brierley Hills, UK
Contact:

Re: Arduino Magnetometer Testing

Post by marktownley » Wed Feb 14, 2018 6:34 am

Nice!
Image
http://brierleyhillsolar.blogspot.co.uk/
Solar images, a collection of all the most up to date live solar data on the web, imaging & processing tutorials - please take a look!

User avatar
Carbon60
Way More Fun to Share It!!
Way More Fun to Share It!!
Posts: 5049
Joined: Wed Mar 07, 2012 12:33 pm
Location: Lancashire, UK

Re: Arduino Magnetometer Testing

Post by Carbon60 » Wed Feb 14, 2018 6:45 am

Hi Rainer,

My concern is the local reinforcing steel which might impact performance. Better to be located away from steelwork and electrical cables if you can do so.

BTW there is a tutorial on this in the library section of this forum.

Regards

Stu.
Lunt LS60THa B1200 PTFT
150mm H-alpha Solar telescope with Lunt35 mod
DMK41, Basler acA1920-155
NEQ6 Pro-mount
Fluxgate Magnetometers (1s and 150s Cadence)
More images at http://www.flickr.com/photos/solarcarbon60/

User avatar
rsfoto
Almost There...
Almost There...
Posts: 709
Joined: Mon Jun 18, 2012 8:30 pm

Re: Arduino Magnetometer Testing

Post by rsfoto » Wed Feb 14, 2018 3:22 pm

Carbon60 wrote:
Wed Feb 14, 2018 6:45 am
Hi Rainer,

My concern is the local reinforcing steel which might impact performance. Better to be located away from steelwork and electrical cables if you can do so.

BTW there is a tutorial on this in the library section of this forum.

Regards

Stu.
Thank you Stu. Will analize that.

regards
regards Rainer



Observatorio Real de 14 San Luis Potosi Mexico




carlosjackal
Oh, I get it now!
Oh, I get it now!
Posts: 36
Joined: Sat Oct 29, 2016 6:38 pm
Location: Antrim

Re: Arduino Magnetometer Testing

Post by carlosjackal » Thu Feb 15, 2018 6:10 pm

IMG_20180215_175322.jpg
IMG_20180215_175322.jpg (2.88 MiB) Viewed 779 times
Hi all here's the first hit of the CME on the Ardruino board. Findings so far are it dosnt appear to react to the house temperature which is good. It concurs with the magnetometer at Crooktree.

The raised section in the middle is the effect of my own vehicle which can be looked at. Worth noting as well the chart is inverted however the can be easily turned around on the online live chart.
Carl

User avatar
Carbon60
Way More Fun to Share It!!
Way More Fun to Share It!!
Posts: 5049
Joined: Wed Mar 07, 2012 12:33 pm
Location: Lancashire, UK

Re: Arduino Magnetometer Testing

Post by Carbon60 » Fri Feb 16, 2018 6:58 am

Nice one, Carl.

Are you also able to capture/export the data as a CSV file (frequency and time)?

Stu
Lunt LS60THa B1200 PTFT
150mm H-alpha Solar telescope with Lunt35 mod
DMK41, Basler acA1920-155
NEQ6 Pro-mount
Fluxgate Magnetometers (1s and 150s Cadence)
More images at http://www.flickr.com/photos/solarcarbon60/

User avatar
Montana
Way More Fun to Share It!!
Way More Fun to Share It!!
Posts: 19039
Joined: Mon Oct 17, 2011 5:25 pm
Location: Cheshire, UK

Re: Arduino Magnetometer Testing

Post by Montana » Fri Feb 16, 2018 7:48 am

Wow! that is impressive :hamster:
Alexandra

carlosjackal
Oh, I get it now!
Oh, I get it now!
Posts: 36
Joined: Sat Oct 29, 2016 6:38 pm
Location: Antrim

Re: Arduino Magnetometer Testing

Post by carlosjackal » Fri Feb 16, 2018 2:18 pm

Carbon60 wrote:
Fri Feb 16, 2018 6:58 am
Nice one, Carl.

Are you also able to capture/export the data as a CSV file (frequency and time)?

Stu
Hi Stuart that can be done. This chart is a basic one provided by the Ardruino software instead of pumping out a list of numbers. There are various ways of doing a CSV file live which I will look at this weekend.

Carl

carlosjackal
Oh, I get it now!
Oh, I get it now!
Posts: 36
Joined: Sat Oct 29, 2016 6:38 pm
Location: Antrim

Re: Arduino Magnetometer Testing

Post by carlosjackal » Fri Feb 16, 2018 2:20 pm

Montana wrote:
Fri Feb 16, 2018 7:48 am
Wow! that is impressive :hamster:
Alexandra
It's working well Alexandra 😁

carlosjackal
Oh, I get it now!
Oh, I get it now!
Posts: 36
Joined: Sat Oct 29, 2016 6:38 pm
Location: Antrim

Re: Arduino Magnetometer Testing

Post by carlosjackal » Fri Feb 16, 2018 2:26 pm

IMG_20180216_142318.jpg
IMG_20180216_142318.jpg (2.89 MiB) Viewed 750 times
The massive WiFi Board has arrived now just need to get these two talking.
Carl

User avatar
marktownley
Librarian
Librarian
Posts: 23668
Joined: Tue Oct 18, 2011 5:27 pm
Location: Brierley Hills, UK
Contact:

Re: Arduino Magnetometer Testing

Post by marktownley » Sat Feb 17, 2018 8:53 pm

Hope the thermals all work out with you for this...
Image
http://brierleyhillsolar.blogspot.co.uk/
Solar images, a collection of all the most up to date live solar data on the web, imaging & processing tutorials - please take a look!

User avatar
Carbon60
Way More Fun to Share It!!
Way More Fun to Share It!!
Posts: 5049
Joined: Wed Mar 07, 2012 12:33 pm
Location: Lancashire, UK

Re: Arduino Magnetometer Testing

Post by Carbon60 » Sun Feb 18, 2018 6:53 am

Frequency counting is the way to go. When I started my magnetometer project some years back I was looking for a suitable low cost counter, but I couldn't find anything on the market cheap enough with the resolution needed for sub nT measurements. The Arduino ( or Rasperry Pi) micro systems now available seem more than up to the task.

Data logging appears to be pretty straightforward, as does exporting to Excel. Once you get your data into Excel, Carl, it will then be easy to filter out the noise/spikes in your data, even accounting for passing traffic, or parking on your driveway.

Temperature control at the receiver has been the biggest challenge with my design. I'm confident that the Arduino version will eliminate this issue and that a cleaner presentation of your data can be achieved through the use of Excel.

Stu.
Lunt LS60THa B1200 PTFT
150mm H-alpha Solar telescope with Lunt35 mod
DMK41, Basler acA1920-155
NEQ6 Pro-mount
Fluxgate Magnetometers (1s and 150s Cadence)
More images at http://www.flickr.com/photos/solarcarbon60/

carlosjackal
Oh, I get it now!
Oh, I get it now!
Posts: 36
Joined: Sat Oct 29, 2016 6:38 pm
Location: Antrim

Re: Arduino Magnetometer Testing

Post by carlosjackal » Sun Feb 18, 2018 11:49 am

Hi Stu, all,
Yes Stu it appears to be. Heres the story so far.

The Aurdrino board is located beside a kitchen window which is opened and closed on a regular basis due to a cat! Its also beside a kettle. If this didnt test the temperature nothing would.

I have found how to load data into Excel by doing the following,

A free programe called Coolterm reads the data from the USB serial port. It then places it into a text file with a date/time stamp. All setup for reading once a minute.

I set up Excel to auto read from the file every minute and import the data. This also automatically gets plotted into a graph there as well.

All seems to work great.

The next plan is to add the WIFI board and send live data to Thinkspeak online this will still allow excel to gather data as well.

All in all this is looking like a very cost effective project which can be easily added to with a small screen temperature sensors etc.

The regulated power supply and stable temperature at the FGM 3 location is still and absolute must.

The following graph is from around 11:30 yesterday until this morning with a comparison from Lancaster magnetometer and i think we have a match.

The first low spike is a van which decided to park briefly and the second my fault allowing the pc to power down briefly.

Regards Carl.
Attachments
Magaurdruino.jpg
Magaurdruino.jpg (121.68 KiB) Viewed 694 times

User avatar
Carbon60
Way More Fun to Share It!!
Way More Fun to Share It!!
Posts: 5049
Joined: Wed Mar 07, 2012 12:33 pm
Location: Lancashire, UK

Re: Arduino Magnetometer Testing

Post by Carbon60 » Sun Feb 18, 2018 6:51 pm

An excellent match, Carl.

You can now very easily get Excel to remove the transient spikes and you've got yourself a nice stable magnetometer. Given the low cost, maybe you could run three at once for the X,Y & Z components ;).

Stu.
Lunt LS60THa B1200 PTFT
150mm H-alpha Solar telescope with Lunt35 mod
DMK41, Basler acA1920-155
NEQ6 Pro-mount
Fluxgate Magnetometers (1s and 150s Cadence)
More images at http://www.flickr.com/photos/solarcarbon60/

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest