OHMYARD

DISCOVER · EXPERIMENT · BUILD

TRACK 9 · MAKER PITFALLS & SENSORS49/52
NOV 27, 2026
14:20:00
4.7kESP32 / UNOVCC: 3.3 V1-WIRE DATADHT22 (AM2302)23.4 °C54.2 % RH✅ DHT22 WIRED CLEANLY — TELEMETRY OK
Drag or WASD to pan · Q / E to rotate · Scroll to zoom

DHT22 vs BME280 Weather Sensor Wiring, Pull-Up & 3.3V Voltage Trap

✓ Reviewed by Jason Guo (OhmYard Lab)· IEC & Datasheet Verified· Updated Nov 27, 2026
QUICK ENGINEERING ANSWER (TL;DR)

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!

DHT22: 1-Wire + 4.7 kΩ Pull-Up (0.5 Hz) | BME280: I2C 0x76/0x77 · 3.3 V Max (T + RH + hPa)

BME280 also avoids DHT22's notorious slow 2-second sampling interval and long-term humidity drift.

SymbolComponentReal-World Engineering Tip
U_BMEBosch 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).

Frequently Asked Questions

Why does my DHT22 sensor return NaN (Failed to read from DHT sensor) on ESP32 or Arduino?

A bare 4-pin DHT22 uses an open-drain single-wire data line and returns NaN if you omit the required 4.7 kΩ to 10 kΩ pull-up resistor between DATA and VCC, poll it faster than once every 2 seconds, or accidentally wire Pin 3 (NC) instead of Pin 2 (DATA).

Continue Exploring Related 2.5D Labs
← All 52 Labs Hub21. I2C Pull-Up Bus →30. 3.3V ⇄ 5V Shifter →46. OLED SSD1306 I2C Lab →

OHMYARD · ALL 52 INTERACTIVE LABS & SIMULATORS

1. Closed Loop & Faults
/closed-loop
2. Ohm's Law & Thermal
/ohm-law
3. Series vs Parallel
/series-parallel
4. X-Ray Breadboard
/breadboard-simulator
5. LED Resistor & E24
/led-resistor-calculator
6. Voltage Divider & Load
/voltage-divider
7. Multimeter Trainer
/multimeter-simulator
8. RC & Oscilloscope
/rc-oscilloscope
9. 555 Timer Pulse Lab
/555-timer
10. Diode & Rectifier
/diode-rectifier
11. Transistor & Flyback
/transistor-switch
12. PWM Dimmer & Fan
/pwm-dimmer
13. Op-Amp Comparator
/opamp-comparator
14. H-Bridge & Shoot-Through
/h-bridge-motor
15. Buck vs LDO Power
/buck-converter
16. Digital Logic Gates
/logic-gates
17. Resistor Color Code
/resistor-color-code
18. ESP32 Pinout Guide
/esp32-pinout
19. Arduino Uno Pinout
/arduino-uno-pinout
20. Zener Voltage Clamp
/zener-diode-regulator
21. I2C Pull-Up Bus
/i2c-pullup-bus
22. Battery Life & Sleep
/battery-life-calculator
23. PCB Trace Width
/pcb-trace-width
24. Wheatstone Bridge
/wheatstone-bridge
25. Raspberry Pi GPIO
/raspberry-pi-pinout
26. WS2812B LED Strip
/ws2812b-led-strip
27. SG90 Servo PWM
/servo-pwm-control
28. HC-SR04 Ultrasonic
/ultrasonic-hcsr04
29. Opto Relay Module
/relay-optocoupler
30. 3.3V ⇄ 5V Shifter
/logic-level-shifter
31. 2N2222 Pinout
/2n2222-pinout
32. SMD Resistor Code
/smd-resistor-code-calculator
33. Distribution Board
/inside-distribution-board
34. Wire a 3-Pin Plug
/wire-a-three-pin-plug
35. Power Strip Overload
/power-strip-overload
36. RCD & Earthing Safety
/rcd-gfci-earth-leakage
37. Live & Neutral Wires
/mains-live-neutral
38. Inside an MCB Breaker
/mcb-trip-breaker-anatomy
39. Why Did It Trip?
/why-did-it-trip
40. Two-Way Staircase Switch
/two-way-staircase-switch
41. AC Transformer Core
/ac-transformer-step-down
42. Induction Hob & Eddies
/induction-cooktop-eddy
43. Kettle Bimetal Thermostat
/thermostat-bimetal-kettle
44. Rooftop Solar & Grid
/home-solar-inverter-grid
45. Common Ground Pitfall
/floating-ground-common-gnd
46. OLED SSD1306 I2C Lab
/oled-ssd1306-i2c-wiring
47. Stepper A4988 Vref Lab
/stepper-a4988-vref-calculator
48. 18650 & TP4056 Lab
/lipo-18650-tp4056-protection
49. DHT22 vs BME280 Lab
/dht22-bme280-sensor-wiring
50. Rotary Encoder & Bounce
/rotary-encoder-debouncing
51. Soil Moisture & Corrosion
/capacitive-soil-moisture-adc
52. ESP32 vs S3 vs C3 Lab
/esp32-s3-c3-pinout-comparison