accelerometer jitter

Joel Newkirk freerunner at newkirk.us
Sun Sep 21 02:14:25 CEST 2008


On Sat, 20 Sep 2008 23:08:42 +0100, Al Johnson
<openmoko at mazikeen.demon.co.uk> wrote:
> On Saturday 20 September 2008, Joel Newkirk wrote:

>> With my Freerunner sitting flat, face up, on the concrete slab of my
> house,
>> the 'Z' reading (positive Z is toward the back of the handset, BTW)
>> fluctuates between 51 and 56. (X and Y range from -1 to 2)  That's a
>> variance of +/- 5%, and I'm fairly confident gravity isn't fluctuating
>> significantly... ;)
>>
>> Is that to be expected, is my Freerunner defective, or am I doing
> something
>> wrong?
> 
> What does the datasheet say about noise levels? You're looking at +/-5%
of
> reading but +/-1% of full scale which isn't implausible for a cheap
> accelerometer.

I can't find the relevant answer on the datasheet.  It has some bar charts
of "percent of parts" vs "sensitivity [mg/digits]" at 2.5v on page 37, but
I can't understand what exactly they're plotting. :(

>> I'm trying to develop a simple tool that will determine 'down' based on
>> output from the accelerometer, and indicate deviations from various
>> 90-degree orientations - will I need to massage the data further to
> ignore
>> variations, should I be averaging several readings, or what?
> 
> Underspecified ;-) How accurate does it need to be? Is the phone expected
> to
> be stationary or moving? Is power consumption important?

Sorry. ;)  Near-stationary, power consumption immaterial, as accurate as
possible.  As a project to get my feet wet doing ground-up development
(probably Python, which I need to learn) for the Freerunner (instead of
just cross-compiling and fixing issues therein) I wanted to write a
software 'bubble-level' tool. Laid flat on a surface you see a bubble,
off-centered as a 'real' bubble-level would be to indicate pitch. More
generally, held with the side or back against a vertical or horizontal
surface to display an indication of how close to level (or vertical) the
surface is.  Lots of incremental additions and changes possible, like
adding audio indication when level is achieved, interacting with DBus or
what-have-you instead of reading sysfs, etc, making it an educational
process on the specific environment of the Freerunner.  So for the initial
basic functionality averaging several samples over the course of a couple
seconds works fine, but later refinements would benefit from more accuracy.
(also actual implementation could attend to all three axes, not just look
at one, which might help or hinder in this application, not sure)

j






More information about the community mailing list