My project is a controlled operable window for natural ventilation. External power is used to drive the servo motor.
I used a photosensor and a temperature sensor to simulate a operable window which response to the outside air temperature or indoor air temperature and day/night change. Since currently I have only one man-made air temperature sensor, only indoor air temperature signal will be assumed in the control.
The basic control logic for this assignment is:
The window can open only in the day time, which can be emulated by a torch light and photo sensor. When the photo sensor senses the light, it is day time.
The window should close during the night for safety consideration, regardless of the air temperature.
If it is day time, if the indoor air temperature is high, the window opens more and vice versa. The openness angle is proportional to the air temperature.
Arduino Sketch: Assignment_6