Accelerometer is a Go

Sunday, November 25, 2007

 

I’ve added a low-power 3-axis accelerometer to my mocked-up watch.  This sensor measures tilting and shaking motions and can be used for a variety of things.


For games, the sensor will measure tilt and can act like a joystick. But, because it’s inside the watch, there is nothing to break nor look ugly. I had the Pac-Man watch as a kid (the version with a joystick) and it came with 4 detachable replacement sticks because they figured you’d break or lose them.


The accelerometer can also be used to save power and extend battery life. In some modes, you might want to shake it to turn on the display. Or, positioning the watch in a certain position (like arm outstretched in front of you rather than at your side) might turn on the display... David Forbe’s Nixie Tube watch does something like this. Lastly (my favorite), the accelerometer could be used to put the watch to sleep at night simply by setting it face down.


Here’s all the gory details on the part that I’m using:

Analog Devices ADXL330 3-axis +/-3g MEMS Accelerometer Datasheet


The highlights are:

  1. •It is incredibly small (4 x 4 x 1.45 mm)

  2. •It takes very little current (320uA, or about 1/10th of my power budget)

  3. •It’s really simple to use: give it power, and it outputs 3 voltages, each representing one axis.

  4. •It’s moderately priced - about $8 - $9 in quantities of 25-100.


The good people at Sparkfun make a breakout board that allowed me to connect up to this surface-mount part easily.


So, 320uA doesn’t sound like a lot of current -- it would run for a year on a pair of AA batteries, or two weeks with my smaller watch battery.  But, I’d still like to save as much power as I can, so I’m making it so that I can turn it off when not needed.  During games it’ll probably be on all the time, but while it’s sleeping it might only check once a second to see if it needs to wake up.  Normally a power switch like this would require an additional transistor, but since this chip is such low power, I can use one of the microprocessor’s data lines.


I improved the original version of the code (seen at the top of the post) with a bar graph:



The missing dot in each line indicates the acceleration in each axis. The X & Y axis are relatively flat, so they are near the center (0 g). The Z axis is sitting upright, so it’s registering the gravitational acceleration from the earth -- +1 g. If the part were upside down, the dot would be on the left instead of the right.



Bonus #1 - Check out this design study for a pong watch by design student Lysandre Follet:



(click to see animated version)


It looks good, if I do say so myself :-)  But, alas, it’s just a study... putting it in to production might result in some compromises.

Bonus #2 - What’s up with “Secret Code Name” text on the screen?  I’ve got a name for this second version, but it’s still hush-hush :-)

 
 
 

next >

< previous