Exploring Temperature and Humidity Sensing with Arduino

Exploring Temperature and Humidity Sensing with Arduino
By Jonathan Acheson 
1 / 17
suivant
Slide 1: Diapositive
ArduinoLower Secondary (Key Stage 3)

Cette leçon contient 17 diapositives, avec diapositives de texte.

time-iconLa durée de la leçon est: 60 min

Éléments de cette leçon

Exploring Temperature and Humidity Sensing with Arduino
By Jonathan Acheson 

Slide 1 - Diapositive

Learning Objective
At the end of the lesson you will understand how to use a DHT11 sensor with Arduino to measure temperature and humidity.

Slide 2 - Diapositive

DHT11 Module Hardware Overview
Want to keep a log of the climate in your greenhouse, build a humidor control system, or track temperature and humidity data for a weather station project? AOSONG’s DHT11 Temperature and Humidity sensor module could be the perfect fit for you!

The DHT11 module is a sensor that can measure temperature and humidity. It consists of a sensor and supporting circuitry.

Slide 3 - Diapositive

DHT11 Sensor
DHT11 can measure temperature from 0°C to 50°C with a ±2.0°C accuracy,  and humidity from 20 to 80% with a 5% accuracy.




Note that the DHT11 has a sampling rate of 1Hz, which 
means it can provide new data once every second.

Slide 4 - Diapositive

Inside the DHT11 Sensor
If you remove the sensor’s casing, you will find an NTC thermistor and a humidity sensing component inside.




Slide 5 - Diapositive

Inside the DHT11 Sensor

Slide 6 - Diapositive

Inside the DHT11 Sensor
  1. The humidity sensing component has two electrodes with a moisture-holding substrate (usually a salt or conductive plastic polymer) in between.
  2. As the humidity rises, the substrate absorbs water vapor, resulting in the release of ions and a decrease in the resistance between the two electrodes.
  3. This change in resistance is proportional to the humidity, which can be measured to estimate relative humidity.

Slide 7 - Diapositive

Inside the DHT11 Sensor
DHt11 also includes a NTC thermistor for measuring temperature. A thermistor is a type of resistor whose resistance varies with temperature.

Slide 8 - Diapositive

Module Pinout
The DHT11 module is relatively simple to connect. There are only three pins:


Slide 9 - Diapositive

Module Pinout
+ (VCC) pin provides power to the sensor. Despite the fact that the supply voltage of the module ranges from 3.3V to 5.5V, a 5V supply is recommended. With a 5V power supply, the sensor can be placed up to 20 meters away. With 3.3V supply voltage, the sensor can be placed just 1 meter away; otherwise, the line voltage drop will cause measurement errors.

Out pin is used for communication between the sensor and the microcontroller.

– (GND) is the ground pin.




Slide 10 - Diapositive

Wiring DHT11 Module to Arduino
Now it’s time to connect the DHT11 module to 
the Arduino! Connections are relatively simple. 
 

+ (VCC) pin to the Arduino’s 5V output and 

 – (GND) pin to ground. Finally, 

Out pin to digital pin #8.


Slide 11 - Diapositive

Installing DHT library
To install the library, navigate to Sketch > Include Library > Manage Libraries… Wait for the Library Manager to download the libraries index and update the list of installed libraries.


Slide 12 - Diapositive

CODING TIME
READ SHEET!

Slide 13 - Diapositive

Displaying Readings on Serial Monitor
Once the DHT library is installed, you can display temperature and humidity readings from the DHT11 sensor on the Arduino Serial Monitor.


Slide 14 - Diapositive

Code Explanation
READ SHEET!

Slide 15 - Diapositive

Code Explanation
READ SHEET!

Slide 16 - Diapositive

Project new

Slide 17 - Diapositive