Concept

The idea of this project is to develop a system that will help to create a more comfortable environment within a room. The sensors monitor the light, air gases and proximities. Within this signals the motors will be activated to execute a certain job like being able to open and close the door when someone comes close to it, open and close the window in case it detects a harmful amount of gases and rotate the window louvers depending of sun’s direction. Improving the comfort of users.

Automatic door
With the ultrasonic sensor attached to a door,  the Arduino program will be reading the values and when someone nears appears a servo motor will be rotated in this case is set to a  90° rotation but could be changed depending on the door specifications. When moving back or disappearing from the view area  of the sensor the servo motor will rotate again to its starting position 0 °.

Automatic Window
With the gas sensor  attached to the roof ,  the Arduino will be reading the values and when it detects a value higher than 200 ( could be changed depending on the specific limit of healthy air range or preferences) a servo motor attached to a emergency window system  will be activated, executing a rotation of 90° and when the sensor no longer detects gases or the reading values  are lower than 200 the servo motor will rotate  back to 0°, closing the window. 

Light sensor
With two photoresistor attached to each corner of a window, the Arduino will be reading the values and when it  detects a minimum difference of 5 between the values of photoresistor 1 and 2 a servo motor attached to a  louver  will be activated, performing a rotation to a 45 °position and  when detecting higher value from the photoresistor 1 the servo will rotate again to the 0 °.  position. Making it possible to automatically be protected from the sun and the heat.

Assembly diagram and parts

Pseudo Code

Code

Next Steps

The next steps to the project will be to design the binding system between the motors and each rotating element  (door, window and louvers). The code can also be expanded making it possible to integrate more sensor like temperature, to activate fans and also an alarm or lightning with the sound sensor.