A PROJECT REPORT ON ADVANCED DOOR LOCK AND ALERT SYSTEM USING ARDUINO AND GSM MODULE Submitted in partial fulfillment of the requirements for the Award of DIPLOMA In ELECTRONICS AND COMMUNICATION ENGINEERING By Mr. S Arun Kumar (19253 - EC - 318 ) Mr. B. Nikhil (19253 - EC - 265 ) M s K. Neeharika (19253 - EC - 283 ) Ms. D. Sri Hamsa (19253 - EC - 288) M r A. Joseph Paul (19253 - EC - 312 ) M r. B. Siva Ram Naidu (19253 - EC - 322) Under the Guidance of Mrs. K. MOUNIKA DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING 2nd SHIFT POLYTECHNIC VNR Vignana Jyothi Institute Of Engineering And Technology Bachupally, Nizampet(S.O) Hyderabad - 500090 C E R T I F I C A T E This is to certify that the project report entitled “ ADVANCED DOOR LOCK AND ALERT SYSTEM ” Has been carried out at VNR VJIET , Hyderabad and submitted by the following students Mr. S Arun Kumar (19253 - EC - 318 ) Mr. B. Nikhil (19253 - EC - 265 ) M s K. Neeharika (19253 - EC - 283 ) Ms. D. Sri Hamsa (19253 - EC - 288) M r A. Joseph Paul (19253 - EC - 312 ) M r. B. Siva Ram Naidu (19253 - EC - 322) In partial fulfillment of the requirements for the award of Diploma in Electronics & Communication Engineering to State Board of Technical Education and Training, Tela ngana at VNR Vignana Jyothi Institute of Engineering & Technology during the period of 2020 - 2020, they carried out a Bonafide work under the guidance and supervision of the undersigned. The results embodied in this project report have not been submitted to any other University or Institute for the award of any Degree. Internal Guide Head of the Dept. M r s. K. Mounika Dr. S. Rajendra Prasad Assistant Professor, Professor, Dept. of ECE Dept. of ECE VNR VJIET VNR VJIET APPROVAL CERTIFICATE Viva - Voice examination conducted for the dissertation work entitled “ADVANCED DOOR LOCK AND ALERT SYSTEM” is conducted on and the work is approved for the award of degree of Diploma in Electronics & Communication Engineering. Mr. S Arun Kumar (19253 - EC - 318 ) Mr. B. Nikhil (19253 - EC - 265 ) M s K. Neeharika (19253 - EC - 283 ) Ms. D. Sri Hamsa (19253 - EC - 288) M r A. Joseph Paul (19253 - EC - 312 ) M r. B. Siva Ram Naidu (19253 - EC - 322) INTERNAL EXAMINER EXTERNAL EXAMINER i ACKNOWLEDGEMENT Our sincere thanks to Mrs. K. MOUNIKA , Department of Electronics and Communication Engineering, 2nd SHIFT POLYTECHNIC, VNR VJIET, who motivated us during project work, guiding us throughout in spite of her schedules and commitments. Our sincere thanks to Dr. S. RAJENDRA PRASAD , Head of the Department, Electronics and Communication Engineering, VNR VJIET & all the faculty of the Department for the encouragement and guidance provided. We extend our thanks to Dr. B. SATYANARAYANA , Vice Principal, 2nd shift polytechnic, VNR VJIET, Hyderabad, for his help & co - operation in providing necessary support for project work. A special note of thanks to Dr. C. D. NAIDU , Principal, VNR VJIET and management of VNRVJIET for providing facilities for project work. We sincerely thank all of them who have helped us either directly or indirectly during the completion of the project tenure. Mr. S Arun Kumar (19253 - EC - 318 ) Mr. B. Nikhil (19253 - EC - 265 ) M s K. Neeharika (19253 - EC - 283 ) Ms. D. Sri Hamsa (19253 - EC - 288) M r A. Joseph Paul (19253 - EC - 312 ) M r. B. Siva Ram Naidu (19253 - EC - 322) PLACE: BACHUPALLY DATE: ii DECLARATION We do declare that this work entitled “ADVANCED DOORLOCK & ALERT SYSTEM ” submitted in the department of Electronics and Communication Engineering, Vallurupalli Nageswara Rao Vignana Jyothi Institute of Engineering & Technology, Hyderabad, in partial fulfillment of the requirement for the award of the diploma in Electronics and Communication Engineering is a bonafide record of our own work carried out under the supervision of Mrs.K.Mounika. Also, we declare that the matter embodied in this thesis has not been submitted by us in full or any part thereof for the award o f any degree/diploma of any other Institute or University previously. Mr. S Arun Kumar (19253 - EC - 318 ) Mr. B. Nikhil (19253 - EC - 265 ) M s K. Neeharika (19253 - EC - 283 ) Ms. D. Sri Hamsa (19253 - EC - 288) M r A. Joseph Paul (19253 - EC - 312 ) M r. B. Siva Ram Naidu (19253 - EC - 322) PLACE: BACHUPALLY DATE: iii ABSTRACT This project displays the plan of advanced locking and alerting system using Arduino. This project will do the task of locking and unlocking the door only when the authorized person enters with an authorized RFID tag and a unique pin. Upon entering correct credentials, it will light the green led and allows th e person to enter by opening the gate (or) door. If the unauthorized person tries to enter the system, a red led lights up and buzzes a waring alarm and sends notification to the administrator mobile immediately. Every movement will be notified through a S MS to the administrator mobile. Admin can HALT as well as OPEN the door at his command by simply sending a unique SMS to the system. This system will improve the security and locking system drastically in places like high secure environment with remote acc essibility is their utmost priority. CONTENTS CHAPTER NO DESCRIPTION PAGE NO ACKNOWLEDGEMENT I DECLARATION II ABSTRACT III CHAPTER 1 INTRODUCTION 1 CHAPTER 2 HARDWARE COMPONENTS 2 2.1 Arduino UN O 2 2.1.1 General description 2 2.1.2. Communication 2 2.1.3 Features 3 2.1.4 Pin diagram 3 2.1.5 General pin functions 4 2.1.6 Special pin functions 4 2.1.7 Applications 5 2.2 4x4 Keypad 6 2.2.1 Pin configuration 6 2.2.2 Pin description 7 2.2.3 Features 7 2.2.4 Operation 8 2.2.5 Applications 9 2.3 RC522 RFID Module 10 2.3.1 Pin configuration 1 0 2.3.2 Pin description 1 0 2.3.3 Features 1 1 2.3.4 Working 11 2.3.5 Reading RFID tag 12 2.3.6 Applications 13 2.4 SIM800L GSM Module 1 4 2.4.1 Introduction 1 4 2.4.2 Features 1 4 2.4.3 Pin description 1 5 2.4.4 Hardware overview 15 2.4.5 LED status indicators 16 2.4.6 Selecting Antenna 17 2.4.7 Wiring 17 2.5 Servo Motor SG - 90 1 9 2.5.1 Introduction 1 9 2.5.2 Pin Configuration 19 2.5.3 Features 20 2.5.4 Operation 2 0 2.5.5 Applications 2 0 2.6 LED 5mm 2 1 2.6.1 LED Pinout 2 1 3.4.2 Features 2 1 3.4.3 Description 2 2 2.7 16*2 LCD 23 2.7.1 Introduction 23 2.7.2 Features 23 2.7.3 Pin Configuration 23 2.7.4 Pin Description 24 2.7.5 Pin function 2 4 2.7.6 Interfacing I2C 25 2.7.6.1 Introduction 25 2.7.6.2 Hardware overview 25 2.7.6.2.1 Character LCD Display 26 2.7.6.2.2 Adapter 26 2.7.6.2.3 I2C Address 2 7 2.7.6.3 I2C Pinout 2 8 2.7.6.4 Interfacing with Arduino 2 8 2.7.6.5 Adjusting LCD contrast 2 9 2.7.7 Applications 2 9 2.8 Buzzer 30 2.8.1 Introduction 30 2.8.2 Features and Specifications 30 2.8.3 Pin Diagram 30 2.8.4 Pin Configuration 3 1 2.8.5 Working 31 2.8.6 Applications 31 CHAPTER 3 SOFTWARE DESCRIPTION 32 3 1 Arduino Software 32 3. 1 .1 Brief on Arduino Cable 32 3. 1 .2 Brief on Arduino Software IDE 3 3 CHAPTER 4 EXPLANATION 36 4 .1 Block Diagram 36 4 1 .1 Description 37 4 2 Circuit Diagram 38 4 .3 Principle Operation 38 CHAPTER 5 RESULT 3 9 CHAPTER 6 ADVANTAGES AND APPLICATIONS 40 6.1 Advantages 40 6. 2 Applications 40 CHAPTER 7 CONCLUSION AND FUTURE SCOPE 41 7.1 Conclusion 41 7.2 Future Scope 41 LIST OF FIGURES FIGURE NO. TITLE PAGE NO. 2.1 Pin Diagram 03 2.2 4x4 k eypad 06 2.3 Internal structure 1 08 2.4 Internal structure 2 09 2.5 RFID Module 10 2.6 RFID Tag & Reader 11 2.7 Reading RFID Tag 1 12 2.8 Reading RFID Tag 2 13 2.9 SIM800l Module 14 2.10 SIM800l Module pin description 1 15 2.11 SIM800l Module pin description 2 16 2.12 Selecting Antenna 1 17 2.13 Selecting Antenna 2 17 2.14 Connecting SIM800L GSM module to Arduino UNO 18 2.15 Servo Motor SG - 90 19 2.16 Servo Motor SG - 90 operation 20 2.17 LED 21 2.18 Pin Configuration of LCD 23 2.19 LCD Display 26 2.20 I2C LCD Adapter 1 26 2.21 I2C LCD Adapter 2 26 2.22 I2C Address of LCD 27 2.23 I2C LCD display Pinout 28 2.24 Arduino Uno to an I2C LCD display 29 2.25 Buzzer 30 3 1 Arduino Cable 32 3.2 Open a new project 33 3.3 Select your file 34 3.4 Select your board 34 3.5 Function of symbols 35 4.1 Block diagrams of Advanced Door Lock And Alert System 36 4.2 Circuit Diagram 38 5.1 Circuit Realtime Output 39 LIST OF TABLES TABLE NO TITLE PAGE NO. 1 Keypad Pin Description 7 2 RFID Pin Description 10 3 SIM800L Pin Description 15 4 Servo Wire Configuration 19 5 LED Pin Description 21 6 LED Color Table 22 7 LCD Pin Functions 24 1 CHAPTER 1 INTRODUCTION The need for safety has been one of the primary factors behind people’s attempts to build homes of their own. Every house comes with one or more main entrances. The main doors are one of the vital points of security. Having mechanisms or security measures in place to control the access to the house has been proved to provide the aspired safety and security. As every house comes with doors, doors come with locks. In an attempt to ensure security, various kinds of door locks such as mechanical or electronic, have been implemented. Even after using those kinds of locks, the crimes do happen due to the fact that such locks have well - known weak points of their own. Some locks can be picked and others can be disabled in some way. So there is a need to invent othe r kinds of locks which cannot be easily broken and even if they can be broken, the task won’t be so easy as it is for other kinds of locks. Various control systems have been designed over the years. The main aim in designing those systems includes – Ease of Control: The system should be easy to control for the household owners. Durability: The system should be durable enough. Security: The system itself should be secure to provide security. The purpose of this p roject is to present a secure smart door l ock which is intended to offer high security, easy access, and control. Therefore, the proposed system makes use of RFID tags and GSM modules to implement a secure but easy - to - use system. It has the possibility to replace the traditional door lock system. By using the proposed method, the security of the household can be enhanced at a very low cost. 2 CHAPTER 2 HARDWARE COMPONENTS 2.1 ARDUINO UNO 2.1.1 GENERAL DESCRIPTION A microcontroller is a general - purpose device, but that is meant to read data, perform limited calculations on that data and control its environment based on those calculations. The prime use of a microcontroller is to control the operation of a machine us ing a fixed program that is stored in ROM and that does not change over the lifetime of the system. The microcontroller design uses a much more limited set of single and double byte instructions that are used to move data and code from internal memory to t he ALU. The microcontroller is concerned with getting data from and to its own pins; the architecture and instruction set are optimized to handle data in bit and byte size. Arduino Uno is a microcontroller board based on 8 - bit ATmega328P microcontroller. Along with ATmega328P, it consists other components such as crystal oscillator, serial communication, voltage regulator, etc. to support the microcontroller. Arduino Uno has 14 digital input/output pins (out of which 6 can be used as PWM outputs), 6 analog input pins, a USB connection, A Power barrel jack, an ICSP header and a reset button. 2.1.2 COMMUNICATION Arduino can be used to communicate with a computer, another Arduino board or other microcontrollers. The ATmega328P microcontroller provides UAR T TTL (5V) serial communication which can be done using digital pin 0 (Rx) and digital pin 1 (Tx). An ATmega16U2 on the board channels this serial communication over USB and appears as a virtual com port to software on the computer. The ATmega16U2 firmware uses the standard USB COM drivers, and no external driver is needed. However, on Windows, a .inf file is required. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the Arduino board. There are two RX a nd TX LEDs on the arduino board which will flash when data is being transmitted via the USB - to - serial chip and USB connection to the computer (not for serial communication on pins 0 and 1). A Software Serial library allows for serial communication on any o f the Uno's digital pins. The ATmega328P also supports I2C (TWI) and SPI communication. The Arduino software includes a Wire library to simplify use of the I2C bus. 3 2.1.3 FEATURES ⮚ Microcontroller : Microchip ATmega328P ⮚ Operating Voltage: 5 Vol ts ⮚ Input Voltage: 7 to 20 Volts ⮚ Digital I/O Pins: 14 (of which 6 provide PWM output) ⮚ Analog Input Pins: 6 ⮚ DC Current per I/O Pin: 20 mA ⮚ DC Current for 3.3V Pin: 50 mA ⮚ Flash Memory : 32 KB of which 0.5 KB used by bootloader ⮚ SRAM : 2 KB ⮚ EEPROM : 1 KB ⮚ Clock Speed: 16 MHz ⮚ Length: 68.6 mm ⮚ Width: 53.4 mm ⮚ Weight: 25 g 2.1.4 PIN DIAGRAM Fig 2.1. Pin Diagram 4 2.1.5 GENERAL PIN FUNCTIONS ● LED : There is a built - in LED driven by digital pin 13. When the pin is high value, the LED is on, when the pin is low, it's off. ● VIN : The input voltage to the Arduino/Genuino board when it's using an external power source (as opposed to 5 volts from the USB connection or other regulated power source). You can supply voltage through this pin, or, if supplying voltage via the power jack, access it through this pin ● 5V : This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power either from the DC power jack (7 - 20V), the USB connector (5V), or the VIN pin of the board (7 - 20V). Supplying voltage via the 5V or 3.3V pins bypasses t he regulator, and can damage the board ● 3V3 : A 3.3 volt supply generated by the on - board regulator. Maximum current draw is 50 mA. ● GND : Ground pins. ● IOREF : This pin on the Arduino/Genuino board provides the voltage reference with which the microcontroller operates. A properly configured shield can read the IOREF pin voltage and select the appropriate power source or enable voltage translators on the outputs to work with the 5V or 3.3V. ● Reset : Typically used to add a reset button to shields which block the o ne on the board. 2.1.6 SPECIAL PIN FUNCTIONS Each of the 14 digital pins and 6 analog pins on the Uno can be used as an input or output, using pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or receive 20 mA as recommended operating condition and has an internal pull - up resistor (disconnected by default) of 20 - 50k ohm. A maximum of 40mA is the value that must not be exceeded on any I/O pin to avoid permanent damage to the microcontroller. The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible to change the upper end of their range using the AREF pin and the analogR eference() function. 5 In addition, some pins have specialized functions: ● Serial / UART : pins 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins are connected to the corresponding pins of the ATmega8U2 USB - to - TTL serial chip. ● External interrupts : pins 2 and 3. These pins can be configured to trigger an inter rupt on a low value, a rising or falling edge, or a change in value. ● PWM (pulse - width modulation): 3, 5, 6, 9, 10, and 11. Can provide 8 - bit PWM output with the analogWrite() function. ● SPI (Serial Peripheral Interface): 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication using the SPI library. ● TWI (two - wire interface) / I²C : A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire library. ● AREF (analog reference): Reference voltage for the analog inputs 2.1.7 APPLICATIONS ● Arduino Uno is used in Do - it - Yourself projects prototyping. ● In developing projects based on code - based control. ● Develop ment of Automation System. ● Designing of basic circuit designs. 6 2.2 4X4 KEYPAD 2.2.1 PIN CONFIGURATION Fig 2.2 4x4 keypad 4X4 KEYPAD MODULES are available in different sizes and shapes. But they all have same pin configuration. It is easy to make 4X4 KEYPAD by arranging 16 buttons in matrix formation by yourself. 7 2.2.2 PIN DESCRIPTION Pin Number Description R ows 1 PIN1 is taken out from 1st ROW 2 PIN2 is taken out from 2nd ROW 3 PIN3 is taken out from 3rd ROW 4 PIN4 is taken out from 4th ROW COLUMN 5 PIN5 is taken out from 1st COLUMN 6 PIN6 is taken out from 2nd COLUMN 7 PIN7 is taken out from 3rd COLUMN 8 PIN8 is taken out from 4th COLUMN Table 1: keypad Pin Description As given in above table, a 4X4 KEYPAD will have EIGHT TERMINALS. In them four are ROWS of MATRIX and four are COLUMNS of MATRIX. These 8 PINS are driven out from 16 buttons present in the MODULE. Those 16 alphanumeric digits on the MODULE su rface are the 16 buttons arranged in MATRIX formation. 2.2.3 4X4 KEYPAD MODULE Features and Specifications: Maximum Voltage across EACH SEGMENT or BUTTON: 24V Maximum Current through EACH SEGMENT or BUTTON: 30mA Maximum operating temperature: 0°C to + 50°C Ultra - thin design Adhesive backing Easy interface Long life. 8 2.2.4 OPERATION : Using KEYPAD MODULE is little tricky. As 16 keys are connected in matrix formation the module is a little complex to use. The module gives only 8 pi ns as a way for interacting with 16 buttons. Consider we have connected the KEYPAD MODULE to a microcontroller. STEP1: First set all ROWS to OUTPUT and set them at +5V. Next set all COLUMNS as INPUT to sense the HIGH logic. Now consider a button is press ed on keypad. And that key is at 2ND COLUMN and 3rd ROW. Fig 2.3 Internal structure 1 With the button being pressed the current flows as shown in figure. With that a voltage of +5V appears at terminal C2. Since the COLUMN pins are set as INPUTS, the cont roller can sense C2 going high. The controller can be programmed to remember that C2 going high and the button pressed is in C2 COLUMN. STEP2: Next set all COLUMNS to OUTPUT and set them at +5V. Next set all ROWS as INPUT to sense the HIGH logic. Since t he key pressed is at 2ND COLUMN and 3rd ROW. The current flows as shown below. 9 Fig 2.4 Internal structure 2 With that current flow a positive voltage of +5V appears at R3 pin. Since all ROWS are set as INPUTS, the controller can sense +5V at R3 pin. The controller can be programmed to remember the key being pressed at third ROW of KEYPAD MATRIX. From previous step, we have known the COLUMN number of key pressed and now we know ROW number. With that we can match the key being pressed. We can take the key INPUT provided by this way for 4X4 KEYPAD MODULE 2.2.5 APPLICATIONS ● Security systems. ● Vending machines. ● Industrial machines. ● Engineering systems. ● Measuring instruments. ● Data entry for Embedded Systems ● Hobby projects. ● Basically any where INPUT device is needed.