HTU21D Humidity Value Decreased as Temperature Increased

Hi all,

I'm using HTU21D connected to arduino nano to measure temperature and humidity inside evaporating room which is located near equator. Just outside the room (outdoor, surrounded by tree but direct sunlight from above), I got the reading value at around 30 Celsius for temperature and 66% for humidity. When I put the system inside the room, after 1 hour I got the reading value at 67 Celsius for temperature and around 25% humidity, which is quite strange since the room was supposed to be humid. I keep the sensor inside the room. Several hours later around 5 PM, the temperature inside the room decreased to around 35 Celsius, but the humidity measurement increased to around 65%. I only open the door for short time, and the room is big enough so most of the air stay in the room when I open the door.

Is this normal? I don't think my code at fault here. Any help will be really appreciated. Thank you.

Hi, welcome to the forum.

Which HTU21D module do yo have and how did you connect the HTU21D to the Arduino Nano ? Because the HTU21D is a 3.3V chip and the Nano is 5V board, so there is a voltage conflict on the I2C bus.

Which sketch do you use ?

It measures the "Relative Humidity", not the amount of water in the air. It is not milli-liters water per liter air. It is a number that tells the percentage of the amount of water that the air can hold for that temperature.
At 67°C, the hot air can hold more water. With the same amount of water in the air, the Relative Humidity decreases.

If you wrap the sensor in a damp towel (not dripping wet, but no dry parts), then it should be near 100% Relative Humidity for all temperatures.

You may not hold the sensor in direct sunlight. There are almost no sensor that allow to be in direct sunlight.

1 Like

From temperature and relative humidity, you can calculate absolute humidity, which is measured in grams of water per cubic metre. This reading may behave more as you are expecting than relative humidity.

Percent RH is a measure of the amount of water the air can "absorb" at any given temperature.

A given volume of air can "absorb" more moisture when it is hot than when it is cold.

So for a volume of air with a constant amount of moisture the %RH will be higher when it is cold and lower than when it is hot.

The following chart shows that at 67 deg C (153 deg F) and 25% RH, the absolute humidity is very high (red and blue lines). At 35 deg C (95 deg F) and 65% RH, the absolute humidity decreased by about half (green and purple lines). So opening the door may have changed things more than the OP thought.