Category Archives: Projects

Building a Fluxgate Magnetometer Part 2

With school starting progress has slowed some, but currently most of the system is constructed.  First off the sense coil had to be finished.  The wire ends were coated in fingernail polish to keep the coil from slowly working undone and the entire setup was placed into a clear acrylic tube to protect it from wear.  The tube was stopped with standard rubber plugs and a computer power cord was soldered on for connection purposes.

With the function generator working it was time to amplify its ~100mV output to something that would induce a larger field via the driver coil.  Finally I decided to go with an operational amplifier (op-amp) design.  This requires both a positive and negative voltage source which is easily accomplished with two 9V batteries.  The signal generator will be run off a third battery because it is crucial that the two op-amp supply batteries remain at equal voltages.  My initial breadboard design (below) clipped the waveform badly (also below).  After some readjustments and gain fiddling a nice waveform was reached.  I built two amplifiers on a perf-board (one to amplify the signal to the driver coil and one to amplify the signal coming back from the sense coil).

It was also time to being thinking about a case/display.  Lexan seemed like the obvious choice so students can see inside.  I bought 2 sheets of lexan and nylon hardware to separate them.  Leaving the sides open allows easy oscilloscope probe access for recalibrating the amplifiers (I left little copper connections on the board for this purpose).  I designed the front control panel (not implemented yet) and drilled all the holes required.  Finally after mounting all the boards down to the lexan I powered up the amplifiers and they worked great (below)!

Next the bandpass filter needs to be nailed down.  I've worked on it some, but cannot get a satisfactory result to build up onto the last perf-board.  The signal that carries the information we are interested in is the 2nd harmonic of the 1kHz driver signal.  It will be weak so it is likely that the amplifier will need a bit of reworking and hopefully I can build some gain into the bandpass design (also op-amp).  The classic catch is increasing the Q of the filter, but killing the amplitude of the signal.  More to come...

Building a Fluxgate Magnetometer - Part 1 (and NASA)

Today I want to discuss the first steps in building a simple fluxgate magnetometer for a classroom demonstrator.  Originally this post was going to be a wrap up of NASA work and the magnetometer would come later, but I'm still waiting on my presentation to clear export control so I can post it.  As soon as it does, I'll put it up along with a short article.

This semester I'll be the TA for 'Global Geophysics', mostly doing lab instruction/writing.  After some thought I decided that students need more hands-on classroom geophysics, which is difficult to do.  By its nature geophysics is an outdoor activity with normally expensive instruments.  The instruments are often viewed as a mysterious black box that spits out numbers used to make a map.  This must change.  With a proper understanding of the instruments students will better understand errors in the data, how to troubleshoot in the field, and know why certain hardware limits exist.

The concept of a fluxgate magnetometer is pretty simple.  Rather than go into detail I'll refer you to this wikipedia article.  This is mainly to chronicle the construction so others can reproduce this (assuming we get a working model).  My design came from a physics lab at Brown University.  The instructions were vague in parts and I'll be taking some liberties as we go along.  This first article will cover construction of the coil and the driver circuit.

