Accelerometer stuck at high state

I recently brought an accelerometer and it isn't showing up when I use an i2c scanner. I tested the values that the arduino and accelerometer were transmitting with each other and found that it was constantly displaying 5/3.3v rather than switching down to 0v to display a binary number. Any ideas on why the voltage is stuck at high and maybe if this has something to do with it not showing up on the scanner?

One possibility is that you have connected a 3.3V accelerometer to a 5V Arduino without using level shifters, and destroyed it.

For informed help, please read and follow the instructions in the "How to get the best out of this forum" post.

I did that but then I purchased a level shifter and a new accelerometer.

Any other ideas?

Yes. You may be using the wrong pins on the Arduino Uno R3.
The Arduino Uno R3 shows no i2c on pins A4 and A5.
Try using the SDA and SCL pins by the USB connector.

Not correct. The pins near D13 are a duplicate of A4, A5.
Both sets connect to the same two I2C pins of the MCU.
Leo..

1 Like

Supply some actual infomation. First, read and follow the instructions in the "How to get the best out of this forum" post.

Have you run the i2c scanner sketch? Does your device show up there?
https://playground.arduino.cc/Main/I2cScanner/

Edit: If it doesn't, two choices:

  1. Bad connection on power, SDA, SCL, and/or GND.
    or
  2. Device failed.

If I failed to mention, all devices must share a common ground.

Hi, @mattymoki

Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.

Can you please post some pictures of your project?
So we can see your component layout.

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

Yeah, I think the problem is definitely that the pins are just floating, and it is displaying 3.3V because of pull ups.

I2C pins are HIGH most of the time, so measuring 3.3volt with pull up to 3.3volt is normal. The pins are only LOW during the very short time that data is exchanged, which you can only see with a scope.
Leo..

Thanks Leo!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.