RFID, Password and OTP based Door Lock System using 8051 Microcontroller

DOI : 10.17577/IJERTCONV7IS11079

Download Full-Text PDF Cite this Publication

Text Only Version

RFID, Password and OTP based Door Lock System using 8051 Microcontroller

A. Hemalatha G. Gandhimathi

Dept of ECE Dept of ECE

Periyar Centenary Polytechnic College National Institute of Technology

Abstract:- Traditional lock systems using mechanical lock and key mechanism are being replaced by new advanced techniques of locking system. These techniques are an integration of mechanical and electronic devices and are highly intelligent. One of the prominent features of these innovative lock systems is their simplicity and high efficiency. Such an automatic lock system consists of electronic control assembly using RFID for authentication , which controls the output load through a password and OTP. This output load can be a motor or a lamp or any other mechanical/electrical load.Here, we developed an

electronic code lock system using 8051 microcontroller. It is a

    1. ORGANIZATION OF THE PAPER:

      In this paper, chapter I discussed about the Introduction, inchapter II, we have to discuss about the Proposed work& Design flow, in chapter III is for Implementation and Result.

      1. PROPOSED WORK & DESIGN FLOW

        simple embedded system with input RFID tag and reader for authentication. The password from keyboard then OTP through GSM and the output being actuated accordingly.

        Keywords: OTP, RFID, GSM, LCD

        1. INTRODUCTION

Level 1

  • RFID

    Level 2

  • Password

    Level 3

  • OTP

    1. PROBLEM DEFINITION:

      Password Based Door Lock System using 8051 Microcontroller is a simple project where a secure password will not enough to act as a door unlocking system since any body can use the password and open the door .

    2. SOLUTION IDENTIFIED:

To overcome this, we design RFID, Password and OTP Based Door Lock System using 8051 Microcontroller.

FIG : 1 PROPOSEDTHREE LEVEL AUTHENTICATION

The proposed design consists of three level authentication as shown in Fig :1

2.1 METHODOLOGY:

The Methodology for the proposed design is shown in Fig :2

    1. BACK GROUND STUDY

      1. RFID (RADIO FREQUENCY IDENTIFICATION):

        RFID methods utilize radio waves to accomplish this. At a simple level, RFID systems consist of three components: an RFID tag or smart label, an RFIDreader, and an antenna. RFID tags contain an integrated circuit and an antenna, which are used to transmit data to the RFID reader.

        RFID

        Password OTP

        RFID tag

        RFID Reader

        Key pad

        Microcontroller

        Key pad

        GSM

      2. GSM MODULE:

This GSM Modem can accept any GSM network operator SIM card and act just like a mobile phone with its own unique phone number. Advantage of using this modem will be that you can use its RS232 port to communicate and develop embedded applications. Applications like SMS Control, data transfer can be developed easily. The modem can either be connected to PC serial port directly or to any microcontroller. It can be used to send SMS or make voice calls. This GSM modem is a highly flexible. Supports features like Voice, SMS, Data/Fax, GPRS and integrated TCP/IP stack.

FIG : 2 PROPOSED METHODOLOGY FOR EACH AUTHENTICATION

2.2 FLOW DIAGRAM

FIG : 3 FLOW DIAGRAM FOR RFID

FIG : 3 FLOW DIAGRAM FOR RFID

R1=S1

R1=S1

FIRST LEVEL AUTHENTICATION: RFID

Read the RFID tag

(R1)

Read the RFID tag

(R1)

Data base stored

RFID ( S1)

No

Data base stored

RFID ( S1)

No

Yes

Yes

Authenticated

Not

Authenticated

Authenticated

Not

Authenticated

Enter in to second

level

Enter in to second

level

AUTHENTICATION STEP 1: ENROL AND LOGIN:

RFID reader allows only the authorize house owner tag and allow them to enter in to the second level authentication. The block diagram is shown in Fig 3. In our design we proposed 1door with 1 RFID tag &one RFID reader and it is connected to 8051. For each 0wner 10 OTP are generated using random generation method, and all are stored in 8051 using keil software.

STEP1: REGISTRATION:

RFID Tag contain unique ID. The authenticated house owner have separate tag and their information along with their mobile number are stored in the 8051.

STEP 2:

When the owner shows the RFID tag, then the RFID reader read the unique RFID number (R1) and it is compared with the stored Data (S1). If it matches first level authentication is over then the message authenticated Owner is displayed in the LCD display and Green LED is ON, that indicate as first level authentication is over.

