How and why to use I2C pullups?

Is your BME280 a module ? That module might already have pullup resistors.

Keep the 12V away from everything !

The I2C pins of the ESP8266 in I2C mode can only make the SDA and SCL low. They can not make it high. The same for the BME280.

It was called a "open collector" signal in the past, but today is it is called "open drain" because mosfets are used.

Since no one can make the signal high, you need pullup resistors. One pullup resistor from SDA to 3.3V and another pullup resistor from SCL to 3.3V.

Do you see the weakness of the I2C bus ? The ESP8266 and BME280 can make the I2C signals low, and that is a strong signal. When SDA and SCL are high (both are 3.3V), then that is with a low current through the pullup resistors and that is a weak high level.

1 Like