Arduino Magnetometer Testing
-
- Oh, I get it now!
- Posts: 43
- Joined: Sat Oct 29, 2016 6:38 pm
- Location: Antrim
Arduino Magnetometer Testing
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. Carl
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. Carl
- Montana
- Librarian
- Posts: 34722
- Joined: Mon Oct 17, 2011 5:25 pm
- Location: Cheshire, UK
- Has thanked: 17974 times
- Been thanked: 8906 times
-
- Oh, I get it now!
- Posts: 43
- Joined: Sat Oct 29, 2016 6:38 pm
- Location: Antrim
- marktownley
- Librarian
- Posts: 42545
- Joined: Tue Oct 18, 2011 5:27 pm
- Location: Brierley Hills, UK
- Has thanked: 20813 times
- Been thanked: 10485 times
- Contact:
Re: Arduino Magnetometer Testing
Sounds cool!
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!
-
- Way More Fun to Share It!!
- Posts: 2033
- Joined: Sat Nov 24, 2012 2:33 pm
- Has thanked: 57 times
- Been thanked: 1204 times
- Carbon60
- Way More Fun to Share It!!
- Posts: 14312
- Joined: Wed Mar 07, 2012 12:33 pm
- Location: Lancashire, UK
- Has thanked: 8558 times
- Been thanked: 8290 times
Re: Arduino Magnetometer Testing
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.
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.
H-alpha, WL and Ca II K imaging kit for various image scales.
Fluxgate Magnetometers (1s and 150s Cadence).
Radio meteor detector.
More images at http://www.flickr.com/photos/solarcarbon60/
Fluxgate Magnetometers (1s and 150s Cadence).
Radio meteor detector.
More images at http://www.flickr.com/photos/solarcarbon60/
- rsfoto
- Way More Fun to Share It!!
- Posts: 6306
- Joined: Mon Jun 18, 2012 8:30 pm
- Location: San Luis Potosi, México
- Has thanked: 9723 times
- Been thanked: 5773 times
Re: Arduino Magnetometer Testing
Interesting and where can I buy those FGM Magnetometers ?
In order to understand it a bit more
Thanks and regards Rainer
In order to understand it a bit more
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 ?...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".
Thanks and regards Rainer
regards Rainer
Observatorio Real de 14
San Luis Potosi Mexico
North 22° West 101°
Observatorio Real de 14
San Luis Potosi Mexico
North 22° West 101°
-
- Oh, I get it now!
- Posts: 43
- Joined: Sat Oct 29, 2016 6:38 pm
- Location: Antrim
Re: Arduino Magnetometer Testing
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.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.
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
-
- Oh, I get it now!
- Posts: 43
- Joined: Sat Oct 29, 2016 6:38 pm
- Location: Antrim
Re: Arduino Magnetometer Testing
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.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
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 ?...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".
Thanks and regards Rainer
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
- rsfoto
- Way More Fun to Share It!!
- Posts: 6306
- Joined: Mon Jun 18, 2012 8:30 pm
- Location: San Luis Potosi, México
- Has thanked: 9723 times
- Been thanked: 5773 times
Re: Arduino Magnetometer Testing
Hi Carl,carlosjackal wrote: ↑Mon Feb 12, 2018 9:36 pmHi 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.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
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 ?...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".
Thanks and regards Rainer
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
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
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
regards Rainer
Observatorio Real de 14
San Luis Potosi Mexico
North 22° West 101°
Observatorio Real de 14
San Luis Potosi Mexico
North 22° West 101°
- marktownley
- Librarian
- Posts: 42545
- Joined: Tue Oct 18, 2011 5:27 pm
- Location: Brierley Hills, UK
- Has thanked: 20813 times
- Been thanked: 10485 times
- Contact:
Re: Arduino Magnetometer Testing
That's a hefty pier Rainer!
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!
- rsfoto
- Way More Fun to Share It!!
- Posts: 6306
- Joined: Mon Jun 18, 2012 8:30 pm
- Location: San Luis Potosi, México
- Has thanked: 9723 times
- Been thanked: 5773 times
Re: Arduino Magnetometer Testing
Each pier weighs 7000kg :-) and finished they look like this
regards Rainer
Observatorio Real de 14
San Luis Potosi Mexico
North 22° West 101°
Observatorio Real de 14
San Luis Potosi Mexico
North 22° West 101°
- marktownley
- Librarian
- Posts: 42545
- Joined: Tue Oct 18, 2011 5:27 pm
- Location: Brierley Hills, UK
- Has thanked: 20813 times
- Been thanked: 10485 times
- Contact:
Re: Arduino Magnetometer Testing
Nice!
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!
- Carbon60
- Way More Fun to Share It!!
- Posts: 14312
- Joined: Wed Mar 07, 2012 12:33 pm
- Location: Lancashire, UK
- Has thanked: 8558 times
- Been thanked: 8290 times
Re: Arduino Magnetometer Testing
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.
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.
H-alpha, WL and Ca II K imaging kit for various image scales.
Fluxgate Magnetometers (1s and 150s Cadence).
Radio meteor detector.
More images at http://www.flickr.com/photos/solarcarbon60/
Fluxgate Magnetometers (1s and 150s Cadence).
Radio meteor detector.
More images at http://www.flickr.com/photos/solarcarbon60/
- rsfoto
- Way More Fun to Share It!!
- Posts: 6306
- Joined: Mon Jun 18, 2012 8:30 pm
- Location: San Luis Potosi, México
- Has thanked: 9723 times
- Been thanked: 5773 times
Re: Arduino Magnetometer Testing
Thank you Stu. Will analize that.
regards
regards Rainer
Observatorio Real de 14
San Luis Potosi Mexico
North 22° West 101°
Observatorio Real de 14
San Luis Potosi Mexico
North 22° West 101°
-
- Oh, I get it now!
- Posts: 43
- Joined: Sat Oct 29, 2016 6:38 pm
- Location: Antrim
Re: Arduino Magnetometer Testing
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
- Carbon60
- Way More Fun to Share It!!
- Posts: 14312
- Joined: Wed Mar 07, 2012 12:33 pm
- Location: Lancashire, UK
- Has thanked: 8558 times
- Been thanked: 8290 times
Re: Arduino Magnetometer Testing
Nice one, Carl.
Are you also able to capture/export the data as a CSV file (frequency and time)?
Stu
Are you also able to capture/export the data as a CSV file (frequency and time)?
Stu
H-alpha, WL and Ca II K imaging kit for various image scales.
Fluxgate Magnetometers (1s and 150s Cadence).
Radio meteor detector.
More images at http://www.flickr.com/photos/solarcarbon60/
Fluxgate Magnetometers (1s and 150s Cadence).
Radio meteor detector.
More images at http://www.flickr.com/photos/solarcarbon60/
- Montana
- Librarian
- Posts: 34722
- Joined: Mon Oct 17, 2011 5:25 pm
- Location: Cheshire, UK
- Has thanked: 17974 times
- Been thanked: 8906 times
-
- Oh, I get it now!
- Posts: 43
- Joined: Sat Oct 29, 2016 6:38 pm
- Location: Antrim
Re: Arduino Magnetometer Testing
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
-
- Oh, I get it now!
- Posts: 43
- Joined: Sat Oct 29, 2016 6:38 pm
- Location: Antrim
-
- Oh, I get it now!
- Posts: 43
- Joined: Sat Oct 29, 2016 6:38 pm
- Location: Antrim
Re: Arduino Magnetometer Testing
Carl
- marktownley
- Librarian
- Posts: 42545
- Joined: Tue Oct 18, 2011 5:27 pm
- Location: Brierley Hills, UK
- Has thanked: 20813 times
- Been thanked: 10485 times
- Contact:
Re: Arduino Magnetometer Testing
Hope the thermals all work out with you for this...
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!
- Carbon60
- Way More Fun to Share It!!
- Posts: 14312
- Joined: Wed Mar 07, 2012 12:33 pm
- Location: Lancashire, UK
- Has thanked: 8558 times
- Been thanked: 8290 times
Re: Arduino Magnetometer Testing
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.
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.
H-alpha, WL and Ca II K imaging kit for various image scales.
Fluxgate Magnetometers (1s and 150s Cadence).
Radio meteor detector.
More images at http://www.flickr.com/photos/solarcarbon60/
Fluxgate Magnetometers (1s and 150s Cadence).
Radio meteor detector.
More images at http://www.flickr.com/photos/solarcarbon60/
-
- Oh, I get it now!
- Posts: 43
- Joined: Sat Oct 29, 2016 6:38 pm
- Location: Antrim
Re: Arduino Magnetometer Testing
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.
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 (121.68 KiB) Viewed 8731 times
- Carbon60
- Way More Fun to Share It!!
- Posts: 14312
- Joined: Wed Mar 07, 2012 12:33 pm
- Location: Lancashire, UK
- Has thanked: 8558 times
- Been thanked: 8290 times
Re: Arduino Magnetometer Testing
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.
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.
H-alpha, WL and Ca II K imaging kit for various image scales.
Fluxgate Magnetometers (1s and 150s Cadence).
Radio meteor detector.
More images at http://www.flickr.com/photos/solarcarbon60/
Fluxgate Magnetometers (1s and 150s Cadence).
Radio meteor detector.
More images at http://www.flickr.com/photos/solarcarbon60/
-
- Oh, I get it now!
- Posts: 43
- Joined: Sat Oct 29, 2016 6:38 pm
- Location: Antrim
Re: Arduino Magnetometer Testing
Thanks Stu, yes that is certainly doable. Baby steps learning code at the minute
Carl
-
- Oh, I get it now!
- Posts: 43
- Joined: Sat Oct 29, 2016 6:38 pm
- Location: Antrim
Re: Arduino Magnetometer Testing
I have now connected the WIFI module to the Arduino Uno board they are now both talking.
It took over a week of putting the codes together to get them to work but I think I have cracked it
The live readings are now being send to THINGSPEAK
The channel is just up and running so will take a day or two to get a length of data.
If you go to the Thingspeak site then channels and type "magnetometer" into the Tag search it's there.
Should be noted that the readings are inverted but will be using a MATLAB graph soon to correct. For now it's still a test.
Regards Carl
-
- Oh, I get it now!
- Posts: 43
- Joined: Sat Oct 29, 2016 6:38 pm
- Location: Antrim
Re: Arduino Magnetometer Testing
Hi all the magnetometer readings can be seen live on the following link,
https://sites.google.com/site/iotchartsdemo/thingspeak
Just type in the channel box 438056 and change the number of points to 2000.
Last night's big hit can be seen.
Cheers Carl
https://sites.google.com/site/iotchartsdemo/thingspeak
Just type in the channel box 438056 and change the number of points to 2000.
Last night's big hit can be seen.
Cheers Carl
- Montana
- Librarian
- Posts: 34722
- Joined: Mon Oct 17, 2011 5:25 pm
- Location: Cheshire, UK
- Has thanked: 17974 times
- Been thanked: 8906 times
- marktownley
- Librarian
- Posts: 42545
- Joined: Tue Oct 18, 2011 5:27 pm
- Location: Brierley Hills, UK
- Has thanked: 20813 times
- Been thanked: 10485 times
- Contact:
Re: Arduino Magnetometer Testing
Good record!
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!
-
- Oh, I get it now!
- Posts: 43
- Joined: Sat Oct 29, 2016 6:38 pm
- Location: Antrim
Re: Arduino Magnetometer Testing
Thanks folks it's working great outputting 24/7 just need to get a decent graph on web page.
Carl
Carl
- Carbon60
- Way More Fun to Share It!!
- Posts: 14312
- Joined: Wed Mar 07, 2012 12:33 pm
- Location: Lancashire, UK
- Has thanked: 8558 times
- Been thanked: 8290 times
Re: Arduino Magnetometer Testing
Great work, Carl.
Stu.
Stu.
H-alpha, WL and Ca II K imaging kit for various image scales.
Fluxgate Magnetometers (1s and 150s Cadence).
Radio meteor detector.
More images at http://www.flickr.com/photos/solarcarbon60/
Fluxgate Magnetometers (1s and 150s Cadence).
Radio meteor detector.
More images at http://www.flickr.com/photos/solarcarbon60/
-
- Oh, I get it now!
- Posts: 43
- Joined: Sat Oct 29, 2016 6:38 pm
- Location: Antrim