Friday, March 29, 2024

RFID Based Security System

This circuit is a security system that uses RF tags as security credentials. It comprises of a microcontroller AT89C52 and an RFID reader. -- By Bikramjeet Waraich

Semi-passive tags have their own power source that powers only the microchip. These have no transmitter. They rely on altering the RF field from the transceiver to transmit their data.

There are three ways for data encoding into tags:

1. Read-only tags contain data, which is pre-written onto them by the tag manufacturer or distributor.

2. Write-once tags enable a user to write data to the tag one time in production mor distribution processes.

3. Full read-write tags allow new data to be written to the tag as needed and later other data can be rewritten over the original data.

- Advertisement -

RF transceiver

The RF transceiver is the source of the RF energy used to activate and power the passive RFID tags. It may be enclosed in the same cabinet as the reader or it may be a separate piece of equipment. When provided as a separate piece of equipment, the transceiver is commonly referred to as an RF module. The RF transceiver controls and modulates the radio frequencies that the antenna transmits and receives. The transceiver filters and amplifies the back-scatter signal from a passive RFID tag.

RFID based security system circuit

Fig.5 shows the circuit of the RFID based security system. The compact circuitry is built around Atmel AT89C52 microcontroller. The AT89C52 is a low-power, high performance CMOS 8-bit microcomputer with 8 kB of Flash programmable and erasable read only memory (PEROM). It has 256 bytes of RAM, 32 input/output (I/O) lines, three 16-bit timers/ counters, a six-vector two-level interrupt architecture, a full-duplex serial port, an on-chip oscillator and clock circuitry. The system clock also plays a significant role in operation of the microcontroller.

Fig.5: Circuit of the RFID-based security system
Fig.5: Circuit of the RFID based security system

FDC_part-list-_-dec

- Advertisement -

An 11.0592MHz quartz crystal connected to pins 18 and 19 provides basic clock to the microcontroller. Power-on reset is provided by the combination of electrolytic capacitor C4 and resistor R1. Switch S1 is used for manual reset. Port pins P2.0 through P2.7 of the microcontroller are connected to data port pins D0 through D7 of the LCD, respectively. Port pins P3.7 and P3.6 of the microcontroller are connected to register-select (RS) and enable (E) pins of the LCD, respectively. Read/write pin of the LCD is grounded to enable for write operation.

All the data is sent to the LCD in ASCII format for display. Only the commands are sent in hex form. Register-select (RS) signal is used to distinguish between data (RS=1) and command (RS=0). Preset VR1 is used to control the contrast of the LCD. Resistor R6 limits the current through the backlight of the LCD. Port pins P3.0 (RXD) and P3.1 (TXD) of the microcontroller are used to interface with the RFID reader.

Circuit operation

When an authorised person having the tag enters the RF field generated by the RFID reader, RF signal is generated by the RFID reader to transmit energy to the tag and retrieve data from the tag. Then the RFID reader communicates through RXD and TXD pins of the microcontroller for further processing.

Thus on identifying the authorised person, port pin P3.2 goes high, transistor T2 drives into saturation, and relay RL1 energises to open the door for the person. Simultaneously, the LCD shows “access granted” message and port pin P1.7 drives piezobuzzer PZ1 via transistor T1 for aural indication.

If the person is unauthorised, the LCD shows “access denied” and the door doesn’t open. LED2 and LED3show presence of the tag in the RFID reader’s electromagnetic field.

To derive the power supply, the 230V, 50Hz AC mains is stepped down by transformer X1 to deliver a secondary output of 15V, 500 mA. The transformer output is rectified by a full-wave rectifier comprising diodes D1 through D4, filtered by capacitor C1 and regulated by ICs 7812 (IC2) and 7805 (IC3). Capacitor C2 bypasses the ripples present in the regulated supply. LED1 acts as the power indicator and R2 limits the current through LED1.

A single-side PCB for RFID-based security system is given below for download. Assemble the circuit on a PCB as it minimises time and assembly errors. Carefully assemble the components and double-check for any overlooked error.

Software

The software for this project is given at the end of this article. It is written in ‘C’ language and compiled using Keil μVision4 compiler. The finally obtained ‘.hex’ code is burnt into the microcontroller using a suitable programmer. The program is easy to understand.

EFY note. The complete kit of this project is available with Kits’n’Spares. The source code of this project is available on the link given below.

Download PCB and component layout PDFs: click here

Download Source Code: click here

2 COMMENTS

  1. Sir,
    We are recently working on the project named RFID based security system published at this site. We are having some problems as there is no specification of RFID module is given in the component list. Also we are having problem in programming of the microcontroller. Please tell me what number of RFID module is used in the circuit and also how we program the microcontroller. Please reply as soon as possible.

SHARE YOUR THOUGHTS & COMMENTS

Electronics News

Truly Innovative Tech

MOst Popular Videos

Electronics Components

Calculators