Version 8 (modified by hek, 7 years ago) (diff)


Temperature and Humidity sensor (DHT11/DHT22)


You can download the Arduino sketch here:

Before downloading the sketch to the Arduino you need to select a unique RADIO_ID (see top of sketch source code). The RADIO_ID must be unique in your radio network and is also used on the Vera side to distinguish between different sensors (1-255). After updating RADIO_ID and downloading the code you should be ready to go. This sensor sleeps most of the time. You can change the sleep interval by updating SLEEP_TIME define at the top of the file.

Wire things up

Follow the instructions in ConnectingRadioModule to connect radio module.

To connect the DHT22 sensor to the Arduino board follow these instructions:
Pin1. Connect VCC of the DHT22 sensor to +5V
Pin2. Connect Data to digital pin 3 of the Arduino board
Pin3. Not used.
Pin4. Connect to Ground

Use also need a pull up resistor between +5V and Data. See picture below.

Hardware - Purchase guide

This is the stuff you need to purchase to build the HumiditySensor. Note that I've provided links to the things I bought during the development. You might find it cheaper somewhere else. Also note that you might need to buy like 10x of some items to get the price specified.

1x Cheap Arduino Nano without serial interface and usb connector

8x Dupont cable Female->Female for radio module (and you might need 3 extra cables for your humidity sensor)

1x NRF24L01+ wireless data transmission module 2.4Ghz

1x DHT22 Temperature and Humidity sensor (there also exist a cheaper humidity sensor called DHT11 that is less accurate but half the price).

1x Pull up resistor (4k7)

(You might later need some housing and transformer or battery compartment as well)

TOTAL SENSOR PRICE: $3,99 + $0.93 + $0,6 + $4,99 = $10,50

To download code to the cheapest Arduino Nano sensors (that is missing the serial USB port) you need to buy one of following as well. It is only attached while downloading code and can be reused between sensors.

1x Serial to USB adapter to download code to cheap Arduino Nanos