Measuring solar wind

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!
Post Reply
SimonM
Ohhhhhh My!
Ohhhhhh My!
Posts: 108
Joined: Mon Dec 28, 2020 1:01 am
Has thanked: 42 times
Been thanked: 49 times

Measuring solar wind

Post by SimonM »

I was interested in measuring solar wind via the changes in the magnetic field and spurred on by the frequent reports by Stu (Carbon60) I thought I would "have a go" at measuring it here in Hampshire, UK.

In the UK there are only a few local magnetic observation stations: Hartland, Eskdalemuir, and Lerwick (see http://www.geomag.bgs.ac.uk/operations/ ... ories.html) to find a source of data for comparison e.g. from http://www.geomag.bgs.ac.uk/data_servic ... tions.html - see the yellow line.

I do have a 3-axis magnetometer HMC5883L which I naively thought would make a good detector but a quick check of the spec showed that it wouldn't be able to distinguish the daily very small changes in the magnetic field. A further check of some of the other chipsets on the market also revealed that they are (as far as I could determine) also not sufficiently sensitive (better) e.g. not able to determine nT level variations.

For now, I will fall back on old technology (from the 1930s), the fluxgate magnetometer of the type that used to be made by Speake & Co in Wales (Bill Speake). I ordered one for the basis of detecting variations in the East-West magnetic (aurora) fields. There is some useful info published e.g. Ian Robinson, for a school project using low-cost FGMs, which count frequency (50 kHz - 120 kHz) and determines the variations in the magnetic field from this e.g. in the range +/- 50 uT.

Simon


User avatar
Montana
Librarian
Librarian
Posts: 34527
Joined: Mon Oct 17, 2011 5:25 pm
Location: Cheshire, UK
Has thanked: 17526 times
Been thanked: 8763 times

Re: Measuring solar wind

Post by Montana »

Good luck on your project Simon, keep us updated with the progress. Have you read Stuart's guide in the Solar Reference library section?
viewtopic.php?f=7&t=10349

Alexandra


User avatar
Carbon60
Way More Fun to Share It!!
Way More Fun to Share It!!
Posts: 14175
Joined: Wed Mar 07, 2012 12:33 pm
Location: Lancashire, UK
Has thanked: 8355 times
Been thanked: 8103 times

Re: Measuring solar wind

Post by Carbon60 »

Great to hear of your interest, Simon.

The guide I produced and which Alexandra kindly referenced has since been updated.
Magnetometer Project.pdf
(2.25 MiB) Downloaded 61 times
Primarily, the update describes a method of keeping the frequency converter enclosed in a constant temperature environment.
Since this update was written (2019) I've worked on improving the waterproofing of the buried sensor. As it is described in the guide (using plumbing hardware), it is still possible for water to enter the so called sealed tube (water really is insidious) which kills the electronics. My current version in operation uses a 'coolbox' filled with concrete as well as the plumbing pipework contained within it to help keep the water out. I'm also working on other options.

Anyhow, this is what I have available to date for you to read. I hope you find it helpful.

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/
User avatar
Montana
Librarian
Librarian
Posts: 34527
Joined: Mon Oct 17, 2011 5:25 pm
Location: Cheshire, UK
Has thanked: 17526 times
Been thanked: 8763 times

Re: Measuring solar wind

Post by Montana »

OK Stuart, I'll update the library!

Alexandra


SimonM
Ohhhhhh My!
Ohhhhhh My!
Posts: 108
Joined: Mon Dec 28, 2020 1:01 am
Has thanked: 42 times
Been thanked: 49 times

Re: Measuring solar wind

Post by SimonM »

Carbon60 wrote: Fri Mar 12, 2021 9:36 am Great to hear of your interest, Simon.

The guide I produced and which Alexandra kindly referenced has since been updated.

Stu.

Thanks for your kind encouragement. I was impressed by the way that you produce regular reports in a consistent and useful way.

I have been collecting information including one of the links in your document (that IC has updated):

https://www.imperial.ac.uk/space-and-at ... ate-works/

Many home magnetometers use the sensor mounted below ground and use a combination of plumbing parts to facilitate placing the sensor about 50cm below ground and for control electronics to be above ground. The idea is that the temperature will remain stable throughout the year. I accessed some published soil temperature data and whilst it helps, it isn't all that stable:

https://catalogue.ceda.ac.uk/?q=soil+te ... er_page=20

The reason that temperature is important is that the fluxgate magnetometers produce an output frequency that is approximately proportional to the magnetic flux being measured but this output is also affected by temperature. Looking at the soil temperatures, it is clear that some form of temperature regulation would be preferable. So, I was interested in reading about how your project has changed between the two releases and in particular the shift away from mounting the magnetometer in plumbing parts buried in the ground to a temperature-controlled oven e.g. using a HabiStat Digital Dimming Thermostat and a heating pad - like the ProRep High Output Heat Mats.

My heating solution will be a little different because I will be placing a heating source (a 10W power resistor) within the magnetometer chamber (a thermos flask) and measuring the temperature with a digital thermometer chip. This means that I should be able to avoid heating a large volume of material and only be concerned with maintaining a stable environment in a small 0.5L volume (the thermos flask). My original plan was to source a glass thermos from a tea/coffee thermos but I now realize that it is an advantage to keep the whole plastic/glass thermos, which acts as additional insulation and offers some mechanical protection.

My plan was to maintain an internal thermos at a temperature of 25-30C throughout the year to a close tolerance e.g. +/- 0.1C in a location TBD that is a reasonable distance away from electrical interference (I have some tools which have high power motors and an electric car). So it will be interesting to measure the influences that these have on the magnetometer.

My electronics will also be a little different because I will be using them to regulate the temperature (measure the temperature and control the heating) when NOT taking measurements of the fluxgate frequency which I plan to do directly e.g. avoiding the use of a heterodyne to "downshift" the frequency. Of course, even the best plans change because it's not possible to know in advance how well things will work out.

Simon


User avatar
Carbon60
Way More Fun to Share It!!
Way More Fun to Share It!!
Posts: 14175
Joined: Wed Mar 07, 2012 12:33 pm
Location: Lancashire, UK
Has thanked: 8355 times
Been thanked: 8103 times

Re: Measuring solar wind

Post by Carbon60 »

Hi Simon,

My sensor is still buried in the garden, but now inside a ‘coolbox’.

Yours sounds like an interesting plan. It will be interesting to see how you progress with this.

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/
SimonM
Ohhhhhh My!
Ohhhhhh My!
Posts: 108
Joined: Mon Dec 28, 2020 1:01 am
Has thanked: 42 times
Been thanked: 49 times

Re: Measuring solar wind

Post by SimonM »

Carbon60 wrote: Fri Mar 12, 2021 9:27 pm My sensor is still buried in the garden, but now inside a ‘coolbox’.

Yours sounds like an interesting plan. It will be interesting to see how you progress with this.
Hi Stu, I hope you find the following entertaining... :seesaw

I bought a single fg-3 sensor and a Mag Shield (in kit form) for an Arduino UNO, from fgsensors.com

I have several versions of the Fluxgate Sensor configured, both inside a vacuum flask and outside "taped down" on my desk. The direction is only approximately E-W aligned and the device is sensitive to temperature and voltage fluctuations. Here is a simple plot using 20-second intervals:

Screenshot 2021-05-31 at 23.41.09.png
Screenshot 2021-05-31 at 23.41.09.png (236.59 KiB) Viewed 1147 times

The graph is the direct output from using an Arduino Serial Plotter. I'm "printing" the frequency, moving average (3 samples), and a filtered output (8-stage FIR low-pass digital filter with 9 samples). The colours are (blue = frequency, red = moving average and green = FIR filter). The inverse of the frequency can be used to determine the magnetic flux. This "conversion" is left for the upstream processor e.g. a webserver...

Normally, a sensor will be sampled once a minute (60 seconds) or at 2 1/2 minutes (150 seconds) to get a "picture" of solar activity. I have seen examples of sampling for 1, 2, 4, 8 or 16 seconds. In this example, I'm sampling for the full 20 seconds in each interval. I could have sampled for 1 or 2 seconds and also have an interval of 20 seconds. If the input is moving (that's what we are trying to measure), using a sample e.g. 2 seconds from 20 will not yield an accurate "story" if the input is varying...

