Different concepts of security system have flourished along with different techniques and different equipments. RFID; Radio-Frequency identification (RFID) is another achievement we are relying on for optimum security facility in multiple projects. It makes use of electromagnetic fields to detect unique tags assigned to objects in the vicinity. There is a reason why it has mustered more popularity in comparison to other security systems that use bar codes and conventional methods. It is due to the fact that RFID traces tags hidden inside objects unlike bar codes. This is why people opt out for RFID based security systems. Considering this fact, we developed a security system using RFID techniques which permits entry of authorized individual in the area where this system is installed. The system uses unique tags assigned to each individual to distinguish authorized and un-authorized access.
Circuit description RFID Based Security System Using Microcontroller AT89C52
The core component of the project RFID based security system is microcontroller AT89C52. The RFID module works as sensor and displays the information concluded on the LCD fixed wherever appropriate. To control the opening of door, a relay is included in the circuit. A complete layout of the overall security circuit with microcontroller as the central component is depicted in the figure 2. There are multiple reasons why we recommend AT89C52 microcontroller; low-power consumption along with high level of performance. This CMOS 8-bit microcomputer comprises 8 kB Flash programmable and erasable read only memory (PEROM) which is enough for the project we are working on. Other features like 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 extends its flexibility. We cannot ignore the vital role of the system clock in operating the microcontroller.
Through the pins 18 and 19 of the microcontroller, we feed in the basic clock signal to the circuit with the help of an 11.0592MHz quartz crystal. The combination of Capacitor C4 and resistor R1 provides Power-on reset. To perform manual reset task, we have included a switch S1. LCD is interfaced to microcontroller by connecting all pins from port 2(P2.0-P2.7) to data pins (D0-D7) of LCD. Similarly, pins 3.7 and 3.6 from port 3 of microcontroller are connected to RS and E pins of LCD. RW pin of LCD is grounded to perform write operation on LCD.
Commands are sent in hex form and other data from microcontroller are sent in ASCII format to the LCD. For data signals RS pin has high value and for command RS is null. Preset VR1 is used to adjust the contrast setting of the LCD. Resistor R6 is incorporated as a current limiter component by controlling the backlight of the LCD. The two pins P3.0 and 3.1 of the microcontroller Port pins P3.0 (RXD) and P3.1 (TXD) of the microcontroller are used to interface with the RFID reader.
The RFID field is set up by the RFID reader such that whenever a certified person enters in that field along with the unique tag assigned to him/her, RFID reader produces a signal. We call that signal a RF signal and energy travels to the tag and extract details from the tag. As per the communication medium, TXD and RXD pins of microcontroller are used to interact with RFID reader.
Let’s talk in details about how the circuit RFID Based Security System Using Microcontroller AT89C52 works. When this system clarifies the authorized access, port pin P3.2 of the microcontroller reaches high state. As a result of which, the transistor T2 falls into saturation. Then consequently, relay RL1 gets energized and the door gets unlocked indicating authorized access. So as to notify people about this situation, LCD displays meaningful message like “access granted” and at the same time, a piezo-buzzer connected at the end of pin P1.7 is triggered via transistor T1.
In cases where the attempts are unauthorized, LCD displays message; “access denied” and the door remains closed. Additional LEDs like LED2 and LED3 are included in the circuit to assure existence of tag in the RFID reader’s electromagnetic field.
The total power required for this circuit is 15V, 500 mA. And for this, a step down transformer is employed in the circuit that transforms a 230V, 50 Hz AC mains to the power required for the circuit. The output generated by the transformer is then fed to the full-wave rectifier that comprises four diodes; D1-D4. It is then filtered by a capacitor C1 and is then regulated by two ICs; 7812 (IC2) and 7805 (IC3). To eliminate the ripples effect in the regulated power supply, another capacitor C2 is included. Few other components like LED1 and resistor R2 are used as power indicator and current limiting device respectively.
To make the implementation of this circuit easier, we have also included a single-side PCB design layout for this circuit. If you want to save time, you can assemble the circuit directly on the PCB board and avoid possible errors during assembling. Be careful while arranging components on the board and don’t forget to check the circuit twice to consider accidental errors.
Software for RFID Based Security System Using Microcontroller AT89C52
The software designed for this project is included here Click here to download complete package of code. Since it is programmed in ‘C’ language, it can be simply understood. Initially, the code is compiled using Keil μVision4 compiler and a hex file is generated. That hex file is burnt into the microcontroller through a suitable programmer.
PARTS LIST OF RFID BASED SECURITY SYSTEM USING MICROCONTROLLER AT89C52
|Resistors (all ¼-watt, ± 5% Carbon)|
|R1 = 10 KΩ|
R2, R5 = 330 Ω
R3, R4 = 1 KΩ
R6 = 33 Ω
VR1 = 10 KΩ
|C1 = 0.1 µF|
C2, C3 = 22 Pf
|IC1 = 7805|
IC2 = AT89C52
IC3 = RFID READER
T1 = BC558
T2 = BC547
D1 = 1N4007
LED1, LED3 = 5mm RED COLOR LED
LED2 = 5mm GREEN COLOR LED
|PZ1 = PIEZO BUZZER|
LCD = 16X2 LCD MODULE
RL1 = 12V, 1C/O RELAY
SW1 = PUSH TO ON SWITCH
XTAL1 = 11.0592 MHz CRYSTAL
DOOR LOCK ACTUATOR