Aziz Bench

DHT22 vs SHT31

7 of the 10 features in our table differ between the DHT22 and the SHT31.

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.

Sensirion

SHT31

±0.2 °C · ±2 %RH · I²C · 2.15 to 5.5 V

Sensirion’s well-proven sensor: ±0.2 °C, ±2 %RH, two I²C addresses and a supply from 2.15 to 5.5 V.

Watch out: The SHT4x is newer, smaller and more accurate on humidity for the same job.

Differences

FeatureDHT22SHT31
Temperature accuracy±0.5 °C±0.2 °C
Temperature range−40 to 80 °C−40 to 125 °C
InterfaceSingle wire (own protocol)I²C
I²C addressNot I²C0x44, 0x45 (set with a pin)
Supply3.3 to 6 V2.15 to 5.5 V
Current between readings50 µA0.2 µA
ESPHomedhtsht3xd

Same on both: measures · humidity accuracy · status.

When to choose the DHT22

In our table the DHT22 has nothing the SHT31 lacks: choose it for price, availability or a board you already have.

Choose the SHT31 if you need

Open the sensor comparison →Tick what your project needs and see which sensor fits best.

SHT31: I²C address, wiring and pull-ups →

Frequently asked questions

What is the difference between the DHT22 and the SHT31?

The SHT31 offers better temperature accuracy, a wider temperature range, a standard I²C bus shared with other sensors, and less current between readings; in our table the DHT22 has no advantage of its own, apart from price or availability.

Which is more accurate, the DHT22 or the SHT31?

Typical datasheet figures: temperature ±0.5 °C for the DHT22 and ±0.2 °C for the SHT31; humidity ±2 %RH and ±2 %RH. Placement matters as much as accuracy: keep either away from the board’s warm parts.

Can I replace the DHT22 with the SHT31?

Not as a drop-in: the DHT22 uses a proprietary single-wire protocol and the SHT31 I²C, so the wiring and the code change.

Other comparisons

Figures from the makers’ datasheets and product pages and the ESPHome documentation, checked in November 2026.