본문 바로가기
Arduino Sensors/Chapter 3 Indoor air environmental senso

DHT22 Temperature-Humidity Sensor [Arduino Sensors for Everyone]

by 로니킴 2021. 6. 12.


This chapter explains how to use the DHT22 sensor. You will learn its features, operating principles, specifications, connection pin arrangement, output values, and connect Arduino and the sensor together to measure the air around you easily using the library.

 

Contents

     


    DHT22 Temperature-Humidity Sensor

     

     

     

     

     


     

    Effects on the human body

    Temperature/humidity affects the human body by increasing the air circulation and the time that air pollutants stay in the air.

     

    According to a study on fine dust health impact and preventative measures using Big Data, the meteorological variables corrected during the analysis of the health effects of fine dust in Korea were mainly temperature and humidity, and due to the characteristics of the analysis area, other variables such as air pressure, sea level, precipitation, and wind direction are used as correction variables in place of temperature and humidity.

     

    In other words, heat (air temperature), pressure (atmospheric pressure), wind (wind direction and wind speed), and moisture (humidity) are four very important environmental factors that affect air pollution. Air pollutants affected by temperature and humidity include dust, combustion gases (CO, NO2, SO2, etc.), formaldehyde, and radon. Due to temperature and humidity, air circulation and the time that air pollutants stay in the air increases, which adversely affects the human body.

     

    According to the results of the National Institute of Environmental Science's “Personal Exposure Assessment Study Based On The Daily Time Activity Pattern of Citizens” and the National Statistical Office’s “Life Time Survey Results,” Koreans (all citizens age 10 years or older) spend their time indoors for at least 20 hours per day. Out of this 20 hours, it is reported that more than 14 hours are spent in their own homes. The indoor air pollutants are affecting our daily lives and health as much as the outdoor air pollution. For example, sick house syndrome and building syndrome cause eye, nose, and mouth irritation, dry throat, fatigue, skin rashes, dizziness, memory loss, and mental fatigue. Indoor air pollutants are  found to be sensitive to the effects of temperature/humidity.

     

    The effects of temperature/humidity on the human body can be divided into direct and indirect effects on the human body. It can also be divided into indoor and outdoor.

     

    Type Effects on the human body
    Direct
    influence

    (anatomy)
    When humidity is low, and the air is dry, the mucous membrane becomes dry. The natural immunity from bacterial infection in the airway worsens, resulting in respiratory diseases such as colds and the flu.
    · When indoor temperature in winter is 28, brain activity slows down and skin becomes dry caused by eczema.
    Indirect
    influence

    (Indoor air
    pollutant)
    · Temperature increases the amount of pollutant emissions indiirs, and humidity increases the concentration, which results in increased increases time spent in the air. Indoor air pollutants are absorbed through breathing and affect the human body.
    · Indoor air pollutants include dust, combustion gases (CO, NO2, SO2, etc.), formaldehyde, and radon (Rn).
    Indoor air pollutants can cause asthma, chronic obstructive pulmonary disease, respiratory disease, headache, rhinitis, laryngitis, atopy, skin disease, emphysema, bronchitis, pneumonia, lung cancer, chronic lung disease, increased airway resistance, headache, dizziness, sleepiness, eyes, nose, and throat irritation, dizziness, cough, diarrhea, skin disease, emotional anxiety, memory loss, lung cancer, etc.

     

     


     

    [Influence of temperature on air pollutants]

    Indoor pollutants Explanation
    carbon dioxide
    (CO2)
    · The right indoor temperature can reduce the amount of carbon emissions in the home. If the cooling temperature is increased by 1 degree and the heating temperature is lowered by 1 degree, 231 kg of CO2 produced per household can be reduced per year. (46.2 trees per year) [1]
    Formaldehyde
    (Hcho)
    · Due to the nature of formaldehyde, the temperature dependence is high, so when temperature rises, the emission also increases rapidly. [2]
    · In spring and summer, the temperature rises and the temperature of buildings rise to very high temperatures. Therefore, emission increases by receiving heat from the building materials and the products inside. During winter, the amount of artificial emission increases because windows are closed, and the room is heated.
    · When the indoor temperature rises by 1, the average concentration increases by 5.4ug/m3. In hot summer months, the average concentration increases by 35.2 ug/m3. [4]
    Styrene · When the indoor temperature rises by 1, the average concentration increases by 8.3ug/m3. [4]
    Volatile organic compounds
    (VOCs)
    · VOCs emitted from building materials are generally affected by room temperature/humidity. [3]
    · Hot buildings, walls, interior materials, and furniture in summer do not simply emit heat; as temperatures rise, and the building heats up, pollutants such as benzene found in buildings, walls, and indoor furniture are also emitted. [2]
    Radon · Since increasing the indoor temperature increases the amount of radon released, it is good to keep the indoor temperature at an appropriate temperature. In winter, due to the difference in temperature between the soil and the room, it enters the room through the floor or cracks of the building. If the inflow rate of radon is higher than the room ventilation rate, the indoor concentration may be higher the outdoor concentration. [5]
    · Radon is characterized by its high dependence ontemperature, humidity, time, and season.

    [1] Climate Change Center, How can we respond to climate change?
    [2] Diel variation of formaldehyde levels and other VOCs in homes driven by temperature dependent inflow and emission rates, Building and Environment, 2019
    [3] Yoo Bok-hee. (2010). Investigation of the relationship between VOC and formaldehyde emission according to temperature and humidity changes in new apartment houses. Journal of the Korean Institute of Architecture-Planning Section, 26(5), 383-391.
    [4] National Institute of Environmental Sciences, 2010, Study on Indoor Air Quality Management Plan by Residential Space (II) 
    [5] Ministry of Environment, 2014, Study on the Effect of Radon Emitted by Building Materials on Indoor Air Concentration

     

     

     

     

    [Influence of humidity on air pollutants]

     

    Humidity increases the concentration of pollutants in the air.

     

    Fine dust is worse on high humidity days because the grains of pollutants in the air increase due to humidity. When the humidity is high, indoor air pollutants (eg fine dust) absorb moisture, making it larger and heavier. As a result, contaminants cannot be accurately measured. It also increases the growth of hygroscopic particulate matter such as sulfates and nitrates, which absorb moisture well. These  particles increase in mass and concentration and affects the growth of atmospheric aerosols (small solid and liquid particles floating in the air).

     

    When humidity is low, and the air is dry, the mucous membrane becomes dry. The natural immunity from bacterial infection in the airway worsens, resulting in respiratory diseases such as colds and the flu. Also, symptoms of various diseases such as allergies and asthma worsen.

     

    High humidity allows various microbes to reproduce. In particular, bacteria such as fungi causes asthma, allergies, and rhinitis symptoms. If the humidity is high, bacteria such as mold become active, and if the humidity is low, the indoor air becomes dry and adversely affects respiratory diseases. So, how does humidity affect indoor air pollutants?

     

    Indoor pollutant Explanation
    fine dust
    (PM)
    · PM concentration of fine dust increases when relative humidity increases, and PM concentration decreases when relative humidity decreases. [2]
    · Excluding when the relative humidity of fine dust is less than 20%, the PM10 concentration increases as the relative humidity increases overall. As for the increase rate, the concentration of fine dust increases by an average of 4.3/ (6.7%) as humidity increases by 10% from 40% relative humidity. [1]
    · As the season changes from spring to summer, the concentration of PM10 increases due to the increase in humidity. [3]
    Ethylbenzene · When the indoor humidity increases by 1%, the concentration increases by 0.6 /. [One]
    Airborne Bacteria (TAB) · When the indoor humidity increases by 1%, the concentration increases by 16.4 CFU/. [One]
    Airborne mold · When the indoor humidity increases by 1%, the concentration increases by 42.5 CFU/. The concentration increases by 501.8 CFU/ in spring, autumn, and winter than in summer. [One]

    [1] National Institute of Environmental Sciences, 2010, Study on Indoor Air Quality Management by Residential Space (II) 
    [2] Changho Lee, Seungnam Oh, 2020, Effect of Air Humidity on Measurement of Light Scattering Fine Dust 
    [3] T.-J. Cho et al., “The Study of Indoor Air Quality at Schools in Chung-Nam Area,” Journal of the Environmental Sciences, vol. 17, no. 5, pp. 501–507, May 2008

     

     

    As humidity increases, the fine dust absorbs moisture and increases in size and mass. As a result, it will not be possible to accurately measure the air pollutant value because it is affected by humidity. For example, in the case of a fine dust sensor that measure by the light scattering method, the concentration (weight) calculated increases by as much as 8 times (due to humidity) as compared to a normal case. Therefore, it is required to use a heater as a standard method for measuring fine dust. When the relative humidity is over 40%, the heater is turned on to measure the size of the fine dust with moisture removed.

     

    The concentration of fine dust is closely related to humidity. In particular, in the case of high concentration cases, in addition to cases of high concentration due to external causes such as yellow dust, high concentrations occur mainly on the foggy days. Usually, humidity is also high on foggy days. 

     

     

    In general, when humidity is high, the amount of moisture in the atmosphere increases, thereby increasing the growth of hygroscopic particulate matter such as sulfate and nitrate that absorb moisture well. These particles’ mass and concentration increase as a result. However, even when humidity decreases, the size of these particles do not immediately return to its original size; rather, they slowly become smaller and smaller. Thus, relative humidity affects the growth of atmospheric aerosols (small solid and liquid particles suspended in the air).

     

     

     

     

     


    DHT22 Sensor?

    The DHT22 temperature and humidity sensor uses the AM2302 sensor. Before release, sensors are calibrated in temperature and humidity during production. When the microcomputer inside the sensor is detected, the correction factor values stored in the memory are used to provide accurate temperature and humidity values.

      

     

    The following is the specification of DHT22 (AM2302).

     

     

    [Sensor precautions]

    Type Precautions
    Operation and storage · The DHT22 sensor must not be placed in liquid. Water or other liquids can damage the sensor beyond repair. Also, water droplets and fog must be avoided. These environments may exceed the range specified in the humidity sensor's specifications (0-100%). Sensors can behave abnormally and then recover again, but they can age quickly.
    · For applications attached to aquarium temperature, refrigerator, air conditioner, iron, etc., a waterproof temperature sensor should be used.
    Chemical substances Chemicals ((H2, CO, O2, CO2, NOx, toxic gas, volatile organic gas, ammonia, toluene, etc.)in the workplace or indoors handling industrial chemicals, direct vapor can affect the sensor in various forms. have.
    · DHT22 sensor's sensor sensitivity (measurement resistance) may be lowered, causing an error.
    Temperature · Care should be taken to avoid shock or sudden temperature changes.
    When measuring temperature, pay attention to the installation site. Accurate measurements can be difficult to obtain near heating elements that generate heat (e.g. stoves, etc.) or in narrow enclosed spaces with poor airflow.
    · Locations with high airflow can affect accurate temperature/humidity readings.
    Light · Long-term exposure to strong light and ultraviolet rays may degrade the performance of the DHT22 sensor.
    Connecting wires · Since the connection line affects the communication quality and distance, a high-quality connection line is recommended.
    Etc · Soldering temperature should be less than 260 .
    · Do not use the DHT22 sensor in an environment where it may be exposed to hazards related to safety and emergency stop devices.

     

     

     

     


    Purchasing the DHT22 sensor

    As follows, the [DHT22] sensor used in the book [Arduino Sensors for Everyone] can be purchased at Ali Express, Amazon.  

     

     

     

     


    Software Coding

    Run the example file in Steamedu123_Sensor-master > examples.

    /*
       @301 DHT22 Temperature-humidity sensor
    */
    
    #include <C301_Steam_Air_DHT22_TempHumidity.h>  // Internal library header file
    #define PIN 3
    
    SteamDHT22 dht22(PIN, DHT22);  // pin number, type
    
    void setup() {
      Serial.begin(9600);     // Start serial communication at a speed of 9600bps.
      dht22.begin();          // (1) Initialize the sensor.
    }
    
    void loop() {
      dht22.read();         // (2) Measure the value of the sensor.
      dht22.display();      // (3) Output the sensor value.
    
      delay(1000);          // Wait for 1 second.
    }

     

     

     

     

     


     

    DHT22 Arduino sensor operation check

    When the hardware connection and software coding are completed, you can check the operation screen as follows.

     

    ------------------------------------------------------ 
    Development environment: WINDOWS 10
    Arduino IDE: 1.8.13
    ------------------------------------------------------ 

     

    01 library copy

    You can easily check the operation by using the  library.  
    The libraries \Steamedu123_Sensor-master folder is copied to the folder below.
    * This folder is created automatically after installing Arduino C:\Users\s\Documents\Arduino\libraries


    02 *. ino file execution
    -Connect Arduino and PC
    -Run Arduino IDE
    -Menu → Tools → Board: Check Arduino UNO
    -Menu → Sketch → Check/Compile

    03 Check compilation

    Select Sketch>OK/Compile (CTRL+R) to compile.


    04 Arduino Uno upload

    When the compilation is completed without any problems, select Sketch>Upload (CTRL+U) to upload the compiled file.


    05 Operation check

    You can check the operation as follows.
     

     


     

    Wrap-up

    You can connect Arduino and [DHT22] sensor and practice the sensor easily with simple coding.

     

    In this section, the effect of temperature/humidity on indoor pollutants, the effect on the human body, and the standard concentration were examined. The measurement range of simple measuring instruments, and the sensors used in the measuring instrument were also examined. In addition, we also had a project using the DHT22 sensor and Arduino to measure temperature/humidity.

     

    Indoor air pollutants have a higher concentration as the temperature/humidity increases. Indoor air pollutants affected by temperature include carbon dioxide, formaldehyde, styrene, VOCs, and radon. Fine dust, ethylbenzene, airborne bacteria, and mold are affected by humidity. Therefore, it is important to maintain the right temperature and humidity for a healthy indoor life.

     

    Indoor temperature can be easily controlled by using air conditioners and heaters, but humidity is difficult to control with only air conditioners and heaters.
    Therefore, check the temperature/humidity level 4 measured by the DHT22 sensor, and if it is bad or very bad, open the window to allow fresh and clean air to enter the house. You can control humidity with forced ventilation, humidifier, charcoal, dehumidifier and plants. However, we have to be careful when using these methods, as they can cause more pollution indoors.

     

     

     

     


     

    References

    References for [DHT22 temperature/humidity Arduino sensor] used in the book [Arduinofor Everyone]are as follows.

     

    [1] National Institute of Environmental Sciences, Research on personal exposure assessment according to national daily time activities, 2010 
    [2] Diel variation of formaldehyde levels and other VOCs in homes driven by temperature dependent infiltration and emission rates, Building and Environment, 2019 
    [3] BokHee Yoo, Investigating the relationship between VOC and formaldehyde emission according to temperature and humidity changes in a new apartment house, Journal of the Architectural Institute of Korea, 383-391, 2010 
    [4] Climate Change Center, How can we respond to climate change? 
    [5] Ministry of Environment, appropriate indoor temperature/humidity, manual for indoor air quality management, 12p
    [6] BME280Datasheet
    [7] SHT20Datasheet
    [8] HDC1080Datasheet
    [9] DHT22(AM2302) Datasheet, “Technical Specification”, p1 
    [10] DHT22(AM2302) Datasheet, “Operating specifications”, p3

     

     


    Purchasing a book

    [Arduino Sensors for Everyone] The book is available for purchase on Google Book and Apple Books.

    In this book, you will learn how to use the PMS7003, GP2Y1010AU0F, PPD42NS, SDS011 Fine Dust Sensor, DHT22 temperature/humidity sensor, MH-Z19B carbon dioxide sensor, ZE08-CH2O formaldehyde sensor, CCS811 total volatile organic compound (TVOC) sensor , GDK101 radiation (gamma ray) sensor, MQ-131 ozone (O3) sensor, MQ-7 carbon monoxide sensor, MICS-4514 nitrogen dioxide sensor, MICS-6814 ammonia sensor, DGS-SO2 sulfur dioxide (SO2) sensor, BME280 atmospheric pressure sensor, GUVA-S12SD ultraviolet (UV) sensor, MD0550 airflow sensor, and QS-FS01 wind speed sensor.

     

    [Google play book]

     

    Arduino Sensors for Everyone, 저자: Ronnie Kim - Google Play 도서

    Arduino Sensors for Everyone - 저자가 Ronnie Kim인 eBook입니다. PC, Android, iOS 기기에서 Google Play 북 앱을 사용해 이 책을 읽어 보세요. 책을 다운로드하여 오프라인으로 읽거나 Arduino Sensors for Everyone을(를)

    play.google.com

     



    댓글