# Problem with Polulu 3-Axis Accelerometer (MMA7341L)

I am using the analog pins on my arduino, and have the 3v3 regulator from the accelerometer connected to the aref pin and have set the analog reference to external. I am using the fact that according to the polulu site and the datasheet there is 440mV per g in 3g mode which is what it is set to by default and what i have left it at. I have also measured the 3v3 voltage regulator on the accelerometer with all the outputs connected and measured exactly 3.291V. So in my code I have the calculations go like this: (analogRead() - 511.5) / ((0.44 / 3.291) * 1023)). 0.44 being volts per g, 3.291 being reference voltage and 1023 being the resolution of the ADC. I have the -511.5 because the 0g output voltage is centered between ground (0V) and aref (3.291). This gives me values of -0.02g for y, 0.13g for x and 0.83g for z. This is while the accelerometer is very close to being perfectly flat. Am i doing something wrong or is there something wrong with my accelerometer? Ask me if i left anything out.

The zero point output and the mV per G are all nominal values. The datasheet will tell you how far off from nominal they can be an still be in spec. You should calibrate the zero and the sensitivity values for all three axes of your particular unit.

And expect those values to also be somewhat temperature sensitive. The datasheet will tell you about that, too.

I have looked att he speced maximum and minimum V/g and my measurements are still way off. Do you still suggest just calibrating it as it is?

aidan_aidan:
I have looked att he speced maximum and minimum V/g and my measurements are still way off. Do you still suggest just calibrating it as it is?

I would start with the raw analog readings. Look for max (1G) min (-1G) and average (0G) values for the three axes. Convert those numbers to mV and check those numbers against the specifications. Perhaps your chip is in a different range or your math is coming out funny.

I will do this. I don't think its a range issue as the only range options for this chip are 3 and 11 g's. 11's would be waaaay off so i am confidant it is set to 3g mode. As for my math i suppose it could be wrong but i have checked it a ton.