Basements in older German houses are usually pretty humid and cold, and there are various rules about the proper ventilation. You are supposed to open the window in the early morning, let some dry air in, but during the day, especially in summer, it must be closed. Summer air contains a lot of moisture, because the quantity of water that air can absorb strongly depends on the temperature, the so-called saturation vapor pressure of water. When such moist warm air enters the basement, it will cool down and water will precipitate on the walls. Not good. For me, this is all a bit inconvenient because rather than potatoes I store a lot of electronic parts in the basement, and I want to keep all as dry as possible. So I decided some month ago to set up a little system: (1) a window fan, (2) two humidity/temperature sensors, (3) an ESP32 to control the fan. As sensors, I use the ubiquitous AM2302, because it is easy to read and accurate enough.
For the fan, a KVVR K011301 Model, about 200 m3/h, it also has a feature to close the opening when the fan is off, so that no air can enter the basement when the fan is not running. In principle, you can also use two fans, one to supply air to the basement, and one to extract it, but for me, it works just fine with one fan to extract the air.
A little contraption made to fit the fan to the window. It is all reversible, so if I don’t like to use the fan any more, I can just fit the old window again.
A little control box was quickly made, with an ESP32 module, and a small transformer, a 5 V voltage regulator (be aware that the ESP32 needs pretty high peak current, several hundred mA in WiFi mode! So I needed to add some rather beefy capacitors. Next time I should use a larger transformer…
The key part is the calculation of the absolute moisture level. This is done by regularly (like, every minute) measuring the temperature and relative moisture level inside the basement, and outside, at a protected spot. Then calculate the saturation vapor pressure (which is a formula you can find in textbooks), and multiply with the relative moisture (in percent). This will give you a value that corresponds to the absolute water content (scaling to grams per m3, or similar, but I just use the hPa value, water partial pressure in air). If the water content outside is lower than inside, in absolute terms, I have the controller switch on the fan. There is some hysteresis to avoid all too frequent switching.
A nice box contains all the circuitry, and it can be accessed via a web interface, pretty handy. I also have a server poll the values every few minutes, to prepare some nice diagrams and to check if the system works as designed.
Indeed, it works brilliantly for several months, but then the AM2302 suddenly failed. It would read back the correct temperature, but the moisture value was stuck at 99%. Not good. I tried to clean the sensor, but to no avail. Also, this is the inner sensor, not exposed to the elements or anything. A is outside, B is inside.
So for the time being, I replaced it with a new AM2302, and hope it is just a freak defect and not a general limitation of these sensors — if it is, I will replace the AMS2302 by Bosch BME180 sensor.
This diagram shows the absolute humidity delta, outside minus inside, so if the outside is dryer than inside (for example, outside 10 hPa water, inside 12 hPa, the value will be negative, and the fan will switch on accordingly.
For now, in June, it is all working well, and the basement is indeed much drier than last year, and I don’t need to worry at all about closing and opening windows.
In this region, it seems that at least every few days there is reasonably dry weather for several hours, and the system uses these hours well to ventilate the basement thoroughly. Sure if you have rainy season in your country, this control won’t help, but it all the more moderate climates it seems to be a nice gadget to have.