Wednesday, December 21, 2011

Laser Cave Profiling - The Beginning

Inspired by caving friend Nathan Williams photos of this technique I decided to try to duplicate his results and then write some great software.  The idea is to make profiles of cave tunnels known as cross sections very easily and accurately.  Cross sections are commonly sketched by a cave mapper by eye with a very rough scale.  Sometimes the passage is measured in height and width with a tape.

Here we use a motorized laser level and a DSLR camera to try to construct profiles.  After seeing Nathan's photos I got the laser level from Harbor Freight Tools (~$60) and used my Nikon D40X in a local Arkansas cave.

Today I just did a quick test about 100 ft. into the passage.  Below is a picture looking toward the level with flash so the tunnel profile can be seen.  Then I did a 20 second exposure with the level running and all lights off.  There was a small amount of light from the entrance, but negligible.


I then read the image into python, remove tripod reflections by subtracting the average of the blue and green channels from the red and then inverting the resulting monochrome image.  The result is seen below:

The big thing I need is the software to then produce a set of points that describe the profile so I can implement routines to compute area and make a pseudo 3-D model of the cave by stacking many closely spaced profiles.  I also tested the scale of the image by counting how many pixels wide the level appears and then determined the pixels/cm count to get the size of the tunnel.  This process will be improved and automated as the software develops.

I'm open to suggestions from cavers and numerical methods folks.  I have a contouring algorithm (Moore-Neighbor Tracing) coded, but it doesn't handle the breaks in the profile.  Any ideas on making it continuous and possibly minor smoothing? I plan to build a "T" shape device with 4 dim LEDs to provide a larger scale target.

Thursday, September 1, 2011

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...

Thursday, August 18, 2011

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.  

Thursday, August 4, 2011

NASA - Mission Control and Flying the Shuttle

Yesterday I was fortunate enough to go through the mission control facilities here at Johnson Space Center. There is historic mission control from the Apollo and early shuttle days, space shuttle control, ISS control, a training/overflow room, and back rooms. I'm going to share some pictures with you and summarize the setup of mission control and operations.






First we were in historic mission control. This is the famous room seen in the photos of the Apollo 11 landing and made even more well known by the movie 'Apollo 13'. The room is relatively small with a visitor viewing gallery. Each station or console was responsible for a system or set of systems such as guidance, navigation, control, CAPCOM (capsule communicator), etc. Every console has a set of loop buttons. These loops can be thought of as conversations. Say the thermal guys need to talk to attitude control (ADCO) and maneuver the spacecraft so it can cool or heat properly. They would punch up a loop and start talking. Controllers listen to many loops simultaneously, but only talk on one at a time. Eventually all decisions are at the discretion of the flight controller. When a decision is made the CAPCOM (the only person who actually talks to the spacecraft) relays the message.




A little known fact is that those controllers in the 'front room' are not the only personell working on the mission control day to day. There are many 'back rooms' surrounding the control center in which more systems specialists look at various sub-systems and aspects of operation. They report to the front room system manager who then reports to flight control. This design of control is still used today. In addition to subsystem back rooms there are also people like geologists in back rooms that would request astronauts look at certain areas/rocks when on the moon.

Shuttle mission control is now sadly quiet after the recent retirement of the space shuttle after a great 30 year run. I've posted pictures of the shuttle control room before, so I'll save the space here and move onto the International Space Station (ISS) control room.

