News:

The Savage///Circuits website has been upgraded to a more efficient theme.

Main Menu

I2C Headaches Using Inexpensive Breakout Boards

Started by Chris Savage, Jun 17, 2025, 01:38 PM

Previous topic - Next topic

Chris Savage

When using Accessory / Sensor / Control boards like the APDS-9960 mentioned in this thread, a common theme that really drives me crazy is the I2C pull-up resistors; typically 4.7KΩ on the SCL / SDA lines. While these resistors are required for proper operation on the I2C bus, the inherent problem is that every board tends to have these resistors.

These breakout boards are designed to make it easy for you to experiment with these, often SMD sensors and other devices. So the board has all the caps and resistors you would normally use in a typical circuit. The problem is, especially for Arduino users (who typically use these breakout boards for projects), is that when you're trying to same I/O pins by putting ALL the I2C devices on the same bus (two pins), what you end up with is too hard of a pull-up on the lines when using multiple devices, which is what I tend to do.

If you're at all familiar with parallel resistance, you can see where / how this can become a problem for the bus. I've often had to desolder these tiny SMD resistors from the board to remove them. Some boards, including the aforementioned APDS-9960, have the ability to disable the pull-up resistors, in this case by cutting a pad. Not everyone knows to (or knows how to) do this, or it's not clear to them to do this.

For Arduino, I have I2C OLED displays, ADCs, DACs, Sound Boards, Sensors, etc. I usually connect them ALL to the same SCL / SDA lines to save I/O, as intended. You really only need one set of pullups for a bus; 4.7KΩ on the SCL line to VCC and 4.7KΩ on the SDA line to VCC. It's just something to be aware of when you're using a bunch of breakout boards with an MCU. Be aware of which boards provide the I2C pullups and disable the ones you don't need, either by cutting traces or desoldering the resistors.

                    Bringing concepts to life through engineering.

zappman

One other thing to take into account with I2C is the "Voltage Level".

From: https://www.i2c-bus.org/voltage-level/

Voltage Level:

In the beginning the I2C bus focused on 5 volt logic. With the I2C specification 2.0 released 1998 the possible I2C reference voltage was decreased to 2 volt.

Since the I2C bus lines are used bidirectionally, interfacing I2C devices with different voltages is not straightforward, special level-shifting devices are necessary for this purpose.

Moving down the voltage scale, Things to consider when working with low voltage I2C systems:

When I2C was first introduced the typical electrical VCC level of electronics was 5V and the initially specified speed was a maximum of 100 kHz. With these parameters it was possible to operate over a wide range of electrical parameters in terms of bus termination and capacitance.

With the definition of fast mode, fast mode plus and high speed the timing requirements became more strict and this implied the need for higher terminations, lower capacitance and minimized serial resistance.

Apart from the bus speed more and more circuitry is moving to 3.3V or even 1.8V and below logic levels. An example is NXP's IO expander PCA9554C.

Since I2C is an open drain concept the VCC level as such is not critical for the operation as long as all components on the bus can accept the voltage on the IO pins and are able to detect the logic levels.

There is however one aspect which is often forgotten:

Cables and connectors add capacitance to the system. This causes the signals to rise and fall more slowly but it also creates additional cross talk due to capacitive coupling. Low voltage systems tend to me more sensitive to these effects then 5V or 3.3V setups.

Even though there might be low capacitance cables on the market there is not much one can do about this except to lower the speed and to possible use a lower bus termination.

As a general rule, on low voltage I2C systems the cables should be kept as short as possible.

butlh ghajbogh nuv'e' yIHo'.
Admire the person with dirt under his fingernails.

Chris Savage

ZappMan!  :o  Welcome! Very good information! Yes, I was focused on the bit that is affecting me in the moment, but everything you posted is also very good information to keep in mind when interfacing I2C devices. Thank you for sharing that information.

There are a couple of circuits in my tutorial, Mixed Voltage Systems that are compatible with I2C bussing.

                    Bringing concepts to life through engineering.

granz

Quote from: Chris Savage on Jun 17, 2025, 01:38 PMWhen using Accessory / Sensor / Control boards like the APDS-9960 mentioned in this thread, a common theme that really drives me crazy is the I2C pull-up resistors; typically 4.7KΩ on the SCL / SDA lines. While these resistors are required for proper operation on the I2C bus, the inherent problem is that every board tends to have these resistors.

These breakout boards are designed to make it easy for you to experiment with these, often SMD sensors and other devices. So the board has all the caps and resistors you would normally use in a typical circuit. The problem is, especially for Arduino users (who typically use these breakout boards for projects), is that when you're trying to same I/O pins by putting ALL the I2C devices on the same bus (two pins), what you end up with is too hard of a pull-up on the lines when using multiple devices, which is what I tend to do.

If you're at all familiar with parallel resistance, you can see where / how this can become a problem for the bus. I've often had to desolder these tiny SMD resistors from the board to remove them. Some boards, including the aforementioned APDS-9960, have the ability to disable the pull-up resistors, in this case by cutting a pad. Not everyone knows to (or knows how to) do this, or it's not clear to them to do this.
I found that it is easier (although a bit messier) to just use a good needle-nosed pliers to grab the SMD resistor and twist it to break it right off the PCB. But, yeah, every breakout board having the pull-up resistors can get to be a pain; they should offer two different versions, one with the resistors, and one without. They wouldn't even have to change the PCB layout, just skip the resistors on some boards.

granz

Quote from: Chris Savage on Jun 17, 2025, 02:34 PMZappMan!  :o  Welcome! Very good information!
ZappMan!, I want to echo Chris' welcome. It is good to see you again, it was sad to see all the troubles that the 'bots gave you wiping out your bandwidth.