Pages

Security Entrance System





Overview:

Our security system is a stand alone device that allows access to registered users identified by their magnetic cards.(For this project, "access" is represented by a lit LED, showing how the system could be used to control an external locking mechanism.)

The system includes features such as:
  • Multiple accounts, including Administrator accounts (which can create, modify, or delete the other accounts). The account information is stored in non-volatile EEPROM memory, so that it is maintained even if the system is reset.
  • A "lock down" of the system when someone tries to gain access by repeatedly swiping incorrect cards.
  • A 20x4 LCD display to give the user feedback on the current state (such as "Access allowed." or "try swiping the card the other way.") and to prompt administrators for commands. All messages printed to the LCD are simultaneously transmitted to an RS232 port, so that all activity can be logged by a PC.


Design:

There are three basic modes of operation:


Normal Mode:
When a card is swiped, the system compares the number on the card to the list of numbers in the EEPROM database compare the number in its database. If a match is found, an the EEPROM lookup reveals that the account has not been disabled, the system prints a friendly message and lights the "access" LED for 4 seconds, representing the time that the door would be unlocked.

If the account number belongs to a system administrator number, then the administrator is prompted to enter a new mode via the keypad.

If more than three invalid attempts are made in a row, (i.e. presumably by a person who is not authorized for entrance) then an LED representing an alarm is activated, and the system goes into a lockdown mode.


Lockdown Mode:
While the system is in Lockdown mode, only administrators will be recognized. In addition to the ability to lock down after several failed attempts, this feature provides a convenient way for administrators to temporarily disable all non-administrator access, without having to modify each account individually,


Learn Mode:
This mode allows administrators to modify the database of magnetic card information. There are 4 levels of permission:

0:Delete account (account is deleted, and the space allocated to the account is freed)
1:Disable account (account is temporarily disabled, but remains in the database)
2:Normal permissions. (user may get access, unless the system is in lockdown mode.)
3:Administrator level permissions.


The administrator who puts the system in lockdown mode is prompted to swipe the card that will be modified, and can then choose any of the four permissions levels to assign to that card. If the card already exists in the database, it is overwritten with the new permissions level.



Hardware:

This system consists of an Atmel 8535 MCU and three other main components. The first is a magnetic card reader, which is used for authentication. The second is an LCD display, which will be used for messages to users. The third is a keypad which is used for by system administrators to configure and maintain the system.(See attached schematic.)In addition to these components, a UART connection allows real-time logging to the PC.

The LCD is a 20x4 display. The operation of this is almost identical to the ones we used in lab, except it has different base addresses for each line of displayable text. Here is a schematic of the hardware connections.

Card Reading:

The card reader has a 5-wire interface:
Red: +5v
Black: ground
Orange: Data
Brown: Clock
Green: Card Detect

Data and Card Detect are active low (data held low represents a logic '1') and data is read on the falling edge of the clock.

On typical magnetic cards, there are three tracks where information is stored. Most card readers (including this one) only read track 2. Furthermore, track 2 is where most useful information is stored, such as credit card numbers for credit cards, or Cornell ID numbers for Cornell cards.

Track 2 has a potential to store 40 characters, each character consisting of 5 bits, 4 for data, and 1 for odd parity. The least significant bit is transmitted first, with the parity bit transmitted last. Zero through nine represent decimal digits, the other 6 characters are for control. A start sentinel character (0b1011) indicates the start of the data block, and an end sentinel character (0b1111) indicate the end of the data block. If the start sentinel and end sentinel are not present in the data read, this indicates a bad read.

Because of limited EEPROM space, our system only looks at characters 9 through 14.These were chosen to correspond to the 6-digit ID number on CU IDs, but almost any credit card or ID card with a magnetic stripe can be used in the system, since these digits typically correspond to some relatively unique substring of the card number.


Software:

Our program was implemented as a state machine with 11 states. 7 of these states control the card reading, while the others perform lookups and writes to the database.

The database is stored in EEPROM, which gives it 512 bytes of space in the 8535.Each entry requires 8 bytes (6 characters of ID plus permission information), allowing a maximum of 64 users in the database.To add a new user, the system searches through the database to find the first open slot, or prints a message to the display if the database is full. Timer 0 is used for a 1 ms time base, which allowed us to add appropriate delays to our LCD and UART transmissions, and the Timer 1 ISR clears the display and turned off the access LED 4 seconds after each message is printed.


Results:
The system works reliably, and has no known bugs. Cards are almost always successfully read on the first try as long as they are held reasonably straight while swiping (swiping cards at an angle prevents the reader from reading the entire card number.)

