Вы находитесь на странице: 1из 23

RFID Based Door Security

System using 8051


Submitted By: Priyanka Bhera

Roll No: 14EBKEC035
Table of Contents
• Project Objective
• Hardware Components
• Component Descriptions
• Software Requirements
• Working Model
• Applications
• Enhancements
• Conclusion
Project Objective
Provide security to organizations
Access allowed only to authorized personnel with a valid RFID tag
Designed using 8051 micro controller and EM-18 RFID module
Output controlled via dc motor.
Hardware Components
Component Specification

Microcontroller 8051 Series (AT89S51)

RFID Reader EM-18 Reader module (125Khz)

RFID Tags Card Type (125Khz)

Voltage Regulator 7805 (5 volts IC), 7812 (12 volts IC)

Rectifier W10 Bridge

Transistor 2N2222

Transformer 12-0-12

Others Crystal,Capacitors, Resistors, Switches, Diodes,Connectors, Power cable

Microcontroller - 8051
• AT89S51 – is the 8051 variant from Atmel
• A micro controller is an integrated circuit or a chip with a processor
and other support devices like program memory, data memory, I/O
ports, serial communication interface etc integrated together.

8051 – Internal Architecture Block Diagram
8051 – Pin Diagram
8051 - Pin Descriptions
• Pin-40 : Named as Vcc is the main power source. Usually its +5V DC.

• Pins 32-39: Known as Port 0 (P0.0 to P0.7) – In addition to serving as I/O port, lower order address and data bus signals are multiplexed with this port (to serve the purpose
of external memory interfacing). This is a bi directional I/O port (the only one in 8051) and external pull up resistors are required to function this port as I/O.

• Pin-31:- ALE aka Address Latch Enable is used to demultiplex the address-data signal of port 0 (for external memory interfacing.) 2 ALE pulses are available for each machine

• Pin-30:- EA/ External Access input is used to enable or disallow external memory interfacing. If there is no external memory requirement, this pin is pulled high by
connecting it to Vcc.

• Pin- 29:- PSEN or Program Store Enable is used to read signal from external program memory.

• Pins- 21-28:- Known as Port 2 (P 2.0 to P 2.7) – in addition to serving as I/O port, higher order address bus signals are multiplexed with this quasi bi directional port.

• Pin 20:- Named as Vss – it represents ground (0 V) connection.

• Pins 18 and 19:- Used for interfacing an external crystal to provide system clock.

• Pins 10 – 17:- Known as Port 3. This port also serves some other functions like interrupts, timer input, control signals for external memory interfacing RD and WR , serial
communication signals RxD and TxD etc. This is a quasi bi directional port with internal pull up.

• Pin 9:- As explained before RESET pin is used to set the 8051 microcontroller to its initial values, while the microcontroller is working or at the initial start of application. The
RESET pin must be set high for 2 machine cycles.

• Pins 1 – 8:- Known as Port 1. Unlike other ports, this port does not serve any other functions. Port 1 is an internally pulled up, quasi bi directional I/O port.
8051 – Reset Circuitry
RFID Reader Module

• a module with a demodulator, coil

and associated electronics.
• RFID reader is an active device and
should be powered
• The coil serves as exciter for the
RFID tag (to energise the coil inside
the tag) and also as an antenna for
receiving the signal propagated by
the RFID tag
• The electronic circuit demodulates
this signal and converts it into a
form suitable for the next stage
• have an integrated chip embedded inside it which will
energise itself in an electromagnetic field
• The chip inside this RFID tag stores a unique information
which we call as the RFID key which is usually a 12 digit
• Unique RFID key – read by an RFID Reader
• Comes in many shapes – smart cards, key tags, buttons
• comes with a chip with memory to store RFID
identification code, a coil and a modulator.
• coil is to energize the chip via electro magnetic induction
• modulator modulates the RFID code/key according to the
• Coil also serves as an antenna to transfer information in
air medium
7805 – 5V Regulator
• 5V supply is essential for 8051 and RFID
• Input voltage range 7V- 35V
• Current rating Ic = 1A
• Output voltage range VMax=5.2V ,VMin=4.8V
• Heat Exchange is necessary if input voltage is
7812 – 12V Regulator
• 12V supply is essential for the 12V DC relay
• Input voltage range 14V- 35V
• Current rating Ic = 1A
• Output voltage range VMax=12.2V ,VMin=11.8V
W10 – Bridge Rectifier
• Bridge rectifier is used to convert
AC supply (from step down
transformer) to DC supply
• To reduce size of circuit, a single
unit bridge rectifier – W10 is used
2N2222 – Transistor
• 2N2222 is a common NPN bipolar junction
transistor (BJT) used for general purpose low-
power amplifying or switching applications
• Used to drive relay in this application by
providing appropriate current amplification
Software Requirements
• Software development involves 4 stages:
• Stage 1 → Saving the authorized RFID keys
• Stage 2 → Reading an RFID Tag for comparison
• Stage 3 → Comparing the read RFID key with the saved values
• Stage 4 → Output - grant or deny access based on comparison stage
• Languages: Assembly (MCS-51 instruction set) or Embedded C|
Compiler: Keil or MIDE-51
Working Model
• We store a set of RFID tag data (unique RFID codes/keys) inside our
program/system, say 3 or 10 RFID tag data
• The system comprises of a micro controller (8051 series), an RFID Reader
module, an LCD module (16x2) to display messages, a 12 volts relay (to
control output), and a power supply circuitry to give power to
microcontroller, RFID module, LCD module and the relay
• When the person with the right RFID tag come and swipes his RFID tag
near the RFID reader, access will be granted.
• When the person with the wrong RFID card swipes his RFID tag, access
will be denied.
• The 16x2 LCD module will display different status messages.
Circuit Diagram of RFID System:
Expected Outputs
• To demonstrate actual working of the project, a lamp bulb is used instead of the door
(and the solenoid lock). The lamp bulb is interfaced to the RFID system using an dc
motor. An LCD module (16x2) can be used to display status messages.
• There are two possible outputs! One for Successful Access and one for Failed Access!
• 1) Successful Access :- If the RFID Tag data read by RFID Reader matches with any of
the stored RFID Tag data inside program memory of 8051, we consider this as a
Successful Access. A message “Access Granted” will be displayed on LCD Module. The
relay will be turned ON (for 30 seconds) and hence the lamp bulb will glow indicating
the door is opened. The relay will be closed after the set time (say 30 seconds) so as to
prevent any further access.
• 2) Failed Access :- If the RFID Tag data read by RFID Reader does not match with any of
the stored RFID Tag data inside program memory of 8051, we consider this as a Failed
Access. A message “Access Denied” will be displayed on the LCD Module. The relay will
not be turned ON and hence the lamp bulb will also be kept OFF.
• Manufacturing
• Supply Chain, Logistics & Distribution
• Security And Access Control
• Parking, Bay And Terminal Management
• Tool Collection
• The project can be enhanced with the addition of a GSM module. A
new system can be setup with the help of a GSM module to send
SMS to a set of mobile numbers when someone access the system
successfully or unsuccessfully (or for both events).
• The same system can also be modified into an RFID based
Attendance management system with the addition of an RTC
module and a LCD display.
Any Query ?