How to use an NXP Accelerometer in a circuit

Thread Starter

Alexander Hamilton

Joined Oct 9, 2016
5
Hi all,


I am a software developer but new to hardware development. My buddy and I are working on a project that requires us to connect an NXP Semiconductor Accelerometer to a micro controller. My goal is to print the data received from the accelerometer. I don't need any help with the code but I need help connecting the accelerometer. It doesn't seem to be outputting anything. The data sheet for the accelerometer is in the link below. Can someone please give me some advice as to how to hook this up? Thanks!


NXP Accelerometer Datasheet: http://www.nxp.com/files/sensors/doc/data_sheet/MMA8453Q.pdf
 

Thread Starter

Alexander Hamilton

Joined Oct 9, 2016
5
Well I have the accelerometer's VDD connected to the microcontroller's 3v3 pinout with a 30K resistor, the GND to GND, and the SDO to the D2 pinout. And no i don't have an oscilloscope
 

OBW0549

Joined Mar 2, 2015
3,566
It also says it can be down to 6uA so wouldn't that be around the right amount of resistance?
The "right amount of resistance" is NONE. Just connect the accelerometer's Vdd pin to the 3.3V supply, as in the Application Diagram in Figure 4.

The 6 μA to 165 μA current consumption spec in the data sheet merely tells you how much operating current the accelerometer takes.
 

Thread Starter

Alexander Hamilton

Joined Oct 9, 2016
5
Alright I did that but it's still not outputting anything besides 0's. Do I have everything else connected correctly? I thought I might to have to do something with the VDDIO but I'm not sure what. The data sheet says, "
External pullup resistors connected to VDDIO are expected for SDA and SCL."
 

bertus

Joined Apr 5, 2008
22,278
Hello,

VDDIO is the supply voltage for the IO stage.
When you want it to be the same as VDD, just connect them together.
The pull-up resistors on the SCL and SDA are needed for the outputs.

Bertsu
 

sailorjoe

Joined Jun 4, 2013
365
AH, I've had a similar problem before.
1. Make sure your microcontroller has am I2C interface. It's a two wire interface, one line is data (SDA), the other is clock (SCL).
2. Connect to your microcontroller exactly like shown in Fig 4 of the data sheet. But before you do that, make sure the voltages for power from your microcontroller do not exceed what you NXP can handl, 3.3 V, I think.
3. Make sure to add pull-up resistors to both SDA and SCL. http://www.ti.com/lit/an/slva689/slva689.pdf
4. Make sure you're using a good I2C driver in your code. Lots of libraries available for free.
5. Make sure you know the device address, and use that in your software. Be careful of decimal and hex.
6. Make sure your initial commands to the device, over I2C, are used to configure the device to start up and configure so it begins to take samples. This may take writing to six different registers.
If you have an oscilloscope or logic analyzer, you can watch the SCA and SCL lines and see if your mc is sending and if your NXP is responding.
By the way, what microcontroller are you using?
 
Top