The fluxgate coil consists of a driver coil surrounding a soft steel wire, and a secondary coil to pickup signal surrounding the primary coil.  First I took 16ga annealed steel wire from Lowes and cut it to about 1m long, cleaned it, and made it as straight as possible.  Afterwards I wrapped close to 2000 turns of 22ga magnet wire (Radio Shack #278-1345) tightly along its length.  This was then bent in half making a 'U' and that was wrapped with close to 1000 turns of 26ga magnet wire. I used large wire because it will be more durable and I used different gauge wire since the enamel insulation was a different color allowing students to easily see the windings.

That's all there is to the coil.  To increase durability I will probably clear coat the coil and place it into a small acrylic tube so its difficult to bend or break.  The next step is to build a driver for the primary coil.  The Brown lab used a function generator.  Currently I don't have one, nor have I found a suitable cheap unit.  This meant improvising, and luckily Velleman makes a signal generator kit that is just about right.  It operates at 1kHz (the desired frequency for this project) and produces sine, square, triangle, and integrator waves.  The kit was pretty easy to build in just about an hour and works well as seen by the oscilloscope output below, but frequency stability is not phenomenal (especially when then unit is cold).  

Next a few amplifiers need to be designed and built.  The signal generator kit cannot pull the load of the coil, so a simple +/- 9V system will probably do.  The output will also need some kind of amplification.  The lab I found also uses a bandpass filter.  Once the amplifiers are working it will be time to decide if this is necessary and if I want to use an oscilloscope and hardware filters, or an ADC and display the waveform on a computer projector using software filters.  

Progress on Ultrasonic Mapper

My last post was on the idea, brainstorming, and basic setup of a ultrasonic mapper intended for cave passages.  This post is an update on the prototype that is running now and will hopefully be tested relatively soon when a bit more hardware mounting has been done.

Attached are several photos of the current state of the system, a simple plexiglass mount was constructed to attach the servo and sounder to an old tripod.  This mount will be stronger on a final version and detachable from the tripod.  This is just a proof of concept prototype.

Since servos only rotate 180 degrees the final model will use two sounders opposed to each other to collect a full 360 degree profile.  This means a similar connector (5-pin mic style) will be used with two units mounted in one case, or it may be possible to go with a more sophisticated sounder.  Keep in mind that the point of the whole project is to construct the profiler on a student shoestring budget.  

Below is an 'image' collected.  The vertical line on the right side is the back of an office chair and the feature on the left is the back and seat of a couch.  This was scanned rather slowly over about 40 seconds with many pings averaged out to reduce error.

Since I collected these images I have implemented an intelligent algorithm that makes a quick three ping assessment and based upon the results it will move to the next position or ping up to an additional fifty times to reduce the uncertainty.

The next step will be to make an intelligent scanning rate method that will scan with lower resolution over smooth surfaces and slow down over surface features.  Hopefully the whole scan can be a 15-30 second ordeal allowing quick mapping of passages.

Holiday Engineering Project - Beginning an Ultrasonic Mapper

Over the Thanksgiving break I decided to tackle a small engineering project that has been on my mind for the past month or so.  The basic idea was inspired by learning about Bill Stone's underwater cave mapping system (Stone Aerospace).   It is a relatively complex system constructed by more funding that a college student has at his/her disposal.  Being a caver myself I decided to build a much simpler and cheaper version for both above and below ground mapping.

Since this project is not too large it should be easily constructed over a few weekend hacking sessions, and over the last day the first steps have taken place. The machine uses and Arduino Uno as an interface between a computer and the real world.  While it is true that it would be possible to make a self-contained unit that would store data on a flash drive and maybe even display initial results on some simple display, I opted out of that option for cost and control concerns.  It should be simple to make a simple GUI that allows a netbook to control the setup very nicely and process the data real time.  
Above the basic layout from my notebook is shown.  The ultrasonic ranger (an SRF05) is attached to a rotating mount to sweep through the space around it.  In the initial prototype stages I'm using a simple RC servo since I have it on hand.  Servos only sweep close to 180 degrees to avoid bending control links on models.  While continuous rotation servos are made, they have no position feedback which does not allow accurate positioning of the servo.  It would be possible to use multiple rangers so 180 degrees is enough rotation, but it will be more economical to switch to a slow geared motor with an encoder (maybe a quadrature rotary encoder?) to detect the position as the unit slowly sweeps the space around it.  
Also pictured is the Arduino board and the range finder mounted in a custom case built this afternoon (the window added allows the ping LED to be seen inside the case to confirm the link).  Modification of the PCB and mounting hardware was required.  CAT5e cable along with 4-pin radio mic connectors are used for the power, ground, echo, and trigger pins.  The ranger has a built in PIC controller to pulse the output with a length of the echo time.  The unit seems to range effectively up to about 17 feet.  
While I don't know the accuracy at large distances, or the spread of the 'beam' with the increasing path length, some simple tests should help sort that out.  Currently I've written the interface on the Arduino in C, which will listen for commands over the USB connection.  It this executes those commands (such as move servo, get distance, etc) and returns the appropriate values if necessary.  The communication is asynchronous and not really 'handshaking', but using startbits there is some error checking involved.  
The control from the computer is in the form of a python script that takes easy user input and converts it to the short serial commands in the home-made quick transfer format in the Arduino C code.  Currently it moves the servo and returns distances in cm.  At distances less than 30 cm results seem to be accurate to about 2-5mm.  

The next steps include mounting everything up to get 180 degree scans produced, assessing the accuracy and noise limits of the unit.  I also plan to implement a scanning algorithm that scans more quickly over plan surfaces and slows down over more interesting surfaces.  It will also throw out false returns, which could be due to a range folding issue in large spaces (I have not done anything past back of the envelope on if the signal is strong enough to cause a range folding issue).  A leveling mechanism (manual or automatic) would be nice for field applications.  If this were to be used in mapping a tunnel some kind of simple inertial navigation system with a combination of gyros and accelerometers could be used.  These are all for future development and future posts.  
Have a happy and safe Thanksgiving!