I am having trouble getting my Raspberry Pi 3 to recognize an i2c device. I have confirmed that the device is hooked up correctly (I've checked the pins several times over, and changed the connecting wires), communicates in the i2c format (both the vendor and data sheet confirm this), and confirmed that i2c is configured correctly on the Raspberry Pi (I am able to use the i2cdetect -y 1 command without error).

I am now attempting to see if there is a hardware issue with the Raspberry Pi. I have read that during an i2cdetect -y 1 command the square wave generated by the pins should be 3.3 V, however when I look at the waveform generated by the Raspberry Pi 3 during the i2cdetect -y 1 sweep the output voltage of the pins was near 1.8 V, at around 40,000 Hz, where as the device's spec-sheet says it operates at 400,000 Hz. (SDA in blue, SCL in yellow)

enter image description here

Are these the correct values for the i2c pins to output? Any help is appreciated.

2 Answers 2


The Raspberry Pi has hard-wired 1k8 pull-ups to 3V3 fitted on pins 3/5 (GPIO 2/3, SDA/SCL).

You shouldn't have any other pull-ups on the bus. Some I2C devices have their own pull-ups, if they are to more than 3V3 they can feed a risky voltage into the Pi.

Measure the voltage in the idle state. It should be 3V3. If it isn't there is something bad going on with the bus.

  • By idle state do you mean the Raspberry Pi not running any commands? If so, both SDA, and SCL, as well as 3.3V are hovering around 0V.
    – Patchwork
    Apr 22, 2017 at 19:37
  • 1
    I mean when the bus is idle, i.e. no active I2C transactions. By default GPIO 2/3 will be high. There is something wrong with your measuring if you are reading a low voltage, or something seriously wrong with your Pi. Try measuring 5V and ground and 3V3 and ground.
    – joan
    Apr 22, 2017 at 19:59
  • Yep. I was grounding my measurement leads to grounds on the oscilloscope, but grounding them to the RPi 3 has solved the issue. Now it's even finding the i2c device! For absolutely no reason. I haven't changed anything, but now everything (regarding i2c detection of this device) works. Thanks for the help!
    – Patchwork
    Apr 22, 2017 at 20:45
  • it reads 3.6 when idle. I connect BARO sensor and ADS1115 & PCA9685. when running the app the voltage of CLK vmin is 0.7 SDA sounds good from (3.5 to 0.1)v.
    – M.Hefny
    Feb 1, 2022 at 3:15

Assuming it is programed correctly there should be no output voltage when off. Depending on your wiring, stray capacitance there can be some voltage but I cannot tell you what it will be. If the ports are on it should be zero for all practical purposes.

When connected to the I2C bus they should be high all the time unless something is sending data. Your trace shows some power line hum, that should not be there. It is probably caused by a bad ground or the scope which should be grounded via its line cord and plug. On your trace any low is caused by some device on the bus turning on. The high's are caused strictly by the pull up resistors.

Looking further into your waveform it is indicating totally inadequate pull up resistors if there are even any which I doubt. Put two pull up resistors one of each connected to 3V3 and the other ends one to SCL and the other to SDA. If this solves your problem there is something going on with your Pi which as I understand it should pull the signals high. If it doesn't try with only one or a different known good device on the bus. Be sure all is at 3V3 and on.

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.