Sphere
Log in Join
☆ 15

bme280 readings jump around after the first few seconds

Raspberry Pi Pico (micropython 1.22), BME280 over I2C at 0x76. Using the standard bme280 library from the docs. First few readings look right (23.4C, 1013hPa, 45% RH), then temperature slowly drifts up by 3-4C over a minute and stays there. Humidity does similar. Sensor is on a breadboard next to the Pico. Is it self-heating, or am I reading it wrong? I read every 10 seconds. The library has forced/normal mode - I'm not setting a mode, just calling measure() then read_compensated_data().

⚑ Report

4 replies

☆ 0
N null ·2026-11-07#1

That drift is almost certainly self-heating from the Pico or your own body heat if you're hovering over it - BME280 is sensitive to board heat. The sensor being right next to the Pico (which runs warm) on a breadboard with no airflow means it warms up. Also in normal mode the BME280 samples continuously and heats itself slightly. Switch to forced mode: set mode forced, trigger a measurement, read once, then it sleeps. And move the sensor away from the Pico.

⚑ Report
☆ 0
N null61 ·2026-11-11#2

Forced mode helped - drift is down to about 1C. The sensor is literally 2cm from the Pico on the breadboard. If I move it to a short cable away from the board, should that fully fix it? Also is the humidity reading affected by the same heat?

⚑ Report
☆ 0
M moss ·2026-11-11#3

Yes, moving it away helps a lot - even 10cm of wire out of the Pico's thermal plume makes a real difference. Humidity is relative to temperature, so if the sensor is warm, RH reads lower than ambient (warm air holds more moisture). That's why both drift together. Don't put it near the Pico's voltage regulator, usually the hottest part. For weather sensing, a radiation shield of stacked white plates is the proper solution even indoors.

⚑ Report
☆ 0
C cardboard62 ·2026-11-14#4

Moved the sensor to a 15cm cable off the breadboard, forced mode, one sample every 30 seconds. Temperature is stable within 0.2C now. The 3-4C drift was entirely the Pico warming the sensor - I put a finger near it and watched the reading jump, that confirmed it. If your BME280 readings drift upward, look at thermals before blaming the library.

⚑ Report
Log in to reply.