RFID Based Book Tracking System for Libraries

CHAPTER 1

INTRODUCTION

1. INTRODUCTION

RFID based systems are going to revolutionize the entire library automation systems. In this project we are going to develop library automation system, which will track the books, whether they are issued or they are in library, so that library user will get the instant information.``

RFID can be used library circulation operations and theft detection systems. RFID-based systems move beyond security to become tracking systems that combine security with more efficient tracking of materials throughout the library, including easier and faster charge and discharge, inventorying, and materials handling.

This technology helps librarians reduce valuable staff time spent scanning barcodes while charging and discharging items. RFID is a combination of radio -frequency-based technology and microchip technology. The information contained on microchips in the tags affixed to library materials is read using radio frequency technology, regardless of item orientation or alignment (i.e., the technology does not require line-of-sight or a fixed plane to read tags as do traditional theft detection systems). The RFID gates at the library exit(s) can be as wide as four feet because the tags can be read at a distance of up to two feet by each of two parallel exit gate sensors.

CHAPTER 2

OPERATION & WORKING PRINCIPLE

OF THE PROJECT

2.1 BLOCK DIAGRAM:

Fig. 2.1

Block diagram description:

The block diagram (Fig 2.1) consists of microcontroller interfaced with an RFID module by an RS232, microcontroller is not directly connected to rs232 because RS-232 signal levels are far too highTTL electronics, and the negative RS-232 voltage for high can’t be handled at all by computer logic. To receive serial datafrom an RS-232 interface the voltage has to be reduced. Also the low and high voltage level has to be inverted.

This level converter uses aMax232 and five capacitors. The max232 is quitecheap(less than 5 dollars) or if youare lucky you can get a free sample fromMaxim.

The MAX232 from Maxim was the first IC which in one package contains the necessary driversand receiversto adapt the RS-232 signal voltage levels to TTL logic. It became popular, because it just needs one voltage (+5V or +3.3V) and generates the necessary RS-232 voltage levels.

Book with RFID, the block diagram is nothing but the rfid tag attached to the book which contains a chip and antenna, RFID reader also has an antenna which reads the information from the tag

2.2 MICRO CONTROLLER:

2.2.1 P89C51 Micro Controller Description:

The Philips microcontrollers described in this data sheet are high-performance static 80C51 designs. They are manufactured in an advanced CMOS process and contain a non-volatile Flash program memory. They support both 12-clock and 6-clock operation. The P89C51X2 and P89C52X2/54X2/58X2 contain 128 byte RAM and 256 byte RAM respectively, 32 I/O lines, three 16-bit counter/timers, a six-source, four-priority level nested interrupt structure, a serial I/O port for either multi-processor communications, I/O expansion or full duplex UART, and on-chip oscillator and clock circuits. In addition, the devices are static designs which offer a wide range of operating frequencies down to zero. Two software selectable modes of power reduction — idle mode and power-down mode —are available. The idle mode freezes the CPU while allowing the RAM, timers, serial port, and interrupt system to continue functioning. The power-down mode saves the RAM contents but freezes the oscillator, causing all other chip functions to be in operative. Since the design is static, the clock can be stopped without loss of user data. Then the execution can be resumed from the point the clock was stopped.

NOTE:

1. I2C = Inter-Integrated Circuit Bus; CAN = Controller Area Network; SPI = Serial Peripheral Interface; PCA = Programmable Counter Array;

ADC = Analog-to-Digital Converter; PWM = Pulse Width Modulation

2.2.2 FEATURES:

80C51 Central Processing Unit

– 4 Kbytes Flash (P89C51X2)

– 8 Kbytes Flash (P89C52X2)

– 16 Kbytes Flash (P89C54X2)

– 32 Kbytes Flash (P89C58X2)

– 128 byte RAM (P89C51X2)

– 256 byte RAM (P89C52/54X2/58X2)

–Boolean processor

–Fully static operation

12-clock operation with selectable 6-clock operation (via software or via parallel programmer).

Memory addressing capability

–Up to 64 Kbytes ROM and 64 Kbytes RAM

Power control modes:

– Clock can be stopped and resumed

–Idle mode

–Power-down mode

Two speed ranges

– 0 to 20 MHz with 6-clock operation

–0 to 33 MHz with 12-clock operation

LQFP, PLCC or DIP package

Extended temperature ranges

Dual Data Pointers

Three security bits

Four interrupt priority levels

 Six interrupt sources

 Four 8-bit I/O ports

 Full-duplex enhanced UART

– Framing error detection

–Automatic address recognition

Three 16-bit timers/counters T0, T1 (standard 80C51) and additional T2 (capture and compare)

• Programmable clock-out pin

• Asynchronous port reset

• Low EMI (inhibit ALE, slew rate controlled outputs, and 6-clock mode)

• Wake-up from Power Down by an external interrupt

2.2.3 BLOCK DIAGRAM:

Fig 2.2.3(i)

Pin Diagram:

Fig 2.2.3(ii)

Pin Description:

ALE/PROG:

Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. ALE is emitted at a constant rate of 1/6 of the oscillator frequency, for external timing or clocking purposes, even when there are no accesses to external memory. (However, one ALE pulse is skipped during each access to external Data Memory.) This pin is also the program pulse input (PROG) during EPROM programming.

PSEN:

Program Store Enable is the read strobe to external Program Memory. When the device is executing out of external Program Memory, PSEN is activated twice each machine cycle (except that two PSEN activations are skipped during accesses to external Data Memory). PSEN is not activated when the device is executing out of internal Program Memory.

EA/VPP:

When EA is held high the CPU executes out of internal Program Memory (unless the Program Counter exceeds 0FFFH in the 80C51).Holding EA low forces the CPU to execute out of external memory regardless of the Program Counter value. In the 80C31, EA must be externally wired low. In the EPROM devices, this pin also receives the programming supply voltage (VPP) during EPROM programming.

XTAL1:

Input to the inverting oscillator amplifier.

XTAL2:

Output from the inverting oscillator amplifier.

The 8051’s I/O port structure is extremely versatile and flexible. The device has 32 I/O pins configured as four eight bit parallel ports (P0, P1, P2 and P3). Each pin can be used as an input or as an output under the software control. These I/O pins can be accessed directly by memory instructions during program execution to get required flexibility. These port lines can be operated in different modes and all the pins can be made to do many different tasks apart from their regular I/O function executions. Instructions, which access external memory, use port P0 as a multiplexed address/data bus. At the beginning of an external memory cycle, order 8 bits of the address bus are output on P0.

Also, any instruction that accesses external Program Memory will output the higher order byte on P2 during read cycle. Remaining ports, P1 and P3 are available for standard I/O functions. But all the 8 lines of P3 support special functions: Two external interrupt lines, two counter inputs, serial port’s two data lines and two timing control strobe lines are designed to use P3 port lines. When you don’t use these special functions, you can use corresponding port lines as a standard I/O. Even within a single port, I/O operations may be combined in many ways. Different pins can be configured as input or outputs independent of each other or the same pin can be used as an input or as output at different times. You can comfortably combine I/O operations and special operations for Port 3 lines.

Port 0:

Port 0 is an 8-bit open drain bidirectional port. As an open drain output port, it can sink eight LS TTL loads. Port 0 pins that have 1s written to them float, and in that state will function as high impedance inputs. Port 0 is also the multiplexed low-order address and data bus during accesses to external memory. In this application it uses strong internal pullups when emitting 1s. Port 0 emits code bytes during program verification. In this application, external pullups are required.

Port 1:

Port 1 is an 8-bit bidirectional I/O port with internal pullups. Port 1 pins that have 1s written to them are pulled high by the internal pullups, and in that state can be used as inputs. As inputs, port 1 pins that are externally being pulled low will source current because of the internal pullups.

Port 2:

Port 2 is an 8-bit bidirectional I/O port with internal pullups. Port 2 emits the high-order address byte during accesses to external memory that use 16-bit addresses. In this application, it uses the strong internal pullups when emitting 1s.

Port 3:

Port 3 is an 8-bit bidirectional I/O port with internal pullups. It also serves the functions of various special features of the 80C51 Family as follows:

Port Pin Alternate Function:

P3.0- RxD (serial input port)

P3.1 -TxD (serial output port)

P3.2 -INT0 (external interrupt 0)

P3.3- INT1 (external interrupt 1)

P3.4 -T0 (timer 0 external input)

P3.5 -T1 (timer 1 external input)

P3.6 -WR (external data memory write strobe)

P3.7 -RD (external data memory read strobe)

VCC: -Supply voltage

VSS: -Circuit ground potential

All four ports in the 80C51 are bidirectional. Each consists of a latch (Special Function Registers P0 through P3), an output driver, and an input buffer. The output drivers of Ports 0 and 2, and the input buffers of Port 0, are used in accesses to external memory. In this application, Port 0 outputs the low byte of the external memory address, time-multiplexed with the byte being written or read.

Port 2 outputs the high byte of the external memory address when the address is 16 bits wide. Otherwise, the Port 2 pins continue to emit the P2 SFR content.

All the Port 3 pins are multifunctional. They are not only port pins, but also serve the functions of various special features as listed below:

Port Pin Alternate Function

P3.0 RxD (serial input port)

P3.1 TxD (serial output port)

P3.2 INT0 (external interrupt)

P3.3 INT1 (external interrupt)

P3.4 T0 (Timer/Counter 0 external input)

P3.5 T1 (Timer/Counter 1 external input)

P3.6 WR (external Data Memory write strobe)

P3.7 RD (external Data Memory read strobe)

MICROCONTROLLER VERSUS MICROPROCESSOR:

What is the difference between a Microprocessor and Microcontroller? By microprocessor is meant the general purpose Microprocessors such as Intel's X86 family (8086, 80286, 80386, 80486, and the Pentium) or Motorola's 680X0 family (68000, 68010, 68020, 68030, 68040, etc). These microprocessors contain no RAM, no ROM, and no I/O ports on the chip itself. For this reason, they are commonly referred to as general-purpose Microprocessors.

A system designer using a general-purpose microprocessor such as the Pentium or the 68040 must add RAM, ROM, I/O ports, and timers externally to make them functional. Although the addition of external RAM, ROM, and I/O ports makes these systems bulkier and much more expensive, they have the advantage of versatility such that the designer can decide on the amount of RAM, ROM and I/O ports needed to fit the task at hand. This is not the case with Microcontrollers.

A Microcontroller has a CPU (a microprocessor) in addition to a fixed amount of RAM, ROM, I/O ports, and a timer all on a single chip. In other words, the processor, the RAM, ROM, I/O ports and the timer are all embedded together on one chip; therefore, the designer cannot add any external memory, I/O ports, or timer to it. The fixed amount of on-chip ROM, RAM, and number of I/O ports in Microcontrollers makes them ideal for many applications in which cost and space are critical.

In many applications, for example a TV remote control, there is no need for the computing power of a 486 or even an 8086 microprocessor. These applications most often require some I/O operations to read signals and turn on and off certain bits.

SERIAL PORTS:

Each 8051 microcomputer contains a high speed full duplex (means you can simultaneously use the same port for both transmitting and receiving purposes) serial port which is software configurable in 4 basic modes: 8 bit UART; 9 bit UART; inter processor Communications link or as shift register I/O expander.

For the standard serial communication facility, 8051 can be programmed for UART operations and can be connected with regular personal computers, teletype writers, modem at data rates between 122bauds and 31 kilo bauds. Getting this facility is made very simple using simple routines with option to elect even or odd parity. You can also establish a kind of Inter processor communication facility among many microcomputers in a distributed environment with automatic recognition of address/data. Apart from all above, you can also get super fast I/O lines using low cost simple TTL or CMOS shift registers.

2.3 RFID TAG:

RFID INTRODUCTION:

RFID (Radio Frequency Identification) allows an item, for example a library book, to be tracked and communicated with by radio waves. This technology is similar in concept to a cell phone. RFID is a broad term for technologies that use radio waves to automatically identify people or objects.

There are several methods of identification, but the most common is to store a serial number that identifies a person or object, and perhaps other information, on a microchip that is attached to an antenna (the chip and the antenna together are called an RFID transponder or an RFID tag). The antenna enables the chip to transmit the identification information to a reader. The reader converts the radio waves reflected back from the RFID tag into digital information that can then be passed on to computers that can make use of it .

The heart of the system is the RFID tag, which can be fixed inside a book's back cover or directly onto CDs and videos. This tag is equipped with a programmable chip and an antenna. Each paper-thin tag contains an engraved antenna and a microchip with a capacity of at least 64 bits.

Components of an RFID System:

A comprehensive RFID system has four components:

RFID tags that are electronically programmed with unique information

Readers or sensors to query the tags

Antenna

Server on which the software that interfaces with the integrated library software is loaded.

Tags.

History of RFID tags

In 1946 Léon Theremin invented an espionage tool for the Soviet Union which retransmitted incident radio waves with audio information. Sound waves vibrated a diaphragmwhich slightly altered the shape of the resonator, which modulated the reflected radio frequency. Even though this device was a passive covert listening device, not an identification tag, it has been attributed as the first known device and a predecessor to RFID technology. The technology used in RFID has been around since the early 1920s according to one source (although the same source states that RFID systems have been around just since the late 1960s).

Similar technology, such as the IFFtransponder invented by the United Kingdom in 1939, was routinely used by the allies in World War IIto identify airplanes as friend or foe. Transponders are still used by military and commercial aircraft to this day.

Another early work exploring RFID is the landmark 1948 paper by Harry Stockman, titled "Communication by Means of Reflected Power" (Proceedings of the IRE, pp 1196–1204, October 1948). Stockman predicted that "…considerable research and development work has to be done before the remaining basic problems in reflected-power communication are solved, and before the field of useful applications is explored."

Mario Cardullo's U.S. Patent 3,713,148 in 1973 was the first true ancestor of modern RFID; a passive radio transponder with memory. The initial device was passive, powered by the interrogating signal, and was demonstrated in 1971 to the New York Port Authority and other potential users and consisted of a transponder with 16 bit memory for use as a toll device.

The basic Cardullo patent covers the use of RF, sound and light as transmission medium. The original business plan presented to investors in 1969 showed uses in transportation (automotive vehicle identification, automatic toll system, electronic license plate, electronic manifest, vehicle routing, vehicle performance monitoring), banking (electronic check book, electronic credit card), security (personnel identification, automatic gates, surveillance) and medical (identification, patient history).

A very early demonstration of reflected power (modulated backscatter) RFID tags, both passive and semi-passive, was done by Steven Depp, Alfred Koelle and Robert Freyman at the Los Alamos Scientific Laboratory in 1973. The portable system operated at 915MHz and used 12 bit tags. This technique is used by the majority of today's UHF and microwave RFID tags.

The first patent to be associated with the abbreviation RFID was granted to Charles Walton in 1983 (U.S. Patent 4,384,288).

TYPES OF RFID TAGS

RFID tags come in three general varieties: passive, active, or semi-passive (also known as battery-assisted). Passive tags require no internal power source, thus being pure passive devices (they are only active when a reader is nearby to power them), whereas semi-passive and active tags require a power source, usually a small battery.

To communicate, tags respond to queries generating signals that must not create interference with the readers, as arriving signals can be very weak and must be told apart. Besides backscattering, load modulation techniques can be used to manipulate the reader's field. Typically, backscatter is used in the far field, whereas load modulation applies in the nearfield, within a few wavelengths from the reader.