If we were to add to the project, we would experiment with adding a card writer (our card reader can’t be used to write cards).Also, we would replace the access LED with an actual mechanical latching mechanism.


Appendices:
Schematic of the hardware  Our sourcecode.



0 comments:

Post a Comment

Share your knowledge

Related Posts Plugin for WordPress, Blogger...

Popular Projects

program for Dual DAC 8051 Microcontroller Based DC Motor Control A Microcontroller Based Turbidity Meter A m -Controller Based Thermostat ASCII to BCD conversion in 8051 AT90LS8515 Digital Message Machine Audio Frequency Response Analyzer Audio Homing Robot Automated Juice Mixer Automated Pet Feeder Autonomous Car Autonomous Parallel Parking RC Car Autonomous Search Robot Autonomous Tank Autonomous Vehicle Contrast Following Rover Autonomous navigating robot BCD number to ASCII in 8051 Balance Bot Blind Bot Blood Pressure Monitor Bloodshed Dev-C++ 5 Compiler/IDE Breath Alcohol Tester Converters on TI MSP430 CrossStudio MSP430 IDE Design of a Real-Time Digital Guitar Tuner Digital Oscilloscope Digital Stethoscope Digital clock project using PIC16C54A microcontroller Digital thermometer ECG monitoring system GPS Data Logger with Wireless Trigger Handwriting Recognition Systm Home Security System Home energy managment IAR Embedded Workbench IDE INFRARED TRACKING SYSTEM IntelliBOT Laser Communications System Line following van MSP-EXP430FG4618 Development Tool and the eZ430 kits MSP430FG4618 device implement a Buzzer tone generator MSP430FG4618 device implement a Real Time Clock MSP430FG4618 device implement a voltage ramp generator MSP430FG4618 device present a message on the LCD Basic Microcontroller(8051) Lab Mivo- RFID based mobile payment system Multi-Zone Fire Alarm System PC based temperature control PIC 16f877 RPM Meter PIC16C54 dual dice electronic project circuit PIC16F84A digital thermometer microcontroller project PIC16F886 horn driver PWM motor contoller with MSP430 Program Block data transfer in 8051 Program to add two BCD numbers in 8051 Program to check whether a 4th bit of a byte is 1 Program to convert ASCII to hex in 8051 Program to count from 0-9 in 8051 Program to count number of 1's in a given data byte in 8051 Program to divide an 8 bit no by another 8 bit number in 8051 Program to find largest of n numbers in 8051 Program to find the LCM of two numbers in 8051 Program to find the square of an 8 bit number in 8051 Program to generate 50msec delay in 8051 Program to implement BCD counter to count from 0-99 in 8051 Program to implement BCD counter to count from 99-0 in 8051 Program to interchange two blocks of data in 8051 Program to multiply 16 bit number by 8 bit number in 8051 Program to search an element in an array in 8051 Program to sort an array of 10 elements in 8051 Programming the ez430 Proximity Security System RAMP wave in 8051 RC Car Controller RObo Dog Radio-controlled Truck Retina color tracker Robotic Arm Controller with GUI Robotic Car Traction Control Safety-sensor vehicle Security Entrance System Self-Powered Solar Data Logger Snake Arm Ultrasonic Positioning Control System Store FFh if 1 Super Train Controller TI MSP430 Microcontrollers Timers on the MSP430 TouchPad Drawing Board Ultra-Sonic Parking Assistant Ultrasonic Parking Controller Ultrasonic Range finder Voice Activated Alarm Clock Voice Recognition Robotic Car Voting Machine Weather Station Web-Monitored Thermostat Wireless Drawing Device Wireless Telemetry Wireless message Communicator Write a C program to display the code of the key pressed in 8051 Zigbee Wireless Relay Control and Power Monitoring System add two multibyte numbers in 8051 convert a decimal number to hex number in 8051 convert an 8bit Hex number to decimal number in 8051 convert hex number to ASCII number in 8051 eZ430-F2013 Development Tool use SD16_A ADC eZ430-RF2500 Development Tool use ADC10 else store 00 in the same location in 8051 find the GCF of two numbers in 8051 find the average of 10 numbers in 8051 generate Fibonacci series in 8051 metal detector project microcontroller using IAR Embedded Workbench program for Elevator Interface in 8051 program for Stepper motor interface in 8051 spectrum analyser square wave in 8051 triangle wave in 8051 voice recognition security system

Sites U missed

Hint

Open Pictures in new page by right click on it, if it is not shown full image.