Search This Blog

Here we have a sensor module to measure the temperature and humidity of the environment. Don't get so excited. If you want to try it to ...

Temperature & Humidity Sensor DHTXX



Here we have a sensor module to measure the temperature and humidity of the environment. Don't get so excited. If you want to try it to make your thermometer to measure body temperature, you need to shake your brain a little bit. This 2 in 1 sensor module serves our purposes in environmental projects at a cheap price where temperature & humidity can be used as a trigger. Unlike most other sensors, this gives a digital output.

In & Out:
We can have only the sensor part or the sensor module pack. Whatever may it be, apparently, we can see, a cage-like structure, 4 output pins, and in the sensor module, we can see some resistors, capacitors along with an IC. The cage is to protect the sensor circuitry.

Sensors


As you can see two sensors, build the entire module; 1. The Humidity Sensor & 2. Temperature sensor (Thermistor).
This module has the simplest construction, one sensor can have. Before jumping into the working principle, let us have a basic idea of the sensors.

Humidity Sensor: The construction of the humidity sensor includes a moisture-holding substrate that changes its conductivity with the change of the environment. The substrate is placed between two electrodes. The substrate absorbs the water vapor and releases ions. Consequently, the conductance increases which is proportional to the relative humidity. The change in resistance between the electrodes is sensed & processed by the IC and creates the output.

Construction of humidity sensor

Now it leaves no place of questioning, why it's called the capacitive type humidity sensor. This capacitive nature provides accurate measurements regarding humidity. (Dew point, Relative Humidity, Absolute Humidity, etc.)

Temperature Sensor: This is nothing but a thermistor that changes its resistance with the change in temperature. It has a negative temperature coefficient (NTC) which means its resistance decreases with the increment of temperature. 



Sintering refers to the inclusion of semiconductor materials to provide a larger change in resistance with just small changes in temperature.

Pinouts:
The sensor has 4 output pins; Vcc, Data, NC, GND respectively.

Working Principles:
Firstly connect the sensor as per the following diagram and don't forget to add the pullup resistor. (Not required for the sensor module as it has an inbuilt pullup resistor mounted on the PCB)

DHTXX has 8 bit MCU, therefore, it sends data in 8-bit sequences. After sending the starting pulse by the host MCU, DHTXX starts sending data. Both the humidity & temperature data are sent through the data pin in serial transmission line.


Data(40 Bit)= Integer byte of RH; Decimal byte of RH; Integer byte of temperature; Decimal byte of temperature; Checksum/Parity byte

The successful transmission of data is checked by the parity byte. In case of failure, again the data is transmitted.

Parity(8 Bit)= Integer byte of RH +Decimal byte of RH +Integer byte of temperature +Decimal byte of temperature

An example be like,
Data:       00110101  00000000  00011000  00000000  01001101
Parity:     00110101+00000000+00011000+00000000 = 01001101
Decision: Data matched!
Humidity: 00110101 = 35H = 53% RH
Temperature: 00011000 = 18H = 24°C

Accuracy & Specifications:
✦ Temperature Range: 0-50°C with ±2% accuracy
✦ Humidity Range: 20-80% with ±5% accuracy
✦ 3.3 ~5V MCU system.
✦ Operating Current: 0.3~5.5 mA
✦ 16-bit resolution
✦ Long term stability
✦ DHT22 has a more precise, accurate & wider range of working.
✦ 1 Hz sampling rate.


Pitfalls:
This sensor can only provide data that are up to 2 seconds old.

Application Area:
✦ Humidity & temperature measurement
✦ Local weather station
✦ Automatic climate control sensor
✦ Environment monitoring device

Other Sensors:
AM2302, SHT71, TMP100, DS18B20, etc.


Reference Articles:

Image Sources:
* DHgate.com
* Technobyte
* The Engineering Projects
* How to Mechatronics
* Simple-Circuit.com
* ElectronicsHub
* How to Mechatronics


1 comment: