inconsistant readings from accelerometer MMA7260QT

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.

Jin, you totally called it.

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.

example readings while still and level:

3v to the 3.3V
X-Axis : 360(359) Y-Axis : 343(344) Z-Axis : 177(177)
X-Axis : 358(359) Y-Axis : 342(343) Z-Axis : 179(177)
X-Axis : 359(359) Y-Axis : 343(343) Z-Axis : 178(177)
X-Axis : 362(359) Y-Axis : 348(343) Z-Axis : 178(177)
X-Axis : 358(359) Y-Axis : 346(344) Z-Axis : 178(177)
X-Axis : 360(359) Y-Axis : 346(344) Z-Axis : 178(177)
X-Axis : 357(359) Y-Axis : 345(344) Z-Axis : 179(178)
X-Axis : 362(359) Y-Axis : 343(344) Z-Axis : 178(178)
X-Axis : 359(359) Y-Axis : 343(344) Z-Axis : 175(177)
X-Axis : 360(359) Y-Axis : 343(344) Z-Axis : 178(177)
X-Axis : 358(359) Y-Axis : 343(344) Z-Axis : 177(177)

5v to the VIN
X-Axis : 358(344) Y-Axis : 358(361) Z-Axis : 183(156)
X-Axis : 363(344) Y-Axis : 362(361) Z-Axis : 179(157)
X-Axis : 347(345) Y-Axis : 360(360) Z-Axis : 174(161)
X-Axis : 352(344) Y-Axis : 364(364) Z-Axis : 158(162)
X-Axis : 331(344) Y-Axis : 363(363) Z-Axis : 148(160)
X-Axis : 357(346) Y-Axis : 336(359) Z-Axis : 170(163)
X-Axis : 376(352) Y-Axis : 346(356) Z-Axis : 158(164)
X-Axis : 339(352) Y-Axis : 370(357) Z-Axis : 149(164)
X-Axis : 367(354) Y-Axis : 357(357) Z-Axis : 158(161)

thanks heaps

oh yeah, hook to the AREF point. That is a good idea too, and suggested by their docs.

Don't forget to add a capacitor (about 1uF) from AREF to ground as close to the Arduino as you can. That will help stabilise readings as well.