[chuck-users] Calculating Motion with Accelerometers

Christopher Graham chrisgr99 at gmail.com
Tue Apr 22 09:12:15 EDT 2008

I don't think it's possible for the single sensor approach to detect
rotation about the gravity vector.  During a pure rotation of that
type none of the outputs from the sensors change.  At best a single
accelerometer can theoretically give 5 degrees of freedom, although
deriving motion in space from double integrating acceleration is only
reasonably good for short-time movements.  It needs to be frequently
recalibrated by source of absolute information such as the optical
sensor on the Wii or a gyroscope.

As an alternative to a pure accelerometer approach, here is a chip
that is, or soon will be, available from Gyration that combines an
accelerometer and a gyroscope on a single chip, along with a built in
processor to convert the data to position/motion data.  They use it in
their pointing devices and mice so the price should not be too high.


I am working with acceleration/position sensing in the development of
a new wind instrument family of products (see www.multiwind.com ).
The current version, soon going into alpha testing, includes a 3-axis
accelerometer chip of the type in the Wii along with a variety of
other sensors including breath pressure.  All sensor data is available
through OSC.  I've been testing it with several OSC applications
including ChucK.

- Chris

On Mon, Apr 21, 2008 at 10:59 PM,  <Inventor-66 at comcast.net> wrote:
> Regarding methods for caclating motion with accelerometers:
>  For the two sensor approach, you subtract the two linear accelerations to get an angular acceleration, and I believe you also divide by the distance between them.  Then you integrate to get angular velocity and integrate again to get angular position (orientation).  To get the X, Y, Z position you just pick one of the sensors and integrate to get velocity then integrate again to get distance.  Now that I think about it, you'd have to remove the gravity vector by taking the high-pass filter of the acceleration with a low cutoff frequency first, or else by subtracting it off.
>  The "trick", as i understand it, is to take advantage of the gravity vector so you only need one sensor.  In this case you low-pass-filter the acceleration to get it's "DC" or "near-DC" component, which should give the orientation vector.  Then you high-pass-filter the acceleration to get it's X, Y, Z component and integrate twice to get distance.  It's a touchy sort of trick that requires tweaking and yes, it probably doesn't do so well with sudden motions.  I'm not sure how well either would work, but I'm going to experiment and give it a try.
>  Les
>  (Inventor)
>  _______________________________________________
>  chuck-users mailing list
>  chuck-users at lists.cs.princeton.edu
>  https://lists.cs.princeton.edu/mailman/listinfo/chuck-users

More information about the chuck-users mailing list