When sampling for two seconds, the frequency is also the count measured (convenient) because the Mag Shield has two 4 bit Prescaler that divide the output by four (using the second output of 4 in each Prescaler) and the counter detects every change (transition). Measuring for only 2 seconds means that the frequency measured e.g. 79,500 Hz maybe 79,500 or 79,499, or 79,501 depending upon when the sample is taken. By sampling for multiples of this, the "correct" frequency can be determined, hence the reason why sampling is often done for longer e.g. 4, 8, or 16 seconds. In the above illustration, each 20-second interval/sample yields approximately 795,000 counts from the sensor.

I have added two digital filters. The first is a 3 sample "moving average". This takes the 20-second samples and finds the moving average e.g. across a 60-second interval. The second filter extends this to 9 samples using an FIR filter. Instead of taking the average, it applies a weighting algorithm and is a low pass digital filter, so it is removing the noise (variability) and smoothing the result. Sometimes you want to see a trend and other times the detail, so this provides something for everyone. :cool: The code uses only integer maths so is able to provide more than one output.

The second type of configuration uses a small 500ml vacuum flask and provides a constant temperature environment. For this, I have modified the configuration to provide Supervisory Control and Data Acquisition (SCADA) with an internal heater, thermal block, and temperature sensing within the vacuum flask. The SCADA uses a closed-loop feedback circuit to maintain an elevated temperature environment for the fg-3 sensor that is controlled can be set to 38.0 C and maintained (-0.0000 to + 0.0625) C e.g. very accurately.

