+ All Categories
Home > Documents > Library Using RFID Part 3

Library Using RFID Part 3

Date post: 14-Oct-2014
Category:
Upload: joseph-santhi-kumar-j
View: 203 times
Download: 0 times
Share this document with a friend
Description:
Complete documentation
82
INTRODUCTION OBJECTIVE: During a day library managers have to supervise many activities within their libraries. These activities have to be performed smoothly and simultaneously for the benefit of all persons concerned. Some of the important functions in library are: check –in/check-out of items, check inventory. If each of these functions is done by conventional methods, they will take time and lead to inefficiencies and unsatisfactory services to the library patrons. This is tedious and slow. If by using RFID technology this process is made for time efficient, then it could be recommended. As far as shelving is concerned, in a conventional library, it is done manually. In most busy libraries many books can be issued during the day so by using this RFID technology we can simplify the work for a librarian. Existing System: The present existing system is consisting of libraries and managing team for regular watching. It is in form of giving written slips to the students and regular renewals and returns. The present existing system requires regular maintenance and regular check up of students. This is 1
Transcript
Page 1: Library Using RFID Part 3

INTRODUCTION

OBJECTIVE:

During a day library managers have to supervise many activities within their

libraries. These activities have to be performed smoothly and simultaneously for the benefit

of all persons concerned. Some of the important functions in library are: check –in/check-out

of items, check inventory.

If each of these functions is done by conventional methods, they will take time

and lead to inefficiencies and unsatisfactory services to the library patrons. This is tedious

and slow.

If by using RFID technology this process is made for time efficient, then it

could be recommended. As far as shelving is concerned, in a conventional library, it is done

manually. In most busy libraries many books can be issued during the day so by using this

RFID technology we can simplify the work for a librarian.

Existing System:

The present existing system is consisting of libraries and managing team for

regular watching. It is in form of giving written slips to the students and regular renewals and

returns. The present existing system requires regular maintenance and regular check up of

students. This is burdensome to librarian and time consuming process. As the number of

students increases it is it is burden to librarian.

The following made to new invention :

Need regular maintenance

Time consuming

Burden to librarian

Proposed System:

It is purely controller based system, which have following features

Time saving devices free them to help customer better

Can be flexible working schedules

1

Page 2: Library Using RFID Part 3

Faster and accurate

Check-in/check-out o all books

1.1 EMBEDDED SYSTEMS

An embedded system is some combination of computer hardware and software, either fixed

in capability or programmable, that is specifically designed for a particular function.

A general-purpose definition of embedded systems is that they are devices used to control,

monitor or assist the operation of equipment, machinery or plant. "Embedded" reflects the

fact that they are an integral part of the system. In many cases their embeddedness may be

such that their presence is far from obvious to the casual observer and even the more

technically skilled might need to examine the operation of a piece of equipment for some

time before being able to conclude that an embedded control system was involved in its

functioning. At the other extreme a general-purpose computer may be used to control the

operation of a large complex processing plant, and its presence will be obvious.

The very simplest embedded systems are capable of performing only a single function or set

of functions to meet a single predetermined purpose. In more complex systems an application

program that enables the embedded system to be used for a particular purpose in a specific

application determines the functioning of the embedded system. The ability to have programs

means that the same embedded system can be used for a variety of different purposes. In

some cases a microprocessor may be designed in such a way that application software for a

particular purpose can be added to the basic software in a second process, after which it is not

possible to make further changes. The applications software on such processors is sometimes

referred to as firmware

The simplest devices consist of a single microprocessor (often called a "chip”), which may

itself be packaged with other chips in a hybrid system or Application Specific Integrated

Circuit (ASIC). Its input comes from a detector or sensor and its output goes to a switch or

activator which (for example) may start or stop the operation of a machine or, by operating a

valve, may control the flow of fuel to an engine. As the embedded system is the combination

of both software and hardware

2

Page 3: Library Using RFID Part 3

Fig 1.1 Block diagram of Embedded System

Software deals with the languages like ALP, C, and VB etc., and Hardware deals with

Processors, Peripherals, and Memory.

Memory: It is used to store data or address.

Peripherals: These are the external devices connected

Processor: It is an IC which is used to perform some task

Processors are classified into four types like:

1. Micro Processor (µp)

2. Micro controller (µc)

3. Digital Signal Processor (DSP)

4. Application Specific Integrated Circuits (ASIC)

Micro Processor (µp):

It is an electronic chip which performs arithmetic and logical operations with assistance of

internal memory.

Embedded

System

Software Hardware

ALPCVB

Etc.,

ProcessorPeripheralsmemory

3

Page 4: Library Using RFID Part 3

Micro Controller (µc):

It is a highly integrated micro processor designed for specific use in embedded systems.

Applications of embedded system

Introduction

Embedded controllers may be found in many different kinds of system and are used for many

different applications. The list, which follows, is indicative rather than exhaustive. An item in

the list may be relevant to a particular company because either (a) it is or involves a core

process or product, (b) it is or involves an ancillary function or service performed by the

company or (c) it refers to a product or service provided by a contractor under some form of

agreement and the vulnerability of the supplier may need to be considered.

List of applications of embedded systems

Manufacturing and process control

Construction industry

Transport

Buildings and premises

Domestic service

A manufacturing company has provided the following list of embedded systems

Multi-loop control and monitoring - DCS, SCADA, telemetry

Panel mounted devices - Control, display, recording and operations

Safety and security - Alarm and trip systems, fire and gas systems, buildings and facilities

security

Field devices - measurement, actuation

Analytical systems - Laboratory systems; on-line/ plant systems

Electrical supply - supply, measurement, control, protection

Tools - for design, documentation, testing, maintenance

4

Page 5: Library Using RFID Part 3

1.2 BLOCK DIAGRAM

Fig1.2 Block Diagram of RFID based LMS

1.3 BLOCK DIAGRAM EXPLANATION

This Project mainly consists of Power Supply section, Microcontroller section, LCD

display section, Serial Communication section and RFID section.

Power Supply Section: This section is meant for supplying Power to all the sections

mentioned above. It basically consists of a Transformer to step down the 230V ac to 9V ac

followed by diodes. Here diodes are used to rectify the ac to dc. After rectification the

obtained rippled dc is filtered using a capacitor Filter. A positive voltage regulator is used to

regulate the obtained dc voltage.

But here in this project two power supplies are used one is meant to supply operating

voltage for Microcontroller and the other is to supply control voltage for Relays.

MICRO

CONTROLLER

R

Power supply

RFID card

RFID

READER

M

A

X

2

3

2

BUZZER

LCD Display

EEPROM

AT24C08

5

Page 6: Library Using RFID Part 3

Microcontroller Section: This section forms the control unit of the whole project. This

section basically consists of a Microcontroller with its associated circuitry like Crystal with

capacitors, Reset circuitry, Pull up resistors (if needed) and so on. The Microcontroller forms

the heart of the project because it controls the devices being interfaced and communicates

with the devices according to the program being written.

LCD Display Section: This section is basically meant to show up the status of the project.

This project makes use of Liquid Crystal Display to display / prompt for necessary

information.

RFID Reader, RFID Card: RF transmitted is used for transmitting the RF signals in our

project. Transmitter is called as “Data in, Antenna out” used to convert serial data received

from RF card into RF wave which in then radiates in to space. Receiver called “antenna data

out” used to convert RF waves in to serial data.

Serial communication: A standard serial interface for PC, RS232C, requires negative logic,

i.e., logic 1 is -3V to -12V and logic 0 is +3V to +12V. To convert TTL logic, say, TxD and

RxD pins of the microcontroller thus need a converter chip. A MAX232 chip has long been

using in many microcontrollers boards. It is a dual RS232 receiver / transmitter that meets all

RS232 specifications while using only +5V power supply.

6

Page 7: Library Using RFID Part 3

1.4 SCHEMATIC

This schematic explanation includes the detailed pin connections of every device

with the microcontroller.

Let us see the pin connections of each and every device with the microcontroller

in detail.

Fig 1.3 Schematic of RFID based LMS

7

Page 8: Library Using RFID Part 3

1.4.1 SCHEMATIC EXPLANATION:

POWER SUPPY

Firstly, the required operating voltage for Microcontroller 89S52 is 5V. Hence the 5V

D.C. power supply is needed by the same. This regulated 5V is generated by first stepping

down the 230V to 9V by the step down transformer.

In the both the Power supplies the step downed a.c. voltage is being rectified by the

Bridge Rectifier. The diodes used are 1N4007. The rectified a.c voltage is now filtered using

a ‘C’ filter. Now the rectified, filtered D.C. voltage is fed to the Voltage Regulator. This

voltage regulator allows us to have a Regulated Voltage. In Power supply given to

Microcontroller 5V is generated using 7805. The rectified; filtered and regulated voltage is

again filtered for ripples using an electrolytic capacitor 100μF. Now the output from the first

section is fed to 40th pin of 89S52 microcontroller to supply operating voltage and from other

power supply to circuitry.

MICRO CONTROLLER

The microcontroller 89S52 with Pull up resistors at Port0 and crystal oscillator of

11.0592 MHz crystal in conjunction with couple of capacitors of is placed at 18 th& 19th pins

of 89S52 to make it work (execute) properly

RFID Reader, RFID Card: RF transmitter is used for transmitting the RF signals in

our project. Transmitter is called as “Data in, Antenna out” used to convert serial data

received from RF card into RF wave which in tern radiates in to space. Receiver called

“antenna data out” used to convert RF waves in to serial data.

Serial communication : A standard serial interface for PC, RS232C, requires negative

logic, i.e., logic 1 is -3V to -12V and logic 0 is +3V to +12V. To convert TTL logic, say, TxD

and RxD pins of the microcontroller thus need a converter chip. A MAX232 chip has long

been using in many microcontrollers boards. It is a dual RS232 receiver / transmitter that

meets all RS232 specifications while using only +5V power supply.

8

Page 9: Library Using RFID Part 3

LCD: A liquid crystal display (LCD) is a thin, flat display device made up of any number

of color or monochrome pixels arrayed in front of a light source or reflector. Each pixel

consists of a column of liquid crystal molecules suspended between two transparent

electrodes, and two polarizing filters, the axes of polarity of which are perpendicular to each

other. Without the liquid crystals between them, light passing through one would be blocked

by the other. The liquid crystal twists the polarization of light entering one filter to allow it to

pass through the other.

Switches: used for the entering input values

9

Page 10: Library Using RFID Part 3

HARDWARE DESCRIPTION

The Hardware components used in this project are

1. Microcontroller

2. RFID

3. RS 232

4. LCD

5. Regulated Power Supply

2.1 MICRO CONTROLLER AT89S52

2.1.1 Introduction:

A Micro controller consists of a powerful CPU tightly coupled with memory, various

I/O interfaces such as serial port, parallel port timer or counter, interrupt controller, data

acquisition interfaces-Analog to Digital converter, Digital to Analog converter, integrated on

to a single silicon chip.

If a system is developed with a microprocessor, the designer has to go for external

memory such as RAM, ROM, EPROM and peripherals. But controller is provided all these

facilities on a single chip. Development of a Micro controller reduces PCB size and cost of

design. Intel has introduced a family of Micro controllers called the MCS-51.

Fig 2.1 Picture of Micro Controller

10

Page 11: Library Using RFID Part 3

2.1.2 Difference between 8051 and 8052

The 8052 microcontroller is the 8051's "big brother." It is a slightly more powerful microcontroller, sporting a number of additional features which the developer may make use of:

256 bytes of Internal RAM (compared to 128 in the standard 8051).

A third 16-bit timer, capable of a number of new operation modes and 16-bit reloads.

Additional SFRs to support the functionality offered by the third timer.

AT89S52 is a low-power, high-performance CMOS 8-bit micro controller with

8Kbytes of in-system programmable Flash memory. The device is manufactured Using

Atmel’s AT89S52

2.1.3 Features of AT89S52

• Compatible with MCS-51 Products

• 8K Bytes of In-System Programmable (ISP) Flash Memory

– Endurance: 1000 Write/Erase Cycles

• 4.0V to 5.5V Operating Range

• Fully Static Operation: 0 Hz to 33 MHz

• Three-level Program Memory Lock

• 256K Internal RAM

• 32 Programmable I/O Lines

• 3 16-bit Timer/Counters

• Eight Interrupt Sources

• Full Duplex UART Serial Channel

• Low-power Idle and Power-down Modes

• Interrupt Recovery from Power-down Mode

• Watchdog Timer

• Dual Data Pointer

• Power-off Flag

11

Page 12: Library Using RFID Part 3

2.1.4 Description of Microcontroller 89S52

The high-density nonvolatile memory technology and is compatible with the industry-

standard 80C51 micro controller. The on-chip Flash allows the program memory to be

reprogrammed in-system or by a conventional nonvolatile memory programmer. By

combining a versatile 8-bit CPU with in-system programmable flash one monolithic chip; the

Atmel AT89S52 is a powerful micro controller, which provides a highly flexible and cost-

effective solution to many embedded control applications.

Fig 2.2 Architecture of micro controller 89S52

12

Page 13: Library Using RFID Part 3

2.1.5 TYPES OF MEMORY:

The 89S52 have three general types of memory. They are on-chip memory, external

Code memory and external Ram. On-Chip memory refers to physically existing memory on

the micro controller itself. External code memory is the code memory that resides off chip.

This is often in the form of an external EPROM. External RAM is the Ram that resides off

chip. This often is in the form of standard static RAM or flash RAM.

a) Code memory: Code memory is the memory that holds the actual 89S52 programs that is

to be run. This memory is limited to 64K. Code memory may be found on-chip or off-

chip. It is possible to have 4K of code memory on-chip and 60K off chip memory

simultaneously. If only off-chip memory is available then there can be 64K of off chip

ROM. This is controlled by pin provided as EA

b) Internal RAM: The 89S52 have a bank of 128 of internal RAM. The internal RAM is

found on-chip. So it is the fastest Ram available. And also it is most flexible in terms of

reading and writing. Internal Ram is volatile, so when 89S52 is reset, this memory is

cleared. 128 bytes of internal memory are subdivided. Internal RAM also contains 128

bits, which are addressed from 20h to 2Fh. These bits are bit addressed i.e. each

individual bit of a byte can be addressed by the user. They are numbered 00h to 7Fh. The

user may make use of these variables with commands such as SETB and CLR.

c) Flash Memory: Flash memory (sometimes called "flash RAM") is a type of constantly-

powered nonvolatile that can be erased and reprogrammed in units of memory called

blocks. Flash memory is often used to hold control code such as the basic input/output

system (BIOS) in a personal computer. When BIOS needs to be changed (rewritten), the

flash memory can be written to in block (rather than byte) sizes, making it easy to update.

On the other hand, flash memory is not useful as random access memory (RAM) because

RAM needs to be addressable at the byte (not the block) level.

Flash memory gets its name because the microchip is organized so that a section of

memory cells are erased in a single action or "flash." The erasure is caused by Fowler-

Nordheim tunneling in which electrons pierce through a thin dielectric material to remove

an electronic charge from a floating gate associated with each memory cell.

13

Page 14: Library Using RFID Part 3

Flash memory is used in digital cellular phones, digital cameras, LAN switches, PC

Cards for notebook computers, digital set-up boxes, embedded controllers, and other

devices.

TECHNICAL OVERVIEW OF FLASH MEMORY

Flash memory is a nonvolatile memory using NOR technology, which allows the user

to electrically program and erase information. Intel® Flash memory uses memory cells

similar to an EPROM, but with a much thinner, precisely grown oxide between the floating

gate and the source. Flash programming occurs when electrons are placed on the floating

gate. The charge is stored on the floating gate, with the oxide layer allowing the cell to be

electrically erased through the source.

Memory Type Features

FLASH Low-cost, high-density, high-speed architecture; low power; high reliability

ROMRead-Only Memory

Mature, high-density, reliable, low cost; time-consuming mask required, suitable for high production with stable code

SRAMStatic Random-Access Memory

Highest speed, high-power, low-density memory; limited density drives up cost

EPROMElectrically Programmable Read-Only Memory

High-density memory; must be exposed to ultraviolet light for erasure

EEPROMorE2PROM Electrically Erasable Programmable Read-Only Memory

Electrically byte-erasable; lower reliability, higher cost, lowest density

DRAMDynamic Random Access Memory

High-density, low-cost, high-speed, high-power

Table 2.1 Different Types of Memories

14

Page 15: Library Using RFID Part 3

2.1.6 Pin Configuration:

Fig 2.3 Pin diagram of AT89S52

PIN DESCRIPTION OF MICROCONTROLLER 89S52

VCC: Supply voltage.

GND: Ground.

The AT89S52 provides the following standard features: 8K bytes of Flash, 256

bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters,

full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 is

designed with static logic for operation down to zero frequency and supports two software

selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM

timer/counters, serial port, and interrupt system to continue functioning. The Power-down

mode saves the RAM contents but freezes the oscillator, disabling all other chip functions

until the next interrupt or hardware reset

15

Page 16: Library Using RFID Part 3

PORT 0: Port 0 is an 8-bit open drain bi-directional I/O port. As an output port, each

pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as

high impedance inputs. Port 0 can also be configured to be the multiplexed low order

address/data bus during accesses to external program and data memory. In this mode, P0

has internal pull-ups. Port 0 also receives the code bytes during Flash programming and

outputs the code bytes during program verification. External pull-ups are required during

program verification.

PORT 1: Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1

Output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins, they

are pulled high by the internal pull-ups and can be used as inputs. In addition, P1.0 and

P1.1 can be configured to be the timer/counter 2 external count input (P1.0/T2) and the

timer/counter 2 trigger input P1.1/T2EX), respectively, as shown in the following table.

Port 1 also receives the low-order address bytes during Flash programming and

verification.2

Table 2.2 Port 1 Description

PORT 2: Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output

buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled

high by the internal pull-ups and can be used as inputs. Port 2 emits the high-order address

byte during fetches from external program memory and during accesses to external data

memories that use 16-bit addresses (MOVX @DPTR). In this application, Port 2 uses strong

internal pull-ups when emitting 1s. During accesses to external data memory that use 8-bit

addresses (MOVX @ RI), Port 2emits the contents of the P2 Special Function Register. Port

16

Page 17: Library Using RFID Part 3

2 also receives the high-order address bits and some control signals during Flash

programming and verification.

PORT 3: Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output

buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled

high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are

externally being pulled low will source current (IIL) because of the pull-ups. Port 3 also

serves the functions of various special features of the AT89S52, as shown in the following

table. Port 3 also receives some control signals for Flash programming and verification.

Table 2.3 Port 3 Description

RST: Reset input. A high on this pin for two machine cycles while the oscillator is running

resets the device.

ALE/PROG: Address Latch Enable (ALE) is an output pulse for latching the low byte of the

address during accesses to external memory. This pin is also the program pulse input (PROG)

during Flash programming. In normal operation, ALE is emitted at a constant rate of1/6 the

oscillator frequency and may be used for external timing or clocking purposes. Note,

however, that one ALE pulse is skipped during each access to external data Memory. If

desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. with the bit set,

ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly

pulled high. Setting the ALE-disable bit has no effect if the micro controller is in external

execution mode

17

Page 18: Library Using RFID Part 3

PSEN: Program Store Enable (PSEN) is the read strobe to external program memory. When

the AT89S52 is executing code from external program memory, PSEN is activated twice

each machine cycle, except that two PSEN activations are skipped during each access to

external data memory.

EA/VPP: External Access Enable. EA must be strapped to GND in order to enable the

device to fetch code from external program memory locations starting at 0000H up to

FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on

reset. A should be strapped to VCC for internal program executions. This pin also receives

the 12-voltProgramming enables voltage (VPP) during Flash programming.

XTAL1: Input to the inverting oscillator amplifier and input to the internal clock operating

circuit.

XTAL2: Output from the inverting oscillator amplifier.

OSCLLATOR CHARACTERISTICS:

XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier

which can be configured for use as an on-chip oscillator, as shown in Figs 6.2.3. Either a

quartz crystal or ceramic resonator may be used. To drive the device from an external clock

source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure

6.2.4.There are no requirements on the duty cycle of the external clock signal, since the input

to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and

maximum voltage high and low time specifications must be observed.

Fig 2.4(a) Oscillator Connections Fig 2.4(b) External Clock Drive Configuration

18

Page 19: Library Using RFID Part 3

Notes:

Under steady state (non-transient) conditions, IOL must be externally limited as follows:

Maximum IOL per port pin: 10 mA

Maximum IOL per 8-bit port: Port 0: 26 mA

Ports 1, 2, 3: 15 mA

Maximum total IOL for all output pins: 71 mA

If IOL exceeds the test condition, VOL may exceed the related specification. Pins are not guaranteed to sink current greater than the listed test conditions.

Minimum VCC for Power-down is 2V.

SPECIAL FUNCTION REGISTER (SFR) MEMORY:

Special Function Registers (SFR s) are areas of memory that control specific

functionality of the 8051 processor. For example, four SFRs permit access to the 8051’s 32

input/output lines. Another SFR allows the user to set the serial baud rate, control and access

timers, and configure the 8051’s interrupt system.

THE ACCUMULATOR:

The Accumulator, as its name suggests is used as a general register to accumulate the

results of a large number of instructions. It can hold 8-bit (1-byte) value and is the most

versatile register.

THE “R” REGISTERS:

The “R” registers are a set of eight registers that are named R0, R1. Etc up to R7.

These registers are used as auxiliary registers in many operations

THE “B” REGISTERS:

The “B” register is very similar to the accumulator in the sense that it may hold an 8-

bit (1-byte) value. Two only uses the “B” register 8051 instructions: MUL AB and DIV AB.

19

Page 20: Library Using RFID Part 3

THE DATA POINTER:

The Data pointer (DPTR) is the 8051’s only user accessible 16-bit (2Bytes) register.

The accumulator, “R” registers are all 1-Byte values. DPTR, as the name suggests, is used to

point to data. It is used by a number of commands, which allow the 8051 to access external

memory.

THE PROGRAM COUNTER AND STACK POINTER:

The program counter (PC) is a 2-byte address, which tells the 8051 where the next

instruction to execute is found in memory. The stack pointer like all registers except DPTR

and PC may hold an 8-bit (1-Byte) value

AD:

An “addressing mode” refers that you are addressing a given memory location. In

summary, the addressing modes are as follows, with an example of each:

This instruction causes the 8051 to analyze Special Function Register (SFR)

Memory: Special Function Registers (SFRs) are areas of memory that control specific

functionality of the 8051 processor. For example, four SFRs permit access to the 8051’s 32

input/output lines. Another SFR allows the user to set the serial baud rate, control and access

timers, and configure the 8051’s interrupt system.

TIMER 2 REGISTERS:

Control and status bits are contained in registers T2CON and T2MOD for Timer 2 .

The register pair (RCAP2H , RCAP2L) are the Capture / Reload registers for Timer 2 in

16-bit capture mode or 16-bit auto-reload mode .

INTERRUPT REGISTERS:

The individual interrupt enable bits are in the IE register . Two priorities can be

set for each of the six interrupt sources in the IP register.

20

Page 21: Library Using RFID Part 3

Table 2.4 Interrupts

TIMER 2:

Timer 2 is a 16-bit Timer / Counter that can operate as either a timer or an event

counter. The type of operation is selected by bit C/T2 in the SFR T2CON. Timer 2 has three

operating Modes: capture, auto-reload (up or down Counting) and baud rate generator. The

modes are selected by bits in T2CON. Timer 2 consists of two 8-bit registers, TH2 and TL2.

In the Timer function, the TL2 register is incremented every machine cycle. Since a machine

cycle consists of 12 oscillator periods, the count rate is 1/12 of the oscillator frequency. In

the Counter function, the register is incremented in response to a 1-to-0 transition at its

corresponding external input pin , T2 .

CAPTURE MODE

In the capture mode, two options are selected by bit EXEN2 in T2CON. If EXEN2 = 0,

Timer 2 is a 16-bit timer or counter which upon overflow sets bit TF2 in T2CON. This bit

can then be used to generate an interrupt. If EXEN2 = 1 Timer 2 performs the same

operation ,but a 1-to-0 transition at external input T2EX also causes the current value in

TH2 and TL2 to be captured into RCAP2H and RCAP2L , respectively.

AUTO-RELOAD (UP OR DOWN COUNTER):

Timer2 can be programmed to count up or down when configured in its 16-bit auto-reload

mode .This feature is invoked by the DCEN (Down Counter Enable) bit located in the SFR

21

Page 22: Library Using RFID Part 3

T2MOD.Upon reset , the DCEN bit is set to 0 so that timer2 will default to count up.

When DCEN is set, Timer2 can count up or down, depending on the value of the T2EX pin.

In this mode, two options are selected by bit EXEN2 in T2CON. If EXEN2 = 0 , Timer2

counts up to 0FFFFH and then sets the TF2 bit upon overflow . If EXEN2 = 1 , a 16-

bit reload can be triggered either by an overflow or by a 1-to-0 transition at external

input T2EX.

BAUD RATE GENERATOR: Timer 2 is selected as the baud rate generator by setting

TCLK and/or RCLK in T2CON. Note that the baud rates for transmit and receive can be

different if Timer 2 is used for the receiver or transmitter and Timer 1is used for the other

function .The baud rates in Modes 1 and 3 are determined by Timer 2’s overflow rate

according to the following equation .

Modes 1 and 3 Baud Rates = Timer 2 Overflow Rate

16

Timer 0 functions as either a timer or event counter in four modes of operation. Timer

0 is controlled by the four lower bits of the TMOD register and bits 0, 1, 4 and 5 of the

TCON register Mode 0 ( 13-bit Timer). Mode 0 configures timer 0 as a 13-bit timer which is

set up as an 8-bit timer (TH0 register) with a modulo 32 prescaler implemented with the

lower five bits of the TL0 register.

22

Page 23: Library Using RFID Part 3

2.2 RFID (RADIO FREQUENCY IDENTIFIER)

Radio-frequency identification (RFID) is an automatic identification method, relying

on storing and remotely retrieving data using devices called RFID tags or transponders. An

RFID tag is an object that can be applied to or incorporated into a product, animal, or person

for the purpose of identification using radio waves. Some tags can be read from several

meters away and beyond the line of sight of the reader. Most RFID tags contain at least two

parts. One is an integrated circuit for storing and processing information, modulating and

demodulating a (RF) signal, and other specialized functions. The second is an antenna for

receiving and transmitting the signal. Chip less RFID allows for discrete identification of tags

without an integrated circuit, thereby allowing tags to be printed directly onto assets at a

lower cost than traditional tags.

Fig 2.5 RFID System

Primarily, the two main components involved in a Radio Frequency Identification

system are the Transponder (tags that are attached to the object) and the Interrogator (RFID

reader). Communication between the RFID reader and tags occurs wirelessly and generally

does not require a line of sight between the devices

2.2.1 RFID TRANSPONDER / TAG

An RFID transponder, considered as a next generation barcode, is a miniscule

microchip that is attached to an antenna. They come in a wide variety of sizes, shapes, and

forms and can be read through most materials with the exception of conductive materials like

water and metal, but with modifications and positioning even these can be overcome.

23

Page 24: Library Using RFID Part 3

Fig 2.6 RFID Tag

PASSIVE TAGS

Passive tags are generally smaller, lighter and less expensive than those that are

active and can be applied to objects in harsh environments, are maintenance free and will last

for years. These transponders are only activated when within the response range of a reader.

The RFID reader emits a low-power radio wave field which is used to power up the tag so as

to pass on any information that is contained on the chip.

ACTIVE TAGS

Active tags differ in that they incorporate their own power source, where as the tag is

a transmitter rather than a reflector of radio frequency signals which enables a broader range

of functionality like programmable and read/write capabilities.

SEMI-PASSIVE TAGS

Semi-passive tags are similar to active tags in that they have their own power

source, but the battery only powers the microchip and does not power the broadcasting of a

signal. The response is usually powered by means of backscattering the RF energy from the

reader, where energy is reflected back to the reader as with passive tags. An additional

application for the battery is to power data storage. Semi-passive tags leads to greater

sensitivity than passive tags, typically 100 times more. The enhanced sensitivity can be

leveraged as Semi-passive tags have three main advantages: greater sensitivity than passive

tags; longer battery powered life cycle than active tags; they can perform active functions

(such as temperature logging) under their own power, even when no reader is present for

powering the circuitry.

24

Page 25: Library Using RFID Part 3

2.2.2 RFID READER/ INTERROGATOR

An RFID reader typically contains a module (transmitter and receiver), a control

unit and a coupling element (antenna). The reader has three main functions: energizing,

demodulating and decoding. In addition, readers can be fitted with an additional interface that

converts the radio waves returned from the RFID tag into a form that can then be passed on to

another system, like a computer or any programmable logic controller. Anti-Collision

algorithms permit the simultaneous reading of large numbers of tagged objects, while

ensuring that each tag is read only once.

Fig 2.7 RFID Reader

RFID operates in several frequency bands. The exact frequency is controlled by the Radio

Regulatory body in each country.

2.2.3 RFID Frequencies

The generic frequencies for RFID are:

125 - 134 kHz

13.56 MHz

UHF (400 – 930 MHz)

2.45 GHz

25

Page 26: Library Using RFID Part 3

5.8 GHz

Although there are other frequencies used, these are the main ones. In the UHF band,

there are two areas of interest. Several frequencies in the 400 MHz band and then the band

860 – 930 MHz Each of the frequency bands have advantages and disadvantages for

operation. The lower frequencies 125-134 kHz and 13.56 MHz work much better near water

or humans than do the higher frequency tags. Comparing passive tags, the lower frequencies

usually have less range, and they have a slower data transfer rate. The higher frequency

ranges have more regulatory controls and differences from country to country.

2.2.4 Applications

RFID tags are useful for a huge variety of applications. Some of these applications

include: supply chain management, automated payment, physical access control, counterfeit

prevention, and smart homes and offices. RFID tags are also implanted in all kinds of

personal and consumer goods, for example, passports, partially assembled cars, frozen

dinners, ski-lift passes, clothing, and public transportation tickets. Implantable RFID tags for

animals allow concerned owners to label their pets and livestock. Verichip Corp. has also

created a slightly adapted implantable RFID chip, the size of a grain of rice, for use in

humans. Since its introduction, the Verichip was approved by the U.S. Food and Drug

Administration, and this tiny chip is currently deployed in both commercial and medical

systems.

2.3 SERIAL COMMUNICATION

Computers can transfer data in two ways: parallel and serial. In parallel data

transfers, often 8 or more lines (wire conductors) are used to transfer data to a device that is

only a few feet away. Examples of parallel data transfer are printers and hard disks; each

uses cables with many wire strips. Although in such cases a lot of data can be transferred in a

short amount of time by using many wires in parallel, the distance cannot be great. To

transfer to a device located many meters away, the serial method is used. In serial

26

Page 27: Library Using RFID Part 3

communication, the data is sent one bit at a time, in contrast to parallel communication, in

which the data is sent a byte or more at a time

Serial data communication uses two methods, asynchronous and synchronous. The

synchronous method transfers a block of data at a time, while the asynchronous method

transfers a single byte at a time.

In data transmission if the data can be transmitted and received, it is a duplex

transmission. This is in contrast to simplex transmissions such as with printers, in which the

computer only sends data. Duplex transmissions can be half or full duplex, depending on

whether or not the data transfer can be simultaneous. If data is transmitted one way at a time,

it is referred to as half duplex. If the data can go both ways at the same time, it is full duplex.

Of course, full duplex requires two wire conductors for the data lines, one for transmission

and one for reception, in order to transfer and receive data simultaneously.

Asynchronous serial communication and data framing

The data coming in at the receiving end of the data line in a serial data transfer is all

0s and 1s; it is difficult to make sense of the data unless the sender and receiver agree on a set

of rules, a protocol, on how the data is packed, how many bits constitute a character, and

when the data begins and ends.

Start and stop bits

Asynchronous serial data communication is widely used for character-oriented

transmissions, while block-oriented data transfers use the synchronous method. In the

asynchronous method, each character is placed between start and stop bits. This is called

framing. In the data framing for asynchronous communications, the data, such as ASCII

characters, are packed between a start bit and a stop bit. The start bit is always one bit, but the

stop bit can be one or two bits. The start bit is always a 0 (low) and the stop bit (s) is 1

(high).

Data transfer rate

The rate of data transfer in serial data communication is stated in bps (bits per

second). Another widely used terminology for bps is baud rate. However, the baud and bps

27

Page 28: Library Using RFID Part 3

rates are not necessarily equal. This is due to the fact that baud rate is the modem

terminology and is defined as the number of signal changes per second. In modems a single

change of signal, sometimes transfers several bits of data. As far as the conductor wire is

concerned, the baud rate and bps are the same, and for this reason we use the bps and baud

interchangeably.

The data transfer rate of given computer system depends on communication ports

incorporated into that system. For example, the early IBMPC/XT could transfer data at the

rate of 100 to 9600 bps. In recent years, however, Pentium based PCS transfer data at rates

as high as 56K bps. It must be noted that in asynchronous serial data communication, the

baud rate is generally limited to 100,000bps.

2.3.1 MAX 232

A standard serial interface for PC, RS232C, requires negative logic, i.e., logic 1

is -3V to -12V and logic 0 is +3V to +12V. To convert TTL logic, say, TxD and RxD pins of

the microcontroller thus need a converter chip. A MAX232 chip has long been using in many

microcontrollers boards. It is a dual RS232 receiver / transmitter that meets all RS232

specifications while using only +5V power supply. It has two onboard charge pump voltage

converters which generate +10V to -10V power supplies from a single 5V supply. It has four

level translators, two of which are RS232 transmitters that convert TTL/CMOS input levels

into +9V RS232 outputs. The other two level translators are RS232 receivers that convert

RS232 input to 5V. Typical MAX232 circuit is shown below.

28

Page 29: Library Using RFID Part 3

Fig 2.8 Pin Configuration of MAX 232

2.3.2 Features

1. Operates With Single 5-V Power Supply

2. Lin Bi CMOS Process Technology

3. Two Drivers and Two Receivers

4. ±30-V Input Levels

5. Low Supply Current. 8 mA Typical

6. Meets or Exceeds TIA/EIA-232-F and ITU Recommendation V.28

7. Designed to be Interchangeable with Maximum MAX 232

8. Applications

TIA/EIA-232-F

Battery-Powered Systems

Terminals

Modems

Computers

9. ESD Protection Exceeds 2000 V Per MIL-STD-883, Method 3015

10. Package Options Include Plastic Small-Outline (D, DW) Packages

2.3.3 Circuit Connections

A standard serial interfacing for PC, RS232C, requires negative logic, i.e., logic '1'

is -3V to -12V and logic '0' is +3V to +12V. To convert a TTL logic, say, TxD and RxD pins

of the uC chips, thus need a converter chip. A MAX232 chip has long been using in many uC

boards. It provides 2-channel RS232C port and requires external 10uF capacitors. Carefully

check the polarity of capacitor when soldering the board. A DS275 however, no need external

capacitor and smaller. Either circuit can be used without any problems.

29

Page 30: Library Using RFID Part 3

It provides 2-channel RS232C port and requires external 10uF capacitors. Carefully

check the polarity of capacitor when soldering the board. A DS275 however, no need external

capacitor and smaller. Either circuit can be used without any problems.

Fig 2.9 Circuit connections of Max 232

2.3.4 MAX-232 to DB9 Interface

30

Page 31: Library Using RFID Part 3

Fig 2.10 Max 232 to DB9 interface

2.4 LIQUID CRYSTAL DISPLAY

2.4.1 INTRODUCTION TO LCD:

Liquid crystal displays (LCDs) have materials which combine the properties of both

liquids and crystals. Rather than having a melting point, they have a temperature range within

which the molecules are almost as mobile as they would be in a liquid, but are grouped

together in an ordered form similar to a crystal.

An LCD consists of two glass panels, with the liquid crystal material sand witched in

between them. The inner surface of the glass plates are coated with transparent electrodes

which define the character, symbols or patterns to be displayed polymeric layers are present

in between the electrodes and the liquid crystal, which makes the liquid crystal molecules to

maintain a defined orientation angle.

One each polarizers are pasted outside the two glass panels. These polarizers would

rotate the light rays passing through them to a definite angle, in a particular direction

When the LCD is in the off state, light rays are rotated by the two polarizers and the

liquid crystal, such that the light rays come out of the LCD without any orientation, and

hence the LCD appears transparent.

When sufficient voltage is applied to the electrodes, the liquid crystal molecules

would be aligned in a specific direction. The light rays passing through the LCD would be

rotated by the polarizers, which would result in activating / highlighting the desired

characters.

The LCD’s are lightweight with only a few millimeters thickness. Since the LCD’s

consume less power, they are compatible with low power electronic circuits, and can be

powered for long durations.

31

Page 32: Library Using RFID Part 3

The LCD s doesn’t generate light and so light is needed to read the display. By using

backlighting, reading is possible in the dark. The LCD’s have long life and a wide operating

temperature range.

Changing the display size or the layout size is relatively simple which makes the

LCD’s more customer friendly.

In recent years the LCD is finding widespread use replacing LED s (seven-segment

LED s or other multi-segment LED s).This is due to the following reasons:

1. The declining prices of LCDs.

2. The ability to display numbers, characters and graphics. This is in contrast to LED which is limited to numbers and a few characters.

3. Incorporation of a refreshing controller into the LCD, there by relieving the CPU of the task of refreshing the LCD. In the case of LED s, they must be refreshed by the CPU to keep on displaying the data.

4. Ease of programming for characters and graphics.

Fig 2.11(a) Picture of a LCD Display

Uses

The LCDs used exclusively in watches, calculators and measuring instruments are the

simple seven-segment displays, having a limited amount of numeric data. The recent

advances in technology have resulted in better legibility, more information displaying

32

Page 33: Library Using RFID Part 3

capability and a wider temperature range. These have resulted in the LCDs being extensively

used in telecommunications and entertainment electronics. The LCDs have even started

replacing the cathode ray tubes (CRTs) used for the display of text and graphics, and also in

small TV applications.

F i g 2 . 1 1 ( b ) P i c t u r e s o f L C D C r o s s S e c t i o n a l V i e w

2 . 4 . 2 S P E C I F I C A T I O N S :

Number of Characters: 16 characters x 2 Lines

Character Table: English-European (RS in Datasheet)

Module dimension: 80.0mm x 36.0mm x 13.2mm(MAX)

View area: 66.0 x 16.0 mm

Active area: 56.2 x 11.5 mm

Dot size: 0.56 x 0.66 mm

Dot pitch: 0.60 x 0.70 mm

Character size: 2.96 x 5.46 mm

Character pitch: 3.55 x 5.94 mm

LCD type: STN, Positive, Transflective, Yellow/Green

Duty: 1/16

View direction: Wide viewing angle

Backlight Type: yellow/green LED

RoHS Compliant: lead free

Operating Temperature: -20°C to + 70°C

33

Page 34: Library Using RFID Part 3

2.4.3 LCD PIN DIAGRAM:

Fig 2.12(a) LCD Pin Description

This section describes the operation modes of LCD’s then describe how to program and

interface an LCD to 8051 using Assembly and C.

2.4.4 LCD PIN DESCRIPTION:

The LCD discussed in this section has 14 pins. The function of each pin is given in table.

Pin Symbol I/O Description

1 Vss -- Ground

2 Vcc -- +5V power supply

3 VEE -- Power supply to control contrast

4 RS I RS=0 to select command register RS=1 to select data register

5 R/W I R/W=0 for write

34

Page 35: Library Using RFID Part 3

R/W=1 for read

6 E I/O Enable

7 DB0 I/O The 8-bit data bus

8 DB1 I/O The 8-bit data bus

9 DB2 I/O The 8-bit data bus

10 DB3 I/O The 8-bit data bus

11 DB4 I/O The 8-bit data bus

12 DB5 I/O The 8-bit data bus

13 DB6 I/O The 8-bit data bus

14 DB7 I/O The 8-bit data bus

Table 2.5 Pin description for LCD

2.4.5 COMMAND CODES:

The LCD can display a character successfully by placing the

1. Data in Data Register

2. Command in Command Register of LCD

1. Data corresponds to the ASCII value of the character to be printed. This can be done by placing the ASCII value on the LCD Data lines and selecting the Data Register of the LCD by selecting the RS (Register Select) pin.

2. Each and every display location is accessed and controlled by placing respective command on the data lines and selecting the Command Register of LCD by selecting the (Register Select) RS pin.

The commonly used commands are shown below with their operations.

35

Page 36: Library Using RFID Part 3

Code (hex) Command to LCD Instruction Register

1 Clear display screen

2 Return home

4 Decrement cursor

6 Increment cursor

5 Shift display right

7 Shift display left

8 Display off, cursor off

A Display off, cursor on

C Display on, cursor off

E Display on, cursor on

F Display on, cursor blinking

10 Shift cursor position to left

14 Shift cursor position to right

18 Shift the entire display to the left

1C Shift the entire display to the right

80 Force cursor to beginning of 1st line

C0 Force cursor to beginning of 2nd line

38 2 lines and 5x7 matrix

Table 2.6 LCD Command Codes

36

Page 37: Library Using RFID Part 3

2.4.6 LCD INTERFACING:

Sending commands and data to LCDs with a time delay:

To send any command from table 2 to the LCD, make pin RS=0. For data, make RS=1.Then

place a high to low pulse on the E pin to enable the internal latch of the LCD.

Fig 2.12(b) LCD Interfacing

2.5 REGULATEDPOWER SUPPLY

The power supplies are designed to convert high voltage AC mains electricity to a

suitable low voltage supply for electronic circuits and other devices. A RPS (Regulated

Power Supply) is the Power Supply with Rectification, Filtering and Regulation being done

on the AC mains to get a Regulated power supply for Microcontroller and for the other

devices being interfaced to it.

A power supply can by broken down into a series of blocks, each of which performs a

particular function. A d.c power supply which maintains the output voltage constant

37

Page 38: Library Using RFID Part 3

irrespective of a.c mains fluctuations or load variations is known as “Regulated D.C Power

Supply”

For example a 5V regulated power supply system as shown below:

Fig 2.13 Regulated Power Supply

2.5.1 TRANSFORMER:

A transformer is an electrical device which is used to convert electrical power

from one Electrical circuit to another without change in frequency.

Transformers convert AC electricity from one voltage to another with little loss of power.

Transformers work only with AC and this is one of the reasons why mains electricity is AC.

Step-up transformers increase in output voltage, step-down transformers decrease in output

voltage. Most power supplies use a step-down transformer to reduce the dangerously high

mains voltage to a safer low voltage. The input coil is called the primary and the output coil

is called the secondary. There is no electrical connection between the two coils; instead they

are linked by an alternating magnetic field created in the soft-iron core of the transformer.

The two lines in the middle of the circuit symbol represent the core. Transformers waste

very little power so the power out is (almost) equal to the power in. Note that as voltage is

stepped down current is stepped up. The ratio of the number of turns on each coil, called the

38

Page 39: Library Using RFID Part 3

turn’s ratio, determines the ratio of the voltages. A step-down transformer has a large number

of turns on its primary (input) coil which is connected to the high voltage mains supply, and a

small number of turns on its secondary (output) coil to give a low output voltage.

Fig 2.14 Step down Transformer

AN ELECTRICAL TRANSFORMER

Turns ratio = Vp/ VS = Np/NS

Power Out= Power In

VS X IS=VP X IP

Vp = primary (input) voltage

Np = number of turns on primary coil

Ip  = primary (input) current

2.5.2 RECTIFIER:

A circuit which is used to convert a.c to dc is known as RECTIFIER. The process of

conversion a.c to d.c is called “rectification”

2.5.2(a) TYPES OF RECTIFIERS:

Half wave Rectifier

Full wave rectifier

39

Page 40: Library Using RFID Part 3

1. Centre tap full wave rectifier.

2. Bridge type full bridge rectifier

Comparison of rectifier circuits:

Parameter

Type of Rectifier

Half wave Full wave Bridge

Number of diodes

1 2 4

PIV of diodes Vm 2Vm Vm

D.C output voltageVm/ 2Vm/ 2Vm/

Vdc,at no-load 0.318Vm 0.636Vm 0.636Vm

Ripple factor 1.21 0.482 0.482

Ripple frequency F 2f 2f

Rectification

efficiency

0.406 0.812 0.812

Transformer

Utilization

Factor(TUF)

0.287 0.693 0.812

RMS voltage Vrms Vm/2 Vm/√2 Vm/√2

Table 2.7 Comparison of rectifier circuits

40

Page 41: Library Using RFID Part 3

Full-wave Rectifier:

From the above comparison we came to know that full wave bridge rectifier as

more advantages than the other two rectifiers. So, in our project we are using full wave bridge

rectifier circuit.

Bridge Rectifier:

A bridge rectifier makes use of four diodes in a bridge arrangement to achieve full-

wave rectification. This is a widely used configuration, both with individual diodes wired as

shown and with single component bridges where the diode bridge is wired internally.

Fig 2.15(a): Linear Power Supply

2.5.2(b) OPERATION:

During positive half cycle of secondary, the diodes D2 and D3 are in forward biased

while D1 and D4 are in reverse biased as shown in the fig(b). The current flow direction is

shown in the fig (b) with dotted arrows.

41

Page 42: Library Using RFID Part 3

Fig 2.15(b): Electrical Transformer

During negative half cycle of secondary voltage, the diodes D1 and D4 are in

forward biased while D2 and D3 are in reverse biased as shown in the fig(c). The current

flow direction is shown in the fig (c) with dotted arrows.

Fig2.15(c): Bridge Rectifier & Operation

Filter:

A Filter is a device which removes the a.c component of rectifier output but allows the d.c

component to reach the load

Capacitor Filter:

We have seen that the ripple content in the rectified output of half wave rectifier is

121% or that of full-wave or bridge rectifier or bridge rectifier is 48% such high percentages

of ripples is not acceptable for most of the applications. Ripples can be removed by one of the

following methods of filtering.

(a) A capacitor, in parallel to the load, provides an easier by –pass for the ripples voltage

though it due to low impedance. At ripple frequency and leave the D.C. to appear at the load.

(b) An inductor, in series with the load, prevents the passage of the ripple current (due to high

impedance at ripple frequency) while allowing the d.c (due to low resistance to d.c)

(c) Various combinations of capacitor and inductor, such as L-section filter ∏ section filter,

multiple section filter etc. which make use of both the properties mentioned in (a) and (b)

42

Page 43: Library Using RFID Part 3

above. Two cases of capacitor filter, one applied on half wave rectifier and another with full

wave rectifier.

Filtering is performed by a large value electrolytic capacitor connected across the DC

supply to act as a reservoir, supplying current to the output when the varying DC voltage

from the rectifier is falling. The capacitor charges quickly near the peak of the varying DC,

and then discharges as it supplies current to the output. Filtering significantly increases the

average DC voltage to almost the peak value (1.4 × RMS value).

To calculate the value of capacitor(C),

C = ¼*√3*f*r*Rl

Where,

f = supply frequency,

r = ripple factor,

Rl = load resistance

Note: In our circuit we are using 1000µF hence large value of capacitor is placed to

reduce ripples and to improve the DC component.

2.5.3 VOLTAGE REGULATOR:

Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) or variable

output voltages. The maximum current they can pass also rates them. Negative voltage

regulators are available, mainly for use in dual supplies. Most regulators include some

automatic protection from excessive current ('overload protection') and overheating ('thermal

protection'). Many of the fixed voltage regulators ICs have 3 leads and look like power

transistors, such as the 7805 +5V 1A regulator shown on the right. The LM7805 is simple to

use. You simply connect the positive lead of your unregulated DC power supply (anything

from 9VDC to 24VDC) to the Input pin, connect the negative lead to the Common pin and

then when you turn on the power, you get a 5 volt supply from the output pin.

43

Page 44: Library Using RFID Part 3

Fig 2.16 Three Terminal Voltage Regulator

78XX:

The Bay Linear LM78XX is integrated linear positive regulator with three terminals.

The LM78XX offer several fixed output voltages making them useful in wide range of

applications. When used as a zener diode/resistor combination replacement, the LM78XX

usually results in an effective output impedance improvement of two orders of magnitude,

lower quiescent current. The LM78XX is available in the TO-252, TO-220 & TO-

263packages,

Features:

• Output Current of 1.5A

• Output Voltage Tolerance of 5%

• Internal thermal overload protection

• Internal Short-Circuit Limited

• Output Voltage 5.0V, 6V, 8V, 9V, 10V, 12V, 15V, 18V, 24V.

44

Page 45: Library Using RFID Part 3

CIRCUIT DESCRIPTION

3.1 CIRCUIT COMPONENTS

This section describes the operation of the circuit. The circuit consists of

microcontroller, power supply section, RFID Module and LCD section.

Microcontroller

Power supply

LCD

RFID Module

Serial Communication

Power Supply Section

Transformer Section

Rectifier Section

Regulator Section

RFID Section

Display Section

The required operating voltage for Microcontroller 89S52 is 5V. Hence the 5V D.C.

power supply is needed. This regulated 5V is generated by stepping down the voltage from

230V to 12V using step down transformer. Now the step downed a.c voltage is being

rectified by the Bridge Rectifier using 1N4007 diodes. The rectified a.c voltage is now

filtered using a ‘Capacitor’ filter. Now the rectified, filtered D.C. voltage is fed to the Voltage

Regulator. This voltage regulator provides/allows us to have a Regulated constant Voltage

which is of +5V. The rectified; filtered and regulated voltage is again filtered for ripples

using an electrolytic capacitor 100μF. Now the output from this section is fed to 40th pin of

89S52 microcontroller to supply operating voltage. The microcontroller 89S52 with Pull up

resistors at Port0 and crystal oscillator of 11.0592 MHz crystal in conjunction with couple of

30-33pf capacitors is placed at 18th& 19th pins of 89S52 to make it work (execute) properly.

45

Page 46: Library Using RFID Part 3

Fig 3.1: Picture of Kit when power is off

• The aim of this project is to implement RFID in the library community to increase

efficiency, productivity and enhance user satisfaction.

• Libraries are repositories of reference resources. They should be provided with better

security and improved functionality.

3.2 CIRCUIT SPECIFICATIONS

Input AC Voltage – 230V

46

Page 47: Library Using RFID Part 3

Microcontroller Voltage – 5V

Transformer Voltage Range – 18V P-P

Regulator Voltage-12V

Lcd voltage – 5V

Fig 3.2 Picture of kit when power is ON

When power is on then two option’s will be displayed on the lcd screen.Those are

1 )Take 2)Return

Based on our choice we have to select the particular option either take or return.

According to that take indicates issuing of the book and return indicates returing of the

book.

47

Page 48: Library Using RFID Part 3

Fig 3.3 When choosing a particular option

By selecting a particular option we see on the lcd screen place the card then by placing

student card it will show that particular student is authorised or not.

Fig 3.4 When Student ID is placed

A fter placing student card we will see on the lcd screen it will show it is student1 or

student2.

48

Page 49: Library Using RFID Part 3

Fig 3.5 Picture of kit when student is recognized

Then after placing the particular book card it will show the wether the book has been

taken or returned.

Fig 3.6 Picture of kit when book is placed

49

Page 50: Library Using RFID Part 3

If we want to take the book first press the take option or if we want to return the book

press the second option.By placing the particular student card and then place the book

then the our reequied operation is done.

Fig 3.7 Picture of kit when invalid ID is placed

If we place the invalid or unauthorized card it will show it is a invalid id.

Fig 3.8 Picture of LCD display

50

Page 51: Library Using RFID Part 3

RESULTS & DISCUSSIONS

In this project “LIBRARY MANAGEMENT USING RFID” when power

given to the circuit then the kit is in on condition and it automatically display system ready

and show two options either issue or return by selecting proper option we can issue the book

or return the issued book.

Fig 4.1 Picture of RS232 Interface Fig 4.2 Picture of RFID Module

Fig 4.3 Picture of Micro Controller Fig 4.4: Picture of LCD Display

51

Page 52: Library Using RFID Part 3

CONCLUSION & FUTURE WORKS

5.1 CONCLUSION

This controller based system is very useful in present day libraries with the less cost and

ease of operation. This system decreases the man power and very efficient in large libraries.

The future implementation involves easy of operation and anti theft detection less span of

time.

ADVANTAGES:

Benefits to library persons:-

Time saving devices free them to help customer better

Can have flexible working schedules

Benefits to library patrons:-

Self check-in and check-out facilities

Check-in and check-out of all books

Quicker services

Faster and accurate

5.2 FUTURE ENHANCEMENT

• RFID encompasses a range of systems operating at different frequencies with

significantly different capabilities.

• The DoD, Wal-Mart, and numerous retailers are mandating the use of RFID for

supply chain management.

• EPCglobalNetwork ™ is standardizing RFID in the UHF band for global,

standardized, royalty free use.

52

Page 53: Library Using RFID Part 3

REFERENCES:

The 8051 Micro controller and EmbeddedSystems

-Muhammad Ali Mazidi

-Janice Gillispie Mazidi

The 8051 Micro controller Architecture, Programming & Applications

-Kenneth J.Ayala

RFID Field Guide: Deploying Radio Frequency Identification Systems

-Manish Bhuptani

RFID: Radio Frequency Identification (McGraw-Hill Networking Professional)

-Steven Shepard

URL’s:

www.mitel.databook.com

www.atmel.databook.com

www.keil.com

www.atmel.com

www.RFID.com

www.controllerappliancse.com

www.libraryautomation.com

www.electronicsforu.com

Software Tool Used: Keil µVision

53

Page 54: Library Using RFID Part 3

SOURCE CODE

1. Click on the Keilµ Vision Icon on Desktop

2. The following fig will appear

Fig A (i).1: Opening Window of Keil Software

3. Click on the Project menu from the title bar

4. Then Click on New Project

Fig A (i).2: Starting a New Project Window

54

Page 55: Library Using RFID Part 3

5. Save the Project by typing suitable project name with no extension in u r own

folder sited in either C:\ or D:\

Fig A (i).3: Saving Window of the Project

6. Then Click on save button above.

7. Select the component for your project. i.e. Atmel……

8. Click on the + Symbol beside of Atmel

Fig A (i).4: Selection of Target Device

55

Page 56: Library Using RFID Part 3

9. Select AT89S52 as shown below

Fig A (i).5: Selection of Microcontroller Species Window

10. Then Click on “OK” followed

11. Then Click either YES or NO………mostly “NO”

12. Now your project is ready to USE

13. Now double click on the Target1, you would get another option “Source group 1”

as shown in next page.

Fig A (i).6: Source Group Window

56

Page 57: Library Using RFID Part 3

14. Click on the file option from menu bar and select “new”

Fig A (i).7: Creating New Program

15. The next screen will be as shown in next page, and just maximize it by double

clicking on its blue boarder.

Fig A (i).8: Program Editor Window

57

Page 58: Library Using RFID Part 3

16. Now start writing program in either in “C” or “ASM”

17. For a program written in Assembly, then save it with extension “. asm” and for

“C” based program save it with extension “ .C”

Fig A (i).9: Extension File name Window

18. Now right click on Source group 1 and click on “Add files to Group Source”

Fig A (i).10: Addition of Source Files Window

58

Page 59: Library Using RFID Part 3

19. Now you will get another window, on which by default “C” files will appear.

Fig A (i).11: Adding Files for Compiling

20. Now select as per your file extension given while saving the file

21. Click only one time on option “ADD”

22. Now Press function key F7 to compile. Any error will appear if so happen.

Fig A(i).12: Compilation Window

59

Page 60: Library Using RFID Part 3

23. If the file contains no error, then press Control+F5 simultaneously.

24. The new window is as follows

Fig A (i).13: Program Run Window

25. Then Click “OK”

26. Now Click on the Peripherals from menu bar, and check your required port as

shown in fig below

Fig A (i).14: Selection of I/O ports Window

60

Page 61: Library Using RFID Part 3

27. Drag the port a side and click in the program file.

Fig A (i).15: Output Window

28. Now keep Pressing function key “F11” slowly and observe.

29. You are running your program successfully

61

Page 62: Library Using RFID Part 3

62


Recommended