Field-tested notes on robotics safety, ROS 2, embedded AI, AI agents, SaaS architecture and the practical systems that connect software to real-world outcomes.

I2C Pull-Ups on Modular Robots: Check Every Sensor Configuration

Modular robot sensor boards on an I2C bus beside an oscilloscope

A robot can pass its sensor checks with three breakout boards and fail with just one. Add two more boards and it can fail again, for a different electrical reason. Each module may bring both capacitance and another pair of pull-up resistors. Removing a module changes the circuit as surely as adding one.

Qualify I2C at the level of the supported assembly, separately for SDA and SCL. For every allowed combination, count the fitted pull-ups, bound the capacitance, and check both rise time and the current demanded from the weakest device pulling the line low. A clean trace from the fully populated prototype does not establish that the reduced configuration works.

The worked example below shows that failure pattern, then checks a different pull-up arrangement across all 31 nonempty combinations of five hypothetical boards. The calculations are executed synthetic examples, not measurements from a robot.

Make the sensor assembly an electrical configuration

The robot communication bus comparison answers where I2C belongs in the architecture. Once it has been selected for a local sensor cluster, the next question is narrower: what exactly is connected to these two wires in each product variant?

Start with a small assembly record. For each controller board, sensor module and harness revision, record:

  • The pull-up value and tolerance on each line, the rail it connects to, and whether it is physically fitted. Include pull-ups on the host board.
  • The capacitance contribution or defensible upper bound on each line, including connectors, cable and test probes.
  • Every participant that can pull a line low, with its guaranteed sink capability at the allowed low voltage. A target drives SDA during acknowledgements and reads; SCL also needs its own driver inventory if targets can stretch the clock.
  • Voltage compatibility, power-off behavior, and any buffer, switch or translator separating electrical segments.

Board names alone are insufficient. A module revision can change a pull-up without changing its I2C address. Keep the record with the hardware configuration, and make a change to it trigger requalification.

Adafruit’s pull-up documentation describes the practical integration issue: pull-ups can live on the controller or the target boards, and parallel sets reduce effective resistance. It also distinguishes logic voltage from board supply voltage. Do not combine resistors attached to different rails as though they were one ordinary pull-up to 3.3 V.

Two limits must overlap

For a passive, single-rail segment approximated by one resistance and one capacitance, use these two bounds:

1
2
R_low_limit  = (Vpullup_max - VOL_limit) / IOL_guaranteed
R_high_limit = tr_limit / (0.8473 × Cbus_max)

The effective resistance must be high enough for a valid low level, and low enough for the rising edge. These are the established equations in TI’s pull-up calculation note. The factor 0.8473 applies to the 30–70% interval of a simple RC rise. A scope’s default 10–90% measurement is a different quantity.

For several resistors on the same line and rail:

1
R_effective = 1 / (1/R1 + 1/R2 + ... + 1/Rn)

With all resistors at ±5%, the lowest effective resistance is 0.95 times nominal; the highest is 1.05 times nominal. Evaluate the sink requirement at the low-resistance corner and the rise time at the high-resistance corner. For mixed tolerances, calculate each parallel combination from its individual resistor limits instead.

Choose the allowed low level so it is compatible with every receiver, then obtain the driver guarantee at that level from the actual component documentation. The current calculated at that boundary is not the maximum current while the line is low: a lower actual output voltage produces more pull-up current. Exceeding the guaranteed boundary means the design has lost its guarantee, not that the calculation predicts the exact resulting voltage.

NXP UM10204, particularly Table 10 and section 7.1, defines the relevant electrical limits. For example, Fast-mode allows a maximum 300 ns rise time, while Standard-mode allows 1000 ns. Selecting a nominal clock rate alone does not establish electrical compliance; device limits and the other timing requirements still apply.

Adding boards can fix one margin and consume another

