You are on page 1of 30

1

No. Name Roll Number

1. Thura Aung YKPT-22352

2. Kaung Khant Lin YKPT-22334

3. Thuta Nyan YKPT-22366

4. Aung Kaung Myate YKPT-22333

5. Thurien Htet YKPT-22355

6. Nyan Min Htet YKPT-22319

7. Nyan Htet Myat YKPT-22335

8. Naing Aung Lin YKPT-22316

9. Wyne Min YKPT-21374

2
Table of Contents

Chapter 1 (Introduction)
• 1.1 Project Background
•1.2 Objectives

Chapter 2 (Theory Background)


• 2.1 Design Methodology
• 2.2 Components

Chapter 3 (Implementation and Experimental Results)


• 3.1 Implementation
• 3.2 Experimental results

Chapter 4 (Program Structure)


• 4.1 Code Overview
• 4.2 Code Implementation
• 4.3 Final Product

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

1. Automated Daytime Access:


Utilize ultrasonic sensors to detect the presence of individuals outside the door during daylight
hours. Implement a motorized door mechanism that opens automatically when someone is detected.
2. Customization and Adaptability
Design the system to be easily customizable, allowing users to set specific parameters such as
detection range and daylight hours. Consider adaptability for different environments, ensuring the smart
door can be adjusted to suit various scenarios.
3. Safety Measures
Incorporate safety features to prevent accidental closures while someone is in the doorway.
Implement emergency override functionality to manually open the door in case of system malfunctions.

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

No Electronic Components Quantity

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

1. Wiring Connections:Connect the ultrasonic sensors to the microcontroller following the


datasheets or pinout diagrams.
Ensure proper power supply and ground connections.

Fig. 1 Preparation for the project

2. Programming:Write code in a suitable programming language (e.g., Arduino IDE) to read


sensor data and control the door mechanism.
Implement logic for opening the door when an object approaches and closing it after a delay.
Use conditional statements and loops to handle sensor inputs.

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

Fig.3 Front View

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.

3. Analysis:Interpret the collected data.


Identify areas for improvement.
Compare the system's performance against design goals.

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.

4.2 Code Implementation

#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;
}

4.3 Final Product

Fig.1 Front View of the Final Product

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

You might also like