The temperature (pressure) to increase is held back by the PID controller and the environment quickly reaches the desired temperature with the minimum of overshoot. There are three constants for the PID Controller: Kp, Ki, and Kd. Kp is the "proportional" part so that as the temperature rises, the heating is proportionally scaled back. The problem with Kp alone is that either the desired setpoint (temperature) is not achieved or it overshoots with poor regulation. This can be partially fixed by "integrating" and adding a small additional amount, which is called Ki. The problem with Kp and Ki alone is that Ki will always continue to increase the setpoint (overshooting it) and this is fixed by the "differential" part which is called Kd. If all this wasn't enough if the temperature overshoots the rate of loss from the vacuum flask is very low, so it can take 10+ hours to again reach the ambient temperature! Overshoot is something to avoid inside a vacuum flask...

Regulation is in fact better than stated because the temperature is monitored and correctly several times during the heating process so that after heating is complete in each cycle, it is at the required temperature. A further complication is that electrical heating may be non-inductive, but it is still an electrically/magnetically "noisy" environment. For this reason, I don't heat and measure at the same time. Instead, I break the interval into smaller cycles and an interval can be any length e.g. 1 second or one day. An advantage of this is that the individual cycles will be the average throughout the interval and not a sample or snapshot.

The Mag Shield provides three things:

