DIY fluxgate magnetometer for experimenters


I don’t think I’ve ever made anything with such an impressive-sounding name before. Doesn’t it sound like something out of a sci-fi movie?

I didn’t make this as a project for my students – it’s a bit advanced. Rather I made it as part of my ongoing quest to record electromagnetic earthquake precursors: one of the ways in which they might be observed is by recording small changes in the Earth’s magnetic field. Thus my interest in magnetometers.

I recorded data from my search coil magnetometer for many months, but it was subject to a lot of interference in my location and, by its nature, could only record short pulses, not long duration changes. Then I set up my milk bottle magnetometer which has been happily recording for a couple of years, but it was a delicate job to position it and was sensitive to physical vibration (it made a pretty good seismometer.)

The fluxgate on the other hand is easy to position and records any changes that can be observed at 3 samples per second. Another significant difference is that it also responds to changes in the strength of the field, whereas the magnet-in-a-milk-bottle only records changes in the direction. Sometimes this will equate to a similar reading but not always. So now I see quite consistent correlation with other magnetometers in this part of the world (I’m in Taiwan). It is definitely showing solar phenomena, especially in the middle of the night when it’s not obscured by so much local interference such as passing buses etc.

Here is a recent 24 hour trace plotted, for comparison, underneath the trace from an Intermagnet magnetometer in Vietnam. This trace was of special interest because it contained a large dip just prior to a 6.1 earthquake in the middle of Taiwan. It appears not to be solar phenomena since it didn’t appear on the trace in Vietnam. I’m not sure what to make of it yet as this was only in the first few days of recording with this device.

magnetometer trace(click to enlarge)

This fluxgate is simpler than the traditional design which utilizes a synchronous detector. In my design, the signal from the pickup coil is simply amplified, fed into a computer sound card and processed the same way as all my other devices. In other words, the computer is measuring the loudness of the 5 KHz signal produced in the core. Furthermore, the core doesn’t use any special material. I experimented with garden variety ferrite toroids found in switchmode power supplies, but was unable to get consistent results. Finally I wound my own toroidal core out of a length of steel telephone wire. I’m sure some high permeability material would work better, but I like the idea of making something good out of junk.

Here is the circuit diagram:

fluxgate-basic (click to enlarge)

And here is the way I set it up to run on a single pair telephone cable. Both power and signal are carried on the same wires, the 5KHz signal being inserted and extracted by a couple of small telephone line transformers that I took out of some old computer modem cards. It’s not essential to set it up this way. I did it  because it wasn’t easy to get power to it in the place I set it up on the back balcony – the furthest I could get it away from the passing traffic.

fluxgate  (click to enlarge)

Some explanation of this circuit is in order. I won’t go into a lot of detail on the theory of fluxgates, as there are many good write-ups on the web (and I suspect I don’t fully understand it myself anyway, as I had a dickens of a job making it work.) But the basic arrangement is two balanced, metal-cored coils driven with A/C, which in this case is two sides of the same toroidal core. A pickup coil wound around both sides, and carefully positioned so that the fields in both sides are cancelled out, produces no output. However, when driven to near saturation of the core, where it becomes non-linear, the presence of an external magnetic field will cause an imbalance, pushing the cores closer to, or further away from saturation, depending on the direction of the field. It’s this imbalance that produces a signal in the pickup coil. This is better understood in practice, observing it on an oscilloscope, or on sound card based oscilloscope software – I use “xoscope” which is fine at the low frequencies we’re dealing with. You will notice the core is driven at 2.5 KHz. This is low for a fluxgate, and it was chosen in case the steel core was too lossy at higher frequencies. It was also convenient for my software, which already accepts a 5 KHz signal. (In normal operation of a fluxgate, the signal received by the pickup coil will be double the drive frequency.)

OLYMPUS DIGITAL CAMERA Here is a photo of the wire used in the core. I bought it at the local DIY shop, thinking it was copper wire and might be handy for various projects. I was dismayed to discover after I had removed the shrink-wrap that it was very stiff and was attracted to a magnet, so having no use for steel wire, it sat in my cupboard for about six years as a reminder that I really do need to learn to read Chinese.

Each wire is a single strand of copper plated steel, 0.5 mm diameter.




I cut off a couple of feet of this (unfortunately I didn’t measure it) and removed the outer grey cover. I left the red and green insulation on, then wound it all up into a rough, donut shaped bundle of about the dimensions shown, then taped it in a few places:


