Saturday, April 17, 2010

Faking Earthquakes - Live IMU data

Adelaide had a very small tremor on Friday and the "scientists" are using statistics to say a stronger one is on the way. Well that is cause for concern indeed, let's get paranoid and install personal seismographs in all our houses in addition to the bushfire, flood and tsunami alert systems.

At this week's hackerspace I tried to stabilize the video stream from the BeagleBoard and push it out to the web via gstreamer, with limited success. I was recommended to use FluMotion. I will push out over USB net from the beagleboard, aggregate on a secondary server and publish via flu. Still kernel lockups when reading the webcam are annoying.

I also finally managed to get the 3DM-GX2 reading done with Python-Pyserial. This provides fun ways of automated testing on the rig i.e. measuring mechanical properties by driving the motors with certain speeds while talking to the Arduino on serial and recording IMU data. I have both logging and live display working. The live without caching has lower sampling speeds since I haven't threaded the sampling separately from the display, but at least the graph updates as I move the IMU about. So here are some pylab plots.

Note the red curve settles at -1g, this is equal to the gravitational acceleration. Wonder what it will record at high altitudes. May be it can used as a gravity based locator system in GPS denied under-water scenarios. The live graph uses a wxPython backend for matplotlib and samples very slowly.

Final word - with proper sensitivity and stable mounting points you can build yourself a seismograph with an IMU.
Post a Comment