Sub topic 1
What Temperature and Relative Humidity Measure
Prerequisites
This chapter assumes that you understand the basic structure of an Arduino sketch, including setup() and loop(). You should also know how to upload a sketch, open the Serial Monitor, connect parts on a breadboard, and use basic C++ types such as float and int.
Temperature
Temperature describes how hot or cold something is. A sensor measures temperature by responding to a physical property that changes with heat. The Arduino then receives a number representing that measurement.
Temperature is commonly expressed in degrees Celsius or degrees Fahrenheit. Celsius is widely used in electronics and science:
- Water freezes at approximately
0 °C. - Water boils at approximately
100 °Cat sea level. - A comfortable indoor temperature is often around
18 °Cto24 °C.
Temperature is a property of a location or object at a particular time. A sensor near a window may measure a different temperature from one near a heater. The sensor's position, airflow, enclosure, and exposure to sunlight all affect the result.
Relative Humidity
Humidity describes the amount of water vapor in air. Water vapor is water in its gas form, so it is invisible.
Relative humidity is expressed as a percentage. It compares the water vapor currently in the air with the maximum water vapor that air could hold at the same temperature.
For example, 50% relative humidity means that the air contains about half of the water vapor it could hold before becoming saturated at that temperature. It does not mean that half of the air consists of water.
Warm air can hold more water vapor than cold air. This means that the same amount of water vapor can produce different relative humidity readings at different temperatures.
Why the Readings Are Related
Temperature and relative humidity are separate measurements, but they are physically connected. When air gets warmer without gaining or losing water vapor, its relative humidity usually falls because warmer air has a greater capacity for water vapor. When air cools, its relative humidity usually rises.
If air cools enough, it reaches the dew point. The dew point is the temperature at which the air becomes saturated. Further cooling causes water vapor to condense into liquid water, such as droplets on a cold window.
The sensor must therefore report both values together. A humidity percentage without its temperature is incomplete because the meaning of relative humidity depends on temperature.
Reading the Values
A digital temperature and humidity sensor usually reports:
| Measurement | Typical unit | Meaning |
|---|---|---|
| Temperature | °C or °F | How hot or cold the sensed environment is |
| Relative humidity | %RH | How close the air is to saturation at that temperature |
Treat the readings as a pair when making decisions. For example, a greenhouse controller might open a vent when temperature is high, or start a fan when humidity is high. A more careful controller considers both values because ventilation changes temperature and humidity together.
Relative humidity is not the same as moisture content in soil, the amount of rainfall, or the total mass of water in a room. It is a temperature-dependent measure of water vapor in air.
Exercise
Exercise
Air contains the same amount of water vapor, but its temperature drops. What usually happens to relative humidity, and why?
Show answer
Relative humidity usually increases because cooler air can hold less water vapor. If the air reaches its dew point, some vapor condenses into liquid water.