1. Separate 5v supply for the fg-3 sensor (I'm also using it for one, or two, digital temperature sensors)
2. Prescaler (divide by 4) with hysteresis
3. 16 characters by 2 lines backlit display

The Mag Shield places the display and a few components on a pretty decent double-sided PCB (with silkscreen printing). The design is intended to be plugged into an Arduino UNO. I can't recommend using an Arduino UNO because the simple method of counting pulses uses an interrupt and a delay. The problem here is not the delay (that is accurately counted) but the frequency stability of the Arduino UNO.

If you look carefully at an Arduino UNO, you will see in addition to the 16.00 Mhz crystal oscillator, there is also a small 3-pin resonator close to the main processor. The crystal oscillator provides a well-regulated output for the USB serial chip. For the Arduino's main CPU (the one you write code for) the ceramic resonator provides a poorly regulated output, which also means that the frequency measurements (counts within a measurement period) also cannot be relied on e.g the temperature outside might vary by 10 - 15 C throughout the day. A simple "fix" for this is to buy a better version of the Arduino (most definitely NOT the Arduino UNO) that you know is using only a crystal oscillator (4-pin device) that also doesn't have a ceramic resonator e.g. only a few of the single-chip Arduino "variants" that are sold.

Using the vacuum flask isolates the fg-3 sensor from the environment. Readings (like the ones shown) are fun to make but are not technically relevant because the small frequency changes detected are swamped by local temperature variations. The heating circuit has the potential to provide 5 J/s additional energy input e.g. 5W but when it is operating at the desired temperature e.g. 38 C, the power consumption drops significantly e.g. the average power to maintain the environment is 0.22 W - a bit higher when it is placed outside in the garden.

Simon


SimonM
Ohhhhhh My!
Ohhhhhh My!
Posts: 108
Joined: Mon Dec 28, 2020 1:01 am
Has thanked: 42 times
Been thanked: 49 times

Re: Measuring solar wind

Post by SimonM »

Here is the output (a few words) later on:

Screenshot 2021-06-01 at 01.59.56.png
Screenshot 2021-06-01 at 01.59.56.png (570.75 KiB) Viewed 1146 times

Simon


User avatar
DeepSolar64
Way More Fun to Share It!!
Way More Fun to Share It!!
Posts: 18728
Joined: Thu Sep 05, 2019 12:19 am
Location: Lowndesville S.C.
Has thanked: 17458 times
Been thanked: 16559 times

Re: Measuring solar wind

Post by DeepSolar64 »

This is really interesting stuff. How much does a capable magnetometer cost?


Lunt 8x32 SUNoculars
Orion 70mm Solar Telescope
Celestron AstroMaster Alt/Az Mount
Meade Coronado SolarMax II 60 DS
Meade Coronado SolarMax II 90 DS
Meade Coronado AZS Alt/Az Mount
Astro-Tech AT72EDII with Altair solar wedge
Celestron NexStar 102GT with Altair solar wedge
Losmandy AZ8 Alt/Az Mount
Sky-Watcher AZGTI Alt-Az GoTo mount
Cameras: ZWO ASI178MM, PGR Grasshopper, PGR Flea
Lunt, Coronado, TeleVue, Orion and Meade eyepieces

Image Visual Observer
" Way more fun to see it! "
SimonM
Ohhhhhh My!
Ohhhhhh My!
Posts: 108
Joined: Mon Dec 28, 2020 1:01 am
Has thanked: 42 times
Been thanked: 49 times

Re: Measuring solar wind

Post by SimonM »

DeepSolar64 wrote: Tue Jun 01, 2021 3:02 am This is really interesting stuff. How much does a capable magnetometer cost?
Hardware:

1x Arduino Leonardo (about £23 or $19 at Amazon)
1x Fluxgate Magnetometer - see https://www.fgsensors.com/shop
1x Mag Shield (optional) but it helps with a stable PSU, a display, and Prescaler and fits on the Arduino (has a PCB)

I don't recommend the Arduino UNO. It is an older design compared to the Arduino Leonardo. It also runs the main CPU e.g. the one you write programs for, using a ceramic resonator. The accuracy of one of these is very poor e.g. a crystal is measured in ppm e,g, 20 ppm whereas the resonator is "quoted" as 16 MHz +/- 0.5% and the frequency drift with temperature is poor. If you are not careful, you will create a magnetometer that will simply tell you the temperature (by varying the frequency displayed) and not the true frequency. Magnetic flux is the inverse of the frequency measured (mostly) but the magnetometers are sensitive to voltage and (especially) temperature. Measurement of frequency is counting pulses in a fixed interval - with the UNO, the interval is not fixed (stable) enough.

The basic code (not including an interrupt service routine - to count the pulses), looks something like:
sensorUpCnt = 0;

intEnable = 1;
delay(measureTime); // Counts during measureTime e.g. 20000 ms (for 20 seconds)
intEnable = 0;

unsigned long frequency =
(sensorUpCnt * 2000 + measureTime - 1) / measureTime; // Round to nearest Hz
NB you can also buy semiconductor magnetometers. For the sensitivity required they will give about 1-bit of info e.g. are not sensitive to measure magnetic flux changes. They can (just about) measure a compass heading, so the output would look more like a "square wave" than a frequency plot - so best avoided.

Stu or anybody who has tried to use a fluxgate magnetometer will tell you that it's really a project about "heating" with a bit of "measurement" on the side.

Simon


User avatar
Carbon60
Way More Fun to Share It!!
Way More Fun to Share It!!
Posts: 14175
Joined: Wed Mar 07, 2012 12:33 pm
Location: Lancashire, UK
Has thanked: 8355 times
Been thanked: 8103 times

Re: Measuring solar wind

Post by Carbon60 »

Hi Simon,

Thank you for your detailed account. As you say, measuring our magnetic environment is mostly about temperature control. It’s also about voltage stabilisation, accurate frequency measurement, judicious placement of the sensor away from interference, data logging and presenting of collected data in a meaningful way that closely matches that produced by professional monitoring stations, so there’s certainly a lot to it.

It looks like you are making great progress.

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/
Post Reply