Top Banner

of 24

RF ID RATIONCARD-OK.doc

Oct 07, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript

AUTOMATED RATIONING FOR PUBLIC DISTRIBUTION SYSTEM USING RFID

ABSTRACT:

This project introduces a novel system for automatically providing the ration products for a family, using Radio Frequency Identity (RFID) Cards. This system is micro controller based, and hence is flexible. In the existing PDS, the delivery of products to the public is marred with irregularities regarding the quantity of the products supplied. The current system for checking these irregularities is grossly inadequate due to the large number of PDS outlets and huge quantum of material being handled.

The entire cost of the project is much lesser than the cost of corruption per year. The project can eliminate crucial and major components of corruption, thus considerably reducing the cash outflow due to corruption. Over the long run, the system can pay rich dividends by the savings in cost due to reduction in corruption. Plan for a national database is already in the pipeline. Hence collection of authentic consumer data for the system is also made simple. In fact, the project could supplement the formerEXISTING SYSTEM:PROPOSED SYSTEM: CHAPTER II HARDWARE DESCRIPTIONSBLOCK DIAGRAM:

HARDWARE COMPONENTS: Microcontroller unit

RFID

ALARM

SOFTWARE COMPONENTS: PIC C CompilerMICROCONTROLLER UNIT:

The basic building block of PIC 16F877 is based on Harvard architecture. This microcontroller also has many advanced features as mentioned in the previous post. Here you can see the basic internal architecture and memory organisation of PIC16F877.Architecture of PIC16F877

The figure below shows the internal architecture of a PIC16F877A chip.

Internal Architecture of PIC16F877A Chip

MEMORY ORGANIZATION OF PIC16F877The memory of a PIC 16F877 chip is divided into 3 sections. They are

Program memory

Data memory and

Data EEPROM

1. Program memoryProgram memory contains the programs that are written by the user. The program counter (PC) executes these stored commands one by one. Usually PIC16F877 devices have a 13 bit wide program counter that is capable of addressing 8K14 bit program memory space. This memory is primarily used for storing the programs that are written (burned) to be used by the PIC. These devices also have 8K*14 bits of flash memory that can be electrically erasable /reprogrammed. Each time we write a new program to the controller, we must delete the old one at that time. The figure below shows the program memory map and stack.

PIC16f877 Program Memory

Program counter

Program counters (PC) is used to keep the track of the program execution by holding the address of the current instruction. The counter is automatically incremented to the next instruction during the current instruction execution.

The PIC16F87XA family has an 8-level deep x 13-bit wide hardware stack. The stack space is not a part of either program or data space and the stack pointers are not readable or writable. In the PIC microcontrollers, this is a special block of RAM memory used only for this purpose.

Each time the main program execution starts at address 0000 Reset Vector. The address 0004 is reserved for the interrupt service routine (ISR).

PIC16F87XA Data Memory OrganizationThe data memory of PIC16F877 is separated into multiple banks which contain the general purpose registers (GPR) and special function registers (SPR). According to the type of the microcontroller, these banks may vary. The PIC16F877 chip only has four banks (BANK 0, BANK 1, BANK 2, and BANK4). Each bank holds 128 bytes of addressable memory.

Data EEPROM and FLASHThe data EEPROM and Flash program memory is readable and writable during normal operation (over the full VDD range). This memory is not directly mapped in the register file space. Instead, it is indirectly addressed through the Special Function Registers. There are six SFRs used to read and write this memory:

EECON1

EECON2

EEDATA

EEDATH

EEADR

EEADRH

The EEPROM data memory allows single-byte read and writes. The Flash program memory allows single-word reads and four-word block writes. Program memory write operations automatically perform an erase-before write on blocks of four words. A byte write in data EEPROM memory automatically erases the location and writes the new data (erase-before-write). The write time is controlled by an on-chip timer. The write/erase voltages are generated by an on-chip charge pump, rated to operate over the voltage range of the device for byte or word operations.

RFID:

Radio-frequency identification(RFID) is the wireless non-contact use ofradio-frequencyelectromagnetic fieldsto transfer data, for the purposes of automatically identifying and tracking tags attached to objects. The tags contain electronically stored information. Some tags are powered by and read at short ranges (a few meters) via magnetic fields (electromagnetic induction), and then act as a passivetransponderto emit microwaves orUHFradiowaves (i.e.,electromagnetic radiationat high frequencies). Others use a local power source such as a battery, and may operate at hundreds of meters. Unlike abarcode, the tag does not necessarily need to be within line of sight of the reader, and may be embedded in the tracked object.

RFID tags are used in many industries. An RFID tag attached to an automobile during production can be used to track its progress through the assembly line. Pharmaceuticals can be tracked through warehouses.Livestock and pets may have tags injected, allowing positive identification of the animal. On off-shore oil and gas platforms, RFID tags are worn by personnel as a safety measure, allowing them to be located 24 hours a day and to be quickly found in emergencies. Since RFID tags can be attached to clothing, possessions, or evenimplanted within people, the possibility of reading personally-linked information without consent has raised privacy concerns.

RFID stands forRadio-Frequency IDentification. The acronym refers to small electronic devices that consist of a small chip and an antenna. The chip typically is capable of carrying 2,000 bytes of data or less.

The RFID device serves the same purpose as a bar code or a magnetic strip on the back of a credit card or ATM card; it provides a unique identifier for that object. And, just as a bar code or magnetic strip must be scanned to get the information, the RFID device must be scanned to retrieve the identifying information.

RFID Works Better Than Barcodes

A significant advantage of RFID devices over the others mentioned above is that the RFID device does not need to be positioned precisely relative to the scanner. We're all familiar with the difficulty that store checkout clerks sometimes have in making sure that a barcode can be read. And obviously, credit cards and ATM cards must be swiped through a special reader.

In contrast, RFID devices will work within a few feet (up to 20 feet for high-frequency devices) of the scanner. For example, you could just put all of your groceries or purchases in a bag, and set the bag on the scanner. It would be able to query all of the RFID devices and total your purchase immediately. (Read a more detailed article onRFID compared to barcodes.)

RFID technology has been available for more than fifty years. It has only been recently that the ability to manufacture the RFID devices has fallen to the point where they can be used as a "throwaway" inventory or control device. Alien Technologies recently sold 500 million RFID tags to Gillette at a cost of about ten cents per tag.

One reason that it has taken so long for RFID to come into common use is the lack of standards in the industry. Most companies invested in RFID technology only use the tags to track items within their control; many of the benefits of RFID come when items are tracked from company to company or from country to country.

Common Problems with RFID

Some common problems with RFID arereader collisionandtag collision. Reader collision occurs when the signals from two or more readers overlap. The tag is unable to respond to simultaneous queries. Systems must be carefully set up to avoid this problem. Tag collision occurs when many tags are present in a small area; but since the read time is very fast, it is easier for vendors to develop systems that ensure that tags respond one at a time. SeeProblems with RFIDfor more details.TAGSA radio-frequency identification system usestags, orlabelsattached to the objects to be identified. Two-way radio transmitter-receivers calledinterrogatorsorreaderssend a signal to the tag and read its response.

RFID tags can be either passive, active or battery-assisted passive. An active tag has an on-board battery and periodically transmits its ID signal. A battery-assisted passive (BAP) has a small battery on board and is activated when in the presence of an RFID reader. A passive tag is cheaper and smaller because it has no battery. However, to start operation of passive tags, they must be illuminated with a power level roughly three magnitudes stronger than for signal transmission. That makes a difference in interference and in exposure to radiation.

Tags may either be read-only, having a factory-assigned serial number that is used as a key into a database, or may be read/write, where object-specific data can be written into the tag by the system user. Field programmable tags may be write-once, read-multiple; "blank" tags may be written with an electronic product code by the user. A tag with no inherent identity is always vulnerable to manipulation.

RFID tags contain at least two parts: anintegrated circuitfor storing and processing information,modulatinganddemodulatingaradio-frequency(RF) signal, collecting DC power from the incident reader signal, and other specialized functions; and anantennafor receiving and transmitting the signal. The tag information is stored in a non-volatile memory. The RFID tag includes either a chip-wired logic or a programmed or programmable data processor for processing the transmission and sensor data, respectively.

