Wire a reliable 1 m I²C sensor
Combine the pull-up planner, harness generator, and a few scope checks to keep your I²C bus stable way past the breadboard.
1. Estimate bus capacitance & size pull-ups
Roughly budget the bus load: cable length (≈50 pF/m for twisted pair) plus each device on the bus (≈15–20 pF). Feed these numbers into the I²C Pull-Up Planner to get a min/max resistor window and verify the rise time stays within spec.
- Aim for a value mid-way between the min and max to keep margin.
- If the rise time exceeds spec (≤1 µs @100 kHz, ≤300 ns @400 kHz), shorten the cable, use shielded wiring, or add an I²C buffer.
- Very low resistances (<2 kΩ) draw several milliamps; ensure the MCU can sink it.
2. Produce a clean harness
The Cable Harness Generator generates a wiring recipe with connector types, color coding and exact length. Share the YAML/JSON with your team to keep documentation consistent.
Pro tips: twist SDA/SCL with ground, reserve a pair for power, and pick a shielded connector if the run crosses aggressive EMI zones.
3. Checklist & oscilloscope checks
- On the PCB, keep SDA/SCL parallel and short; add sense vias near the MCU if needed.
- Match MCU configuration to the planner settings (Standard 100 kHz or Fast 400 kHz).
- Probe with a logic analyzer / scope: verify the high level reaches VCC and the rising edges stay within spec.
- Leave optional pull-ups on add-on boards to adjust the effective resistance if the bus grows.
4. Practical scenarios
Two ready-to-run setups to copy into the planner and the harness tool. They highlight how the numbers translate into components, wiring and validation steps.
0.8 m sensor leash @ 400 kHz
Twisted pair run with two peripherals. Keep the pull-ups agile without starving the controller of sink current.
- Planner inputs
- VCC = 3.3 V, mode = Fast (400 kHz), cable = 0.8 m @ 70 pF/m, extra capacitance = 30 pF.
- Result window
- Rmin ≈ 1.0 kΩ, Rmax ≈ 3.9 kΩ, rise time ≈ 240 ns with 2.7 kΩ.
- Harness tip
- Use a shielded 4-conductor cable, twist SDA with GND and SCL with GND to keep the pair balanced.
preset: fast-mode-short length_m: 0.8 cap_per_m_pf: 70 extra_cap_pf: 30 pullup_choice_ohm: 2700
1.2 m backbone @ 100 kHz
Several modules share a longer ribbon cable. Prioritise noise immunity and leave headroom for future branches.
- Planner inputs
- VCC = 5 V, mode = Standard (100 kHz), cable = 1.2 m @ 80 pF/m, extra capacitance = 60 pF.
- Result window
- Rmin ≈ 1.5 kΩ, Rmax ≈ 5.6 kΩ, rise time ≈ 420 ns with 2.7 kΩ.
- Harness tip
- Break out each branch with a short stub and keep dedicated grounds; add shield drain to chassis at one end only.
preset: standard-bus-backbone length_m: 1.2 cap_per_m_pf: 80 extra_cap_pf: 60 pullup_choice_ohm: 2700