DHT22/RHT03 (Low Energy) Humidity driver

Introduction

The DHT22/RHT03 (Low Energy) driver for Humidity sensors is used in conjunction with the DHT22/RHT03 sensor to measure the humidity of the sensor’s surroundings. The DHT22/RHT03 measures humidity via a variably resistant moisture absorbing substrate. The DHT22/RHT03 can also measure temperature through the use of a thermistor. Humidity and temperature measurements can be taken in tandem with each other. All data outputs are supplied via the data pin. This device supports ultra low energy mode and is only powered conditionally.


Driver Parameters

The DHT22/RHT03 LE Humidity driver for Humidity sensors has three parameters that need to be configured:

Pin

This is the pin is monitoring the change in humidity from the DHT22/RHT03, any pin is suitable so long as it is not already in use by another driver. However, it is possible to use the DHT22/RHT03 temperature and humidity drivers in conjunction with each other and both can be assigned the same data pin.

Power Pin

This pin is selected to provide power to the DHT22 only during reading, this way we preserve power when the client detects no new changes.

Resolution(%)

A value between 0% and 5% can be selected with the default being 1%. This is the change threshold that determines when the builder base will detect a change in humidity. For example if the last read value was 60% and the resolution is set to 2%, the builder base will send out the next message when the data is either <58% or >62%


Wiring

Example

The GP0 pin is connected to Data Pin on the DHT22/RTH03, the GP1 pin is connected to VCC on the DHT22/RTH0 and GND pin on the Builder Base is then connected to the GND pin on the DHT22/RTH03.

Breadboard

Schematic

Used Pins

Used Pins

Description

Used Pins

Description

GP0 (can be any GP pin)

This pin receives data from the DHT22

GP1 (can be any GP pin)

This pin provides the power during reading

GND

This pin provides the GND


How to write an App

Navigate to the App Builder and create a new application. You can find the “Humidity” code object under the “Hardware” Tab in the object drop down menu on the left, or you can also use the search bar.

 

 

 

Drag the “Humidity” Object onto the canvas.

 

 

 

Next, locate the “Text” Object under the Interface tab and drag it onto the canvas.

 

 

 

 

Finally, connect the “Humidity” port from the Humidity Object to the “In” port on the Text object and save your application.

 


How to create a firmware

Navigate to the Firmware Builder and create a new firmware file.

Click the “+ Add Hardware” button Scroll down in the list to find the “Sensor” section and select “Humidity”.

Give your device a name, and click “Add Device”

 

 

 

Next, select the “DHT22 RHT03 LE” driver under the driver dropdown menu.

 

 

For this example we select:

  • Pin: GP0

  • Power Pin: GP1

  • Resolution: 1%

 

 

You may now save your firmware file and upload it to one of your clients.

 

 

 


Supported Hardware

  • DHT22


Downloads

Apps

Firmware

Assets