Recently, a lot of posts about building air quality monitors have appeared on Habré. At the same time, I did not find a single attempt to control air quality, and after all, as soon as we move from passive observation to active management, a lot of interesting problems and solutions arise. I want to share my modest developments in this area.
So, it is given: Garage not heated, not warmed, brick two-storeyed with huge humidity inside from which wooden interfloor overlapping rot, on a wall in the winter a snow coat and other unpleasant rust.
Task: “Drain” the garage.
')
Decision. We will not go into the details of capillary suction of water by concrete and other sources of moisture in the air of the garage - we will focus on what we can do with the moisture that has already appeared. If you do not consider too expensive for a garage appliances such as dehumidifiers, then the only way I found is to force out the internal, damp air with a drier outdoor air with a simple fan.
Arduino, two DHT22 sensors inside and out, a relay module on the fan and really interesting problems begin.
DHT22 is known to give off temperature and relative humidity. How to compare sensor readings? Is the outside air "drier" than the inside? What will happen to the air if it is sucked into the garage? Perhaps it is so much warmer that even with less relative humidity outside it will produce condensation on the walls inside. The internal temperature is always different from the outside, but at the same time gradually tends to the outside. The degree of "gradualness" is unknown. The temperature will rise or fall - just unknown.
The first thought was to try to build arrays of sensor readings and try to predict the effect of outside air on the inside, but a bunch of redrawn pieces of paper did not allow us to build a distinct model in my head for implementation.
But the next idea came. Absolute humidity is absolute and that does not depend on pressure, temperature and other things. And if the absolute humidity of the outside air is lower than the absolute humidity of the internal air, then the outside air is definitely “drier” and regardless of how its temperature changes inside - it is “better” than the replaced air.
The idea is an idea, but even then there were minor problems. It turns out the absolute humidity is calculated from the temperature and relative humidity according to the graphs like this:

And there is no exact way of recalculation. But there is a sufficiently large variety of approximating formulas. According to the results,
this formula was chosen, or rather the formulas, since the formulas for the positive and negative temperatures are different.
It would seem that this is all. We compare two absolute humidity and if outside “land” - turn on the fan, but it was not there. The first problem is that if we imagine that the outside air has constant humidity and there is no moisture inside, but there is raw air, when pumping through the garage, the outside air will mix with the air there and the internal humidity will endlessly approach the outside, but will not reach it or will reach it very soon. And it is extremely inefficient in electricity. The obvious solution is to introduce some kind of difference in humidity, at which the fan is turned off and the internal air is considered to be dry, but a second problem arises. When the temperature drops from +30 to -30, the value of absolute humidity changes a thousand times. That is, at -30 degrees, a difference of 0.001 grams per cubic meter of air can mean that you will pass the dew point and a coat will fall on the walls. And at +30 this thousandth does not mean anything, because 20 grams of water can hang in a cubic meter.
No clear, informed decision was invented. The scientific difference was taken as a goodwill-on scientific standard of 0.01 grams per cubic meter from the consideration that there was not much damage from the frost on the walls, because when the temperature rises, the robot works - the ice just sublimates and will be removed with the rest of the air. And for empirical reasons, another energy-saving restriction was introduced. At a relative outdoor humidity above 90%, the outside air is not pumped. Just because it is abnormally high humidity for our region and even if this air is drier than internal - very soon and it will also have to be pumped out. The figure is 90% the same from the ceiling.
Result.
One and a half years the robot plows non-stop.

Arduino in a box with a gun, the same power supply. It also has an internal sensor on the right. Relay unit in the outlet itself. The switch forcibly turns on the fan to bypass the relay. Fur coat of frost in the winter was gone. The tree has all cracked. Nothing rots. It consumes about two kilowatt-hours per month. If in the “dry” garage to breathe for about 15 minutes - the robot turns on the fan. In general, everything works.
A side effect - freezes. And it freezes in such a way that the frost coat of frost now periodically appears outside, and in May, when the sun is shining and the grass is turning green - inside, without a padded jacket, it shakes from the cold.
Field for optimization. If you screw the SD card and compile the statistics, you can choose a more reasonable cutoff than 90%. You can think and put the difference in absolute humidity cutoff depending on temperature.
And now the most interesting thing is development.
Now the system of exhaust ventilation with recuperation for a private house is being worked out. The task is to reduce energy consumption and ventilation and heating. It would seem that everything is simple. CO2 sensors per room. We ventilate only the room where we “breathed in”, but there are a lot of questions to which I have no answers yet. I would be happy to help.
1. How to control the outflow through the stove? Here there is a chastotnik on the inlet fan, there is on the exhaust. If it were not for the stove, it would be possible to do one thing and turn the fans in sync. And what about the outflow through the furnace? (Separate air duct for furnace flow - not to offer);
2. (excluding the stove) Algorithm for fan speed control? The current idea is that the rotation speed should not depend on the concentration of CO2 but on the growth rate of the concentration. That is, if the concentration grows - the momentum grows, if it drops, then some kind of cut-off drops, say, 500-600ppm. Increasing the cutoff, you can enter the winter economy mode with a high concentration of CO2;
3. There is a desire to bind the stove damper to the CO sensor, in the sense that it keeps the damper as closed as possible for the maximum amount of time, but it is scary;
4. A purely technical question: how can all this sensor magnificence be hanged as cheaply as possible around the house, since for the purpose of controlling the heating there will also be DHT22 in each room?
Thanks for attention. I did not draw the scheme of the robot, I will send a sketch to everyone, I will gladly accept constructive suggestions.