Professional Documents
Culture Documents
2
Table of Contents
Chapter 1 (Introduction)
• 1.1 Project Background
•1.2 Objectives
Chapter 5 (Conclusion)
• 5.1 Conclusion
• 5.2 Advantages
• 5.3 Disadvantages
References
3
Chapter-1 Introduction
4
1.1 Project Background
The Arduino Security Door project aims to enhance home security by integrating advanced
technology into traditional door systems. In an era where smart technology is revolutionising our daily
lives, incorporating it into our homes can enhance security, convenience, and efficiency. The smart door
project aims to leverage Arduino and ultrasonic sensor technology to create an intelligent door system for
security and accessibility. The project is designed to cater to various use cases, including pet habitats such
as hamster houses, where door automation can provide a seamless and secure environment.
1.2 Objectives
Imagine a scenario where the smart door is installed in a hamster habitat. During the day, the door
opens automatically, allowing the hamster to explore and enjoy its surroundings. The ultrasonic sensor
ensures that the door remains closed when there's no human presence, providing security for the pet. At
night, when the ultrasonic sensor is inactive, the manual button allows the owner to interact with the
hamster or secure the habitat, ensuring a peaceful and undisturbed night for the pet.
This project not only showcases the capabilities of smart technology but also addresses specific
needs in unique environments like pet habitats, highlighting the versatility of the automated door system.
5
Fig. 1 Potential Usecase: Hamster inside a cardboard house
6
Fig. 2 Potential Usecase: Automated Chicken Coop Door
7
Fig. 3 Potential Usecase: Front View of Automated Sensor Car Garage.
8
Fig. 4 Potential Usecase: Inside View of Automated Sensor Car Garage.
9
Fig. 5 Potential Usecase: Automated Sensor Storage.
10
Chapter-2 Theory Background
11
2.1 Design Methodology
Project Definition:
● Clearly define the objectives and scope of the project: automated door system using an ultrasonic
sensor for daytime operation and manual control at night.
● Identify potential use cases, with a specific focus on the hamster habitat scenario.
System Architecture:
● Develop a high-level system architecture that outlines the key components: ultrasonic sensor,
motorized door mechanism, Arduino microcontroller, power supply, and user interface.
● Define communication protocols and data flow between the components.
Hardware Selection:
● Select appropriate hardware components based on project requirements.
● Choose an ultrasonic sensor with suitable range and accuracy.
● Opt for a motor and motor driver compatible with the door's size and weight.
● Decide on a power supply that balances efficiency and functionality.
Sensor Calibration:
● Calibrate the ultrasonic sensor to achieve accurate distance measurements.
Customization and Adaptability
● Design the system to be easily adjustable for different environments.
● Allow customization of parameters such as detection range, daylight hours, and door
opening/closing speed.
Testing and Iteration
● Conduct comprehensive testing at each development stage, including sensor calibration,
motorized door operation, and user interface functionality.
● Gather user feedback to identify potential improvements and address any issues.
Documentation
● Create thorough documentation detailing the system architecture, hardware components, software
algorithms, and user instructions.
● Include troubleshooting guides and maintenance recommendations.
12
2.2 Components
The components required for the project might include
1
Arduino Uno 1
2
USB A-to-B Cable 1
3
Breadboard – Half Size 1
4
LED 5mm 10
5
Servo mortar 2
6
Ultrasonic sensor 2
7
Light sensor 1
8
Bazzor 1
9
Switch 1
10
Resistor 2
13
Chapter-3 Implementation and Experimental Results
14
3.1Implementation
3.Door Mechanism:The actual door mechanism (not visible in the image) could be a servo motor,
stepper motor, or solenoid.
Attach the motor or actuator to the door hinge or latch.
Program the microcontroller to activate the motor based on sensor readings.
15
Fig.2 Inside the prototype
16
3.2 Experimental Results
1. Performance Metrics:Measure the response time of the door (how quickly it opens or closes after
detecting an object).
Evaluate accuracy (does it open/close reliably when an object is detected?).
Consider power consumption and efficiency.
2. Data Collection:Record sensor readings during various scenarios (e.g., different distances, angles, and
lighting conditions).
Note any anomalies or unexpected behavior.
17
Chapter-4 Program Structure
18
4.1 Code Overview
The Arduino Security Door project's code is designed to create an intelligent door system
utilizing a servo motor, ultrasonic sensors, a light sensor, a button, and a buzzer. Below is a breakdown of
the main components and their functionalities:
4.1.1 Servo Control
The servo motor is controlled to open and close the door. It is attached to pin 6 on the Arduino
board and is responsible for the physical movement of the door.
4.1.2 Ultrasonic Sensors
Two ultrasonic sensors are employed to detect obstacles on either side of the door. One sensor is
connected to pins 9 (echo) and 10 (trigger), while the other sensor is connected to pins 11 (echo) and 12
(trigger). These sensors measure the distance between the door and any obstacles, ensuring safe door
operation.
4.1.3 Light Sensor
A light sensor, connected to analog pin A0, detects ambient light levels. This sensor helps
determine whether the door should operate based on the lighting conditions.
4.1.4 Button and Buzzer
A button, connected to pin 5, allows manual opening of the door. A buzzer, connected to pin 3,
provides audible feedback during door operation.
#include <Servo.h>
Servo myservo;
int echo1=9;
int trig1=10;
int echo2=11;
int trig2=12;
int servo=6;
int lightsensor=A0;
19
int btn=5;
int buz=3;
int led=13;
long distance1,distance2,duration1,duration2;
void setup(){
Serial.begin(9600);
pinMode(buz,OUTPUT);
pinMode(echo1,INPUT);
pinMode(trig1,OUTPUT);
pinMode(echo2,INPUT);
pinMode(trig2,OUTPUT);
myservo.attach(servo);
pinMode(lightsensor,INPUT);
pinMode(btn,OUTPUT);
pinMode(led,OUTPUT);
}
void loop(){
int btn_state=digitalRead(btn);
if(btn_state==HIGH){
myservo.write(140);
delay(2000);
}
myservo.write(0);
// delay(500);
// digitalWrite(led,LOW);
int lightlevel=analogRead(lightsensor);
Serial.print("Light Level :");
Serial.println(lightlevel);
if(lightlevel>40){
digitalWrite(led,LOW);
20
digitalWrite(trig1, LOW);
delayMicroseconds(2);
digitalWrite(trig1, HIGH);
delayMicroseconds(10);
digitalWrite(trig1, LOW);
duration1=pulseIn(echo1,HIGH);
distance1=calculate(duration1);
Serial.print("Distance1 (cm): ");
Serial.println(distance1);
digitalWrite(trig2, LOW);
delayMicroseconds(2);
digitalWrite(trig2, HIGH);
delayMicroseconds(10);
digitalWrite(trig2, LOW);
duration2=pulseIn(echo2,HIGH);
distance2=calculate(duration2);
Serial.print("Distance2 (cm)");
Serial.println(distance2);
if(distance1<30||distance2<30){
tone(buz,600);
myservo.write(140);
delay(500);
noTone(buz);
delay(1000);
}else{
myservo.write(0);
}
}
else{ digitalWrite(led,HIGH);}
// if(lightlevel>50)
// myservo.write(180);
21
delay(500);
}
long calculate(long num){
return num*0.034/2;
}
22
Fig.2 Inside View of the Final Product
23
Fig.3 Automated Door Opening due to the sensor at day time (Front View)
24
Fig.4 Automated Door Opening due to the inside sensor at day time (Front View)
25
Butto
Fig.5 Automated Door Opening due to the button at day time (Inside View)
26
Fig.6 Automated Doors are not working by sensor at night time(Front View)
27
Chapter-5 Conclusion
28
5.1 Conclusion
In conclusion, the Arduino Security Door project presents a viable solution for enhancing home
security and accessibility through the integration of advanced technology. By leveraging Arduino
microcontrollers and sensors, the project has demonstrated the ability to automate door operations while
providing customizable features for users. Through the implementation of ultrasonic sensors, light
sensors, and servo motors, the system offers a seamless and efficient solution for controlling door access.
5.2 Advantages
● Enhanced Security: The automated door system increases security by detecting and preventing
unauthorized access to the premises.
● Convenience: Users benefit from the convenience of automated door operation, reducing the need
for manual intervention.
● Customization: The system allows users to customize parameters such as detection range and
operating hours to suit their specific needs and preferences.
● Safety: Safety features such as obstacle detection and emergency override ensure the system
operates securely and reliably.
● Versatility: The Arduino platform provides flexibility for future enhancements and integrations,
making the system adaptable to evolving security requirements.
5.3 Disadvantages
● Complexity: The implementation of the Arduino Security Door system may require technical
knowledge and expertise, making it challenging for some users to set up and maintain.
● Cost: The cost of the components required for the project may be prohibitive for some users,
especially if additional features or enhancements are desired.
● Reliability: While the system offers automated operation and safety features, it may still be
susceptible to malfunctions or technical issues, requiring regular maintenance and
troubleshooting.
Overall, the Arduino Security Door project presents a promising solution for enhancing home security
and accessibility through the integration of smart technology. Despite some potential challenges, the
benefits of increased security, convenience, and customization make it a valuable addition to modern
home automation systems. With continued development and refinement, the Arduino Security Door
system has the potential to address a wide range of security needs and provide users with greater peace of
mind.
29
References
(SCISPACE), (The WorkPlace depot), (IRE Journals)
30