Mini Project
Mini Project
BACHELOR OF TECHNOLOGY
IN
ELECTRONICS AND COMMUNICATION ENGINEERING
Submitted by
i
CONTENTS
Certificate iv
Acknowledgment v
Declaration vi
Abstract vii
Chapter-1: INTRODUCTION 03
Chapter-2: PROCEDURE 06
2.4 Programming
i
Chapter-4: ARDUINO 17
6.1 Applications
Chapter-7: CONCLUSION 31
Chapter-8: REFRENCES 33
i
i
i
(Approved by AICTE, Accredited by NAAC with ‘A’ Grade & Affiliated to JNTUK,
Kakinada, Recognized by Govt. of AP)
PARITALA-521180, NTR Dt, A.P.
2023-2024
CERTIFICATE
This is to certify that the technical project entitled “BLUETOOTH BASED DOOR LOCK
SYSTEM USING ARDUINO” is the bonafide work done by KANDALA VENKATA SIVA
Submitted in partial fulfillment of the requirements for the award of the degree of
Bachelor of Technology in Electronics & Communication Engineering during the
Academic Year 2023-2024.
v
ACKNOWLEDGEMENT
The present project work is the several days study of the various aspects of the project
development. During this effort in the present study, we have received a great amount of help from
our secretary and correspondent J.DURGA PRASAD Sir which we wish to acknowledge and thank
from depth of our hearts
We are thankful to our principal Dr.U. YEDUKONDALU Sir for permitting and
encouraging us in doing this project.
We are deeply intended to Dr. V.G.N.S. PRASAD Sir, professor and head of the
department, E.C.E, whose motivation and contract encouragement has led to pursue a project in the
field of embedded electronics.
We are very much obliged and thankful to our internal guide Mr. J. DURGA PRASAD,
associate professor for providing this opportunity and contract encouragement given by them during
the course. We are grateful to them valuable guidance and suggestions during my project work.
Our parents have put ourselves ahead of themselves, Because of their hard work and dedication;
we had opportunities beyond our wildest dreams. Our heartfelt thanks to them for giving us all we
ever needed to be successful student and individual.
Finally, we express our thanks to all our other professors, Classmates, friends, neighbours,
and our family members who helped us for the completion of our project and without infinite love
and patience this would never have been possible.
v
DECLARATION
I hereby declare that this project entitled “BLUETOOTH BASED DOOR LOCK SYSTEM USING
ARDUINO” has been undertaken by me and this work has been submitted to MVR College of
Engineering & Technology affiliated to JNTUK, Kakinada, in partial fulfillment of the requirements
for award of the degree of Bachelor of Technology in ELECTRONICS & COMMUNICATION
ENGINEERING.
I further declare that this project work has not been submitted in full or part for the award of any
degree of this in any other education institutions.
i
ABSTRACT
In this digitally dependent world, the security is most concern for every
one of us. As we all are facing the fear of robbery, people cannot keep
their valuable things safely even at their own houses, banks or in any
other places. They are always in fear of losing their valuable things. Old
traditional locking system is not that safe as Bluetooth based door locking
system via password.
So, in this project we have work for all these problems and this project
provide much more lock security as compare to traditional lock security.
We have replaced the old traditional lock system with password. This
project will provide efficient security to the users at low cost.
It will be also easy to implement and give safety in any places like our
houses, institutions, banks or any other public places. If the users forgot
the password, then he/she will change or reset the password, which gives
the more flexibility to the users.
2
CHAPTER-1
INTRODUCTION TO BLUTOOTH BASED DOOR LOCK
SYSTEM USING ARDUINO
INTRODUCTION
As we all are very familiar with the term “Security”. Nowadays it is most
important to keep our valuable things safe. The world is also growing digitally
dependent, and we can even design the doors to be more secure. We can make these
digital doors by using “Password” which is more secure than traditional lock system.
The Bluetooth connected door lock system primarily consists of the following
components:
1. Arduino Microcontroller: The central unit that processes commands and controls
the locking mechanism.
2. Bluetooth Module (e.g., HC-05/HC-06): Facilitates wireless communication
between the Arduino and a smartphone.
3.Electronic Lock Mechanism (e.g., Solenoid Lock, Servo Motor: Physically controls
the locking and unlocking of the door.
4. Power Supply: Powers the entire system, typically a battery or mains power adapter.
5.Mobile Applications: A custom or existing app on the smartphone to send
lock/unlock commands to the Arduino via Bluetooth.
3
1.2: Working Principle
1. Pairing and Connection: The Bluetooth module on the Arduino pairs with the user's
smartphone. Once paired, it establishes a secure communication channel.
2. Command Reception: The smartphone sends lock/unlock commands through the
mobile application.
3. Processing: The Arduino receives these commands via the Bluetooth module and
processes them.
4. Actuation: Based on the received command, the Arduino controls the electronic lock
mechanism to lock or unlock the door.
5. Feedback: Some systems might include feedback mechanisms to inform the user of
the current status of the lock (e.g., via LEDs or notification on the smartphone).
1. *Arduino Microcontroller*:
- Acts as the brain of the system, executing code to handle Bluetooth communication
and control the lock mechanism.
- Commonly used boards include Arduino Uno, Arduino Nano, or Arduino Mega.
2. *Bluetooth Module*:
- HC-05 or HC-06 modules are popular choices due to their ease of use and reliable
connection range.
- Operates on the Serial Communication Protocol, which allows it to easily interface
with the Arduino.
4. *Power Supply*:
- Ensures uninterrupted operation of the system. Battery backups can be used to
maintain functionality during power outages.
4
5. *Mobile Application*:
- Can be developed using platforms like MIT App Inventor, Android Studio, or using
pre-built apps that support Bluetooth communication.
- Interfaces with the user to send commands and can also display lock status if feedback
is implemented.
- *Enhanced Security*: Only authorized users with the paired device can control the
lock.
- *Convenience*: Users can lock/unlock their doors without physical keys, reducing
the risk of losing keys.
5
CHAPTER-2
PROCEDURE
1. *Components Needed*:
- *Arduino Uno*: The microcontroller that will control the system.
- *Bluetooth Module (e.g., HC-05 or HC-06)*: For wireless
communication.
- *Servo Motor or Electric Door Strike*: To physically lock/unlock
the door.
- *Power Supply*: Ensure it matches the voltage and amperage
requirements of your door lock.
- *TIP120 Transistor*: Used to control the lock.
- *1N4001 Diode*: Provides protection against back voltage .
2. *Transistor Setup*:
- Connect the TIP120 transistor:
- Base to Arduino pin 9.
- Collector to the lock's ground.
- Emitter to the circuit ground.
- Add a diode (1N4001) pointing away from ground to protect
against voltage spikes when the lock turns off.
6
3. *Bluetooth Integration*:
- Connect the Bluetooth module:
- RX on the module to TX on the Arduino.
- TX on the module to RX on the Arduino.
- GND to ground.
- VCC to 3.3V or 5V (depending on the module).
- Pair the Bluetooth module with your Android phone.
4. *Programming*:
- Write an Arduino sketch that:
- Listens for incoming serial data (commands) from the phone.
- Reads the received characters into an array.
- Verifies if the received password matches the predefined one.
- Controls the transistor (pin 9) to open or close the lock based on
the command.
7
BLOCK DIAGRAM:
8
9
10
CHAPTER 3
//-----------------------------------------------
//psw security
#include <Servo.h>
#include<LiquidCrystal.h>
LiquidCrystal lcd(12,11,2,3,4,5);
Servo myservo;
const int buzzer=13;
String readString;
void setup() {
Serial.begin(9600);
myservo.attach(8);
pinMode(buzzer,OUTPUT);
lcd.begin(16,2);
delay(100);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("PASSWORD HOME ");
11
lcd.setCursor(0,1);
lcd.print("SECURITY ");
delay(1000);
gopen();
delay(1000);
gclose();
lcd.clear();
lcd.setCursor(0,0);
lcd.print("PLEASE ENTER ");
lcd.setCursor(0,1);
lcd.print("PASSWORD.. ");
}
//------------main program -------------
void loop() {
while(Serial.available()){
delay(3);
char c = Serial.read();
readString+=c;
}
if(readString.length() >0)
{
12
Serial.println(readString);
if(readString == "2024")
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("PASSWORD OK ");
lcd.setCursor(0,1);
lcd.print("PLEASE GO.. ");
delay(1000);
gopen();
delay(3000);
gclose();
lcd.clear();
lcd.setCursor(0,0);
lcd.print("PLEASE ENTER ");
lcd.setCursor(0,1);
lcd.print("PASSWORD.. ");
}
else if(readString == "NrPK")
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("PASSWORD OK ");
13
lcd.setCursor(0,1);
lcd.print("PLEASE GO.. ");
delay(1000);
gopen();
delay(3000);
gclose();
lcd.clear();
lcd.setCursor(0,0);
lcd.print("PLEASE ENTER ");
lcd.setCursor(0,1);
lcd.print("PASSWORD.. ");
else{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("WRONG PASSWORD ");
lcd.setCursor(0,1);
lcd.print("PLEASE CHECK.. ");
digitalWrite(buzzer,1);
delay(3000);
digitalWrite(buzzer,0);
}
14
readString = "";
}
}
//-------------sub-programs -----------
void gopen()
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("DOOR OPENING ");
lcd.setCursor(0,1);
lcd.print("PL. CHECK ");
delay(2000);
myservo.write(90);
delay(1000);
}
void gclose()
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("DOOR CLOSING ");
15
lcd.setCursor(0,1);
lcd.print("PL. CHECK ");
delay(2000);
myservo.write(0);
delay(1000);
}
16
CHAPTER-3
ARDUINO
What Is Arduino?
In the next section, we’re going to discuss a few of the Arduino boards
available and how they differ from each other.
17
Types of Arduino Boards
Below are a few examples of the different types of Arduino boards out
there. The boards with the name Arduino on them are the official boards
but there are also a lot of really great clones on the market as well. One
of the best reasons to buy a clone is the fact they are generally less
expensive than their official counterpart. Adafruit and Sparkfun for
example, sell variations of the Arduino boards which cost less but still
have the same quality of the originals. One word of caution, be careful
when buying boards from companies you don’t know.
18
Arduino Uno
One of the most popular Arduino boards out there is the Arduino
Uno. While it was not actually the first board to be released, it remains to
be the most actively used and most widely documented on the
market. Because of its extreme popularity, the Arduino Uno has a ton of
project tutorials and forums around the web that can help you get started
or out of a jam. We’re big fans of the Uno because of it’s great features
and ease of use.
Board Breakdown
Here are the components that make up an Arduino board and what each
of their functions are.
19
1. Reset Button – This will restart any code that is loaded to the
Arduino board
2. AREF – Stands for “Analog Reference” and is used to set an
external reference voltage
3. Ground Pin – There are a few ground pins on the Arduino and
they all work the same
4. Digital Input/Output – Pins 0-13 can be used for digital input or
output
5. PWM – The pins marked with the (~) symbol can simulate analog
output
6. USB Connection – Used for powering up your Arduino and
uploading sketches
7. TX/RX – Transmit and receive data indication LEDs
8. ATmega Microcontroller – This is the brains and is where the
programs are stored
9. Power LED Indicator – This LED lights up anytime the board is
plugged in a power source
10. Voltage Regulator – This controls the amount of voltage going
into the Arduino board
11. DC Power Barrel Jack – This is used for powering your Arduino
with a power supply
12. 3.3V Pin – This pin supplies 3.3 volts of power to your projects
13. 5V Pin – This pin supplies 5 volts of power to your projects
14. Ground Pins – There are a few ground pins on the Arduino and
they all work the same
15. Analog Pins – These pins can read the signal from an analog
sensor and convert it to digital
20
Arduino Power Supply
The Arduino Uno needs a power source in order for it to operate and can
be powered in a variety of ways. You can do what most people do and
connect the board directly to your computer via a USB cable. If you
want your project to be mobile, consider using a 9V battery pack to give
it juice. The last method would be to use a 9V AC power supply.
Once the circuit has been created on the breadboard, you’ll need to
upload the program (known as a sketch) to the Arduino. The sketch is a
set of instructions that tells the board what functions it needs to
perform. An Arduino board can only hold and perform one sketch at a
time. The software used to create Arduino sketches is called the IDE
which stands for Integrated Development Environment. The software is
free to download and can be found
at https://www.arduino.cc/en/Main/SoftwareEvery Arduino sketch has
two main parts to the program:
void setup() – Sets things up that have to be done once and then don’t
happen again.
void loop() – Contains the instructions that get repeated over and over
until the board is turned off.
21
CHAPTER-4
IMPLEMENTATION:
Circuit Setup:
Connect the TIP120 transistor to the Arduino. The base of the transistor
should be connected to a digital pin (e.g., pin 9).
Wire the diode (1N4001) in parallel with the lock (to protect against
back voltage).
22
Programming the Arduino:
If the PIN matches, sends a signal to the TIP120 transistor to unlock the
door.
Create a simple Android app that sends the four-digit PIN via Bluetooth
to the Arduino.
The app can have a numeric keypad for entering the PIN.
Testing:
23
Results:
Successful Authentication:
Keypad:
Upon entering the correct password (e.g., 1234#), the servo motor
rotates to unlock the door, and a message "Door Unlocked!" is printed
on the serial monitor.
Failed Authentication:
24
CHAPTER – 6
ADVANTAGES AND DISADVANTAGES
ADVANTAGES
Convenience:
Wireless Access: Users can unlock the door remotely using their
smartphone, eliminating the need for physical keys.
Multiple Entry Methods: The system supports both keypad and Bluetooth
entry, providing flexibility.
Security:
Customization:
Cost-Effective:
DIY Solution: It’s suitable for DIY enthusiasts, reducing installation and
setup costs.
25
Learning Opportunity:
DISADVANTAGES
Security Risks:
Range Limitations:
Power Dependence:
Power Supply: The system requires a continuous power supply, which can
be a drawback in case of power outages unless a backup power source is
provided.
Technical Challenges:
26
Maintenance: Regular updates and maintenance might be needed to ensure
security and functionality.
Reliability Issues:
Privacy Concerns:
27
6.1APPLICATIONS:
Home Security:
Front and Back Doors: Provides secure access control for main entrances,
enhancing home security.
Internal Rooms: Used for securing rooms with valuables, like home offices
or safes.
Educational Institutions:
Healthcare Facilities:
28
Patient Rooms: Enhances privacy and security in patient areas, particularly
for high-security patients or sensitive areas.
Hospitality Industry:
Hotel Rooms: Modernizes guest room access, allowing guests to use their
smartphones or a keypad for entry.
Event Management:
Co-Working Spaces:
Residential Complexes:
Industrial Facilities:
29
Employee Access: Manages and monitors employee access to different
sections of the facility, ensuring compliance with security protocols.
Retail Stores:
Cash Offices: Secures areas where cash and financial records are handled.
Research Facilities:
Parking Garages:
30
CHAPTER – 7
CONCLUSION
Key Advantages:
31
Range and Reliability: Bluetooth’s limited range and potential for
interference, along with the need for consistent power supply, are
important factors to consider.
32
CHAPTER – 8
REFERENCES
33
34