An RFID reader transmits an encoded radio signal to interrogate the tag. The RFID tag receives the message and then responds with its identification and other information. This may be only a unique tag serial number, or may be product-related information such as a stock number, lot or batch number, production date, or other specific information.

Readers

RFID systems can be classified by the type of tag and reader. APassive Reader Active Tag(PRAT) system has a passive reader which only receives radio signals from active tags (battery operated, transmit only). The reception range of a PRAT system reader can be adjusted from 12,000 feet (0.30609.60m), allowing flexibility in applications such as asset protection and supervision.

AnActive Reader Passive Tag(ARPT) system has an active reader, which transmits interrogator signals and also receives authentication replies from passive tags.

AnActive Reader Active Tag(ARAT) system uses active tags awoken with an interrogator signal from the active reader. A variation of this system could also use a Battery-Assisted Passive (BAP) tag which acts like a passive tag but has a small battery to power the tag's return reporting signal.

Fixed readers are set up to create a specific interrogation zone which can be tightly controlled. This allows a highly defined reading area for when tags go in and out of the interrogation zone. Mobile readers may be hand-held or mounted on carts or vehicles

SignalingSignaling between the reader and the tag is done in several different incompatible ways, depending on the frequency band used by the tag. Tags operating on LF and HF bands are, in terms of radio wavelength, very close to the reader antenna because they are only a small percentage of a wavelength away. In thisnear fieldregion, the tag is closely coupled electrically with the transmitter in the reader. The tag can modulate the field produced by the reader by changing the electrical loading the tag represents. By switching between lower and higher relative loads, the tag produces a change that the reader can detect. At UHF and higher frequencies, the tag is more than one radio wavelength away from the reader, requiring a different approach. The tag canbackscattera signal. Active tags may contain functionally separated transmitters and receivers, and the tag need not respond on a frequency related to the reader's interrogation signal

AnElectronic Product Code(EPC) is one common type of data stored in a tag. When written into the tag by an RFID printer, the tag contains a 96-bit string of data. The first eight bits are a header which identifies the version of the protocol. The next 28 bits identify the organization that manages the data for this tag; the organization number is assigned by the EPC Global consortium. The next 24 bits are an object class, identifying the kind of product; the last 36 bits are a unique serial number for a particular tag. These last two fields are set by the organization that issued the tag. Rather like aURL, the total electronic product code number can be used as a key into a global database to uniquely identify a particular product Often more than one tag will respond to a tag reader, for example, many individual products with tags may be shipped in a common box or on a common pallet. Collision detection is important to allow reading of data. Two different types of protocols are used to"singulate"a particular tag, allowing its data to be read in the midst of many similar tags. In aslotted Alohasystem, the reader broadcasts an initialization command and a parameter that the tags individually use to pseudo-randomly delay their responses. When using an "adaptive binary tree" protocol, the reader sends an initialization symbol and then transmits one bit of ID data at a time; only tags with matching bits respond, and eventually only one tag matches the complete ID string

Both methods have drawbacks when used with many tags or with multiple overlapping readers.Bulk readingis a strategy for interrogating multiple tags at the same time, but lacks sufficient precision for inventory control.

MiniaturizationRFIDs are easy to conceal or incorporate in other items. For example, in 2009 researchers atBristol Universitysuccessfully glued RFID micro-transponders to liveantsin order to study their behavior.This trend towards increasingly miniaturized RFIDs is likely to continue as technology advances.

Hitachi holds the record for the smallest RFID chip, at 0.05mm 0.05mm. This is 1/64th the size of the previous record holder, the mu-chip. Manufacture is enabled by using thesilicon-on-insulator(SOI) process. These dust-sized chips can store 38-digit numbers using 128-bitRead Only Memory(ROM).A major challenge is the attachment of antennas, thus limiting read range to only millimeters.The RFID tag can be affixed to an object and used to track and manage inventory, assets, people, etc. For example, it can be affixed to cars, computer equipment, books, mobile phones, etc.

