9 of the 10 features in our table differ between the DHT22 and the BME280.
Aosong
DHT22
±0.5 °C · ±2 %RH · Single wire (own protocol) · 3.3 to 6 V
A step up from the DHT11: ±0.5 °C, ±2 %RH typical and down to −40 °C, still on one data wire.
Watch out: The humidity error can reach ±5 %RH, one reading every 2 s at most, and its own protocol needs precise timing. About 50 µA between readings.
Bosch Sensortec
BME280
±1 °C · ±3 %RH · I²C/SPI · 1.71 to 3.6 V
Temperature, humidity and pressure in one I²C or SPI chip: the classic weather-station sensor.
Watch out: ±1 °C and ±3 %RH, less accurate than a dedicated humidity sensor. Check the chip: the BMP280 looks almost the same and has no humidity sensor.
Differences
Feature
DHT22
BME280
Measures
temperature · humidity
temperature · humidity · pressure
Temperature accuracy
±0.5 °C
±1 °C
Humidity accuracy
±2 %RH
±3 %RH
Temperature range
−40 to 80 °C
−40 to 85 °C
Interface
Single wire (own protocol)
I²C, SPI
I²C address
Not I²C
0x76, 0x77 (set with a pin)
Supply
3.3 to 6 V
1.71 to 3.6 V
Current between readings
50 µA
0.1 µA
ESPHome
dht
bme280_i2c / bme280_spi
Same on both: status.
Choose the DHT22 if you need
better temperature accuracy (±0.5 °C against ±1 °C)
better humidity accuracy (±2 %RH against ±3 %RH)
a 5 V supply
Choose the BME280 if you need
barometric pressure too
a standard I²C bus shared with other sensors
less current between readings (0.1 µA against 50 µA)
What is the difference between the DHT22 and the BME280?
The DHT22 offers better temperature accuracy, better humidity accuracy, and a 5 V supply. The BME280 offers barometric pressure too, a standard I²C bus shared with other sensors, and less current between readings.
Which is more accurate, the DHT22 or the BME280?
Typical datasheet figures: temperature ±0.5 °C for the DHT22 and ±1 °C for the BME280; humidity ±2 %RH and ±3 %RH. Placement matters as much as accuracy: keep either away from the board’s warm parts.
Can I replace the DHT22 with the BME280?
Not as a drop-in: the DHT22 uses a proprietary single-wire protocol and the BME280 I²C or SPI, so the wiring and the code change. Check the supply too: 3.3 to 6 V for the DHT22, 1.71 to 3.6 V for the BME280.