In order to measure RH, we need to not only sense
the water vapor pressure but we need to sense the
temperature, as well. There are many ways to do this, but
the most common inexpensive way this is done is with
sensors such as the DHT22 (Figure 6) that outputs a
digital signal that we can read for the RH and
temperature. In practice, we can read this sensor about
once every two seconds and expect to get an RH reading
that is ±1% accurate. The digital signal output is somewhat
arcane, but fortunately we have access to pre-built and
tested libraries to use with the Arduino.
Temperature is a measure of how hot or cold an
object is; we measure temperature with a thermometer
(duh). The DHT22 uses a thermistor (thermal resistor)
which is a type of resistor that has a resistance that varies
significantly with temperature. As with the RH, the
temperature is reported as part of the digital data output
of the DHT22. The temperature reading is accurate to
Using the DHT22 Hardware
There are lots of ways to sense temperature and
humidity. We will use the DHT22 [you can get one from
Adafruit or Virtuabotix for about $13]. This sensor is a bit
more expensive than its DHT11 little brother, but it is also
more precise, accurate, and has a better range for
It is absolutely critical that you pay attention here
because you can very easily kill your $13 DHT22 if you
wire it wrong.
September 2013 71
■ FIGURE 8: Fritzing PCB view.
■ FIGURE 6: Fritzing breadboard view.
■ FIGURE 7: Fritzing schematic view.