Why the bus needs them
I2C devices don't drive the line high. They can only pull it low, or let go. This is called open-drain, and it's what allows several devices to share two wires without destroying each other — if one pulls low while another lets go, nothing is fighting.
But something has to bring the line back up when everyone lets go. That's the pull-up resistor's entire job. Without it the line never returns high and the bus is dead.
What decides the value
The resistor is squeezed between two limits, and any value between them works.
Too small — the device can't pull low
A strong pull-up fights the device trying to pull the line down. If it wins, the "low" never gets low enough to register. The minimum is set by how much current the device can sink while still holding a valid low, and for typical 3.3V and 5V parts it lands around 1kΩ.
Too large — the line rises too slowly
The pull-up has to charge the bus capacitance — every device, every centimetre of wire adds some. A weak pull-up charges it slowly, and if the line hasn't reached a valid high by the time the next clock edge arrives, data corrupts.
This is why longer wires and more devices push you toward smaller resistors, not larger ones.
Practical values
| Situation | Typical value |
|---|---|
| *Short breadboard run, one or two devices | 4.7kΩ |
| Several devices, or longer wires | 2.2kΩ |
| Faster bus speeds, or high capacitance | 1kΩ – 2.2kΩ |
| Battery powered, speed not critical | 10kΩ (less idle current) |
4.7kΩ is the default answer and is right for most hobby setups. If you want to be rigorous, the limits come from two formulas — minimum from supply voltage and sink current, maximum from allowed rise time and bus capacitance — but for a breadboard with two sensors, 4.7kΩ is not a guess, it's the well-trodden middle.
The actual hobby problem: too many pull-ups
Three modules each carrying 4.7kΩ gives you an effective pull-up of roughly 1.6kΩ before you add anything of your own. Add a Pi's internal pull-ups on top and you can end up below the minimum — at which point devices struggle to pull the line low and the bus becomes unreliable in a way that looks random.
What to do: with two or three modules on a short bus, fit nothing extra. If you're stacking several, look for the pull-up resistors on each board — usually a small pair near the SDA/SCL pins, sometimes with a cuttable jumper — and remove or disable them on all but one.
Symptoms worth recognising
- Nothing detected at all — usually not a pull-up problem. Work through the I2C troubleshooting order first; it's far more often ground, wiring, or I2C not being enabled.
- Works with one device, breaks when you add another — could be too many pull-ups in parallel, or an address clash. Test each device alone to tell them apart.
- Intermittent, worse with longer wires — classic too-weak pull-up. Try 2.2kΩ.
- Fine slowly, fails at higher speed — the line isn't rising fast enough. Smaller resistor, or shorter wires.
The short version
- I2C physically cannot work without pull-ups — they aren't optional
- 4.7kΩ is the standard answer; 2.2kΩ for more devices or longer runs
- Your modules probably already have them — check before adding more
- Too many in parallel is a more common fault than having none
- Never level-shift I2C with a voltage divider
For the general principle behind all of this, see pull-up and pull-down resistors explained.