The idea of my project is to make a smart curtain with a light sensor for the sun,It also shows the daily temperature and humidity on the LCD, the user can be controll it by phone to open and close it according to his need.
This idea is intended for the convenience of the user, as when it is present, he will not need to get up and move from the bed to close it at sunrise
You can see similar models through the following links:
Arduino to copy the text code and upload it to Arduino UNO.
for cuttind power:65,speed 25
for scan power:30, speed 150
After the machine has finished cutting all the parts..it's time to assemble
I also fabricated some furniture models to give the project more realism
Here I assembled the component box and installed the screws
Then I assembled the components for the walls
And this is the final shape of the room..now we are ready to assemble the components and do the electricity
LDR Sensor for light sensitivity
dc motor driver To control the direction and speed of the motors
bloutootht module To control components remotely by phone
Electrical tape to stick wires together
Then I connected the LDR sensor to pin No. 2 to the Arduino
And here I connected the DHT sensor
And this is the shape of the electrical circuit at the end.. Now we can write the code and assemble the components of the project together
Input of the first motor ( IN1 = pin7 ... IN2 =pin 6 )
Input of the second motor ( IN3 =pin 5 ... IN4 =pin 4)
To control the speed of the first motor ( ENA =pin 9 )
To control the speed of the second motor ( ENB = pin3 )
pin 2 for LDR pin 10 for DHT11
Here are the complete connections with the LCD and the DHT11 sensor
..I used a 9-volt adapter to feed the driver because there are 2 motors connected to it, and this needs a high current, and I took out 5 volts from it, connected to the breadboard to supply the Arduino and the rest of the components with the required current
I define the input and specify the pin number for each component
At first, I wrote the first feature, which is to control the motors based on the feeling of the LDR
Then I wrote the void lobe and determined the speed of the motors and determined their movement based on the LDR sensor
And here I determined the direction of movement of the motors in each case through the inputs of each of them
And here, after defining the inputs and the numbers of the components pin, I defined the Bluetooth module to be the data entered through the phone
Then I wrote the bluetooth module code to control the opening and closing of the curtain according to the inputs
Then I wrote the bluetooth module code to control the opening and closing of the curtain according to the inputs
Here I set the required movement where the curtain closes when sending number 1 and opens when sending number 2
Then I wrote the code to show the temperature and humidity on the LCD..And in the end I put all this code together
At first, I downloaded the dht11 library and the LCD i2c to identify the components
Then I typed a Void SetUp and wrote the required words on the screen with it
Finally, I defined that the outputs are based on the inputs of the DHT11 sensor connected to the PIN No. 10
At first, I assembled the wooden parts of the room and the window
Then I assembled the parts of the component box and installed them together ..I put the LCD in its place
Then I installed the motors in their specified places
and here I made the curtain movement path
And here I installed it in the place specified in the upper part of the wood
Then I made the curtain and before installing it, I made sure that the motors were working correctly
And here I put the LDR sensor in a place outside the window
I installed the Arduino and the power outlet to connect the adapter
And here I installed the curtain in place
Then I installed the outer wood piece
Here I put the rest of the components and wires in the box installed on the wall
Then I installed it and put furniture models to give a real look to the room
After making sure of the locations of all the parts, I uploaded the code to the Arduino
I made sure that all components are working successfully
I connected the 9 volt adapter to supply the components with the required current
Here the LCD shows the temperature and humidity
Explain how the motor controls the curtain
https://drive.google.com/file/d/1jndEwM7aj0dhNVBukd1KjkZ88FX3igMb/view?usp=sharing
Finally, this is our smart curtain
https://drive.google.com/file/d/1GmpIZPBNw_K80t_cnJQgMlxgBVXme_hY/view?usp=sharing
This is the bluetooth module window on the phone
I asked my friends, if they have a smart curtain, what are the characteristics that they prefer to have? They suggested the idea of controlling it remotely by phone, and I actually made this feature
My friend Salma helped me as she fabricated the plywood on the laser machine because I was sick and could not go to the lab
*I encountered some problems while writing the code, and I searched on YouTube and asked my Instructor Mohanad
*I also faced a problem with the way to connect the motors with the curtain to control its movement, and these videos helped me reach a satisfactory result
I think it's fun to control things around us with sound.. so I was going to control the curtain by some specific words through the code