I just got the ADXL345 accelerometer module. I tried everything I could find online but I can't get it work. Here's how I connect the pins to the arduino uno:

ADXL345    ->     ARDUINO
  VCC               3.3V
  CS                3.3V
  GND               GND
  SDA               SDA
  SCL               SCL

I also use 2 10kOhm resistors from SDA, SCL to 3.3V on arduino. I tried both Adafruit and SparkFun ADXL345 libraries but it doesn't work. Using Adafruit library it says that no adxl345 is connected. I tried to connect SDO to 3.3V pin and then it stopped saying no adxl345 is connected but still didn't work (no x,y,z values displayed). Then I tried SparkFun library without connecting SDO to 3.3V (because it failed) and all I got was 0, 0, 0. I literally tried everything I could find from videos, tutorials, etc. I don't know why it doesn't work. What am I doing wrong? I already ordered the MPU6050. Is it any better?

2 Answers 2


As far as my experience goes you donot have to connect it to pulldown resistors. If using a 5v Arduino, simply connect it like:

VCC --> 5V (Arduino)
GND --> GND (Arduino)
SDA --> A4 or SDA (Arduino Uno has dedicated I2C pins beside AREF pin)
SCL --> A5 or SCL

This is all you need. As although the ADXL345 is a 3.3v MEMS, its module comes with a 5v to 3.3v converter and also goes through its startup procedure (Refer datasheet) for you.
As for the library you can use this one here
Also you can refer this article for detailed usage here
And I hope next time you put in some more research and then buy a new part.


SDO should be tied to ground, not 3.3V. That puts it into I2C mode.

VDDIO, VS and CS all need to be on 3.3V.

To communicate with an Arduino at 5V you really need a 5V -> 3.3V I2C level shifter. I use the PCA9306DCUR.

  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Nick Gammon
    Dec 14, 2016 at 6:27
  • The ADXL345 module already has a level shifter. Aug 11, 2021 at 10:26
  • @SupragyMishra How do you know? No specific module has been specified, only the chip that is on the module.
    – Majenko
    Aug 11, 2021 at 10:40
  • Most modules ship with a shifter and note that he refered VCC not Vdd (digital supply) and Vs (supply voltage) Aug 13, 2021 at 8:11
  • @SupragyMishra A module having a voltage regulator (common) does not mean that the module has a logic level translator (rare). The Adafruit one is the only one I have found that has a level translator. All the others don't. VCC and VDD don't imply any voltage. One is the collector voltage (from the old TTL days) and the other is the drain voltage (CMOS terminology). Nothing there implies any voltage.
    – Majenko
    Aug 13, 2021 at 10:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.