Fundamentals/I2C/The two wires
Chapter · I2C

The two wires

Why every I2C wire needs a pull-up resistor, how big it should be, what too many of them do, and a 5 V module on a 3.3 V board.

  1. 09Why pull-up resistors4 minA chip on I2C can only pull a line down. A pull-up resistor to the supply is the only thing that brings it back up, so a bus with no pull-ups has lines that float, and nothing on it answers.
  2. 10How big a pull-up5 minToo big a pull-up and the line cannot rise in time for the next clock. Too small and a chip cannot pull it down to a clean zero. The specification sets both limits, and a few kilohms sits between them.
  3. 11Too many pull-ups4 minMost modules carry their own pull-ups, and on one bus they all end up in parallel. A few are fine; five 4.7 kΩ pull-ups make 940 Ω, too strong for a chip to pull the line to a clean zero.
  4. 125 V and 3.3 V4 minA 5 V module's pull-ups hold the line at 5 V, which is on the ESP32's pins every time the line is a one. A one-transistor level converter gives each side its own wire at its own voltage.

Start at 09 and read down — the order is the order things get easier in. Or take the one with your part in it; every article stands on its own, and links back to whatever it needs.