I2C pull-up resistors on modules and breakout boards

Nick Alexeev

Some modules and breakout boards for I2C slave devices come with I2C pull-up resistors. When multiple such modules are connected to the same I2C bus, their pull-up resistors appear in parallel. That results in a stronger effective pull-up resistance, which may prevent communication on the I2C bus.

You have to have pull-ups on the I2C bus.

Somewhere on the I2C bus you have to have pull-ups in order to be able to communicate on the I2C bus. The pull-ups may reside on the microcontroller board, or on the I2C slave device's breakout board, or anywhere else on the I2C bus.

Some microcontrollers have internal pull-ups. It's not recommended to use the microcontroller's internal pull-ups for I2C. Still, internal pull-ups is much better than no pull-ups at all.

Watch out though, you may end up with pull-ups that are too strong.

If pull-up resistors are too strong, that can prevent communication on the I2C bus.

Strong pull-up means that the current through the resistor is relatively large. Stronger pull-up translates into smaller resistor value. Weak pull-up translates into a larger resistor value. Stiff pull-up is same as strong pull-up. These terms are not limited to I2C. It applies to pull-up and pull-down resistors in other types of circuits too.

The problematic pull-up resistors are shown in red.  These may create a pull-up that's too strong, which can prevent the communication on the I2C bus.

Suppose all three boards in this diagram came with pull-up resistors installed. The 2.2 kΩ value is common for an I2C bus running at +5 V. Notice however that R2, R4, R6 all are connected between SCL and Vdd. They are in parallel, and they act as one 733 Ω resistor. This combined pull-up is too strong I2C. That can prevent communication on the I2C bus. (Similar for the pull-up resistors on the SDA line.)

If these resistors can spoil the I2C bus, then why are they designed into the breakout boards in the first place? I'm guessing that it must have been a compromise to create an easy out-of-the-box experience. A lot of I2C first-timers don't know that pull-ups are required. Some Arduino boards don't have I2C pull-up resistors nor pads for them (Arduino Uno, Arduino Pro, for example). Some Arduino boards have unpopulated pads for I2C pull-up resistors (Arduino Mini Pro, for example). A breakout board provides the pull-ups, and "it just works". That is, until too many breakout boards — each with pull-up resistors — are connected to the same I2C bus.

Remedies

Of course, as soon as you realize that there are extra pull-up resistors you can simply remove them.

Some breakout board suppliers are aware of a possible parallel pull-up scenario. Some breakout boards were designed with provisions to address this.

  • Some breakout boards have I2C pull-ups which are half strength. They are weaker than the optimal values for the I2C, but stronger than the internal pull-ups of a μC. A typical such value is 4.7 kΩ . This is a compromise. The number of modules that can be connected in parallel without removing resistors is still limited. But a greater number of modules may be connected before the combined parallel pull-up becomes too strong.
  • On some breakout boards, pull-up resistors are connected to Vcc through solder blobs. A solder blob is easy to remove, then pull-up resistors will not affect the I2C bus. (For example, see SJ1 in this breakout board.)
  • Some breakout boards have unpopulated pads for pull-up resistors. (For example, R1 and R2 on this board.)

Related

I2C bus specification and user manual. Anyone working with I2C should at least skim through it.

Forum thread How to deal with multiple pull-up resistors on modules? was a point of departure for writing this post.

Design calculations for robust I2C communications. Concise EDN article with diagrams.

Forum thread Is there a correct resistance value for I2C pull-up resistors?,
and application note I2C Bus Pullup Resistor Calculation by Texas Instruments (slva689).

Forum thread What happens if I omit the pullup resistors on I2C lines? The oscilloscope screenshots in the post show I2C waveforms with internal pull-ups, and with correcly sized external pull-up resistors.

© Copyright 2015, Nick Alexeev