Read Tag (R1)

Read Tag (R1)

NO

NO

R1=S1

Door lock

R1=S1

Door lock

YES

YES

Level 1

Authenticated

Enter pass word (p1)

NO

Level 1

Authenticated

Enter pass word (p1)

NO

P1 = S2

ROTP=

SOTP1

P1 = S2

ROTP=

SOTP1

YES

YES

YES

YES

Green LED ON

Display Level 2 Authenticated

Green LED ON

Display Level 3 Authenticated

Green LED ON

Display Level 2 Authenticated

Green LED ON

Display Level 3 Authenticated

Enter OTP(ROTP)

Door UNLOCK

Enter OTP(ROTP)

Door UNLOCK

FIG : 4 FLOW DIAGRAM FOR PASS WORD & OTP AUTHENTICATION

DOOR CONTROLLING SYSTEM:

The flow Diagram is shown in Fig 4.and the block diagram is shown in Fig 5.

STEP 3:

When first authentication is over, the house owner enter the pass word via Key pad ( P1) , then is is verified with the stored data ( S2) If it matches second level authentication is over then the message Level 2 authenticated is displayed in the LCD display and Green LED is ON, that indicate as second level authentication is over .

STEP 4:

In 8051, one of the owner OTP is sent to the owner registered mobile. By entered this OTP via key pad, and this is verified with the stored OTP, then the door is UNLOCK.

LCD display

LCD display

III MODEL DEVELOPMENT& IMPLEMENTATION

3

8051

Door Locking & Un Locking Module

8051

Door Locking & Un Locking Module

5

Indication

6

Alarm & ( Motor) Door unlock & lock

1

RFID

Reader 1

RFID

Reader 1

2 7

Matrix Keypad and a 16×2 LCD. Here, an AT89C52

.Microcontroller is used and it is an 8-bit controller. This controller requires a supply voltage of +5V DC. In order to provide regulated 5V DC voltage to the controller we need to use 7805 power supply circuit. We can use 9V DC battery or 12V, 1A adaptor as a power source.

    1. RESET CIRCUIT DESIGN:

      The reset pin of the microcontroller is kept active till the power supply is in the specified range and a minimum oscillation level is maintained. In other words to ensure the supply voltage does not falls below the threshold level of 1.2V and the reset pulse width is greater than 100ms (recommended for 89C52), we need to select the values of resistor and capacitor such that RC >=100ms. Hence, we

      Tag R

      F

      11

      Key board ( To enter

      password & OTP )

      Key board ( To enter

      password & OTP )

      4

      8 10

      9

      selected a 10K resistor and a 10µF electrolytic capacitor.

      GSM Modem

      GSMModem

    2. OSCILLATOR CIRCUIT DESIGN:

      An 11.0592MHz crystal oscillator is used to provide external clock signal to the microcontroller. To ensure smooth operation, we need to connect two ceramic capacitors in the range of 30pF to 40pF. This crystal oscillator is connected between pin 18 and 19 of the microcontroller. Here, we used two 33pF capacitors.

    3. INTERFACING LCD, KEYPAD AND MOTOR DRIVER:

      First, a 10K Potentiometer is connected to the LCD Displays Contrast Adjust Pin (Pin 3). RS, RW and E of

      FIG: 5 HARDWAREMODEL DEVELOPMENT

      For Authentication, RFIDs are used, the owner has a unique RFID, and their details are linked through 8051.

      FIG: 6 CIRCUIT DIAGRAM FOR DOOR UNLOCK AND LOCK

      3.1CIRCUIT DESIGN:

      Password based door lock system using 8051 microcontroller circuit design uses five major components, a Microcontroller, L293D Motor Driver, a DC Motor, a 4×4

      LCD are connected to P3.0, GND and P3.2 pins respectively. The eight data lines of the LCD are connected to PORT1.The four ROW pins of the Keypad are connected to P2.0 to P2.3 and the four COLUMN pins of the Keypad are connected to P2.4 to P2.7 pins respectively. The IN1 and IN2 of (1A and 2A) of the L293D Motor Driver are connected to PORT0 pins P0.0 and P0.1. Motor is connected between OUT1 and OUT2 (1Y and 2Y) pins of L293D.

    4. COMPILATION OF MICROCONTROLLER CODE:

Once the circuit is designed and drawn on a piece of paper, the next step is to write and compile the code. Here, we used the Keil µVision software to write the program in C language.

Prior to writing the code, general steps needs to be followed like creating a new project and selecting the target device or the required microcontroller. Once the code is written, we need to save it with .c extension and then add it to the source file group under the target folder. The code is then compiled by pressing F7 key.

Once the code is compiled, a hex file is created. In the next step, we use Proteus software to draw the circuit. The code is dumped into the microcontroller using an external programmer and Willar Software.

IV RESULTS & DISCUSSION

Once the circuit is powered ON, microcontroller sends commands to the LCD to display enter password on LCD. Now we need to enter the password using the keypad. Once

password is entered, it displays 5 stars on LCD to indicate that controller read password successfully.

Now the controller compares the entered password with predefined password. If the password is matched, then the microcontroller makes P0.0 HIGH and P0.1 LOW, so the motor driver gets the input signals for forward motion of the motor.

As a result, the Door Motor rotates in forward direction to open the door. After a delay of 10seconds, the microcontroller makes P0.0 LOW and P0.1 HIGH, so the motor driver gets the input signals for reverse motion. As a result, the Door motor rotates in reverse direction to close the door.

If the password is not matched, then microcontroller maintains both P0.0 and P0.1 LOW. Hence, the door motor is stationary so that door remains closed.

    1. DOOR UNLOCKED

      Wherein once the RFID, correct code or password, and Correct OTP are entered, the door is opened and the concerned person is allowed access to the secured area. The implemented result is shown in Fig 7

      FIG: 7 RESULTS FOR DOOR UNLOCK

    2. DOOR LOCKED:

      Again, if another person arrives, it will ask to enter the all the three authentication even any one of the authentication is wrong, then door would remain closed, denying access to the person.The implemented result is shown in Fig 8

      FIG: 8 RESULTS FOR DOOR LOCK

      V CONCLUSION

      This simple circuit can be used at residential places to ensure better safety. It can be used at organizations to ensure authorized access to highly secured places. With a slight modification this Project can be used to control the switching of loads through password. This project provides security. Power consumption is less and we used commonly available components. It is a low range circuit, i.e. it is not possible to operate the circuit remotely. If we forget the password it is not possible to open the door.

      VI. REFERENCES

      1. Ashish Jadhav, Mahesh Kumbhar, Mahesh Walunjkar, Feasibility Study Of Implementation Of Cell Phone Controlled, Password Protected Door Locking System, International Journal of Innovative Research in Computer and Communication Engineering, Vol. 1, Issue 6, August 2013.

      2. P. K. Gaikwad, Development OfFpga And Gsm Based Advanced Digital Locker System, International Journal of Computer Science and Mobile Applications, Vol.1 Issue. 3, September2013.

      3. Annie P. Oommen, Rahul A P, Pranav V, Ponni S, RenjithNadeshan, Design And Implementation Of A Digital Code Lock,International Journal of Advanced Research in Electrical, Electronics and Instrumentation Engineering, Vol. 3, Issue 2, February 2014.

      4. Arpita Mishra, Siddharth Sharma, Sachin Dubey, S.K.Dubey, Password Based Security Lock System, International Journal of Advanced Technology in Engineering and Science, Volume No.02, Issue No. 05, May 2014.

      5. E.Supraja, K.V.Goutham, N.Subramanyam, A.Dasthagiraiah, Dr.H.K.P.Prasad, Enhanced Wireless Security System With Digital Code Lock Using Rf&Gsm Technology,International Journal of Computational Engineering Research, Vol 04, Issue 7, July 2014.

      6. Nikhil Agarwal, G.SubramanyaNayak, Microcontroller Based Home Security System With Remote Monitoring,International

        Conference on Electronic Design and Signal Processing (ICEDSP),2012.

      7. SaurabhVinayakLawate, M. S. Ali, Electronic Eye For Security System,International Journal of Electronic and Electrical Engineering, Volume 7, Number 9 , 2014.

      8. Pradnya R. Nehete, Kantilal P. Rane A Paper On OTP Based Door Lock Security System , International Journal For Emerging Trends in Engineering and Management Research (IJETEMR) , Volume II, Issue II -21st June 2016 (ISSN NO: 2455-7773) .

1 thoughts on “RFID, Password and OTP based Door Lock System using 8051 Microcontroller

Leave a Reply