I am trying to pull readings from an accelerometer into the arduino, but i seem to get inconsistent and wildly changing results.
I am using the MMA7260QT on a breakout board from pololu (on the advice from another poster, thanks!) because it has a built in voltage regulator.
i'm sending 5V into VIN. i am getting readings into the arduino on analog in 0,1,2. So at first, at rest on the level, i got this:
x = 280 , y=280, z=105
these are averages, because the reading fluctuate up and down a lot, like by > 20 from reading to reading. and this is at rest. so much so, that my software keeps a running average to use instead of the instantaneous readings, because they are too volatile.
but right now, at rest, im getting
x= 350, y=340, z=170
Since the voltage to the MM7260 is regulated to 3.3, the voltage shouldnt be affecting the readings.
So, has anyone else experienced this? Are teh reading normally so volatile? I don't think gravity is changing in my location. Do I have a bad chip? Did i damage it?
thanks. Once i get this working i'll post all my code and project notes.
Did you change anything between readings? The expected output using the ADC without using AREF should be ~338 for zero g (X, Y axis) and ~297 for -1g (Z axis) at the 6g setting (1.65V/5V1024, and (1.65V-.2V)/5V1024. You seem to be reading only -.84g on the Z axis.
I've only used the Freescale 1 axis 50g accelerometer, but my readings were pretty consistent, although they had to be calibrated.
You may want to feed the 3.3V output of the breakout board into the AREF pin to get full range on the ADC, as you're only using about 2/3 of the range at 5V.
According to the specs on the breakout board, i could use 5v to the VIN connection because it has a voltage regulator to drop it to 3.3. But i switched and powered it with the arduino 3v to the 3.3V connection, and now the readings are much more stable.