Nextsteel-wire-toroid2 I wound about 200 turns of 31 swg wire onto it. I can only say “about” because I lost patience with it several times, dropping the wire, getting it tangled and kinked etc…. The result was about the messiest winding you’ve ever seen. This is only a drawing, but it’s pretty much what it looks like, except I haven’t really shown 200 turns. If you don’t get the same number of turns, you can adjust the parallel capacitor to get a reasonable sine wave. (I have a 0.47uf and a 0.22 uf in parallel on mine. See the circuit diagram.) This capacitor should be good quality to avoid temperature drift – something it suffered from terribly when I used cheap capacitors in the beginning. I suspect I still have some temperature drift problems, but nothing like I had at first. This is what the drive waveform should look like:


Next, make a rectangular former out of thick card or plastic and wind 500 turns of thin wire onto it for the pickup coil. I used 38 swg.steel-wire-toroid3 This coil, with the parallel 3n3 cap, are tuned to resonate at 5 KHz. You may need to adjust it if there’s any difference in your coil.

steel-wire-toroid4Then slide the toroid inside. When it’s ready to try out, you will need to rotate the core to find the best position that nulls out the 2.5KHz drive signal. You will need to observe this on the oscilloscope trace. If you then use software such as “Spectrum Lab”, you should be able to observe the 5 KHz signal changing as you rotate it or wave metal things around it. (It’s not advisable to put a magnet too close to it. It took mine a long time to recover, drifting for several hours as it settled down.) You can try different drive levels by adjusting the 10K trimpot on the 555’s output. At some point a little over half way, you’ll find a level that gives the best sensitivity. When observing it on Spectrum Lab, I saw it was easy to overdrive it, whereupon it generated heaps of spurious signals that swamped the output.

The rest of the electronics were assembled “Manhattan style” on a piece of blank double sided copper-clad board. This construction solved some feedback I was getting on my first attempt. It also reduced stray capacitances which were letting the 2.5KHz drive signal into the LM386 amplifier I.C. This was making it hard to get a null position for the pickup coil.

 The software is set up in the same way as described in my seismometer post, except for the software that processes the 5 KHz signal. I wrote a different one for the magnetometer that has a lower sample rate of about 3 per second. The Windows version can be downloaded here.

Note: I am currently running this under linux, using a cheap USB sound card. The PC now has two seismometers, the pendulum and a Lehman, and two magnetometers recording continuously (this fluxgate and the magnet-in-a-milk-bottle.) This is being done through both channels of the internal sound card and two single input USB sound cards. If anybody is interested in setting it up under linux, contact me via the contact page or post a comment.

As you can see I am currently recording data with Amaseis. This works out OK. I usually leave it on 5 minute traces and watch the passing buses. It looks like this: magnetometer-trace-on-amaseis (click to enlarge)

When I want to make a 24 hour trace for study or comparison with other magnetometers I just select 24 hours of data and apply a 50 second low pass filter to reduce local interference. Here is a recent screen shot:
2013-03-30f (click to enlarge)

Update 28 Aug 2013

After continuous recording for a couple of months, the fluxgate is still working OK. The daytime trace is still subject to wild fluctuations from traffic and other local sources. Occasionally the quieter, night time part of the trace records distinctive solar phenomena which compares well with other on-line magnetometers (usually I check it against one in Vietnam, as mentioned above.)

Here are some of the best recent traces (mine is the black line):

2013-07-09 2013-07-10 2013-07-18 2013-07-25 2013-08-04 2013-08-27

Update 9 October 2013

Most of the solar phenomena I have observed has been fairly slow-changing, so I was surprised to see a large, fast rise-time pulse this morning. It annoyed me at first, as I was certain somebody had parked a truck behind my house in the early hours of the morning!

Here is the trace compared with an Intermagnet magnetometer in Vietnam:


Although very steep on the 24 hour graph, on closer inspection, the initial rise occurred over about three and a half minutes, as can be seen on this unfiltered trace:


The pulse appears on magnetometers all over the world, so I’m curious if it produced any Northern Lights, but so far, no reports of it on the news.

This entry was posted in Electronics. Bookmark the permalink.

2 Responses to DIY fluxgate magnetometer for experimenters

  1. Daniel says:

    Wonderfull, Greame !!

    Still a very good job !!!


    We are very interested here !

    Many thanks,

    Daniel ON5DA