8 Replies Latest reply on Jun 29, 2016 6:20 PM by Intel Corporation

    Adxl 335 aceelerometer sensor connectivity with Sparkfun adc block.

    Rahul_Jidge

      Hello,

           I working on a project that takes analog input from the accelerometer. I am using ADXL 335 accelerometer and Sparkfun ADC block to get values on Edison. I am not able to read accelerometer values or getting garbage. My circuit connection is followed:

       

      pins on ADXL 335 sensor:

      -     Vcc pin  to 3.3v  from battery

      -      GND pin to ground of battery

      -     X pin to  AIN0 on adc block

      -     Y pin to  AIN1 on adc block

      -     Z pin to  AIN2 on adc block

       

      pins on Sparkfun adc block (pins from bottom to top):

      -     GND pin to GND from battery

      -     AIN0 pin to X pin on ADXL 335

      -     GND pin to GND from battery

      -     AIN1 pin to Y pin on ADXL 335

      -     GND pin to GND from battery

      -     AIN2 pin to Z pin on ADXL 335

      -     AIN3, GND pins are left floating.

       

           I'm used library like:

           1. GitHub - sparkfun/SparkFun_ADC_Block_for_Edison_CPP_Library: C++ library and example for using SparkFun's ADC block for … 2

           2. SparkFunEdisonADC/C++ at master · humberto-garza/SparkFunEdisonADC · GitHub

       

           First, library showing me the output result as -1 for function getRawResult(0); and second library pulling some random value which am I believing garbage.

           I want help in to

           1) correct my sensor to Sparkfun adc block connection, if wrong.

           2) correct the code I'm following, if wrong.

           3) any other references that help me to study correct myself what I am doing wrong.

       

       

      Thanks in advance

      Rahul