The ISS control room is similar to shuttle control with one major exception. The ISS is flown from the ground. With the shuttle and Apollo astronauts actually flipped switches and punched up computer programs to fly the vehicle. The ISS astronauts are free to work knowing that their orbit is controlled by the ground. The orbit of the ISS is occasionally boosted to combat continual orbital decay. The orientation of the station is also changed for thermal, scientific, and debris avoidance. Much of the maneuvering is done by speeding up, slowing down, and rotating giant gyroscopes on the station. These moves require no propellant, but there are technical issues (that's for another time though).

There is also a training/overflow control area, but that area is currently undergoing a few remodeling projects.

On a side note I was able to fly the shuttle simulator before it is dismantled. We started at 10,000 ft. on landing approach. I came up just short of the runway the first time, but got it on the ground the second time (even if it wasn't a pretty landing).

Thursday, July 28, 2011

NASA - What's New

Well a lot has happened since my first week down at NASA.  I've watched the final launch and landing of the shuttle with STS-135, visited historic and current mission control, watched a dry run of the desert rats program, and even got to shake the hand of robonaut!




The launch of the shuttle was amazing, even just watching it on the big screen with other employees cheering.  Once they were in orbit we recorded a wake up message to be played to them during one of the flight days.  The video is embedded below.  Skip ahead towards 1:13 and you'll see all of us.  I'm in a denim shirt near a guy in a bright red shirt.  We all went into work at 4AM to watch the landing, then went to Waffle House for some breakfast.



Morpheus still hasn't lit up since I've been here due to the fire investigation and more recently some RF interference issues.  Hopefully those are resolved soon and the tests can continue.  My work on writing a software package has shifted slightly and I'm writing a plotting package.  When I give my exit presentation in a few weeks I'll post it on here so you can get a more detailed idea of what is going on, but in general my software takes huge amounts of flight data and divides it up to plot it.  We are already using the software to look for what is causing some drift in the inertial navigation system!  I'll try to do better about posting more frequent, short updates over the next couple of weeks before I head back to Norman and the blog will likely go back to interesting scientific thoughts or updates on teaching.

Sunday, June 19, 2011

NASA - Week 1

This week I began my work at NASA Johnson Space Center (JSC).  My job is to write software regression test protocols for the guidance, navigation, and control software on a lander prototype.  We normally refer to the software as the GN&C package.  It basically tells the flight computer and flight computer software (FCS) what to do as far as maneuvering the vehicle.

The vehicle I'm working on is called Morpheus and will with any luck be the next machine we place on the moon.  It may take some instrument up after a few more years, but only time and funding will tell.  Below is a picture of the lander with me for scale.



I encourage you to also follow the Morpheus blog from NASA (here).  Videos of tests will be posted there, but I'll also repost.  The first few tests the lander was tied down to the ground.  Then it was hung from a tether and allowed to ascend and land on its own.  Some of the tests worked well, but others had problems as is in the video below.  Most of those issues have been solved and we are now just working on some control lag problems.



More tests were planned very soon, but the rocket started a fire in the test field and we can not light the engine again until the investigate has cleared up, hopefully by early July.  Until we do more field tests I'm working in the NSTL (Navigation Systems Testing Laboratory) trying to do regression analysis.  In general fixing a bug in software can break other features.  When the software is flying a very expensive lander with around half a ton of explosive rocket fuel that is a very bad thing.  I'm using spacecraft simulation code to prove that certain changes don't cause issues with the flight and trying to develop software modification protocols that allow rapid updates.



The icing on the cake was really my first day when I happened to hear that Gene Kranz (the flight controller for many years, made famous in the movie 'Apollo 13') was speaking.  I attended his lecture and it was amazing.  He really has the passion that I love seeing in people.  Mr. Kranz was excited for what our generation can do, but concerned that we may currently lack the leadership to do it.  I agree completely with his statement and all of us in the room are striving to learn those vital skills that he talked about.  The Apollo missions would have never left the ground without leadership, teamwork, and persistance.  While we may have many times the computer power of the 1960's I'm worried we have fewer of these important personal qualities.

Tuesday, June 14, 2011

Field Camp - The Final Week

The final week of field camp consisted of a swap between geology/geophysics students, preparation of final reports, and a final presentation.

For the first day (Monday) of the geology/geophysics swap I was helping the geologists with my homebrew resistivity rig.  After some small problems in the morning the device cooperated, and we took a like across a fault, seeing massive jumps in conductivity over the gouge area.  The second day I was actually out with the geology professors hand mapping some of the surface geology in the area.  Tom and Neil were very instructive and were able to measure a strike and dip on things that very few would term 'outcrop'.  Nonetheless the data plotted nicely!




After the mapping came independent projects and final reports.  Cullen and I decided to collect a gravity line across the dry union fault near Salida (the area of the first field trip).  I ended up staying at camp to help the geologists process their data and Cullen went with Guang to collect the line.  The results were stunning and the calculated fault dip angle is 87 degrees.



Processing the magnetic data was quite a challenge.  To take the data we place flags along the path we walk, take their coordinates and press mark at each flag.  The instrument is collecting a magnetic reading every 1/10 of a second.  I ended up writing code that assumes a constant walking place between flags and linearly interpolates positions between.  The code then re-writes a new datafile that can be plotted by OASIS.  The quick code hack was not perfect and really should have already been in the software that came with the instrument.  Hopefully over the summer I'll have time to perfect the code and write a nice GUI to go along with it.  (Error checking would also be nice)

Finally on the last day of camp we had to give a presentation of the results.  Cullen and I talked for about 40 minutes and then there was much discussion between the faculty of our image.  We had everybody excited about what we should try next year!  Unless plans change it is likely that Cullen and I will TA next year.

Now I'm at NASA in Houston, TX.  Towards the end of this week I'll start a weekly post about the work here.  It's very exciting work with a flying vehicle and guidance software.  Stay Tuned!  Below are a few pictures from the group trip to Pike's Peak.  A copy of the final report can also be downloaded HERE.

Thursday, June 2, 2011

Week 2 (Seismic Week) - Field Camp 4

This week was seismic week for us here in Canon City.  We carefully selected a site that crosses from sediment into basement, but the nature of the contact is unknown.  It ran across the property of a nice couple who moved here from Iowa three years ago.  They are interested in the geology and were more than happy to have us tramp all over with magnetic, gravity, and finally seismic gear including a larger thumper mounted on an ATV.

The first part of the week involved Cullen and I working on a mounting system to attach the thumper for the four-wheeler.  Seismic surveying works on the premise that different rocks have different wave velocities as a function of the type of rock, fluid content, etc.  We set out a long line of geophones (basically a vertical seismometer) and then hit the ground very hard to induce a signal.  From the return of the signal we can learn a lot about what the subsurface looks like.



For some surveys we hit the ground with a sledgehammer, shoot it with a gun, or even use dynamite! In this case we tried a new device that pulls a 40kg weight up with an electric motor and then drops it.  There is also a giant rubberband that accelerates the weight towards the ground.  There is currently a battle going on between naming the machine the seismic thumper device or the seismic thumper and utility device.  We added weights, battery mounts, and even a flashing safety light to the four-wheeler.

Before we could even use the thumper the control box failed due to a cable issue, so I had to rewire the control system (actually just a solenoid control) and mount the switch in a box on the ATV.  It was a midnight patch up, but it worked well all day!



The survey was laid out on Wednesday.  The line was almost 750m long, then we even rolled it forward! Geophones were placed every 10m and the thumper was shot at each geophone three times to 'stack' the data (this helps us reduce random noise).  We don't have any images yet, but tomorrow we begin processing.  The line took a day to layout, a day to shoot, and tomorrow morning to roll up.  Several long days for us here.  I also put together a quick video of the thumper shooting.



On a side note, we also took a great hike and field trip in the past week, so I've added a few photos of the Collegiate Peaks, and Tunnel Drive Trail.


Sunday, May 29, 2011

Week 1 - Field Camp 3

Week 1 has been very busy and week 2 is almost to begin.  We were lucky with the weather, but this week looks to begin the inevitable warm up that we all knew would come.  This week the geophysics group went on a field trip to get the regional setting (Monday), learned detailed surveying with the TOPCON differential GPS (Tuesday), conducted a gravity survey, and a magnetic survey (days dependent on group assignment).  The week ended on Saturday with another field trip out west to see some different formations.



The regional field trip went well and we scrambled across some slopes to see most of the section that the geologists would be mapping and be very familiar with.  As a geophysics student I was more interested in the rock properties, what methods we could differentiate them with, etc.  This trip did help put things in a big picture geologic perspective though.

The differential GPS surveying went well despite a few equipment setup issues, which were to be expected with new users.  The basic premise of the system is to leave a very precise GPS unit in place all day while another identical unit is used as a rover.  The two data sets can then be merged using the base to correct for signal attenuation by the continually changing atmosphere and other error sources.  In general sub-centimeter accuracy is achievable.  This accuracy in elevation is especially important in gravity data processing since 1m makes .3086 mGal difference in the data.  While some complain that taking 2 minutes to get a GPS fix is unreasonable I remind you that we are getting a very accurate position on an irregularly shaped rotating planet FROM SPACE... it's amazing it dosen't take longer.

The gravity survey looks at density differences in the subsurface while the magnetic survey examines differences in magnetic susceptibility.  We are interested in contracts between sediments and basement or with a dike especially in this area.  After the processing I will post some results, but I know the magnetometer went crazy when I passed over the suspected location of a large dike.  The gravity survey should also be helpful, but the gravimeter does instill a certain amount of fear in everyone since it is ~$100,000 and VERY easy to break.  Omar is modeling the magnetometer in this picture.

Finally, we went on another trip Saturday which involved me getting some nice rocks with chlorite in them for bookends from a tailings type pile in a field.  This week will be seismic week, so stay tuned for updates and pictures of our new (hopefully) 700m long seismic line!

Sunday, May 22, 2011

Setting Up Equipment - Field Camp 2

The past few days have been working to get a solid radio link to downtown.  The internet signal comes up on a 5.8GHz link, is distributed over a 5.12GHz mesh around the camp, and is repeated to others on a 3GHz haul over the canyon.  Below is a picture of the stack at the top of the camp on the study hall.  The repeaters are mounted on the sides of cabins.  The current link is slow, but a new circuit will be installed downtown giving us a fast connection this week.  Also included is a picture of the geophysics server (named thor) and the associated gear.







We also worked on setting up the thumper.  This is a machine that attaches to a trailer hitch of any vehicle (truck, ATV, etc) and impacts the ground with a great force.  We use this in seismic imaging.  Normally we use a sledgehammer for small surveys, but that can get tiring.  For large, deep surveys explosives are used, this machine is a great middle ground.

As you can see there is still some work to be done.  Tomorrow the hitch will be modified and in the evening I'll be building some custom brackets and mounts for the controls and battery with Dr. Keranen.  We'll use aluminium angle iron to build most of the mounts, pictures will follow.






Tomorrow we all leave early for a regional trip to get the general geological/tectonic setting of the area.  This trip will be both geologists and geophysicists.

Friday, May 20, 2011

Setting Up Camp - Field Camp 1

This is the first in a series of posts I'll be writing about my experience at the new Bartell field camp. This camp will serve as the base for summer geology/geophysics students. Geologists will be here 5 weeks, geophysicists 3 weeks. I arrived early to setup computer equipment and help get things going around the place.



I arrived Wednesday and unloaded the server, 10 laptops, associated wiring/network components, and my field gear. More on the setup in the next post when we have internet and the rest of the network up and running.

The first night here the freshman field trip was also at camp, spending the night before departing to Dalhart, TX. We all hooked up the projector, hung a sheet, and had a movie night in the dining hall (complete with popcorn). The movie was 2012, one of the better geological comedies if you ask anybody there.

The camp site is beautiful and my cabin is at the top, affording the best view. This view comes at the price of walking a VERY steep trail, and at 6,200 ft. it's easy to get a bit winded. After a couple days it is not a problem though.




So far the weather has been very cool and rainy in town, but fairly dry up at camp. It's hit freezing at night making a sleeping bag necessary in the cabins. The peaks off in the distance are still snow covered, but today were obscured by rain shafts.




Stay tuned for a tech update tomorrow and then the arrival of the rest of the crew on Sunday. The next few weeks should brings lots of interesting field work and interesting results.


- Posted using BlogPress from my iPad

Location:Silverado Ct,CaƱon City,United States

Thursday, January 13, 2011

Surviving a Crash - The Black Box Then and Now

After an airliner crashes there is a search for survivors (of which you have about a 1:100 chance of being among) and the search for the ever important in infamous 'black box'.  The black box records critical flight data that helps accident investigators determine what caused the crash and if there are problems with the airplane model that need to be corrected.  This was the case of the stripping jack screw in the tail of the MD-83 that caused the crash of Alaska Air 261 in 2000.  The black box has undergone many transformations over the years, but it has always had to be a durable machine that can preserve data through  the dramatic forces of a crash, water immersion, and inferno like fires of jet fuel and airframe materials.

Some of the earliest flight data recorders used photographic film rolls that had lines exposed on them by light reflected of sets of mirrors.  The mirrors were deflected different amounts according to aircraft parameters resulting in a 'strip chart' on the film.  This was easy to develop, but was only a one time use as the film had to be replaced after exposure.  The first data recorders just recorded a few simple channels of data and were common only on test flights due to their cost.

Later black boxes, like the one featured in the video below, used metal strips with the data scratched into the metal by a sharp stylus.  These records survived the fire and shock much better than film, but were still single use.  Keep in mind this is still all done with 'old fashioned' technology as there was no solid state memory in these days.  The next step was voice recording.  What were the pilots talking about before the crash?

Video on Analog Recorder

In the 1950's spy gadgets were the rage in the intelligence community and they required some of the same properties that aircraft flight data recorder designers desired: compact, durable, simple.  Wire recording was the answer.  Magnetically encode data on a spool of wire and use a ground based playback/decoding system.  It wasn't long before both the flight data and the cockpit voice data were being recorded on the same wire reel.  This reel could be erased and used again.

Modern flight data recorders and required to store at least 88 parameters by law (US) and they are solid state.  There are a few cases where the data has been unreadable to due destruction of the unit, but new units that propel themselves from the crash may solve that problem.  The new recorders also transmit a beacon signal making them easier to find for about a month.  Some of the smart units are even capable of observing when inputs are changing rapidly and collecting data more often as this is when things are likely to go wrong.

The purpose of this trip through the history of the flight data recorder was not only to show the evolution of a remarkable and very useful device, but to show how engineering problems can be solved without a microchip.  Are the recorders now better than those of the film days? Of course, but it required some out of the box thinking to build the mechanical recorders of the early days of aviation.