I ordered an accelerometer from Sparkfun and a data logging shield from Adafruit with the idea of building a little seismograph. Here's what it looks like so far, in a professional-looking case:

G-Meter in Box

After building the data logging shield, I successfully got it running using the example on Adafruit's tutorials page for the light and temperature logger. This was pretty simple but I'd probably do the connectors differently next time so I could "layer" it like a regular Arduino shield. As it is I installed female pin headers instead of soldering directly to the board.

Next came setting up and testing the BMA180 accelerometer. I found some code that allowed me to interface the BMA180 using the I2C interface and Wire Arduino library. Initially I thought I had overwritten the factory default offset settings but after looking at the register dumps and reading the datasheet (and reading it again (and again)), I think the factory defaults are still there.

The first runs used the I2C interface, but this was actually pretty slow. The self-test cycle, for example, is supposed to collect about 10-15 samples in 10 mSec, and with I2C I was able to get only a couple of reads. 

I then switched to SPI, which was considerably faster but required some work to get the BMA180 to cooperate with Adafruit's RTC chip (I2C) and the SD card (SPI). Once I had this running I got a few hundred reads in 7 mSec - more than fast enough. SPI had me stumped for a couple of days but more readings of the datasheet cleared things up.

The first trial was to plop it on the floor of the car and drive around. This past week I had a good opportunity as I had to run a bunch of errands one afternoon. The data:

Vibe G Data

I like gnuplot. It's way powerful but relatively easy to get simple plots. MacPorts is only running 4.4, but it's probably good enough for me. Anyway, you can see that the Z axis is about -1G as the sensor is mounted upside down on the breadboard. There are two choices when soldering on the header - you can set it up to make it easier to read the connections, or easier to read the axis positions. (The flip side of the board has the axes silkscreened on it - note to Sparkfun. Might be helpful to put the axes on both sides.)

You can see the periods of time when the car was parked and when it was driving. If I thought about it I could probably figure out the 3-axis rotation of the sensor - it's obviously not oriented perfectly level at rest as Z isn't -1.0 and X and Y aren't 0.0.

For some reason I was unable to set the range using the SPI interface, so I switched back to I2C and it seemed to work. I wrote an Arduino library (probably post this later) to bring together the various bits of code I'd worked out in prototype cases. Once I got the range setting right I decided the next experiment…

How many gs do your clothes feel on the spin cycle in the washing machine?

I'm sure you always wanted to know. Well, it's more than 16gs:

Washing Machine Spin Cycle G Data

My father-in-law the physics professor predicted more than 16gs (I must admit I forgot his estimate but it was based on 1f radius and more than 100rpm, values that seem quite reasonable.)

The offsets seem a little wonky - the initial value of -7.5g in the Z axis is really weird. Offsets in the BMA180 are just added in after the measurement, so I'm wondering if they're really only valid for the default 2g range setting. One LSB is a greater value for a range of 16g than 1g. You can turn off applying the offsets, so that's the next thing to try.