IOError: [Errno 121] Remote I/O error
i2cdetect -y 1 get 0x53 OK. i2cget -y 1 0x53 0 got 0x2a OK, i2cget -y
1 0x53 4 got 0xff OK. Voltages across SCL and GRD showed -3.3, SCK and
GRD which also showed -3.3
How to proceed further?
Ah, I have been playing with I2C for almost one hobbyist year now, and I always get the above "Error 121 Remote I/O Error" message. Now first let me list some common causes.
"i2cdetect -y 1" is a helpful, but preliminary, and very forgiving test. It only confirms that your hardware setup is "more or less" OK. (I guess it just pings, or reads, and not writes.)
"i2cget ..." is reading something OK, but have you also tried "i2cset" to write something and then read it back (to make sure if you actually have written something successfully?).
If you are using a multimeter to check the power and signal line idle voltages, showing roughly around 3V, it means again only "more or less" OK. If you use a scope to display the wave forms when repeatedly reading and writing at say, I2C 100kHz, you may find the signals distorted, for many reasons, including those listed below.
Rpi I2C signal/data pins built in pullup is 1k8. Most sensors/converters almost always have their own pull ups, usually 4k7, but may be as weak as 10k. The problem is that even 10k, not to mention 4k7, in parallel, would strength 1k7 to even stronger, causing problems such as GPIO pin over current (3V/1k is already 3mA, which Rpi might not like that much). If you place more sensors on the I2C bus, then the problem worsens, see more details below.
If your connecting wires are longer than 15cm, then they are antennas picking up nearby 50/60Hz mains EMI waves, which might also cause trouble.
There are perhaps a couple of more trouble making causes I forgot. Perhaps I would update later.
Quick and dirty, but not perfect remedies
Some experiences to share:
I almost never use Rpi's built in SCL/SDA signals. I use TXS/TXB/02/04/08 logical level converter to level shift, but at the same time buffer/boost/isolate. Those TXS/B chips are designed to help strengthen weak I2C signals, so they are good, though not perfect, especially if you are using long wires (me over 1m), where you need I2C extenders (Google SparkFun's suggestions).
Even using TXS buffers, you still have the I2C pullup overloading problem. What I usually do when first using any I2C device, is remove the device's built in pullups. This is almost an immediately cure, when I got the Error 121, remote IO error. You may like to google around to see the pictures of how other happy guys removing their I2C chips built in pull ups and problem solved.
There are more things I did but forgot now, perhaps I would update later.
PS - Not too long ago I was trying to place 4 I2C ADS1115 ADC chips on the bus. I immediately got the 121 remote io error. The lazy hobbyist knew where was the problem, so removed one pullup, but the error did not go away. So the lazy guy removed one more, and then one more, until all pullups were removed, then everybody was happy, and the error 121 remote IO error disappeared. But the error kept coming back intermittently. The lazy guy finally found that just using one sensor is best, two is still OK, more than three then error comes up often.
I am still struggling with this nasty I2C 121 error problems, so my quick and dirty answer might not that helpful. But I have been googling hard these couple of months without much luck, because problem is a bit subtle, ... :(
/ to continue, ...
A Guide to Voltage Translation With TXS-Type Translators - Application Report SCEA044 – 2010jun
Effects of External Pullup and Pulldown Resistors on TXS and TXB Devices - SCEA054A – 2018mar
TXS0108E 8-Bit Bi-directional, Level-Shifting, Voltage Translator for Open-Drain and Push-Pull Applications TXS0108E SCES642E – 2018feb
TXS0104E 4-Bit Bidirectional Voltage-Level Translator for Open-Drain and Push-Pull Applications - SCES651H – 2018may
Maximum I2C Bus Length? - electronics.stackexchange.com
NXP SMSbus Guide
The I2C Address List by Lady Ada - last updated on Apr 28, 2019.
The I2C Address List by Lady Ada - hightlighted by tlfong, 2019apr28
Using I2C extender to entertain more I2C devices