RFID offers advantages over manual systems or use ofbarcodes. The tag can be read if passed near a reader, even if it is covered by the object or not visible. The tag can be read inside a case, carton, box or other container, and unlike barcodes, RFID tags can be read hundreds at a time. Barcodes can only be read one at a time using current devices.

RFID APPLICATIONS

RFID can be used in a variety of applications,such as:

Access management

Tracking of goods

Tracking of persons and animals

Toll collection andcontactless payment Machine readable travel documents Smartdust(for massively distributedsensornetworks)

Tracking sports memorabilia to verify authenticity

Airport baggage tracking logistics[18]Asset managementRFID combined withmobile computingand Web technologies provide a way for organizations to identify and manage their assets. Mobile computers, with integrated RFID readers, can now deliver a complete set of tools that eliminate paperwork, give proof of identification and attendance. This approach eliminates manual data entry.

Web based management tools allow organizations to monitor their assets and make management decisions from anywhere in the world. Web based applications now mean that third parties, such as manufacturers and contractors can be granted access to update asset data, including for example, inspection history and transfer documentation online ensuring that the end user always has accurate, real-time data. Organizations are already using RFID tags combined with a mobile asset management solution to record and monitor the location of their assets, their current status, and whether they have been maintained.

RFID is being adopted foritem-levelretail uses. Aside from efficiency and product availability gains, the system offers a superior form ofelectronic article surveillance(EAS), and a superiorself checkoutprocess for consumers.

Inventory systemsAn advanced automatic identification technology based on RFID technology has significant value for inventory systems. The system can provide accurate knowledge of the current inventory. In an academic study[citation needed]performed at Wal-Mart, RFID reduced Out-of-Stocks by 30 percent for products selling between 0.1 and 15 units a day. The RFID can also help the company to ensure the security of the inventory. With the just in time tracking of inventory through RFID, the computer data can show whether the inventory stored in the warehouse is correct with quantity currently. Other benefits of using RFID include the reduction of labor costs, the simplification of business processes, and the reduction of inventory inaccuracies.

Product trackingRFID use in product tracking applications begins with plant-based production processes, and then extends into post-salesconfiguration managementpolicies for large buyers.

RFID antenna for vehicular access control

RFID can also be used for supply chain management in the fashion industry. The RFID label is attached to the garment at production, can be read/traced throughout the entire supply chain and is removed at the point of sale (POS).

Access controlRFID tags are widely used inidentification badges, replacing earliermagnetic stripecards. These badges need only be held within a certain distance of the reader to authenticate the holder. Tags can also be placed on vehicles, which can be read at a distance, to allow entrance to controlled areas without having to stop the vehicle and present a card or enter an access code.

Social mediaFacebook is using RFID cards at most of their live events to allow guests to automatically capture and post photos. The automotive brands have adopted RFID for social media product placement more quickly than other industries

To prevent retailers diverting products, manufacturers are exploring the use of RFID tags on promoted merchandise so that they can track exactly which product has sold through the supply chain at fully discounted prices.

