Vous êtes sur la page 1sur 24

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 former

EXISTING SYSTEM:

PROPOSED SYSTEM:

CHAPTER II
HARDWARE DESCRIPTIONS

BLOCK DIAGRAM:

LCD

RF ID CARD

ALARM

RF ID CARD
READER

MCU

KEYS
CONTAINER
CONTROL
ELEMENTS

VALVE

VESSEL

HARDWARE COMPONENTS:

Microcontroller unit
RFID
ALARM

SOFTWARE COMPONENTS:
PIC C Compiler

MICROCONTROLLER 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 PIC16F877


The memory of a PIC 16F877 chip is divided into 3 sections. They are
Program memory
Data memory and
Data EEPROM
1. Program memory
Program 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 Organization
The 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 FLASH


The 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 onchip 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 of radiofrequency electromagnetic fields to 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 passive transponder to emit
microwaves or UHF radiowaves (i.e., electromagnetic radiation at high frequencies).
Others use a local power source such as a battery, and may operate at hundreds of meters.
Unlike a barcode, 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 even implanted
within people, the possibility of reading personally-linked information without consent
has raised privacy concerns.
RFID stands for Radio-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 highfrequency 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
on RFID 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 are reader collision and tag 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. See Problems with RFID for more details.

TAGS
A radio-frequency identification system uses tags, or labels attached to the objects
to be identified. Two-way radio transmitter-receivers called interrogators or readers send
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, readmultiple; "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: an integrated circuit for storing and
processing

information, modulating and demodulating a radio-frequency (RF)

signal,

collecting DC power from the incident reader signal, and other specialized functions; and
an antenna for 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. A Passive 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.60 m), allowing flexibility in
applications such as asset protection and supervision.
An Active Reader Passive Tag (ARPT) system has an active reader, which
transmits interrogator signals and also receives authentication replies from passive tags.
An Active 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

Signaling
Signaling 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 this near field region, 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 canbackscatter a 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
An Electronic 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 a URL, 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 a slotted
Aloha system, 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 reading is a strategy for interrogating multiple tags at the same time, but
lacks sufficient precision for inventory control.
Miniaturization
RFIDs are easy to conceal or incorporate in other items. For example, in 2009
researchers at Bristol University successfully glued RFID micro-transponders to
live ants in 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 the silicon-on-insulator (SOI) process. These dust-sized chips can store 38-digit
numbers using 128-bit Read 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 of barcodes. 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 and contactless payment

Machine readable travel documents

Smartdust (for massively distributed sensor networks)

Tracking sports memorabilia to verify authenticity

Airport baggage tracking logistics[18]

Asset management
RFID combined with mobile computing and 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 for item-level retail uses. Aside from efficiency and
product availability gains, the system offers a superior form of electronic article
surveillance (EAS), and a superior self checkout process for consumers.
Inventory systems
An 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 tracking
RFID use in product tracking applications begins with plant-based production processes,
and then extends into post-sales configuration management policies 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 control
RFID tags are widely used in identification badges, replacing earlier magnetic
stripe cards. 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 media
Facebook 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 the railroadindustry, 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 the lading, 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 fluids


The 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 barcode
RFID

tags

are

often

complement,

but

not

substitute,

for UPC or EAN barcodes. 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 email or mobile phone, for printing or display by the recipient. An example is
airline boarding passes. The new EPC, along with several other schemes, is widely
available at reasonable cost.
The storage of data associated with tracking items will require many terabytes.
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) or EAN from 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 for POS store checkout to replace
the cashier with 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.
Telemetry

Active RFID tags also have the potential to function as low-cost remote sensors
that broadcast telemetry back 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, the Wireless
Identification and Sensing Platform is 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 like Philips Hitachi Panasonic make their own special kind of LCDs to be
used in their products. All the LCDs performs the same functions (display characters
numbers special characters ASCII characters etc).Their programming 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 from the external unit and display it on the screen. One vcc takes 5 volts to
turn on the LCD and GND a ground and one is contrast (we use it to set the contract
colour of the alphabets (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 over seven
segments and other multi segment LEDs. The reasons being: LCDs are economical;
easily programmable; have no limitation of displaying special & even custom
characters (unlike

in

seven

segments),

animations

and

so

on.

A 16x2 LCD means 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 a LCD.
PIN DIAGRAM:

Circuit diagram:

RS(register set):
Is used to distinguish between commands and data. When it is 1 it means that
some data is coming to LCD (by data i mean some characters or ASCII characters) and
when it is 0 it means that some command is approaching to LCD from external unit
(usually a micro controller) by commands i mean that a instruction for LCD
is coming for example move cursor one step back or forward turn on or off cursor etc.
RW(read-write):

This pin most often remains 0 because when it is 0 it means we are writing to
LCD module writing anything data or command. 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 pins are caring. 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 to turn 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
or ASCII character.
We cannot send an integer, float, long, double type data to LCD because LCD is
designed to display a character only. The 8 data pins on LCD carries only ASCII 8-bit
code of the character to LCD. However we can convert our data in character type array
and send one by one our data to LCD. Data can be sent using 8-bit 0r 4-bit mode. 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.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 (DB47) are used.
LCD Commands:
The command 0x30 means we are setting 8-bit mode LCD having 1 line and we
are initializing it to be 5x7 character display. Now this 5x7 is something which everyone
should know what it stands for. Usually the characters are displayed on LCD in 5x8
matrices form. Where 5 is total number of coulombs and is number of rows. Thus the
above 0x30 command initializes the LCD to display character in 5 coulombs and 7 rows
the last 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 displayed on 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 add 1 in 0x80+1=0x81 the cursor moves to
second matrix for example 16x1 LCD displays 16 characters only the first will
appear on 0x80 second 0x81 third 0x82 and so on until last the 16 once
on address 0xFF.
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 Hitachi because 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 complete
3. Write command 0x030 to LCD and wait 160 secs for instruction to complete
4. 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 each
time 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 complete
3. Write command 0x03 to LCD and wait 160 secs for instruction to complete
4. 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

Vous aimerez peut-être aussi