The idea of the assignment is to make a small model for a door that can sense the presence of the person before entrance and exit which is inspired by the transparent photocell door sensor door found at malls. Enjoy!
Photocell door
There are 1 software and 3 inspired website used:
Tinkercad: used to make a virtual circuit and simulate it before applying it to check if it is applicable or not and to make a wiring diagram for the circuit of the device.
2. Google : used to find inspirational ideas and ways to apply them and search for solutions for problems faced.
3. Pinterest: used to find inspirational ideas and ways to apply them and search for solutions for problems faced.
4. Autodesk Instructables: used to find inspirational ideas and ways to apply them and search for solutions for problems faced.
5.Arduino IDE: to verify the code and upload it to Arduino
Thinkercad
Google seach
Autodesk Instructables
Arduino ide
Rullers
Compass
Pencil
Cutter
Glue Gun
Avometer
There are 2 main Material used:
1. CardBoard sheets
2. PVC Roll as transparent material for lights.
CardBoard
PVC Roll
Mini breadboard
ِAdaptor 5V
DC Geared Motor
ON/OFF switch
Resistors
Arduino uno
Dc Power Jack
Arduino uno
Potentiometer
Servo motor
The creation of the circuit on TinkerCad:
The circuit contains 3 different components (Ultrasonic, LED and servomotor )
the circuit gives us 1 input : Ultrasonic sensors
The circuit gives us 2 output: servomotor movement, and LED .
I used color coding, red for positive and black for negative, and others to differentiate between eath functions.
The voltage of the power supply is 9 volts for Arduino.
Connecting the components in the channel as shown in the figure.
The Electrical circuit simulation on TinkerCad
1 Make a diagrammatic sketch for the device showing the outer shape of device.
3. make code blocks of Arduino as the following:
make an if condition
add the condition to be reading of the sensor to be less than or equal 20 cm
if the condition is right, then the servo motor will change the direction to 90 degrees and LED on
otherwise, if nobody is present in front of the sensor, then the sensor will return back to its normal position and LED off.
2. make a wiring diagram for the circuit on tinker CAD by :
add breadboard, Arduino, Ultrasonic distance sensor, servo motor
connect the 5V, GND of Arduino to + & - of breadboard
connect the sensor and the motor GND and power to bread board
connect the sensor (trigger and echo), the motor (signal) to digital pins 2,4,7 and 8 alternatively and connect them to power and GND too.
4. start simulation to check that the code is working
5.verify the code and upload it to Arduino using Arduino IDE
6.make the circuit for the device (like the wiring diagram shown above on tinker CAD) and check its functionality
7.check the functionality of smart door as shown in the video at the assignment links.
In the beginning, the circuit did not work, I tried to find an error by using the trial and error method to find the solution, by checking each component individually, but all the components worked well
then I asked help from my peers Nada and My Instructor Hala. after reversing the circuit we found in last I didn't connect the wire between the two sides of the breadboard to connect the positive and negative to each component.
so I wired it and it works as well as it can
Circuit After Solution
Circuit Before Solution