DHT22 vs BME280 Weather Sensor Wiring, Pull-Up & 3.3V Voltage Trap
Building an IoT weather station? A bare 4-pin DHT22 uses a single open-drain wire that returns 'NaN' without a 4.7 kΩ–10 kΩ pull-up resistor, whereas the far more accurate Bosch BME280 speaks I2C (adding barometric pressure) but is a strict 3.3 V chip that burns out on 5 V!
BME280 also avoids DHT22's notorious slow 2-second sampling interval and long-term humidity drift.
- DHT22 needs a 4.7 kΩ–10 kΩ pull-up resistor between DATA and VCC (unless mounted on a 3-pin breakout PCB with an onboard SMD resistor).
- BME280 Absolute Max Voltage is 3.6 V! Only use 3.3 V on bare purple GY-BME280 modules (without an onboard 662K regulator).
| Symbol | Component | Real-World Engineering Tip |
|---|---|---|
| U_BME | Bosch BME280 (3.3V I2C Temp/Hum/Press) | Check whether your purple module has a 5-pin LDO chip before ever considering 5 V supply. |
Real-World Bench Scenario: Watch out for fake BMP280 modules sold as BME280: BMP280 is rectangular (no humidity sensor), while true BME280 has a square silver metal lid!
Bench Challenge: Test removing the 4.7 kΩ pull-up on DHT22 (NaN error) and applying 5 V to a bare 3.3 V BME280 (over-voltage warning).