Project Secret Remote Lock
Project Secret Remote Lock
By
B.TANOJ KUMAR B.MOHAN
R.HARISH KUMAR A.YASHWANTH
CH.PAVITRA CH.MADHAVI
G.CHANDU A.BHARATH AJAY SAI
GOVERNMENT POLYTECHNIC
CHODAVARAM
3
CERTIFICATE
ACKNOWLEDGEMENT
We are specially thankful to our principal DR. G. UDAY BHASKAR sir, for providing
necessary departmental facilities.
Last but not least we thankful all of our friends and their cooperation and suggestions.
ABSTRACT
Safety & Security are the main concerns in our everyday life. Each and every individual needs
to feel secure of their belongings without their presence. These all requirements will be
delivered through our security system.An access control for doors forms an essential part in
our security pattern. Doors locked using conventional locks are not as safe as they used to be,
anyone can easily break them which results very minimal safety and security compared to
our security system. We are here to make the system that will provide 24/7 safety and
security. Password based door lock system allows only authorized individual to access
restricted areas like Bank lockers,institutional entries,Military premises.,etc .
This system is fully controlled by Aurdino (micro controller). If the entered password is
matched with the actual password then the door gets opened,if it is incorrect an alert will be
sent to respective owner through "SMS" notification also an alert to neighbours and
respective authorities through “BUZZER”. This programmed password based security system
will give client more reliability in safety and security with minimal effort for locking-opening
the door. The security door lock automation system promises a bold step to the future where
mechanical door locks will be substituted (or) replaced by electronic door locks.
Keywords : Security&Safety,Arduino,Buzzer,Led’s,Pin,Authorization,Sms
6
CONTENTS :
CHAPTER TOPIC
01 INTRODUCTION
02 FUNCTIONAL DESCRIPTION OF
COMPONENTS
05 WIRING SEQUENCE
06 SOURCE CODE
07 FUTURE SCOPE
08 FINAL REPORT
7
CHAPTER – 1
INTRODUCTION
The primary objective of this project is to create a reliable and efficient door lock system that
combines the robustness of a PIN-based mechanism with the help of GSM communication
which enhances security level. By integrating these technologies, users will provided more
safety and security by ensuring authorized access and real-time control over their doors
compared to mechanical locks . The traditional mechanical lock definitely need a physical key
to lock/unlock it.There is lots of disadvantages of it even though it is strong .
The integration of GSM technology takes the project to the next level, enabling alerts to
authorizer about their lock control. By utilizing GSM, the door lock system can communicate
with authorized individuals through their mobile devices like,if the pin was entered correct
the respective owner enhancing convenience and security. Users can recieve alerts if any one
tries to open the door via SMS to designated number .
8
CHAPTER – 2
FUNCTIONAL DESCRIPTION OF COMPONENTS
❖ ARDUINO UNO
Vin : This is the input voltage pin of the Arduino board used to provide input supply from an
external power source.
5V : This pin of the Arduino board is used as a regulated power supply voltage and it is used
to give supply to the board as well as onboard components.
3.3V : This pin of the board is used to provide a supply of 3.3V which is generated from a
voltage regulator on the board
GND : This pin of the board is used to ground the Arduino board.
RESET : This pin of the board is used to reset the microcontroller. It is used to Resets the
microcontroller.
ANALOG PINS : The pins A0 to A5 are used as an analog input and it is in the range of 0-5V.
DIGITAL PINS : The pins 0 to 13 are used as a digital input or output for the Arduino board.
SERIAL PINS : These pins are also known as a UART pin. It is used for communication between
the Arduino board and a computer or other devices. The transmitter pin number 1 and
receiver pin number 0 is used to transmit and receive the data respectively.
SPI PINS: This is the Serial Peripheral Interface pin, it is used to maintain SPI communication
with the help of the SPI library.
EXTERNAL INTERRUPT PINS : This pin of the Arduino board is used to produce the
External interrupt and it is done by pin numbers 2 and 3.
PWM PINS: This pins of the board is used to convert the digital signal into an analog by varying
the width of the Pulse. The pin numbers 3,5,6,9,10 and 11 are used as a PWM pin.
11
❖ GSM MODULE
A customised Global System for Mobile communication (GSM) module is designed for
wireless radiation monitoring through Short Messaging Service (SMS). This module is able
to receive serial data from radiation monitoring devices such as survey meter or area
monitor and transmit the data as text SMS to a host Server.
GSM is the most widely deployed wireless telephony technology and is part of the
evolution in wireless mobile communication. GSM digitizes and compresses data then
sends the compressed data over a channel using two streams of user data, each with its
specific time slot
12
❖ RELAY MODULE
A relay module is an electronic device that acts as an electrically controlled switch. It consists
of a coil, which generates a magnetic field when current flows through it, and a set of contacts
that open or close based on the state of the coil. The relay module is used to control the flow
of electric current to other devices or circuits.
When an electric current is applied to the coil of the relay module, the magnetic field
generated causes the contacts to either open or close, depending on the specific design. This
allows the relay module to switch the flow of current to another circuit or device. The relay
module provides isolation between the control circuit and the circuit being controlled,
ensuring that the control signals and high-power circuits are electrically separated.
Relay modules are commonly used in various applications, such as home automation,
industrial automation, automotive systems, and electronic projects. They can be used to
control lights, motors, valves, pumps, and other electrical loads. The main advantage of using
relay modules is their ability to control high-power or high-voltage circuits with low-power
control signals, making them versatile and widely used in many different systems.
14
A relay module is an electronic device that acts as an interface between a low-voltage circuit
and a high-voltage circuit. It consists of an electromechanical relay, typically controlled by a
low-voltage signal, and associated circuitry for switching high currents or voltages.
The main function of a relay module is to control the flow of electrical power to a load based
on the status of an input signal. Here are some key functions of a relay module:
SWITCHING: The primary purpose of a relay module is to switch electrical circuits on or off.
When an appropriate control signal is applied to the relay coil, it energizes the coil and closes
or opens the relay contacts, allowing or interrupting the flow of current to the load.
ISOLATION: Relay modules provide electrical isolation between the control circuit and the
load circuit. This isolation helps protect the control circuit from high voltage or high current
in the load circuit, ensuring safety and preventing damage to sensitive control components.
SIGNAL AMPLIFICATION: Relay modules can also amplify weak input signals. For example, a
low-power control signal from a microcontroller or logic circuit can be used to activate the
relay coil, which in turn switches a higher current or voltage circuit.
SIGNAL CONVERSION: Relay modules can be used to convert one type of electrical signal to
another. For instance, a relay module can convert a digital signal (ON/OFF) to an analog signal
(continuous control) or vice versa.
It works on the principle of electromagnetism. The electromagnetic field that creates the
temporary magnetic field is energised when the relay’s circuit detects the fault current. This
magnetic field moves the relay armature to open or close connections.
15
❖ SOLENOID LOCK
The solenoid lock denotes a latch for electrical locking and unlocking. It is available in
unlocking in the power-on mode type, and locking and keeping in the power-on mode type,
which can be used selectively for situations. The power-on unlocking type enables unlocking
only while the solenoid is powered on.
The main function of a solenoid is to provide a nearly uniform magnetic field similar to what
is produced by a permanent magnet. Since it’s dependent on electric current, it can be turned
on or off as needed. Its versatility leads to a wide range of applications.
16
❖ BUZZER
The primary function of a buzzer is to generate audible sound or tones. Buzzer devices are
commonly used in various electronic systems and applications for different purposes.
The main function of a buzzer in a pin door lock system is to provide audible feedback to the
user. If an incorrect PIN code is entered or an unsuccessful action is attempted, the buzzer
may produce a different sound or remain silent, indicating an error or failure.
Advantages of Buzzer: -
Buzzers provide audible alerts, simplicity, low cost, versatility, reliability, immediate feedback,
easyintegration, accessibility support, educational/entertainment applications, and industrial
applications.
17
❖ JUMPER WIRES
A jumper wire is an electric wire that connects remote electric circuits used for printed circuit
boards. By attaching a jumper wire on the circuit, it can be short-circuited and short-cut
(jump) to the electric circuit.
Male to female jumper wires are used for easy and convenient interconnection between
components in electronic prototyping and testing projects, without the need for soldering.
They come in groups or cables with connectors or pins at each end and can connect FRC pins,
Header pins, Berg pins, and other components.
18
❖ BREAD BOARD
The breadboard consists of a plastic board with numerous interconnected metal clips or
sockets that are arranged in a grid pattern. The clips are typically grouped in rows and
columns, and each clip within a row is electrically connected, while clips in different
rows/columns are usually isolated from each other. This arrangement allows components
to be inserted into the clips and connected together by simply pushing their leads or wires
into the appropriate sockets.
19
❖ LED
LED stands for Light Emitting Diode. It is a semiconductor device that emits light when an
electric current passes through it. LEDs are widely used in various applications due to their
energy efficiency, compact size, long lifespan.
LIGHTING: LEDs are extensively used for general lighting purposes, both in residential and
commercial settings. They are found in light bulbs, lamps, downlights, strip lights, and many
other lighting fixtures.
DISPLAY: LEDs are used in a wide range of displays, including digital clocks. Compared with
conventional light sources that first convert electrical energy into heat, and then into light,
LEDs (Light Emitting Diodes) convert electrical energy directly into light, delivering efficient
light generation with little-wasted electricity.
20
CHAPTER :- 3
BASIC COMMANDS OF ARDUNIO AND GSM
ARDUNIO :-
1.PINMODE(pin, mode): Sets the mode of a digital pin as INPUT or OUTPUT.
Example: pinMode(13, OUTPUT);
4.ANALOGWRITE(pin, value): Writes a PWM (Pulse Width Modulation) value to a pin. Only
certain pins support analogWrite.
Example: analogWrite(9, 128);
6.DELAY(ms): Pauses the program execution for the specified number of milliseconds.
Example: delay(1000);
10.SETUP(): A function called once when the program starts. Used for initialization tasks.
Example: void setup() { /* setup code goes here */ }
11.LOOP(): A function that runs repeatedly after the setup(). Used for the main program
logic.
Example: void loop() { /* main program logic goes here */ }
21
GSM :-
1.AT: This is the attention command used to communicate with the GSM module. It is
typically sent at the beginning of each command sequence.
2.AT+CPIN: This command is used to enter the SIM card PIN (Personal Identification
Number) if it is required for your GSM module.
3.AT+CMGF: This command sets the SMS message format. It can be used to configure the
module to operate in either text mode (AT+CMGF=1) or PDU (Protocol Data Unit) mode
(AT+CMGF=0).
5.AT+CMGR: This command is used to read a received SMS message. It is followed by the
index number of the message.
6.AT+CMGD: This command is used to delete an SMS message. It is followed by the index
number of the message or a parameter to specify which messages to delete.
7.ATD: This command is used to dial a phone number. It is followed by the phone number
you want to dial.
10.AT+CSQ: This command is used to check the signal strength of the GSM network. It
provides information about the received signal quality.
11.AT+CREG: This command is used to check the registration status of the GSM module on
the network.
12.AT+CGATT: This command is used to check the attachment status of the GSM module to
the GPRS (General Packet Radio Service) network.
22
CHAPTER – 4
ALGORITHM AND FLOW CHART
❖ ALGORITHM:
❖ FLOW CHART:
24
CHAPTER-5
WIRING SEQUENCE
25
CHAPTER : 6
SOURCE CODE
#include <Keypad.h>
int relayPin = 10; // digital pin connected to the relay module
int ledgreen = A5; // analog pin connected to the green led
// Define the pins for the rows and columns of the keypad
byte rowPins[ROWS] = {2, 3, 4, 5};
byte colPins[COLS] = {6, 7, 8, 9};
// Create a Keypad object
void setup()
{
pinMode(relayPin, OUTPUT); // set the relay pin as output
Serial.begin(9600);
digitalWrite(relayPin, HIGH); // intialize relaypin in high state
digitalWrite(buzzer,LOW); // intialize buzzerpin in high state
}
void loop()
{
// Get the key pressed on the keypad
char key = keypad.getKey();
// Check if a key is pressed
if (key != NO_KEY)
{
// Print the key pressed to serial monitor
Serial.print(key);
if (password.length() == 4)
{
// Compare the string with the password
if (password == "1234")
{
27
digitalWrite(buzzer,LOW);
Serial.println("AT+CMGF=1");
delay(1000);
Serial.println("AT+CMGS=\"+916303782212\"\r");
delay(1000);
Serial.println("WELCOME TO HOME");
delay(1000);
Serial.println((char)26);
{
digitalWrite(relayPin, HIGH); // deactivate the relay module to close the lock
digitalWrite(ledred,HIGH)
digitalWrite(ledgreen,LOW);
digitalWrite(buzzer,HIGH);
delay(1000);
digitalWrite(buzzer,LOW);
delay(1000);
digitalWrite(buzzer,HIGH);
delay(1000);
digitalWrite(buzzer,LOW);
delay(1000);
digitalWrite(buzzer,HIGH);
28
delay(1000);
digitalWrite(buzzer,LOW)
delay(1000);
digitalWrite(buzzer,HIGH);
delay(1000);
digitalWrite(buzzer,LOW);
Serial.println("AT+CMGF=1");
delay(1000);
Serial.println("AT+CMGS=\"+916303782212\"\r");
delay(1000);
Serial.println("ALERT!,SOMEONE IS TRYING TO OPEN THE DOOR ");
delay(1000);
Serial.println((char)26);
delay(1000);
digitalWrite(ledred,LOW);
}
CHAPTER- 7
FUTURE SCOPE
CHAPTER-8
FINAL REPORT
❖ OBSERAVTION TABLE
CONCLUSION:- Overall, the project met its objectives and contributes to the field of
access control technology by giving 100% accuracy with the proof of above observation
table.