SNAA344 October 2020 HDC2080
Relative humidity is the ratio of the environmental vapor pressure to the saturation vapor pressure at a given temperature, and represents how close the atmosphere is to complete water saturation. These quantities both have a strong dependence on temperature. When the interior case temperature of a system is incorrect, it will negatively affect the relative humidity output of the sensor.
After characterization of the system as discussed in Section 2, the correct ambient temperature, the interior case temperature (as read by the sensor), and the case relative humidity are all known. Using these quantities it is possible to create an appropriate look up table to correct for RH offset between the interior and exterior of the case. The only requirement is that the atmospheric moisture (measured as Absolute Humidity) between the sensor surroundings and the ambient environment are equal. This is a reasonable assumption, as absolute humidity is not affected by increases in temperature or the effects of heat-generating ICs.
Under this assumption, we can derive the following relationship:
Where:
The saturation vapor pressure can be calculated using the August-Roche-Magnus formula, with only temperature:
This version of the equation returns good results between 0 °C to 100 °C. If calculating the exponential on the host microcontroller is not possible, a lookup table of saturation vapor pressures may be used instead.