# What is a formula to approximate the change in relative humidity cause by a change in temp?

The moisture-carrying ability of air goes up as the temperature rises. So if I take a volume of air and heat it or cool it (allowing it to expand/contract so the pressure remains constant) how can I calculate the (approximate) relative humidity of the warmer/cooler air that contains the same amount of water vapor?

Say I blow 30°c air at 20% relative humidity over a cool object (but not cool enough to condense water out of the air.) The air is cooled to 20°. What would the relative humidity of the cooled air be if it contained the same amount of water vapor? How do I calculate that?

I am building an Arduino-based control for a warm air dryer for ski boots and bike gear. I will measure the temperature/humidity of the heated air as it comes out of the dryer, and then measure it again as it escapes the gear that I am drying. While the gear is still damp, the waste air should pick up additional moisture, and so its relative humidity should be higher that it would be if I simply cooled it down. When my gear is completely dry, the cooler waste air should contain the same amount of water vapor that it started with, so the relative humidity should be the amount calculated for the measured change in temperature.

I want a "good enough" solution, not one that's mathematically pure. If it gets me answers that are within a percent but involves less computation, that's better than an ideal solution that involves lots of time-consuming calculations. The Arduino microcontroller is fairly slow and cannot do high speed/high precision floating point calculations.

(Would this question be better on an engineering forum? I could see arguments either way.)

You need to know the vapor pressure of water at different temperature. No simple formula to calculate this exists, however you can hunt down a table - like the one on wikipedia - and then use the Clausius-Clapeyron equation. I've learned to use this form: $$ln\frac{P_1}{P_2}=-\frac{L}{R}(\frac{1}{T_1}-\frac{1}{T_2})$$ With latent heat $$L$$ and gas cosntand $$R$$. Use thge closest known value pair auf T and P from your table to calculate the desired values.