1. Überblick & Funktionsprinzip
I²C (NXP UM10204) connects millions of digital temperature, humidity, pressure, IMU, and ToF sensors (BME280, SHT40, MPU6050, INA219) over just two open-drain wires: SDA and SCL.
Almost every I²C failure in real hardware comes down to two circuit details: mis-sized pull-up resistors Rp violating the UM10204 rise-time limit (300 ns at 400 kHz Fast Mode!), or interfacing a 3.3 V MCU with 5 V sensors without the classic single-MOSFET (BSS138) bidirectional level shifter.
UM10204 Pull-Up Window: Too large Rp fails rise time (R_max = t_r / (0.8473 · C_b)); too small Rp overloads open-drain drivers above 3 mA (R_min = (Vdd − 0.4 V) / 3 mA). Note that with a level shifter, BOTH sides have pull-ups in parallel when pulling LOW!
BSS138 Bidirectional Magic (Zero Direction Pin!): Tie Gate to 3.3 V, Source to LV (3.3 V bus), Drain to HV (5 V bus). When idle, Vgs = 0 V → MOSFET OFF so LV sits at 3.3 V and HV sits at 5 V safely. When LV pulls LOW, Vgs = 3.3 V turns MOSFET ON pulling HV LOW. When HV pulls LOW, the body diode pulls LV down to 0.7 V, turning Vgs ON to pull LV all the way to 0.1 V!

2. Step-by-step: Sizing I²C pull-ups & wiring a 3.3 V ↔ 5 V BSS138 level shifter
1Sum total bus capacitance Cb (devices + traces + cable)
Count ~10 pF per I²C IC pin plus ~1 pF/cm on PCB traces (~80 pF/m on ribbon/shielded cable). Keep total Cb strictly ≤ 400 pF per UM10204.
2Calculate Rp window for 100 kHz vs 400 kHz
For 400 kHz Fast Mode (tr ≤ 300 ns), 10 kΩ fails even on short buses! Use 2.2 kΩ–3.3 kΩ on single-voltage buses (or 4.7 kΩ on each side of a dual-pullup BSS138 shifter = 2.35 kΩ effective).
3Verify BSS138 low Vgs(th) (< 1.5 V) and never swap LV/HV sides
Ordinary power MOSFETs (Vgs_th = 3 V) will NOT turn on cleanly at 3.3 V! Use BSS138 (Vgs_th ≈ 1.3 V) with Gate tied strictly to the LOWER voltage rail (3.3 V).
4Inspect SDA/SCL rise time on a scope and add 9-clock bus recovery in firmware
Check actual 30%–70% rise time at the farthest sensor. In firmware, toggle SCL 9 times at startup to free any sensor stuck holding SDA LOW after an interrupted reset.
3. Fehlersuche & Multimeter-Diagnose
| Symptom | Ursache | Multimeter-Prüfung | Abhilfe |
|---|---|---|---|
| I²C works at 100 kHz but randomly NACKs or reads 0xFF at 400 kHz | Pull-up resistors too weak (e.g. 10 kΩ) or excessive cable capacitance | Measure 30–70% SCL/SDA rise time with oscilloscope | Lower Rp to 2.2–3.3 kΩ, shorten cable, or add an active I²C bus accelerator (LTC4311) |
| Multiple breakout boards connected together fail to pull SDA below 0.8 V | Too many parallel onboard pull-ups (e.g. 5 × 4.7 kΩ = 940 Ω → >5 mA sink overload!) | Measure total resistance from SDA to Vcc with power off | Remove duplicate pull-up resistors so only ONE pair remains on the bus |
4. Häufige technische Fragen (FAQ)
Why does the UM10204 rise-time formula use 0.8473 instead of 2.2?
Standard digital logic defines rise time from 10% to 90% (ln(9) = 2.197). NXP UM10204 defines I²C rise time strictly between V_IL(max) = 30% Vdd and V_IH(min) = 70% Vdd, and ln(0.7 / 0.3) = 0.8473!
Can I rely on my microcontroller’s internal 40 kΩ pull-ups for I²C?
Almost never reliably! Even on a tiny 50 pF PCB trace, 40 kΩ gives tr = 1,700 ns — violating even 100 kHz spec (1,000 ns) and making the bus a magnet for EMI. Always install real 2.2–4.7 kΩ external pull-ups.
How far can I run an I²C sensor cable?
I²C is an Inter-IC board bus, not a fieldbus! Bare I²C reliably runs ~0.5–2 m (limited by 400 pF capacitance). For 5–30 m runs, use differential I²C buffers (PCA9615) or switch to RS-485 / 4–20 mA.
Why do I need pull-ups on BOTH sides of a BSS138 level shifter?
When the bus is idle, the BSS138 is OFF, completely isolating the two sides — so each side needs its own pull-up resistor to reach its respective HIGH rail (3.3 V on LV, 5.0 V on HV).
Should I put pull-ups on every I²C sensor module?
NO! Put ONLY ONE pair of pull-up resistors per I²C bus (one on SDA, one on SCL). Stacking multiple breakout boards with onboard 4.7 kΩ resistors drops total resistance below 1 kΩ and prevents sensors from pulling the bus LOW.
What if I have a 1.8 V sensor talking to a 3.3 V MCU?
BSS138 (Vgs_th up to 1.5 V) is marginal at 1.8 V! For 1.8 V buses, pick an ultra-low-Vth MOSFET like RUM001L02 / BSS138W-L or a dedicated I²C translator IC like TI TCA9406 / PCA9306.
5. Zugehörige Rechner, Leitfäden & weitere Schaltungen
- Rechner für den Spannungsfall der Sensorversorgung
- Rechner für Impulsausgänge
- RS-485 Transceiver: 120 Ω Terminierung, Fail-Safe-Bias & TVS
- CAN / CANopen Bus-Terminierung (Split Termination 60+60 Ω)
- Differentieller RS-422-Encoder & VR-Drehzahlsensor-Konditionierung
- PNP-Schaltausgang (3-Leiter, Plus-schaltend) — Schaltung & Simulator
- NPN-Schaltausgang (3-Leiter, Minus-schaltend) — Schaltung & Simulator
- NAMUR 2-Leiter Eigensicherheits-Schaltung (IEC 60947-5-6)
- 2-Leiter 4–20 mA Stromschleife & geschützter Empfänger