Hardware · Sensor family

Temperature & humidity sensors.

What these are
The most common sensors a grower starts with
They measure
Air temperature and relative humidity
Open Agriculture Technology pick
SHT31 when a reading has to be trusted

Temperature and humidity are the first things most growers measure, and these are the sensors they reach for. A handful of cheap parts cover almost every need: the DHT11 and DHT22 for a few dollars, the more accurate SHT31, the BME280 that adds air pressure, and the rugged DS18B20 for temperature in wet or tough spots. The right one depends on how much you need to trust the reading.

A temperature and humidity sensor module
Image: adafruit.com

What they measure.

Two things, usually together: air temperature, in degrees, and relative humidity, the percentage of moisture the air is holding compared with the most it could hold at that temperature. Together they describe the climate a plant’s leaves actually feel, and they are the inputs to vapor pressure deficit, the number serious growers watch.

Dumb or smart.

It is worth knowing how much work the sensor does for you. At the simplest end, a bare thermistor is not smart at all: it is a resistor whose resistance changes with temperature, and the microcontroller has to read that change and do the math. Most of the parts on this page are a step up: they include a tiny chip and hand over a finished digital reading, so the microcontroller just asks and receives a number. The DHT and DS18B20 sensors speak a simple one-wire signal; the SHT31 and BME280 speak I²C, a small two-wire bus. Digital sensors are easier to trust because the conversion happens inside the part, away from electrical noise.

Compare the sensors.

The five you will actually meet, side by side. The tinted column is the value-for-accuracy pick. Notice the jump in accuracy from the DHT parts to the SHT31, and that the DS18B20 measures temperature only but survives places the others cannot.

Common temperature and humidity sensors · verified 2026-06-23
Spec DHT11 DHT22 SHT31Accuracy pick BME280 DS18B20
Measures Temp + RH Temp + RH Temp + RH Temp + RH + pressure Temp only
Interface 1-wire digital 1-wire digital I²C I²C / SPI 1-wire (Dallas)
Temp accuracy ±2 °C ±0.5 °C ±0.3 °C ±1 °C ±0.5 °C
RH accuracy ±5 % ±2–5 % ±2 % ±3 % n/a
Temp range 0 to 50 °C −40 to 80 °C −40 to 125 °C −40 to 85 °C −55 to 125 °C
Waterproof option No No No No Yes (probe)
Best for Toys, first tests Hobby and prototypes When accuracy matters Weather and air pressure Rugged or wet temperature

The DHT22 is also sold as the AM2302 (the same sensor on a small board). Accuracy figures are from the manufacturer datasheets and drift over time, especially the cheaper humidity elements. For a fuller side-by-side including light and air sensors, see the sensor comparison. For the deep dive on one part, see the DHT22, BME280, SHT31, and DS18B20 pages.

Why both numbers matter (VPD).

Temperature and humidity are most useful together. Combined, they give vapor pressure deficit, a single number for how strongly the air pulls moisture out of a leaf. VPD predicts transpiration, stress, and disease pressure better than either reading alone, which is why a good temperature and humidity sensor is the foundation of climate control in a tunnel or a grow room. A sensor with honest accuracy on both numbers gives a VPD you can act on; a sloppy one does not.

Where they fit, and where they don’t.

Where they fit

  • Greenhouse, tunnel, and grow-room climate.
  • Feeding a VPD reading for climate control.
  • Cheap, plentiful nodes where one odd reading is averaged out.
  • Waterproof temperature in soil or water (DS18B20).

Where they don’t

  • Audit-grade or compliance measurement without calibration.
  • Direct sun or rain, unless in a vented shield (or a sealed probe).
  • Fast-changing conditions; cheap sensors respond slowly.
  • Humidity from a DS18B20: it measures temperature only.

Which to buy.

One rule covers most of it: if the number drives a decision, spend the few extra dollars on an SHT31. If it is for a rough sense of the room, a DHT22 is fine. And whatever you choose, read Trust Your Gauge before you rely on it.

Datasheets.

Straight from the makers; these open in a new tab:

Sensirion SHT31 Bosch BME280 Analog Devices DS18B20 Open Agriculture Technology sensor comparison

Frequently asked questions.

What is the best temperature and humidity sensor for a grower?

For readings you intend to act on, the SHT31 is the value pick: accurate to about a third of a degree and 2 percent humidity, for a few dollars. The DHT22 is fine for cheap hobby use, and the DS18B20 is the choice for temperature in wet or rugged spots.

What is the difference between the DHT22 and the SHT31?

The SHT31 is noticeably more accurate (about plus or minus 0.3 degrees C and 2 percent humidity versus the DHT22 at 0.5 degrees and 2 to 5 percent), reads faster, and uses the I2C bus. The DHT22 is cheaper and uses a simple one-wire signal. Choose the SHT31 when the reading drives a decision.

What is VPD and why does it need both temperature and humidity?

VPD, or vapor pressure deficit, is how strongly the air pulls moisture from a leaf. It is calculated from temperature and humidity together, and it predicts transpiration and stress better than either alone. That is why a sensor that reads both, accurately, is the foundation of climate control.

Can temperature and humidity sensors be used outdoors or in water?

Most cannot be used directly. Common boards like the DHT22, SHT31, and BME280 are not weatherproof and need a vented radiation shield outdoors. For temperature in soil or water, use a DS18B20 in its sealed waterproof probe form, which is built for it.

What is the difference between I2C and one-wire sensors?

Both are digital, so the sensor sends a finished number. I2C is a small two-wire bus that lets several sensors share the same pair of pins, used by the SHT31 and BME280. The one-wire signal used by the DHT sensors and the DS18B20 is simpler but carries one sensor per pin in practice for the DHT parts.