Transportation and logistics[Logistics and transportation are major areas of implementation for RFID technology. Yard management, shipping and freight and distribution centers use RFID tracking technology. In therailroadindustry, RFID tags mounted on locomotives and rolling stock identify the owner, identification number and type of equipment and its characteristics. This can be used with a database to identify thelading, origin, destination, etc. of the commodities being carried.

In commercial aviation, RFID technology is being incorporated to support maintenance n commercial aircraft. RFID tags are used to identify baggage and cargo at several airports and airlines. Some countries are using RFID technology for vehicle registration and enforcement. RFID can help detect and retrieve stolen cars.

Hose stations and Conveyance of fluidsThe RFID antenna in a permanently installed coupling half (fixed part) unmistakably identifies the RFID transponder placed in the other coupling half (free part) after completed coupling. When connected, the transponder of the free part transmits all important information contactlessly to the fixed part. The couplings location can be clearly identified by the RFID transponder coding. Then, the controller is enabled to automatically start subsequent process steps.

Complement to barcodeRFID tags are often a complement, but not a substitute, forUPCorEANbarcodes. They may never completely replace barcodes, due in part to their higher cost and the advantage of multiple data sources on the same object. Also, unlike RFID labels, barcodes can be generated and distributed electronically,e.g.via e-mail or mobile phone, for printing or display by the recipient. An example is airlineboarding passes. The newEPC, along with several other schemes, is widely available at reasonable cost.

The storage of data associated with tracking items will require manyterabytes. Filtering and categorizing RFID data is needed to create useful information. It is likely that goods will be tracked by the pallet using RFID tags, and at package level with Universal Product Code (UPC) orEANfrom unique barcodes.

The unique identity is a mandatory requirement for RFID tags, despite special choice of the numbering scheme. RFID tag data capacity is large enough that each individual tag will have a unique code, while current barcodes are limited to a single type code for a particular product. The uniqueness of RFID tags means that a product may be tracked as it moves from location to location, finally ending up in the consumer's hands. This may help to combat theft and other forms of product loss. The tracing of products is an important feature that gets well supported with RFID tags containing a unique identity of the tag and also the serial number of the object. This may help companies cope with quality deficiencies and resulting recall campaigns, but also contributes to concern about tracking and profiling of consumers after the sale.

It has also been proposed to use RFID forPOSstore checkout to replace thecashierwith an automatic system which needs no barcode scanning. In the past this was not possible due to the higher cost of tags and existing POS process technologies. However, Industry Standard, a couture shop and recording studio in Ohio has successfully implemented a POS procedure that allows faster transaction throughput. An FDA-nominated task force concluded, after studying the various technologies currently commercially available, which of those technologies could meet the pedigree requirements. Amongst all technologies studied including bar coding, RFID seemed to be the most promising and the committee felt that the pedigree requirement could be met by easily leveraging something that is readily available.

TelemetryActive RFID tags also have the potential to function as low-cost remote sensors that broadcasttelemetryback to a base station. Applications of tagometry data could include sensing of road conditions by implanted beacons, weather reports, and noise level monitoring. Passive RFID tags can also report sensor data. For example, theWireless Identification and Sensing Platformis a passive tag that reports temperature, acceleration and capacitance to commercial Gen2 RFID readers.

It is possible that active or battery-assisted passive (BAP) RFID tags, used with or in place of barcodes, could broadcast a signal to an in-store receiver to determine whether the RFID tag (product) is in the store.

LCD (liquid crystal display):

LCD stands for liquid crystal display. They come in many sizes 8x1 , 8x2 , 10x2 , 16x1 , 16x2 , 16x4 , 20x2 , 20x4 ,24x2 , 30x2 , 32x2 , 40x2 etc.Many multinational companies likePhilipsHitachiPanasonicmake their own special kind ofLCDs to be used in their products. All the LCDs performs the same functions (display characters numbers special charactersASCIIcharacters etc).Theirprogramming is also same and they all have same 14 pins (0-13) or 16 pins (0 to 15). Eight (8) of them all are data pins that takes data fromthe external unit and display it on the screen. One vcc takes 5 volts to turn on the LCD and GND a ground and one iscontrast (we use it to set the contract colour of thealphabets(with respect to LCD) that appears on the LCD).

LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and circuits. These modules are preferred overseven segmentsand other multi segmentLEDs. The reasons being: LCDs are economical; easily programmable; have no limitation of displaying special & evencustom characters(unlike in seven segments), animations and so on.

A16x2 LCDmeans it can display 16 characters per line and there are 2 such lines. In this LCD each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely, Command and Data.The command register stores the command instructions given to the LCD. A command is an instruction given to LCD to do a predefined task like initializing it, clearing its screen, setting the cursor position, controlling display etc. The data register stores the data to be displayed on the LCD. The data is the ASCII value of the character to be displayed on the LCD. Click to learn more about internal structure of aLCD.PIN DIAGRAM:

Circuit diagram:

RS(registerset): Is used to distinguish between commands and data. When it is 1 it means that some data iscomingto LCD (by data imean some characters orASCIIcharacters) and when it is 0 it means that some command is approaching to LCD fromexternal unit (usually amicro controller) by commands i mean that a instruction for LCD iscomingfor example movecursor one step back or forward turn on or off cursor etc. RW(read-write): This pin most often remains 0 becausewhenit is 0 it means we arewritingto LCD module writing anything data orcommand. When it is 1 it means we are reading LCD.EN(Enable): This enable signal is very important. When it is 1 it provides an extra beem to LCD to display the character that the data pinsarecaring. After displaying the character it then comes back to normal state 0.Two extra pins on some LCD are for background display one pin represents background display apply 5 volts toturn on background display or 0 volts to turn off background display.

The data which we send to our LCD can be any alphabet (small or big), digit orASCIIcharacter. We cannot send an integer, float, long, double type data to LCD because LCD is designed to display a characteronly. The 8 data pins on LCD carries only ASCII8-bit code of the character to LCD. However we can convert our data incharacter type array and send one by one our data toLCD. Datacan be sent using 8-bit 0r 4-bit mode. If 4-bitmode is used, two nibbles of data (First high four bits and then low four bits with an E Clockpulse with each nibble) are sent to complete a full eight-bit transfer.8-bit mode is best used when speed is required in an application and at least ten I/O pinsare available. 4-bit mode requires a minimum of six bits. In 4-bit mode, only the top 4 databits (DB4-7) are used.

LCD Commands:

Thecommand0x30 means we are setting 8-bit mode LCD having 1 line and we areinitializingit to be 5x7 character display. Now this 5x7 is something which everyone should know what it stands for.Usually the characters aredisplayedon LCD in 5x8 matrices form. Where 5 is total number ofcoulombsand isnumber of rows. Thus the above 0x30 command initializes the LCD to display character in 5coulombsand 7 rows thelast row we usually leave for our cursor to move or blink etc.

The command 0x38 means we are setting 8-bit mode LCD having two lines and character shape between 5x7 matrixes.

The command 0x20 means we are setting 4-bit mode LCD having 1 line and character shape between 5x7 matrixes.

The command 0x28 means we are setting 4-bit mode LCD having 2 lines and character shape between 5x7 matrixes.

The command 0x06 is entry mode it tells the LCD that we are going to use you.

The command 0x08 display cursor off and display off but without clearing DDRAM contents.

The command 0x0E displays cursor on and dispaly on.

The command 0x0c display on cursor off(displays cursor off but the text will appear on LCD)

The command 0x0F dispaly on cursor blink (text will appear on screen and cursor will blink).

The command 0x18 shift entire dispaly left (shift whole off the text on the particular line to its left).

The command 0x1C shift entire dispaly right (shift whole off the text on the particular line to its right).

The command 0x10 Moves cursor one step left or move cursor on step ahead to left whenever new character is displayedon the screen.

The command 0x14 Moves cursor one step right or move cursor on step ahead to right whenever new character is displayed on the screen.

The command 0x01 clear all the contents of the DDRAM and also clear the LCD removes all the text from the screen.

The command 0x80 initialize the cursor to the first position means first line first matrix (start point) now if we add1 in 0x80+1=0x81 the cursor moves to second matrix forexample16x1 LCDdisplays16 characters only the first will appearon 0x80 second 0x81 third 0x82 and so on until last the 16 once onaddress0xFF.

Before you send commands and data to your LCD, the LCD must first be initialized .This initialization is very important for LCD that are made by Hitachibecause they use HD44780 driver chipsets that is to be initialized first otherwise you will see nothing on your LCD.

For 8-bit mode, this is done as follows:1. Wait more than 15 msecs after power is applied.2. Write command 0x030 to LCD and wait 5 msecs for the instruction to complete3. Write command 0x030 to LCD and wait 160 secs for instruction to complete4. Write command 0x030 AGAIN to LCD and wait 160 secs or Poll the Busy Flag).In 4-bit mode, the high nibble is sent before the low nibble and the E pin is toggled eachtime four bits is sent to the LCD. To initialize in 4-bit mode:1. Wait more than 15 msecs after power is applied.2. Write command 0x03 to LCD and wait 5 msecs for the instruction to complete3. Write command 0x03 to LCD and wait 160 secs for instruction to complete4. Write command 0x03 AGAIN to LCD and wait 160 secs (or poll the Busy Flag) Write 0x02 to the LCD to Enable 4-Bit Mode