Consider this deliberately simplified configuration:

  • One 3.3 V pull-up rail, bounded above at 3.465 V.
  • A 0.4 V allowed low level and a 3 mA guaranteed sink capability for every low-driving pin in the example.
  • Five optional sensor boards, each fitting 4.7 kΩ ±5% on SDA and on SCL.
  • No other pull-ups. The host and fixed wiring contribute at most 50 pF to SDA and 40 pF to SCL; each board adds at most 30 pF and 20 pF respectively.
  • A 300 ns rise-time limit. All boards share a compatible voltage domain, and the model has no active edge accelerators or translators.

Those capacitance and device values are assumptions for the example. Replace them with your own bounded inputs. They are not generic specifications for sensor boards or Jetson headers.

The resulting SDA budget is:

Attached boardsSDA capacitance upper boundNominal effective pull-upRise time at +5% resistanceCurrent at the low-level boundary, −5% resistanceTwo-check result
180 pF4.700 kΩ334.5 ns0.686 mARise too slow
2110 pF2.350 kΩ230.0 ns1.373 mAPass
3140 pF1.567 kΩ195.1 ns2.059 mAPass
4170 pF1.175 kΩ177.7 ns2.746 mAPass
5200 pF0.940 kΩ167.3 ns3.432 mASink guarantee exceeded

The five-board assembly has the fastest predicted rising edge and the worst low-level margin. Looking only for rounded edges would miss its problem. Conversely, removing boards reduces capacitance but also removes pull-ups; the one-board assembly has the slowest predicted SDA edge.

SCL has less assumed capacitance here, so its one-board rise is about 250.9 ns and passes that check. A passing SCL waveform does not clear SDA. At five boards, both lines exceed the assumed sink guarantee.

These results also separate two very different experiments. Reducing the configured bus speed can relax the applicable rise-time requirement when every device supports the selected mode. It does not remove the excessive DC pull-up demand. A slower five-board bus still needs the low-level problem resolved.

Check combinations, then consider a common pull-up arrangement

For five independently optional modules, there are 31 nonempty assemblies. The boards below intentionally have identical electrical assumptions, making the count-based table easy to audit; the list still assigns each board its own identity and permits different capacitances and resistor values.

This standard-library Python example checks both lines. The second run represents a physical change: all module pull-ups are removed and one 1.5 kΩ ±5% pull-up is fitted to each line. It does not represent adding another resistor alongside the existing ones.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from itertools import combinations
from math import isclose

# Hypothetical same-voltage, passive bus. Units: ohm, pF, V, A, ns.
BOARDS = [dict(name=f"sensor_{i}", sda_pf=30, scl_pf=20,
pullup_ohm=4700) for i in range(1, 6)]
VPU_MAX, VOL_LIMIT, IOL_MIN = 3.465, 0.4, 0.003
TOL, TR_LIMIT_NS = 0.05, 300
BASE_PF = dict(sda=50, scl=40)


def check(boards, line, fixed_pullup=None):
# fixed_pullup means ALL module pullups have been removed.
resistors = ([fixed_pullup] if fixed_pullup is not None
else [b["pullup_ohm"] for b in boards])
assert resistors and all(r > 0 for r in resistors)
r_nom = 1 / sum(1 / r for r in resistors)
r_low, r_high = r_nom * (1 - TOL), r_nom * (1 + TOL)
c_pf = BASE_PF[line] + sum(b[f"{line}_pf"] for b in boards)
rise_ns = 0.8473 * r_high * c_pf / 1000
# Current demanded AT VOL_LIMIT, not the maximum low-state current.
sink_a = (VPU_MAX - VOL_LIMIT) / r_low
return dict(rise_ns=rise_ns, sink_ma=1000 * sink_a,
passes=rise_ns <= TR_LIMIT_NS and sink_a <= IOL_MIN)


cases = [c for n in range(1, 6) for c in combinations(BOARDS, n)]
assert len(cases) == 31
# Independent spot checks of the one-board rise and five-board sink corner.
assert isclose(check(BOARDS[:1], "sda")["rise_ns"], 334.51404)
assert isclose(check(BOARDS, "sda")["sink_ma"], 3.4322508398656217)
for fixed in (None, 1500):
passed = sum(all(check(c, line, fixed)["passes"]
for line in ("sda", "scl")) for c in cases)
assert passed == (25 if fixed is None else 31)
print(f"fixed_pullup={fixed}: {passed}/31 assemblies pass both lines")
for n in range(1, 6):
d = check(BOARDS[:n], "sda")
print(n, round(d["rise_ns"], 1), round(d["sink_ma"], 3), d["passes"])

