2

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

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.

|improve this answer|||||
  • 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 '17 at 19:37
  • 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 '17 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 '17 at 20:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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