Professional Documents
Culture Documents
Acknowledgement: Sureshkumar.K.B, Mrs - Sussamma Mathew, Mrs. Padmaja Detha
Acknowledgement: Sureshkumar.K.B, Mrs - Sussamma Mathew, Mrs. Padmaja Detha
Acknowledgement: Sureshkumar.K.B, Mrs - Sussamma Mathew, Mrs. Padmaja Detha
ACKNOWLEDGEMENT
CONTENTS
1.INTRODUCTION
3.EXPLANATION
4.CIRCUIT DIAGRAM
5.FLOW CHART
6.PROGRAM
7.PCB LAYOUT
8.PCB FABRICTION
10.FUTURE ENHANCEMENT
11.CONCLUSION
12REFERENCE
CHAPTER 1
INTRODUCTION
RFID based attendance system uses RFID tags for each person. A
person marks the attendance by swiping the tag near RFID reader module.
The attendance is temporarily saved in the EEPROM. At any time the
circuit can be connected to a computer and the attendance is moved from
EEPROM to a text file in computer. It has following advantages. (1)
Simplicity and reliability, (2) Saving attendance in a computer allows easy
verification and longer record keeping.
CHAPTER 2
2.2 EXPLANATION
RFID READER
The DT125R series RFID Proximity OEM Reader Module has a built-
in antenna in minimized form factor. It is designed to work on the industry
standard carrier frequency of 125 kHz. This LF reader module with an
internal or an external antenna facilitates communication with Read-Only
Department of Electronics 4 Govt.Polytechnic
College,Nattakom
Project 2011 RFID
Based Attendance System
transponders type UNIQUE or TK5530 via the air interface. The tag data
is sent to the host systems via the wired communication interface with a
protocol selected from the module pinout. The LF DT125R module is best
suited for applications in Access Control, Time and Attendance, Asset
Management, Handheld Readers, Immobilizers, and other RFID enabled
applications.The AUTOMATIC DATA COLLECTION Technology used
in th RFID reader.
Features
• Selectable UART or Wigand26.
• Plug-and-Play, needs +5V to become a reader.
• No repeat reads.
• LED/Beeper indicates tag reading operation.
• Excellent read performance without an external circuit.
• Compact size and cost-effective very efficient module for portable readers.
BRIDGE
TRANSFORMER
FILTER
RECTIFIER
TRANSFORMER
VOLTAGE
Regulated
REGULATOR
output
Figuer 2.2 Block diagram of power supply
Almost all electronic devices used in electronic circuits need a dc
source of power supply to operate .The source of dc power is used to
establish the dc operating points for the passive and active electronic
devices incorporated in the system. The combination of a transformer, a
rectifier, and a filter constitutes an ordinary dc supply, also called an
unregulated power supply. For many applications in electronics
unregulated power supply is not good because of the following reasons.
• Poor regulation.
• Variations in the ac supply main.
• Variations in temperature.
(1) Transformer
ARCHITECTURE OF AT89C52
The Accumulator
The "R" registers are a set of eight registers that are named R0, R1,
etc. up to and including R7. The "R" registers as very important auxiliary,
or "helper", registers. The Accumulator alone would not be very useful if it
were not for these "R" registers. The "R" registers are also used to
temporarily store values.
The "B" register is very similar to the Accumulator in the sense that
it may hold an 8-bit (1-byte) value. The "B" register is only used by two
8052 instructions: MUL AB and DIV AB. Thus, if you want to quickly
and easily multiply or divide A by another number, you may store the
other number in "B" and make use of these two instructions. Aside from
the MUL and DIV instructions, the "B" register is often used as yet another
temporary storage register much like a ninth "R" register.
DPS bit to the appropriate value before accessing the respective Data
Pointer Register.
The Program Counter (PC) is a 2-byte address which tells the 8052
where the next instruction to execute is found in memory. When the 8052
is initialized PC always starts at 0000h and is incremented each time an
instruction is executed. It is also interesting to note that while you may
change the value of PC (by executing a jump instruction, etc.) there is no
way to read the value of PC.
The Stack Pointer, like all registers except DPTR and PC, may hold
an 8-bit value. The Stack Pointer is used to indicate where the next value
to be removed from the stack should be taken from. This order of operation
is important. When the 8052 is initialized SP will be initialized to 07h. If
you immediately push a value onto the stack, the value will be stored in
Internal RAM address 08h. SP is modified directly by the 8052 by six
instructions: PUSH, POP, ACALL, LCALL, RET, and RETI.
SFRs
invoke new features. In that case, the reset or inactive values of the new
bits will always be 0.
Program Memory
Code memory is the memory that holds the actual 8052 program that
is to be run. In 89S52 the internal code memory is a Flash memory.
Internal code memory is limited to 8K. Code may also be stored
completely off-chip in an external ROM or, more commonly, an external
EPROM. Flash RAM is also another popular method of storing a program.
The UART in the AT89S52 operates the same way as the UART in
the AT89C51 and AT89C52. Also known as a serial port. It is a duplex
port, which means that it can transmit and receive data simultaneously.
P0, P1, P2, P3 - Input/output ports
TF2- Timer 2 overflow flag set by a Timer 2 overflow and must be cleared
by software. TF2 will not be set when either RCLK = 1 or TCLK = 1.
EXF2- Timer 2 external flag set when either a capture or reload is caused
by a negative transition on T2EX and EXEN2 = 1. When Timer 2 interrupt
is enabled, EXF2 = 1 will cause the CPU to vector to the Timer 2 interrupt
routine. EXF2 must be cleared by software. EXF2 does not cause an
interrupt in up/down counter mode (DCEN = 1).
RCLK- Receive clock enable. When set, causes the serial port to use
Timer 2 overflow pulses for its receive clock in serial port modes 1 and 3.
RCLK = 0 causes Timer 1 overflow to be used for the receive clock.
TCLK- Transmit clock enable. When set, causes the serial port to use
Timer 2 overflow pulses for its transmit clock in serial port modes 1 and 3.
TCLK = 0 causes Timer 1 overflows to be used for the transmit clock.
EXEN2- Timer 2 external enable. When set, allows a capture or reload to
occur as a result of a negative transition on T2EX if Timer 2 is not being
used to clock the serial port. EXEN2 = 0 causes Timer 2 to ignore events at
T2EX.
TR2- Start/Stop control for Timer 2. TR2 = 1 starts the timer.
C/T2- Timer or counter select for Timer 2. C/T2 = 0 for timer function.
C/T2 = 1 for external event counter (falling edge triggered).
through reset (either hardware reset or WDT overflow reset). When WDT
overflows, it will drive an output RESET HIGH pulse at the RST pin.
2.2.5 EEPROM
In recent years the LCD is finding widespread use replacing LEDs. This is due to
the following reasons:
• The declining price of the LCDs.
• The ability to display numbers, characters and graphics. This is in contrast to
LEDs, limited to displaying only numbers to few characters.
Features
• + 5V power supply (Also available for + 3V)
• 1/16 duty cycle
• To be driven by pin 1, pin 2 or pin 15, pin 16
3 Vo Contrast Adjustment
4 RS H/L Register Select Signal
5 R/W H/L Read/Write Signal
6 E H ->L Enable Signal
7 DB0 H/L Data Bus Line
8 DB1 H/L Data Bus Line
9 DB2 H/L Data Bus Line
10 DB3 H/L Data Bus Line
11 DB4 H/L Data Bus Line
12 DB5 H/L Data Bus Line
13 DB6 H/L Data Bus Line
14 DB7 H/L Data Bus Line
15 A/Vee + 4.2V for LED/Negative Voltage Output
R/W, Read/Write
R/W input allows the user to write the information to the LCD or read
information from it. If this pin is set high then read will be selected, else if zero implies
write.
E, Enable
This pin is used by the LCD to latch information presented to its data pins. When
data is supplies to data pins, a high to low pulse must be applied to this pin in order for
the LCD to latch in the data present in the data pins. This pulse must be a minimum of
450ns wide.
RS = 1. There are also instruction command codes that can be sent to the LCD to clear
the display or force the cursor to the home position or blink the cursor. We also use RS
= 0 to check the busy flag bit to see if the LCD is ready to receive information The
busy flag is D7 and can be read when R/W = 1 and RS = 0, as follows: if R/W = 1,RS =
O. When D7 = 1 (busy flag = 1 ) , the LCD is busy taking care of internal operations
and will not accept any new information.
The MM74C922 and MM74C923 CMOS key encoders provide all the
necessary logic to fully encode an array of SPST switches. The keyboard scan can be
implemented by either an external clock or external capacitor. These encoders also
have on-chip pull-up devices which permit switches with up to 50 kW on resistance to
be used. No diodes in the switch array are needed to eliminate ghost switches. The
internal debounce circuit needs only a single external capacitor and can be defeated by
omitting the capacitor. The Data available output returns to a low level when the
entered key is released, even if another key is depressed. The Data available will return
high to indicate acceptance of the new key after a normal debounce period; this two-
key roll-over is provided between any two switches. An internal register remembers the
last key pressed even after the key is released. The 3-STATE outputs provide for easy
expansion and bus operation and are LPTTL compatible.
Features
CHAPTER 3
CIRCUIT DIAGRAM
3.2 Working
Microcontroller reads time from real time chip DS12887. Whenever a RFID tag
is brought near RFID module, it sends the card number in ASCII fomat to the
microcontroller. The microcontroller compares this number with those numbers in the
EEPROM. If match is found, it first check whether it is a master card, then it displays
menu for master card. If not, it displays the ID number and then sends the time and date
details along with ID number to EEPROM for marking daily attendance. If no matches
found, the microcontroller displays ‘Card Not Programmed’ in LCD.
Master card menu consists of set time, add, edit, delete, transfer. The various
options are selected using the keypad keys- up, down, enter, cancel. Keypad encoder
converts the key pressed into corresponding hex file. The output from RFID is given as
the serial input. The card ID number is 8 bytes long and two extra bytes serve as start
and stop bits.
Set time: It is used to edit the time of RTC. The time is entered using the keypad.
Add: It is used to add a new tag and store the new tag number and ID number to
EEPROM.
Edit: It is used to edit the card ID number. The new ID number is entered through
keypad.
Transfer: This option is used to transfer the marked attendance stored in EEPROM to
the computer.
MAX232 is used to convert the TTL voltage to RS232 compatible voltage. Real
time clock is used to provide the date, month, and year details for marking the
attendance.
CHAPTER 4
CHAPTER 5
PROGRAM
#include<reg52.h>
#include<aBsacc.h>
if(TI ==1)
T1=0;
else
{
num=SBUF;
else
{
j=checkcard();
if(j==0)
display(msg1);
else if(j==1)
{
if(nedit==1)
edited();
else if(ndel==1)
del();
else
{
senddetails();
display(msg2);
hexascii(code1);
}
}
else
prog();
}
l=0;
lcdcmd(0x01);
}
RI=0;
}
}
//-------------------------------------Main Program-------------------------------------------------------
void main()
{ msdelay(80);
TH1= -3;
TMOD=0x20;
SCON=0x50;
TR1=1;
IE=0x90;
lcdinit();
w=0;
r=0;
laddr=get_from_mem(0xFD);
msdelay(4);
w=get_from_mem(0xFE);
msdelay(4);
l2addr=get_from_mem(0XFF);
msdelay(4);
r=1;
display(msg0);
lcdcmd(0x01);
while(1)
{
hr=XBYTE[4];
bcdascii(hr);
lcddata(':');
min=XBYTE[2];
bcdascii(min);
lcddata(':');
sec=XBYTE[0];
bcdascii(sec);
lcdcmd(0xC0);
day=XBYTE[7];
bcdascii(day);
lcddata('-');
mnt=XBYTE[8];
bcdascii(mnt);
lcddata('-');
yr=XBYTE[9];
lcddata('2');
lcddata('0');
bcdascii(yr);
lcdcmd(0x80);
}
}
//-----------------------------Function Definition-------------------------------------------------
{
ldata=value;
RS=0;
EN=1;
msdelay(1);
EN=0;
msdelay(60);
}
void lcdinit()
{
lcdcmd(0x38);
lcdcmd(0x0E);
lcdcmd(0x01);
lcdcmd(0x06);
lcdcmd(0x80);
}
x=x|0x30;
y=num&0xF0;
y=y>>4;
y=y|0x30;
if(choice==0)
{
lcddata(y);
lcddata(x);
}
else
{
serial(y);
serial(x);
}
}
return num;
}
void nop(void)
{
}
for(j=0;j<8;j++)
if(data1[j]!=data2[j])
flag=1;
if(flag==0)
{ if(addr==0x00)
a=2;
else
a=1;
break;
}
else
addr=taddr;
}
w=temp1;
r=temp2;
return a;
}
while(count<=c)
{
while(IN==0);
while(IN==1);
n1=P1;
n1=n1&0x0F;
if(c==1)
break;
else
if(n1<0x0A)
{
if(count==1)
{
num=n1*c1[(c-1)];
count++;
}
else if(count==2)
{
num=num+n1*c1[(c-2)];
count++;
}
else
{
num=num+n1;
count++;
}
}
}
if(c==1)
return n1;
else
return num;
}
void prog()
{
unsigned char k=0,inp;
display(msg3);
display(msg4[k]);
do
{
display(msg4[k]);
inp=input(1);
if(inp==0x0C)
{
if(k==0)
k=4;
else
k--;
}
else if(inp==0x0D)
{
k++;
if(k>4)
k=0;
}
else if(inp==0x0F)
break;
else if(inp==0x0E)
{
switch(k)
{
case 0: settime();
break;
case 1: display(msg11);
nadd=1;
break;
case 2: display(msg12);
nedit=1;
break;
case 3: display(msg5);
ndel=1;
break;
case 4: display(msg17);
transmit();
break;
}
break;
}
}while(inp!=0x0F);
}
void settime()
{
msdelay(80);
XBYTE[10]=0x20;
XBYTE[11]=0x83;
display(msg6);
hr=input(2);
hr=hexbcd(hr);
display(msg7);
min=input(2);
min=hexbcd(min);
display(msg8);
day=input(2);
day=hexbcd(day);
display(msg9);
mnt=input(2);
mnt=hexbcd(mnt);
display(msg10);
yr=input(2);
yr=hexbcd(yr);
XBYTE[0]=0x00;
XBYTE[2]=min;
XBYTE[4]=hr;
XBYTE[7]=day;
XBYTE[8]=mnt;
XBYTE[9]=yr;
XBYTE[11]=0x03;
}
void added()
{
unsigned char i=0,k,taddr;
taddr=laddr;
display(msg13);
k=input(3);
display("Adding");
for(i=0;i<8;i++)
{ send_to_mem(taddr+i,data1[i]);
stop_s_eeprom();
msdelay(4); // page write
}
send_to_mem(taddr+8,k);
stop_s_eeprom();
msdelay(4);
display(msg14);
laddr=laddr+0x09;
send_to_mem(0xFD,laddr);
stop_s_eeprom();
msdelay(4);
nadd=0;
}
void edited()
{
unsigned char k,caddr;
display(msg13);
k=input(3);
caddr=addr+0x08;
display("Editing");
send_to_mem(caddr,k);
stop_s_eeprom();
msdelay(4);
display(msg15);
nedit=0;
}
void del()
{
unsigned char i=0,taddr;
taddr=addr;
send_to_mem(taddr,0xFF);
for(i=1;i<7;i++) // page write
send_byte_s_eeprom(0xFF);
stop_s_eeprom();
msdelay(4);
send_to_mem(taddr+7,0xFF);
send_byte_s_eeprom(0xFF);
stop_s_eeprom();
msdelay(4);
display(msg19);
ndel=0;
}
void senddetails()
{
if(w<4)
{
start_s_eeprom();
send_byte_s_eeprom(dwaddr[w]);
send_byte_s_eeprom(l2addr);
send_byte_s_eeprom(code1);
send_byte_s_eeprom(hr);
send_byte_s_eeprom(min);
send_byte_s_eeprom(day);
send_byte_s_eeprom(mnt);
send_byte_s_eeprom(yr);
stop_s_eeprom();
msdelay(4);
l2addr+=7;
if(l2addr==0xFC)
{
w+=1;
if(w==4)
l2addr=0xFC;
else
l2addr=0x00;
}
send_to_mem(0xFE,w);
stop_s_eeprom();
msdelay(4);
send_to_mem(0xFF,l2addr);
stop_s_eeprom();
msdelay(4);
}
else
display(msg16);
}
void transmit()
{
unsigned char i,num,temp,addr2=0x00;
choice=1;
temp=w;
if(temp==4)
temp--;
w=1;
r=1;
do
{
serial('@');
for(i=0;i<7;i++)
{
num=get_from_mem(addr2++);
if(i==0)
hexascii(num);
else
bcdascii(num);
}
serial('#');
msdelay(4);
if(w==temp)
if(addr2>=l2addr)
break;
if(addr2==0xFC)
{
w+=1;
r+=1;
addr2=0x00;
}
}while(w<=temp);
choice=0;
display(msg18);
if(input(1)==0x0E)
{
l2addr=0x00;
w=1;
r=1;
display(msg19);
}
}
start_s_eeprom();
send_byte_s_eeprom(dwaddr[w]);
send_byte_s_eeprom(s_address);
//----------------dummy over----------------------------------------------------
start_s_eeprom();
send_byte_s_eeprom(draddr[r]);
i = get_byte_s_eeprom();
stop_s_eeprom();
return(i);
}
void send_byte_s_eeprom(unsigned char s_byte)
{
unsigned char temp = s_byte;
if(temp == 0)
sda = 0;
else
sda = 1;
sclk = 1;
nop();
nop();
nop();
sclk = 0;
}
sda = 1;
nop();
sclk = 1;
nop();
nop();
nop();
sclk = 0;
}
sclk = 0;
return(temp);
}
void start_s_eeprom()
{
sda = 1;
sclk = 1;
nop();
nop();
nop();
sda = 0;
nop();
nop();
nop();
sclk = 0;
}
void stop_s_eeprom()
{
sda = 0;
nop();
nop();
nop();
sclk = 1;
nop();
nop();
nop();
sda = 1;
}
FABRICATION OF PCB
Making a Printed Circuit Board is the first step towards building electronic
equipment by any electronic industry. We should keep in mind that quality
of soldering affects the quality of the output. The procedure for fabricating
the PCB for setting up the circuit of any multipurpose project is described
below.
PCB Making:
PCB Drawing:
PCB Fabrication:
The fabrication of the PCB starts by transferring the PCB drawing onto a
copper clad sheet. For a small number of PCB, a direct photographic
transfer of the PCB drawing from a negative image of the drawing to a
photo sensitized copper clad sheet is carried out. The copper from the
unexposed area is later etched away. For large quantity production, screen
printing method is used to transfer the PCB drawing image to the copper
clad sheet. For etching the copper clad sheet 20-30grms of ferric chloride
75ml of water heated to about 60degree Celsius may be used . The copper
clad sheet is placed in the solution with its copper side upwards in a plastic
tray. Stirring the solution helps in speedy etching. The dissolution of
unwanted copper would take about 45min. If etching takes longer, the
solution may be heated again and the process is repeated. The paint on the
pattern can be removed by rubbing with a rag soaked in thinner, turpentine
or acetone. The PCB can then be washed and dried.
The pads are drilled with proper drill sizes of 0.9mm, 1mm, 3mm etc for
the leads and mounting holes.
CHAPTER 6
Advantages
• Promiscuity of tags.
• Non-contact and non-line-of-sight.
Disadvantages
• Identity theft.
• Very little power available to digital portion of the IC, limited functionality.
CHAPTER 7
FUTURE ENHANCEMENT
Protocols may be rolled out which make tags obstinate to power interruption
and fault induction. Power loss graceful recovery of tags can be implemented. Research
works could be conducted on smart cards and other embedded systems. Many
multitudes of labour can be done associating low cost hardware . Improved memory
storage can make it possible to mark the attendances of a large group of people, without
connecting to the system. By using active tags or using high frequency RFID readers,
the range can be increased.
APPENDIX
AT89C52
Features
• Compatible with MCS-51™ Products
• 8K Bytes of In-System Reprogrammable Flash Memory
• Endurance: 1,000 Write/Erase Cycles
• Fully Static Operation: 0 Hz to 24 MHz
• Three-level Program Memory Lock
• 256 x 8-bit Internal RAM
• 32 Programmable I/O Lines
• Three 16-bit Timer/Counters
• Eight Interrupt Sources
• Programmable Serial Channel
• Low-power Idle and Power-down Modes
Description
DC CHARACTERISTICS
is provided between any two switches. An internal register remembers the last
key pressed even after the key is released. The TRI-STATEÉ outputs provide for
easy expansion and bus operation and are LPTTL compatible.
Features
• 50 kX maximum switch on resistance
• On or off chip clock
• On-chip row pull-up devices
• 2 key roll-over
• Keybounce elimination with single capacitor
• Last key register at outputs
• TRI-STATE outpust LPTTL compatible
• Wide supply range 3V to 15V
• Low power consumption
DC Electrical characteristics
EEPROM 24C08
Features
• Low-voltage and Standard-voltage Operation
–2.7 (VCC = 2.7V to 5.5V)
– 1.8 (VCC = 1.8V to 5.5V)
• Internally Organized 128 x 8 (1K), 256 x 8 (2K), 512 x 8 (4K), 1024 x 8 (8K )
or 2048 x 8 (16K)
• 2-wire Serial Interface
• Schmitt Trigger, Filtered Inputs for Noise Suppression
• Bi-directional Data Transfer Protocol
• 100 kHz (1.8V) and 400 kHz (2.5V, 2.7V, 5V) Compatibility
• Write Protect Pin for Hardware Data Protection
• 8-byte Page (1K, 2K), 16-byte Page (4K, 8K, 16K) Write Modes
• Partial Page Writes are Allowed
• Self-timed Write Cycle (5 ms max)
• High-reliability
– Endurance: 1 Million Write Cycles
– Data Retention: 100 Years
• Automotive Grade, Extended Temperature and Lead-free/Halogen-free
Devices
Available
• 8-lead PDIP, 8-lead JEDEC SOIC, 8-lead MAP, 5-lead SOT23,
8-lead TSSOP and 8-ball dBGA2™ Packages
• Counts seconds, minutes, hours, days, day of the week, date, month, and
year with leap year compensation valid up to 2100
• Binary or BCD representation of time, calendar, and alarm
• 12– or 24–hour clock with AM and PM in 12–hour mode
• Daylight Savings Time option
• Selectable between Motorola and Intel bus timing
• Multiplex bus for pin efficiency
• Interfaced with software as 128 RAM locations
• 15 bytes of clock and control registers
• 113 bytes of general purpose RAM
• Programmable square wave output signal
• Bus–compatible interrupt signals (IRQ)
• Three interrupts are separately software maskable and testable
• Time–of–day alarm once/second to once/day
• Periodic rates from 122 ms to 500 ms
• End of clock update cycle
• Century register
RFID READER
•
Features
• Selectable UART or Wigand26
Pin description
LCD DISPLAY
Absolute Maximum Ratings
Electrical Characteristics
PIN Description
CHAPTER 8
CONCLUSION
The project RFID based attendance system has been completed and
working has been observed. RFID tag shown over the reader identifies the
person and the code can be entered by the use of keypad. The ID number and
related details are sent to the computer . RFID module comprising of a RFID
Reader and a RF Tag avails an easy implementation option and is a far less
tedious bid. It is a simple method and is reliable. Saving attendance in a
computer allows easy verification and longer record keeping.
REFERENCES
6. www.cornell.com
7. www.electronics4u.com
8. www.datasheet4u.com