The executed result is 25 of 31 assemblies passing both modeled checks with module pull-ups, and 31 of 31 with the fixed pair. The six failures in the original arrangement are the five single-board configurations and the fully populated configuration.

For the fixed-pair design, the common nominal-resistance window follows from the largest capacitance and the weakest sink guarantee across the supported assemblies:

1
2
3
4
Minimum nominal resistance = (3.465 - 0.4) / (0.003 × 0.95)
≈ 1.075 kΩ
Maximum nominal resistance = 300 ns / (0.8473 × 200 pF × 1.05)
≈ 1.686 kΩ

The chosen 1.5 kΩ lies inside that interval. At the worst modeled SDA load, its rise time is 266.9 ns; its boundary sink demand is 2.151 mA. This is a candidate arrangement for these assumptions, not a universal resistor recommendation.

More generally, take the intersection of the permissible ranges for every supported configuration and both lines if you want one common resistor value. If that intersection is empty, changing the topology, reducing capacitance, restricting allowed combinations or selecting different components may be necessary. Averaging incompatible limits produces an invalid compromise.

Centralizing pull-ups is one practical way to make module population stop changing resistance. It is not mandatory: distributed pull-ups can work when they are documented and qualified. If module pull-ups cannot be removed, include them in every candidate calculation. A connector being unplugged is a configuration change, not evidence that the remaining bus retains its margins.

Turn the calculation into a bench acceptance record

The script checks only passive RC rise time and a DC sink boundary. It does not establish idle-high voltage under aggregate leakage, fall time, setup/hold timing, clock stretching, noise immunity, power sequencing or translator compatibility. It excludes the empty assembly; qualify that state too if the host still needs to communicate with another device on the segment.

Before trusting an RC estimate, inspect the waveform. A two-stage edge, ringing, an active accelerator or a substantial distributed harness can invalidate the simple model. For a translator, follow its own electrical requirements and account for the currents and capacitances coupled across its sides; do not apply two independent resistor calculations blindly.

Use a bench record that ties the calculation to the actual assembly:

Bench conditionEvidence to retainWhat it resolves
Minimum, intermediate and maximum supported populationBoard revisions, fitted pull-up values, harness revision, SDA/SCL tracesWhether the physical assembly matches the configuration record
Each device pulling SDA lowLow-level voltage during controller traffic, target ACK and target data, measured at relevant receiversWhether the weakest target is hidden by a strong controller waveform
Each supported SCL driverLow-level and rising-edge traces, including supported stretching behaviorWhether the clock line has a different limiting driver
Supply and environmental corners in the product specificationRail voltage, rise time, idle-high level and low-level measurementsWhether the component guarantees and leakage assumptions hold
Real motor and converter activityCorrelated signal and local supply/ground observationsWhether noise or supply disturbances explain failures after the static checks pass
Startup, shutdown and supported partial-power statesLine levels and observed communication/recovery behaviorWhether an unpowered module loads or clamps the bus

Measure rise time using the specified thresholds, at the nodes that matter. Document probe loading and use a suitable short ground connection; a measurement setup that changes the circuit materially belongs in the capacitance budget. Re-run the checks after changing a cable, adding a probe or replacing a module revision.

If failures track motor activity, use the separate robot power-integrity diagnostic method to distinguish rail disturbances from static pull-up sizing. Repeated software retries do not demonstrate that either electrical problem has been solved.

Finally, carry the result into the sensor consumer. A bus that occasionally returns a transaction error produces missing measurements, not fresh evidence that the environment is unchanged. The sensor-confidence gate should handle that loss explicitly; downstream filtering must not disguise it as a healthy sensor stream.

The useful release artifact is a configuration record with both lines checked, measured evidence attached, and unsupported assemblies identified. “I2C works on the prototype” is too weak a statement when the prototype is only one of the circuits you ship.