Sizing I²C pull-ups
How do you size I²C pull-up resistors?
| Level | ●● onsite technical |
| Track | Embedded & wearables |
| Really testing | The rise-time vs sink-current window. |
Free full answer — one of 12 questions answered in full on this site.
Show the answer
Say this first: Between two limits. Max R from the rise-time spec: Rp ≤ t_r/(0.8473·C_bus) (t_r = 1000 ns at 100 kHz, 300 ns at 400 kHz, 120 ns at 1 MHz). Min R from the drivers' sink current: Rp ≥ (VDD − 0.4 V)/3 mA (20 mA for Fast-mode Plus).
Numbers: 400 kHz, 200 pF → Rp ≤ 1.77 kΩ; at 3.3 V Rp ≥ 967 Ω → pick 1.2–1.5 kΩ. At 100 kHz, 100 pF → Rp ≤ 11.8 kΩ → 4.7 kΩ is typical.
Too much capacitance? Lower the speed, split the bus, or add a buffer/active pull-up.
Try it
I²C pull-up window — free tool →
Going deeper
Where 0.8473 comes from. The spec measures rise time from 30% to 70% of VDD. On an RC charge, t = RC·ln(0.7/0.3) = 0.8473·RC.
Estimating C_bus before the board exists. About 10 pF per device pin, plus roughly 1–2 pF per cm of trace, plus connectors and cable. Example: 6 devices and 20 cm of trace ≈ 60 + 30 = 90 pF.
Measuring it. Scope the rising edge and read the 30–70% time; C_bus ≈ t/(0.8473·Rp). A 10× probe adds about 10 pF — include it.
Where people go wrong
- Every plug-in board brings its own pull-ups. Three 4.7 kΩ in parallel = 1.6 kΩ, which may break the minimum.
- Forgetting the current source option: active pull-ups (or a bus buffer) when the window closes.
Try it: I²C pull-up window
More like this in the book
This is EM-02 from Hardware Engineer Interview Questions. The book has 12 questions on low-speed interfaces & embedded hardware and 141 in all, each answered the same way: what to say first, how to explain it, the numbers worth quoting and the follow-ups that come next.
Errata
No corrections known for this question. All errata
Ask about this question
Stuck on a step, or think something is wrong? Send it with EM-02 in the subject. Good questions get answered on this page, and corrections go into the next printing.
Related
← EM-01 I²C vs SPIEM-03 Drive a solenoid valve from a GPIO →