The vast majority of humidity sensors measure relative humidity. Relative humidity indicates how much water vapour is in the air compared to the maximum amount of water vapour the air can contain.
Air can only contain a limited amount of water vapour. That amount depends on temperature and air pressure. A relative humidity of 100% indicates the maximum amount of water vapour. The air is saturated. If more water vapour is added, it will condense. The warmer the air, the more water vapour it can contain. So if you raise the temperature in a room, the relative humidity will drop (the absolute amount of moisture in the air remains the same but the warmer air can absorb more moisture).
You have probably noticed that the windows, mirrors and tiles condense (become damp) when you take a hot shower. This is because there is a lot of moisture (water vapour) in the air when you shower. When this moist air touches your cold window/mirror/tile, it cools down. And colder air can contain less water vapour so that the water in the air condenses and you get damp windows/mirrors/tiles.
Indoors, the relative humidity is usually 40 to 60 %. In a bathroom, of course, this can be higher.
Tip: Is the humidity in your classroom too low? Then place a bowl of water on the heating.
On the page Measuring temperature we have explained that the resistance value of a resistor can change under the influence of temperature. There are also resistors that can change under the influence of water. However, these are not used in ControlCO2. ControlCO2 uses a capacitor to measure humidity.
As already discussed in Measuring temperatureA resistor is one of the most frequently used components in an electronic product. A capacitor also belongs to the list of most used components (which one is the winner, I will not mention here).
A capacitor can be seen as a storage tank for electrons. Or to use the analogy with water again, like a big water barrel. You can store water in it and then use it later.
As mentioned, ControlCO2 uses a capacitor to measure humidity. Such a capacitor consists of a hygroscopic dielectric material (material that attracts moisture). This Hygroscopic dielectric material will cause the capacitance to change dramatically if it becomes damp. The more humid, the greater the capacitance. So by measuring the capacitance, we can find out the amount of moisture.
But how do you measure that capacity? Let's take the analogy with water again. We want to know how big our water tank is. You can easily determine this if you know how much water comes out of your water pipe to fill the vessel. By measuring the time it takes to fill the vessel, you can determine the size of the vessel. And if you know the size, you also know the humidity of the air.
So we use a similar principle to determine the capacitance. If we know how many electrons flow into the capacitor, then we can measure the size of the capacitor by measuring how long it takes for the capacitor to fill completely with electrons. The longer this takes, the larger the vessel, and thus the higher the humidity.