Ventilation of the bathroom with the mind

    Going into my apartment bathroom, once again, with annoyance, I notice the rumble of ventilation turned on, I don’t see anything wrong with the fact of ventilation, but I don’t like the question of the convenience and functionality of the ventilation in the bathroom. The fact is that the fan of forced ventilation in my apartment (probably many people have this way) is connected in parallel with the light switch and it works only when the light is on. In connection with the prevailing circumstances and the availability of opportunities - I decided to change this state of affairs, and create an automated bathroom ventilation system. Since the ventilation should work, but should not interfere, I decided to do so.

    Preliminary idea


    When the fan came out of the bathroom and turned off the light, the fan turns on, it works for a while, then it turns itself off. To implement this idea, you need a light sensor, a relay - for switching 220 V and a controller that will connect all this.

    As a controller, Arduino Nano took the simplest light sensor and relay - all this stuff can be easily bought for up to 500 rubles from Ali on the Chinese or other electronic sites. Just need a power supply.



    At the beginning of the implementation of this device, the idea came to add functionality in the form of a button and another operating mode. When the button is pressed, the fan turns on regardless of whether the light is on or off and the fan operation time is about 7-9 times longer than in the “standard” "Mode. Also added a LED signaling that the “long” ventilation mode is on.

    As a result, the assembled and connected device in the box looks like this: The

    image

    board for the device using the Arduino was taken universal and was developed by me earlier for various handicrafts, some components are not involved in it. Also on my board there is a transistor that controls the relay - it is not necessary in the circuit (I already had it soldered so I didn’t change anything).

    Let me give you a diagram of the component part involved:



    When writing the program code, I put some features: if the light does not turn on for a long time (1-3 seconds), then ignore this switch, and when the light is turned off for a short time, also ignore this trigger. The value obtained from the light sensor for which I decide is off or on the light, selected experimentally. The time for a short cycle of work is 3 minutes, for a long cycle it is about 25 minutes.

    Then I gave this device for testing. After several days of testing, it turned out that in the mornings they go to the bathroom very often and stay there for a while and in principle do not need to turn on the ventilation - I changed the response time in the program to turn on the ventilation as: if the light is on and it is lit for more than 30-40 seconds, I turn on ventilation . I was also told that it would be good to do so that the ventilation could be turned on at night or for a long time (for drying clothes) - here I slightly upgraded the circuit and connected a switch in parallel with the relay contacts so that the fan is turned on or the relay contacts are closed or the switch contacts - you have to remember if the switch is on, then Arduino will not be able to turn off the fan. For clarity, I will give the wiring diagram of the switch:


    The finally assembled and installed device and its components look like this:

    image

    image

    After the finally installed and tested device, another idea came - to add a moisture sensor to the device and to turn on the humidity threshold, turn on the fan until the humidity returns to normal, but there are small pitfalls : if the humidity does not decrease (for example, in summer, the humidity is high enough), then the fan will rotate forever, you also have to combine this mode with the fact that if the light is on (i.e. human It is in the bathroom and taking a bath) did not include a ventilation during this, and it may be necessary to include periodically for a short period of time - in general there is an open question and requires time, reflection and further testing!

    Lastly, I provide a link to the vent_plus program code in case anyone wants to implement the same device.

    PS If anyone has questions alternative ideas for improving the implementation / modernization of the device - please in the comments.

    Also popular now: