Tuesday, 22 November 2016

RFID Based Book Tracking System CHAPTER 2 OPERATION & WORKING PRINCIPLE


CHAPTER 2
OPERATION & WORKING PRINCIPLE

OF THE PROJECT

2.1 BLOCK DIAGRAM:
RFID Based Book Tracking System CHAPTER 2 OPERATION & WORKING PRINCIPLE

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 high TTL electronics, and the negative RS-232 voltage for high can’t be handled at all by computer logic. To receive serial data from 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 a Max232 and five capacitors. The max232 is quite cheap (less than 5 dollars) or if you are lucky you can get a free sample from Maxim.

       The MAX232 from Maxim was the first IC which in one package contains the necessary drivers and receivers to 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


Device Comparison Table:


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:


Pin Diagram:

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)

MICRO CONTROLLER VERSUS MICRO PROCESSOR:
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 122 bauds 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 diaphragm which 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 IFF transponder invented by the United Kingdom in 1939, was routinely used by the allies in World War II to 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 915 MHz 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 near field, within a few wavelengths from the reader.


2.3.1 Passive Tags:
Passive RFID tags (fig 2.3) have no internal power supply. The minute electrical current induced in the antenna by the incoming radio frequency signal provides just enough power for the CMOS integrated circuit in the tag to power up and transmit a response. Most passive tags signal by backscattering the carrier wave from the reader. This means that the antenna has to be designed both to collect power from the incoming signal and also to transmit the outbound backscatter signal. The response of a passive RFID tag is not necessarily just an ID number; the tag chip can contain non-volatile, possibly writable EEPROM for storing data.

 2.3.2 Active Tags:
Unlike passive RFID tags, active RFID tags have their own internal power source, which is used to power the integrated circuits and broadcast the signal to the reader. Active tags are typically much more reliable (i.e. fewer errors) than passive tags due to the ability for active tags to conduct a "session" with a reader. Active tags, due to their onboard power supply, also transmit at higher power levels than passive tags, allowing them to be more effective in "RF challenged" environments like water (including humans/cattle, which are mostly water), metal (shipping containers, vehicles), or at longer distances, generating strong responses from weak requests (as opposed to passive tags, which work the other way around). In turn, they are generally bigger and more expensive to manufacture, and their potential shelf life is much shorter.
Many active tags today have practical ranges of hundreds of meters, and a battery life of up to 10 years. Some active RFID tags include sensors such as temperature logging which have been used to monitor the temperature of perishable goods like fresh produce or certain pharmaceutical products. Other sensors that have been married with active RFID include humidity, shock/vibration, light, radiation, temperature, and atmospherics like ethylene. Active tags typically have much longer range (approximately 500 m/1500 feet) and larger memories than passive tags, as well as the ability to store additional information sent by the transceiver.

 2.3.3 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 broadcast a signal. The RF energy is reflected back to the reader like a passive tag. An alternative use for the battery is to store energy from the reader to emit a response in the future, usually by means of backscattering.
The battery-assisted receive circuitry of semi-passive tags lead to greater sensitivity than passive tags, typically 100 times more. The enhanced sensitivity can be leveraged as increased range (by a factor 10) and/or as enhanced read reliability (by one standard deviation).
The enhanced sensitivity of semi-passive tags place higher demands on the reader, because an already weak signal is backscattered to the reader. For passive tags, the reader-to-tag link usually fails first. For semi-passive tags, the reverse (tag-to-reader) link usually fails first.
Semi-passive tags have three main advantages:
1) Greater sensitivity than passive tags
2) Better battery life than active tags.
 3) Can perform active functions (such as temperature logging) under its own power, even when no reader is present.

Tag Life:
RFID tags last longer than barcodes because the technology does not require line-of-sight. Most RFID vendors claim a minimum of 100,000 transactions before a tag may need to be replaced
RFID Storage Types:  
There are three types of tags: "read only", "WORM," and "read/write". "Tags are "read only" if the identification is encoded at the time of manufacture and not rewritable.”WORM" (Write-Once-Read-Many) tags are programmed by the using organization, but without the ability to rewrite them later. "Read/write tags," which are chosen by most libraries, can have information changed or added. In libraries that use RFID, it is common to have part of the read/write tag secured against rewriting, e.g., the identification number of the item.
2.4 RFID READERS:
2.4.1 RFID Reader Description:
          RFID Reader Module, are also called as interrogators. They convert radio waves returned from the RFID tag into a form that can be passed on to Controllers, which can make use of it. RFID tags and readers have to be tuned to the same frequency in order to communicate. RFID systems use many different frequencies, but the most common and widely used & supported by our Reader is 125 KHz.
 RFID readers or receivers are composed of a radio frequency module, a control unit and an antenna to interrogate electronic tags via radio frequency (RF) communication.

RFID Reader Diagram:


The reader powers an antenna to generate an RF field. When a tag passes through the field, the information stored on the chip in the tag is interpreted by the reader and sent to the server, which, in turn, communicates with the integrated library system when the RFID system is interfaced with it.
RFID exit gate sensors (readers) at exits are basically two types. One type reads the information on the tag(s) going by and communicates that information to a server.
The server, after checking the circulation database, turns on an alarm if the material is not properly checked out. Another type relies on a "theft" byte in the tag that is turned on or off to show that the item has been charged or not, making it unnecessary to communicate with the circulation database.
            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. 

2.4.2 RFID MODULE IMPLEMENTATION:
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, which contains the information about the book like name of the book etc. RFID is a combination of radio -frequency-based technology and microchip technology.


RF (radio frequency) portion of the electromagnetic spectrum is used to transmit signals. An RFID system consists of an antenna and a transceiver, which read the radio frequency and transfer the information to a processing device (reader) and a transponder, or RF tag, which contains the RF circuitry and information to be transmitted. 
The antenna provides the means for the integrated circuit to transmit its information to the reader that converts the radio waves reflected back from the RFID tag into digital information that can then be passed on to computers that can analyze the data.
Radio frequency identification (RFID) in a variety of ways including automatic identification and data capture (AIDC) solutions. We pride ourselves in providing customers with inexpensive RFID solutions that integrate well with other systems.
The reader has been designed as a Plug & Play Module and can be plugged on a Standard 300 MIL-28 Pin IC socket form factor.

Functions:
1.      Supports reading of 64 Bit Manchester Encoded cards
2.      Pins for External Antenna connection
3.      Serial Interface (TTL)
4.      Wiegand Interface also available
Customer application on request 

2.4.3 RFID FEATURES:


Note:
1.      Reader module has to be mounted on non-metallic surface, else it may affect the operation of reader.
2.      Buzzer & LED are Active low signals.
3.      For Buzzer & LED current limiting Resister has to be mounted. MAX current is 20mA. (470 or 510 ohms for LED and 240 or 270 Ohms for Buzzer)

4.      LED’s Anode and Buzzer’s Positive marked pin to be connected to Vcc.
5.      Wiegand out put format is also available in select readers.
RFID FREQUENCIES:
RFID tags and readers have to be tuned to the same frequency in order to communicate effectively. RFID systems typically use one of the following frequency ranges: low frequency (or LF, around 125 kHz), high frequency (or HF, around 13.56 MHz), ultra-high frequency (or UHF, around 868 and 928 MHz), or microwave (around 2.45 and 5.8 GHz).
ANTENNA:
The antenna produces radio signals to activate the tag and read and write data to it. Antennas are the channels between the tag and the reader, which controls the system's data acquisitions and communication. The electromagnetic field produced by an antenna can be constantly present when multiple tags are expected continually. Antennas can be built into a doorframe to receive tag data from person's things passing through the door.
SERVER:
The server is the heart of some comprehensive RFID systems. It is the communications gateway among the various components (Boss, 2004). It receives the information from one or more of the readers and exchanges information with the circulation database. Its software includes the SIP/SIP2 (Session Initiation Protocol), APIs (Applications Programming Interface) NCIP (National Circulation Interchange Protocol) or SLNP necessary to interface it with the integrated library software but no library vendor has yet fully implemented NCIP approved by NISO (Koppel, 2004). The server typically includes a transaction database so that reports can be produced.
Installations:
While there are over 500,000 RFID systems installed in warehouses and retail establishments worldwide, RFID systems are still relatively new in libraries. Fewer than 250 had been installed as of the first quarter of 2004. Most installations are small, primarily in branch libraries. The University of Connecticut Library; University of Nevada/Las Vegas Library, the Vienna Public Library in Austria, the Catholic University of Leuven in Belgium, and the National University of Singapore Library are the only sites that appear to have tagged more than 500,000 items each. So far in India , only two University libraries have adopted the RFID system. First among them is Jayakar Library of Pune University and second is Dhanvantri Library of Jammu University . The use of RFID throughout Indian libraries will take at least four to five years.
Recent Developments:
Recent developments in hardware and software for RFID systems have increased the potential of this technology in library automation and security. 'Today, the one important result for libraries is the ability to use non-proprietary systems, now that the new generation of RFID-chips with standard ISO 15693 (to be integrated into ISO 18000-3) is available,' explains Dr Christian Kern, system development manager of Bibliotheca RFID Library Systems, a Swiss company specialising in such systems for libraries. "With this technology, libraries do not have to depend on one single supplier for tags.
 Vendors:
The products of six manufacturers of library RFID systems are available in India through their business associates: Bibliotheca, Checkpoint, ID Systems, 3M, X-ident technology GmbH represented by Infotek software and systems in India and TAGSYS- the last represented by Tech Logic, Vernon, Libsys in India and VTLS.
There are several other companies that provide products that work with RFID, including user self-charging stations and materials handling equipment.
RFID Technology Overview:
Radio Frequency Identification (RFID) is a generic term for non-contacting 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 unique serial number that identifies a person or object on a microchip that is attached to an antenna. The combined antenna and microchip are called an "RFID transponder" or "RFID tag" and work in combination with an "RFID reader" (sometimes called an "RFID interrogator").
An RFID system consists of a reader and one or more tags. The reader's antenna is used to transmit radio frequency (RF) energy. Depending on the tag type, the energy is "harvested" by the tag's antenna and used to power up the internal circuitry of the tag. The tag will then modulate the electromagnetic waves generated by the reader in order to transmit its data back to the reader.
The reader receives the modulated waves and converts them into digital data. In the case of the Parallax RFID Reader Module, correctly received digital data is sent serially through the SOUT pin.
There are two major types of tag technologies.
"Passive tags" are tags that do not contain their own power source or transmitter. When radio waves from the reader reach the chip’s antenna, the energy is converted by the antenna into electricity that can power up the microchip in the tag (known as "parasitic power"). The tag is then able to send back any information stored on the tag by reflecting the electromagnetic waves as described above. "Active tags" have their own power source and transmitter.
The power source, usually a battery, is used to run the microchip's circuitry and to broadcast a signal to a reader. Due to the fact that passive tags do not have their own transmitter and must reflect their signal to the reader, the reading distance is much shorter than with active tags. However, active tags are typically larger, more expensive, and require occasional service.
The RFID Reader Module is designed specifically for low-frequency (125 kHz) passive tags. Frequency refers to the size of the radio waves used to communicate between the RFID system components.
RFID systems typically use one of the following frequency ranges: low frequency (or LF, around 125 kHz), high frequency (or HF, around 13.56 MHz), ultra-high frequency (or UHF, around 868 and 928 MHz), or microwave (around 2.45 and 5.8 GHz).
 It is generally safe to assume that a higher Frequency equates toa faster data transfer rate and longer read ranges, but also more sensitivity to environmental factors such as liquid and metal that can interfere with radio waves. There really is no such thing as a "typical" RFID tag.
·        The read range of a tag ultimately depends on many factors:
Ø  the frequency of RFID system operation
Ø  the power of the reader,
Ø  Interference from other RF devices.
Balancing a number of engineering trade-offs (antenna size v. reading distance v. power v. manufacturing cost), the Parallax RFID Reader Module's antenna was designed with a specific inductance and "Q" factor for 125 kHz RFID operation at a tag read distance of up to 1¾” - 3” inches. 
2.5 INTERFACING DEVICES:
2.5.1 RS-232 Serial Port:
RFID module is interfaced with the microcontroller using an RS232 (serial port).


When communicating with various micro processors one needs to convert the RS232 levels down to lower levels, typically 3.3 or 5.0 Volts. Here is a cheap and simple way to do that. Serial RS-232 (V.24) communication works with voltages -15V to +15V for high and low. On the other hand, TTL logic operates between 0V and +5V. Modern low power consumption logic operates in the range of 0V and +3.3V or even lower.

RS-232 DB9 Pin Out:



Data Transmission through RS-232:
     RS-232 communication is dependent on a set timing speed at which both pieces of hardware communicate. In other words, the hardware knows how long a bit should be high or low.
RS-232 also specifies the use of “start” and “stop” bits.
    Every time a character is sent, the same communication occurs:
1.      Start bit sent.
2.      Seven data bits sent.
3.      Stop bit sent.
This communication is dependent on the fact that both devices are sampling the bits at the same rate! We’ll see what happens if this doesn’t happen…
A Sample Transmission:

Full Duplex Transmission:
Full duplex transmission (FDX) occurs when data is transmitted (or can be transmitted) simultaneously by both devices. Special wiring is needed for FDX.


RS-232 Features:

Thus the RS-232 signal levels are far too high TTL electronics, and the negative RS-232 voltage for high can’t be handled at all by computer logic. To receive serial data from 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 a Max232 and five capacitors. The max232 is quite cheap (less than 5 dollars) or if you’re lucky you can get a free sample from Maxim.

2.5.2 MAX-232:
MAX-232 is also known as “Level Converter”. The MAX232 from Maxim was the first IC which in one package contains the necessary drivers and receivers to 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.
MAX 232 PIN DIAGRAM:


MAX-232 FEATURES:
Input supply voltage range, Vcc                         -0.3 t0 6V
Positive output supply voltage range,Vs+          -0.3 to 15V
Negative output supply voltage range,Vs-         -0.3 to -15V
Output voltage range, Vo T1OUT,T2OUT        -0.3 to Vs+ +0.3V
                                       R1OUT, R2OUT         -0.3 to Vcc +0.3V
2.5.3 RS232 INTERFACED TO MAX 232:

Rs232 is 9 pin db connector, only three pins of this are used ie 2,3,5 the transmit pin of rs232 is connected to rx pin of micro controller.

2.5.4 INTERFACING MAX-232 AND MICRO CONTROLLER:


MAX232 is connected to the microcontroller as shown in the figure above 11, 12 pin are connected to the 10 and 11 pin ie transmit and receive pin of microcontroller,

2.6 SCHEMATIC DIAGRAM & DESCRIPTION:

PROJECT CIRCUITRY:


Practical Circuit:



SCHEMATIC DESCRIPTION:
  We can break the project into three parts like micro controller section, power supply section, and D.C. regulated power supply section.  The Circuit shows the complete diagram of the rfid based book tracking system.
Micro controller section contains only micro controller 89C51 and a crystal of 11.0592 MHz for oscillator. As micro controller works on the program inside the memory. As a program generates the login therefore it does not require any logic circuits.  As the controller keeps all the memory and I/O ports inside it, it contains very less components in its outer configuration.  Power to the IC supplied is +5v DC.
  In this RFID module is connected to microcontroller via RS232 (serial port) Then max232 is connected to the microcontroller as shown in the figure above 11, 12 pin are connected to the 10 and 11 pin of microcontroller, an LCD is interfaced with the microcontroller by connecting it to any of the port pins,lcd is used to display the information about which book has been issued.

2.7 LIQUID CRYSTAL DISPLAY:
 INTRODUCTION:
LCD (liquid crystal display) projectors usually contain three separate LCD glass panels, one each for the red, green, and blue components of the video signal being fed into the projector. As light passes through the LCD panels, individual pixels ("picture elements") can be opened to allow light to pass or closed to block the light, as if each little pixel were fitted with a Venetian blind. This activity modulates the light and produces the image that is projected onto the screen.
DLP ("Digital Light Processing") is a proprietary technology developed by Texas Instruments. It works quite differently than LCD. Instead of having glass panels through which light is passed, the DLP chip is a reflective surface made up of thousands of tiny mirrors. Each mirror represents a single pixel.
In a DLP projector, light from the projector's lamp is directed onto the surface of the DLP chip. The mirrors wobble back and forth, directing light either into the lens path to turn the pixel on, or away from the lens path to turn it off.
In very expensive DLP projectors, there are three separate DLP chips, one each for the red, green, and blue channels. However, in most DLP projectors under $20,000 there is only one chip. In order to define color, there is a color wheel that consists of red, green, blue, and sometimes white (clear) filters.

This wheel spins in the light path between the lamp and the DLP chip and alternates the color of the light hitting the chip from red to green to blue. The mirrors tilt away from or into the lens path based upon how much of each color is required for each pixel at any given moment in time. This activity modulates the light and produces the image that is projected onto the screen. (In addition to red, green, blue, and white segments, some color wheels now use dark green or yellow segments as well.

2.7.1 PIN DESCRIPTION OF THE LCD:


2.7.2 Interfacing LCD to Micro Controller:


A typical LCD write operation takes place as shown in the following timing waveform

The interface is either a 4-bit or 8-bit parallel bus that allows fast reading/writing of data      to and from the LCD.
This waveform will write an ASCII Byte out to the LCD's screen. The ASCII code to be displayed is eight bits long and is sent to the LCD either four or eight bits at a time.
If 4-bit mode is used, two nibbles of data (First high four bits and then low four bits with an E Clock pulse with each nibble) are sent to complete a full eight-bit transfer. The E Clock is used to initiate the data transfer within the LCD.
8-bit mode is best used when speed is required in an application and at least ten I/O pins are available. 4-bit mode requires a minimum of six bits.
In 4-bit mode, only the top 4 data bits (DB4-7) are used. The R/S pin is used to select whether data or an instruction is being transferred between the microcontroller and the LCD.
If the pin is high, then the byte at the current LCD Cursor Position can be read or written.
If the pin is low, either an instruction is being sent to the LCD or the execution status of the last instruction is read back (whether or not it has completed).

2.8 DUMPING PROCESS:
Flash Magic:
Features:
  • Straightforward and intuitive user interface
  • Five simple steps to erasing and programming a device and setting any options desired
  • Programs Intel Hex Files
  • Automatic verifying after programming
  • Fills unused Flash to increase firmware security
  • Ability to automatically program checksums. Using the supplied checksum calculation routine your firmware can easily verify the integrity of a Flash block, ensuring no unauthorized or corrupted code can ever be executed
  • Program security bits
  • Check which Flash blocks are blank or in use with the ability to easily erase all blocks in use
  • Read the device signature
  • Read any section of Flash and save as an Intel Hex File
  • Reprogram the Boot Vector and Status Byte with the help of confirmation features that prevent accidentally programming incorrect values
  • Display the contents of Flash in ASCII and Hexadecimal formats
  • Single-click access to the manual, Flash Magic home page and NXP Microcontrollers home page
  • Ability to use high-speed serial communications on devices that support it. Flash Magic calculates the highest baudrate that both the device and your PC can use and switches to that baudrate transparently
  • Command Line interface allowing Flash Magic to be used in IDEs and Batch Files
  • Manual in PDF format
  • Supports half-duplex communications
  • Verify Hex Files previously programmed
  • Save and open settings
  • Able to reset Rx2 and 66x devices (revision G or higher)
  • Able to control the DTR and RTS RS232 signals when connected to RST and /PSEN to place the device into Boot ROM and Execute modes automatically. An example circuit diagram is included in the Manual. Essential for ISP with target hardware that is hard to access.
  • Able to send commands to place the device in Boot ROM mode, with support for command line interfaces.
  • The installation includes an example project for the Keil and Raisonance 8051 compilers that show how to build support for this feature into applications.
  • Able to play any Wave file when finished programming.
  • Built in automated version checker - helps ensure you always have the latest version.
  • Powerful, flexible Just In Time Code feature. Write your own JIT Modules to generate last minute code for programming. Uses include:
    • Serial number generation 
    • Copy protection and copy authorization 
    • Storing program date and time - manufacture date 
    • Storing program operator and location 
    • Lookup table generation  
    • Language tables or language selection 
    • Centralized record keeping 
    • Obtaining latest firmware from the Corporate Web site or project intranet
  • Sponsored by NXP Semiconductors
  • Features automatically updating Internet links including links to related technical documents, software updates, utilities and code examples, using Embedded Hints technology
  • Displays information about the selected Hex File, including the creation and modification dates, flash memory used, percentage of the current device used
  • Flash Magic works on any versions of Windows, except Windows 95. 10Mb of disk space is required
2.9 COMPILATION TOOL (SDCC):
 Small Device C Compiler:
SDCC is a retargettable, optimizing ANSI - C compiler that targets the Intel 8051, Maxim 80DS390, Zilog Z80 and the Motorola 68HC08 based MCUs. Work is in progress on supporting the Microchip PIC16 and PIC18 series. SDCC is Free Open Source Software, distributed under GNU General Public License (GPL).

 SDCC Basics:
 Assuming that the location of SDCC is defined in your path, you can use the following syntax for your header files:
#include <stdio.h>

To use SDCC on the command line, use a command line syntax similar to the
following (note: a more complete list of flags is shown in the example makefile
later):
sdcc --code-loc 0x6000 --xram-loc 0xB000 file.c
Ø  SDCC will generate the following output files:
  • file.asm – Assembler file created by the compiler
  • file.lst – Assembler listing file created by the assembler
  • file.rst – Assembler listing file updated by the linkage editor
  • file.sym – Symbol listing created by the assembler
  • file.rel – Object file created by the assembler, Input to the linkage editor
  • file.map – Memory map for the load module created by the linker
  • file.mem – Summary of the memory usage
  • file.ihx – This is the load module in Intel hex format


Ø  By default SDCC uses the small memory model
Ø  The assembler is given the memory locations as .area directives instead of ORG statements.
Ø  We must remember to use the --code-loc and --xram-loc
directives because this tells the linker where to place things in memory.
Ø  We can examine the file.rst and file.map output files to verify that
our code and data are assigned to the correct location.
FEATURES OF SDCC:
·         ASXXXX and ASLINK, a Freeware, retargettable assembler and linker.
·         Extensive MCU specific language extensions, allowing effective use of the underlying hardware.
·         A host of standard optimizations such as global sub expression elimination, loop optimizations (loop invariant, strength reduction of induction variables and loop reversing ), constant folding and propagation, copy propagation, dead code elimination and jump tables for 'switch' statements.
·         MCU specific optimizations, including a global register allocator.
·         Adaptable MCU specific backend that should be well suited for other 8 bit MCUs
·         Independent rule based peep hole optimizer.
·         A full range of data types: char (8 bits, 1 byte), short (16 bits, 2 bytes), int (16 bits, 2 bytes), long (32 bit, 4 bytes) and float (4 byte IEEE).
·         The ability to add inline assembler code anywhere in a function.
·         The ability to report on the complexity of a function to help decide what should be re-written in assembler.
·         A good selection of automated regression tests.
SDCC also comes with the source level debugger SDCDB, using the current version of Daniel's s51 simulator.
SDCC was written by Sandeep Dutta and released under a GPL license. Since its initial release there have been numerous bug fixes and improvements. As of December 1999, the code was moved to SourceForge where all the "users turned developers" can access the same source tree. SDCC is constantly being updated with all the users' and developers' input.

SDCC SUPPORTS FOLLOWING PLATFORMS:
Linux - x86, Microsoft Windows - x86 and Mac OS x - ppc are the primary, so called "officially supported" platforms.
SDCC compiles natively on Linux and Mac OS X using using gcc. Windows release and snapshot builds are made by cross compiling to mingw32 on a Linux host.
Windows 9x/NT/2000/XP users are recommended to use Cygwin (http://sources.redhat.com/cygwin/) or may try the unsupported Borland C compiler or Microsoft Visual C++ build scripts.
SUPPORT OF SDCC:
SDCC and the included support packages come with fair amounts of documentation and examples. When they aren't enough, you can find help in the places listed below. Here is a short check list of tips to greatly improve your chances of obtaining a helpful response.
1.      Attach the code you are compiling with SDCC. It should compile "out of the box". Snippets must compile and must include any required header files, etc. Incomplete information will hamper your chance of a timely response.
2.      Specify the exact command you use to run SDCC, or attach your Makefile.
3.      Specify the SDCC version (type "sdcc -v"), your platform and operating system.
4.      Provide an exact copy of any error message or incorrect output.

2.9 REGULATED POWER SUPPLY:
A variable regulated power supply, also called a variable bench power supply, is one where you can continuously adjust the output voltage to your requirements. Varying the output of the power supply is the recommended way to test a project after having double checked parts placement against circuit drawings and the parts placement guide.
This type of regulation is ideal for having a simple variable bench power supply. Actually this is quite important because one of the first projects a hobbyist should undertake is the construction of a variable regulated power supply. While a dedicated supply is quite handy e.g. 5V or 12V, it's much handier to have a variable supply on hand, especially for testing.
Most digital logic circuits and processors need a 5 volt power supply. To use these parts we need to build a regulated 5 volt source. Usually you start with an unregulated power To make a 5 volt power supply, we use a LM7805 voltage regulator IC (Integrated Circuit).
The IC is shown below.


 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.
BLOCK DIAGRAM:


CIRCUIT DIAGRAM:


CIRCUIT FEATURES:
  • Brief description of operation: Gives out well regulated +5V output, output current capability of 100 mA
  • Circuit protection: Built-in overheating protection shuts down output when regulator IC gets too hot
  • Circuit complexity: Very simple and easy to build
  • Circuit performance: Very stable +5V output voltage, reliable operation
  • Availability of components: Easy to get, uses only very common basic components
  • Design testing: Based on datasheet example circuit, I have used this circuit successfully as part of many electronics projects
  • Applications: Part of electronics devices, small laboratory power supply
  • Power supply voltage: Unregulated DC 8-18V power supply
  • Power supply current: Needed output current + 5 mA
Component costs: Few dollars for the electronics components + the input transformer cost. 


No comments:

Post a Comment

Note: only a member of this blog may post a comment.