Automated Window Opening/closing

by SVK in Circuits > Arduino

1336 Views, 1 Favorites, 0 Comments

Automated Window Opening/closing

wdemo

Background

After installing plastic windows, it became stuffy, the micro-ventilation mode did not save, through a more open window it became noisier (someone shouted loudly in the morning, or talked easily in the evening), and in winter it was also noticeably cool.

Idea

Affordable automation of the closing element control process, in other words, opening and closing the window according to the conditions of interest to us - noise, heat, time of day, illumination, air freshness (ventilation).

Retreat

The response to light is not implemented. The type of sensors used in my implementation is not fundamental - it just happened :)

Supplies

  • TB6612 Motor Shield for Arduino (there are a lot more control ports on the board than we need in this implementation)
  • One Wire Waterproof Temperature Sensor 2.0 for DS18B20 - At first, I was going to use two sensors-inside and outside, to measure the difference. But then I limited myself to one inside-so as not to drill the window and not to disassemble the sensor. The temperature difference is calculated from two different window states. Thus, any analog temperature sensor can be used.
  • Voice Sound Detection Sensor Amplifier LM393 - Digital sensor for exceeding the noise threshold. It is convenient for carrying out visual adjustment. However, during the tests, the idea came to me that with an analog sensor, you can rely on two levels - the level of silence and noise. Moreover, these levels could be changed programmatically depending on the time of day. If desired, you can solder an additional wire and get an analog value. The microphone will need to be taken outside.
  • DC12V 2" Linear Actuator - The proposed samples have excessive force in the proposed (from the very top of the window) mounting option, so you can choose the minimum. The sizes should be selected based on your case.
  • Power Connector pin 2.1x5.5mm Plug Jack - It is better to use it so that the male VDC jack can be directly connected to an Arduino or an actuator.
  • RCA - Оf course, you can also use the power jack, but there is a risk of mixing it up.
  • Wires, soldering iron, square-section aluminum rail, hacksaw and file :)

Logic

P1070019.JPG

(A/M)(O/C)W - auto/manual open/close window

(N/V)(O/C)(A/M)W - noise/vent open/close auto/manual window

Here is a starting state diagram. During the experiments, a controlled time lock was added for the transition from one state to another. Additional transitions. Correction of the fact that at the moment it is not possible to accurately restore the state of partial opening of the window set manually.

Scheme

scheme.png
P1070021.JPG
P1070025.JPG
P1070023.JPG

The assembly scheme is quite simple. The shields are neatly connected to each other. We connect the connectors for the power supply and the actuator. We connect our (just) two sensors. Attention, the voltage should be connected to the motor shield.

Build

P1070009.JPG
P1070011.JPG
P1070017.JPG

It's quite simple. The actuator automatically stops in the extreme positions. Based on this, it is necessary to select its size and place of fixation.

Fastening to the window can be carried out through a double-sided sticky foam tape, it is quite reliable and can be subsequently peeled off.

The distance of the sensor from the window can be adjusted the speed of reaction to temperature changes associated with its condition.

Usage

sdemo

The program works in automatic mode. Various time and temperature constants are specified in the code. In manual mode, you can control the opening, switch to automatic mode, choose to ignore the temperature sensor and/or noise. Switch the screen backlight.

Software

Arduino IDE : 1.8.15 for Windows

Library: Adafruit_Motor_Shield_V2, Arduino-Temperature-Control-Library

Sources: Climat.zip

Conclusion

The project turned out to be very interesting both from a technical point of view and from a logical one. There were a lot of interesting details, solutions and situations-for an average book :) And it still has a lot to expand.

If you have any suggestions for mutually beneficial cooperation , I will be glad.

If you just have questions about the material, ask, I will answer.