Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

I2C and MMA8452/MMA8451 accelerometer

$
0
0

Still new to embedded programming and I am trying to use the MMA8452 accelerometer (datasheet) on SparkFun's breakout board (link).  I programmed SparkFun's example program (link) into the MSP430G2553 via Energia with no issues and plotted the serial data in Excel.  However this data, for lack of a better word, was "noisy."  There would be huge spikes in the data even though the device was sitting still.  Sometimes the WHO_AM_I value would be reported incorrectly as well.

 

I found out the board shipped with 10k pull ups so I dropped them to the recommended 4.7kΩ resistors and the problem persisted.  When I tried to investigate the SCL and SDA lines with my oscilloscope, the problem would disappear and the data would be a pristine flat line (as expected). That told me the scope probe capacitance was actually helping the circuit and rather than decrease resistance I should increase resistance.  That seemed very counter intuitive to me, but I followed the data and changed pull ups to 15k.  The problem disappeared and the data was clean.  I was using short leads with and without a breadboard.  The jumper to the Green LED was also removed from the SCL line.

 

Being required to have 15k pull ups on the I2C bus seems wrong to me especially since the datasheet recommends 4.7k.  Am I missing something?  I am not well versed in I2C and Freescale's tech support has been less than helpful.  I did order a MMA8451 sample and swapped it on SparkFun's breakout board and had the same problem.  So I know the problem was not specific to that MMA8452.

 

Other I2C devices (like the BQ32000) work fine.

 


Viewing all articles
Browse latest Browse all 2077

Trending Articles