Products‎ > ‎

Battery-board-DHT22

This board is similar to our Battery-board-DHT11 product but replaces the DHT11 sensor by a more accurate DHT22 dual temperature/humidity sensor, also made by AOSONG. This sensor can read positive and negative temperatures (from -40°C to 125°C) with 0.1°C precision and ±0.5°C accuracy. It also reads humidities in the whole 0-100% range with 0.1% precision and 2-5% accuracy. This  sensor is fits well in lots of applications, including HVAC control and weather monitoring.

panStamp Battery-board-DHT22 for wireless applications
Figure 1 : panStamp Battery-board-DHT22 for wireless applications

In order to use Battery-board-DHT22, you only need to program a panStamp with our sample temphumpress application compiled with the TEMPHUM definition enabled from sensor.h. You will also need to enable DHT22 as the sensor to be used by the application:

/**
 * Type of sensor. Uncomment only one of these options: TEMP, TEMPHUM or
 * TEMPPRESS
 */
//define TEMP  1          // Temperature sensor (TMP36)
#define TEMPHUM  1    // Temperature + Humidity sensor (DHT11 or DHT22)
//#define TEMPPRESS  1  // Temperature + Pressure sensor = BMP085

#ifdef TEMPHUM
//#define DHT11  1           // Temperature + Humidity sensor = DHT11
#ifndef DHT11
#define DHT22  1           // Temperature + Humidity sensor = DHT22
#endif
#endif

By default, temphumpress takes Vcc as the actual battery voltage. However, all battery-boards have Analog 7 pin (panStamp 12th pin) directly connected to the battery. When using this application on a Battery-board, we advise enabling battery monitoring via the Analog 7 pin. From temphumpress.ino we have to uncomment the VOLT_SUPPLY_A7 definition:

/**
 * Uncomment if you are reading Vcc from A7. All battery-boards do this
 */
#define VOLT_SUPPLY_A7

Base-board-DHT22 with panStamp and AA battery

Figure 2 : Base-board-DHT22 with panStamp and AA battery


Connection between panStamp and DHT22 sensor is the same as the one from the Battery-board-DHT11 page :
DHT11, connection with panStamp
Figure 3: DHT22, connection with panStamp

As you can see, the DHT22 is directly powered from the Arduino digital pin 15 (Analog 1). This lets the panStamp unpower the sensor whilst in sleep mode, reducing the current consumption to the maximum. For any other hardware reference please refer to our generic Battery-board product.

Firmware-side, when programmed with our sample temphumpress application, the board periodically sends temperature/humidity readings according to the value programmed in the TX_INTERVAL register, saved in EEPROM. This interval is 255 (0xFF) by default in "fresh"panStamps so you will need to program your desired interval after programming the module for the first time. After transmitting the reading, the panStamp enters the sleep mode, disconnecting most peripherals until the next transmission and hence drastically reducing the current consumption.

battery-board-dht22 with wall-mountable enclosure

Figure 4 : battery-board-dht22 with wall-mountable enclosure (sold as an extra option from our webstore)

ą
Daniel Berenguer,
Jul 17, 2012, 5:02 PM
Comments