Help Using Sparkfun Accelerometer MMA7361

I hope someone can tell me what I'm doing wrong. I seem to be getting readings from my accelerometer, but the readings never change no matter how much I move the thing around.

I have the sparkfun accelerometer MMA7361 (Triple Axis Accelerometer Breakout - MMA7361 - SEN-09652 - SparkFun Electronics) hooked up to my Arduino Uno.
I'm using the AcceleroMMA7361_v0.8b library from here (http://code.google.com/p/mma7361-library/downloads/detail?name=AcceleroMMA7361_v0.8b.zip&can=2&q=)

When I run the "RawData" sketch included in the library, this is what comes on the serial monitor:

Calibrating MMA7361011..................................................
DONE
x: 519 y: 519 z: 583
x: 519 y: 519 z: 583
x: 519 y: 519 z: 583
x: 519 y: 519 z: 583
x: 519 y: 519 z: 583
x: 519 y: 519 z: 583
x: 519 y: 519 z: 583
x: 519 y: 519 z: 583
x: 519 y: 519 z: 583
x: 519 y: 519 z: 583
x: 519 y: 519 z: 583
x: 519 y: 519 z: 583
x: 519 y: 519 z: 583
x: 519 y: 519 z: 583
x: 519 y: 519 z: 583
x: 519 y: 519 z: 583
x: 519 y: 519 z: 583

Here is how I have the accelerometer hooked up to the Arduino:

**Accelerometer Pin ** Arduino Pin
ST 12
GSEL 10
0GD 11
SLP 13
XOUT A0
YOUT A1
ZOUT A2
GND GND
VCC 3.3V

Any ideas would be greatly appreciated!!!

Did you read the datasheet ?
Did you look at the schematic ?
Post your code.

If you are using a 5V Arduino you need level shifters between the IO control pins. Otherwise, it may be permanently damaged.

I apologize for my newbie-ness, but since I’m running the accelerometer from the 3.3V output on the Arduino I understood that a logic level converter wouldn’t be needed.

I used the AcceleroMMA7361_v0.8b library documentation to find out how to hook up the arduino. It says the Begin method gets the following parameters

void begin (int sleepPin, int selfTestPin, int zeroGPin, int gSelectPin, int xPin, int
yPin, int zPin)

In the example sketch that came with the library, here are the pins in the begin method:

accelero.begin(13, 12, 11, 10, A0, A1, A2);

which is why I hooked up the Arduino the way I described in my first post.

Also, I did my best to read the datasheet (https://www.sparkfun.com/datasheets/Components/General/MMA7361L.pdf) but it looks like the PCB Layout in the Basic Connections section are done on the Sparkfun breakout board.

I’ve been trying to figure this out on my own for hours. I really appreciate your taking the time to help me!

Here is the sketch I’m running:

#include <AcceleroMMA7361.h>

AcceleroMMA7361 accelero;
int x;
int y;
int z;

void setup()
{
  Serial.begin(9600);
  accelero.begin(13, 12, 11, 10, A0, A1, A2);
  accelero.setARefVoltage(3.3);                   //sets the AREF voltage to 3.3V
  accelero.setSensitivity(LOW);                   //sets the sensitivity to +/-6G
  accelero.calibrate();
}

void loop()
{
  x = accelero.getXRaw();
  y = accelero.getYRaw();
  z = accelero.getZRaw();
  Serial.print("\nx: ");
  Serial.print(x);
  Serial.print("\ty: ");
  Serial.print(y);
  Serial.print("\tz: ");
  Serial.print(z);
  delay(500);                                     //(make it readable)
}

I looked through the data sheet and could find nothing to suggest that the logic inputs of the MMA7361 are 5 V tolerant . The outputs of a 5 V Arduino are 0 or 5V (approximately). It is safe to assume that the accelerometer won’t work correctly or could be damaged if its logic inputs are connected to the Arduino outputs, without a level shifter.

However, you don’t need to do so. Just connect the logic inputs (g-Select, /Sleep and Self Test) to +3.3V or ground, as appropriate. If you want 1.5 g sensitivity, those connections would be /Sleep = 3.3V, Self Test = ground, g-Select = ground.

You probably don't actually need most of those connections to the device. Just connect them to power or ground according to what the datasheet says.

Also, I did my best to read the datasheet

What exactly does that mean ?
Page 3 of the data sheet clearly shows the Operating voltage as 3.3.V. You say you are powering it from 3.3V output of arduino but ALL the OTHER pins from the arduino which is running on 5V are still connected to the device . Either you are not understanding
what all this means or you are ignoring it. You cannot connect ANY of these pins directly to an arduino running on 5V:

sleepPin (pin-7)
selfTestPin (pin-13)
zeroGPin (pin-9)
gSelectPin (pin-10)

If you do not know how to perform the level conversion then you need to ask.
There are several different chips that can be used and in some cases a simple voltage divider will suffice.
74HC4050
74LVCH245A
CD4050
TXB0108

Either you are not understanding
what all this means or you are ignoring it. You cannot connect ANY of these pins directly to an arduino running on 5V:

Quote

sleepPin (pin-7)
selfTestPin  (pin-13)
zeroGPin  (pin-9)
gSelectPin  (pin-10)

Well, you CAN. None of those 4 pins actually needs to be changed to use the device. You connect them either 0 or 1 depending on what you want to do. For 0, connect them to ground. For one, connect them to the 3.3 V pin on the arduino board. None of those pins actually needs to be connected to any pin of the Arduino which is going to try to put 5V into it.

Well, you CAN.

Well I can't argue that. I just didn't expect that the OP would not want to use any of the those pins. If he had stated that he had no intention of using them I would have made the same suggestion . I normally don't start out by telling the OP he should disable some features of a chip he paid for.

Perhaps if you understood what those pins did, you would realise that for any normal use, you would not want to use them.