You are on page 1of 38

RFID SMART SHOPPING CART

1.INTRODUCTION
OVERVIEW
Supermarket is the place where customers come to purchase their daily using products
and pay for that. So there is need to calculate how many products are sold and to generate the
bill for the customer. Cashier’s desks are placed in a position to promote circulation. At
present, many supermarket chains are attempting to further reduce labor costs by shifting to
self-service checkout machines, where a single employee can oversee a group of four or five
machines at once, assisting multiple customers at time. An RFID reader is a device that is
used to interrogate an RFID tag. The reader has an antenna that emits radio waves; the tag
responds by sending back its data. An RFID tag is a microchip combined with an antenna in a
compact package; the packaging is structured to allow the RFID tag to be attached to an
object to be tracked. "RFID" stands for Radio Frequency Identification. The tag's antenna
picks up signals from an RFID reader or scanner and then returns the signal, usually with
some additional data.

1.1 Embedded System

An embedded system is a special-purpose computer system designed to perform one


or a few dedicated functions, sometimes with real-time computing constraints. It is usually
embedded as part of a complete device including hardware and mechanical parts. In contrast,
a general-purpose computer, such as a personal computer, can do many different tasks
depending on programming. Embedded systems have become very important today as they
control many of the common devices we use.

Since the embedded system is dedicated to specific tasks, design engineers can
optimize it, reducing the size and cost of the product, or increasing the reliability and
performance. Some embedded systems are mass-produced, benefiting from economies of
scale.

Physically, embedded systems range from portable devices such as digital watches
and MP3 players, to large stationary installations like traffic lights, factory controllers, or the
systems controlling nuclear power plants. Complexity varies from low, with a single

ECE Department, NNRESI


RFID SMART SHOPPING CART

microcontroller chip, to very high with multiple units, peripherals and networks mounted
inside a large chassis or enclosure.

In general, "embedded system" is not an exactly defined term, as many systems have
some element of programmability. For example, Handheld computers share some elements
with embedded systems — such as the operating systems and microprocessors which power
them — but are not truly embedded systems, because they allow different applications to be
loaded and peripherals to be connected.

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


fixed in capability or programmable, that is specifically designed for a particular kind of
application device. Industrial machines, automobiles, medical equipment, cameras, household
appliances, airplanes, vending machines, and toys (as well as the more obvious cellular phone
and PDA) are among the myriad possible hosts of an embedded system. Embedded systems
that are programmable are provided with a programming interface, and embedded systems
programming is a specialized occupation.

Certain operating systems or language platforms are tailored for the embedded
market, such as Embedded Java and Windows XP Embedded. However, some low-end
consumer products use very inexpensive microprocessors and limited storage, with the
application and operating system both part of a single program. The program is written
permanently into the system's memory in this case, rather than being loaded into RAM
(random access memory), as programs on a personal computer are.

1.2 Applications of Embedded System

We are living in the Embedded World. You are surrounded with many embedded
products and your daily life largely depends on the proper functioning of these gadgets.
Television, Radio, CD player of your living room, Washing Machine or Microwave Oven in
your kitchen, Card readers, Access Controllers, Palm devices of your work space enable you
to do many of your tasks very effectively. Apart from all these, many controllers embedded
in your car take care of car operations between the bumpers and most of the times you tend to
ignore all these controllers.

ECE Department, NNRESI


RFID SMART SHOPPING CART

In recent days, you are showered with variety of information about these embedded
controllers in many places. All kinds of magazines and journals regularly dish out details
about latest technologies, new devices; fast applications which make you believe that your
basic survival is controlled by these embedded products. Now you can agree to the fact that
these embedded products have successfully invaded into our world. You must be wondering
about these embedded controllers or systems. What is this Embedded System?

The computer you use to compose your mails, or create a document or analyze the
database is known as the standard desktop computer. These desktop computers are
manufactured to serve many purposes and applications.

You need to install the relevant software to get the required processing facility. So,
these desktop computers can do many things. In contrast, embedded controllers carryout a
specific work for which they are designed. Most of the time, engineers design these
embedded controllers with a specific goal in mind. So these controllers cannot be used in any
other place.

Theoretically, an embedded controller is a combination of a piece of microprocessor


based hardware and the suitable software to undertake a specific task.

These days designers have many choices in microprocessors/microcontrollers.


Especially, in 8 bit and 32 bit, the available variety really may overwhelm even an
experienced designer. Selecting a right microprocessor may turn out as a most difficult first
step and it is getting complicated as new devices continue to pop-up very often.

In the 8 bit segment, the most popular and used architecture is Intel's 8031. Market
acceptance of this particular family has driven many semiconductor manufacturers to develop
something new based on this particular architecture. Even after 25 years of existence,
semiconductor manufacturers still come out with some kind of device using this 8031 core.

1.2.1 Military and aerospace software applications

From in-orbit embedded systems to jumbo jets to vital battlefield networks, designers of
mission-critical aerospace and defense systems requiring real-time performance, scalability,
and high-availability facilities consistently turn to the LynxOS® RTOS and the LynxOS-178
RTOS for software certification to DO-178B.

ECE Department, NNRESI


RFID SMART SHOPPING CART

Rich in system resources and networking services, LynxOS provides an off-the-shelf


software platform with hard real-time response backed by powerful distributed computing
(CORBA), high reliability, software certification, and long-term support options.

The LynxOS-178 RTOS for software certification, based on the RTCA DO-178B
standard, assists developers in gaining certification for their mission- and safety-critical
systems. Real-time systems programmers get a boost with LynuxWorks' DO-178B RTOS
training courses.

LynxOS-178 is the first DO-178B and EUROCAE/ED-12B certifiable, POSIX®-


compatible RTOS solution.

1.2.2 Communications applications

"Five-nines" availability, Compact PCI hot swap support, and hard real-time response—
LynxOS delivers on these key requirements and more for today's carrier-class systems.
Scalable kernel configurations, distributed computing capabilities, integrated
communications stacks, and fault-management facilities make LynxOS the ideal choice for
companies looking for a single operating system for all embedded telecommunications
applications—from complex central controllers to simple line/trunk cards.

LynuxWorks Jumpstart for Communications package enables OEMs to rapidly develop


mission-critical communications equipment, with pre-integrated, state-of-the-art, data
networking and porting software components—including source code for easy customization.

The Lynx Certifiable Stack (LCS) is a secure TCP/IP protocol stack designed especially
for applications where standards certification is required.

1.2.3 Electronics applications and consumer devices

As the number of powerful embedded processors in consumer devices continues to rise,


the BlueCat® Linux® operating system provides a highly reliable and royalty-free option for
systems designers.
4

ECE Department, NNRESI


RFID SMART SHOPPING CART

And as the wireless appliance revolution rolls on, web-enabled navigation systems,
radios, personal communication devices, phones and PDAs all benefit from the cost-effective
dependability, proven stability and full product life-cycle support opportunities associated
with BlueCat embedded Linux. BlueCat has teamed up with industry leaders to make it easier
to build Linux mobile phones with Java integration.

For makers of low-cost consumer electronic devices who wish to integrate the LynxOS
real-time operating system into their products, we offer special MSRP-based pricing to
reduce royalty fees to a negligible portion of the device's MSRP.

1.2.4 Industrial automation and process control software

Designers of industrial and process control systems know from experience that
LynuxWorks operating systems provide the security and reliability that their industrial
applications require.

From ISO 9001 certification to fault-tolerance, POSIX conformance, secure partitioning


and high availability, we've got it all. Take advantage of our 20 years of experience.

1.3 Microcontroller Versus Microprocessor

What is the difference between a Microprocessor and Microcontroller? By


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

A system designer using a general-purpose microprocessor such as the Pentium or the


68040 must add RAM, ROM, I/O ports, and timers externally to make them functional.
Although the addition of external RAM, ROM, and I/O ports makes these systems bulkier

ECE Department, NNRESI


RFID SMART SHOPPING CART

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.

1.4 Microcontrollers For Embedded Systems

In the Literature discussing microprocessors, we often see the term Embedded


System. Microprocessors and Microcontrollers are widely used in embedded system
products. An embedded system product uses a microprocessor (or Microcontroller) to do one
task only. A printer is an example of embedded system since the processor inside it performs
one task only; namely getting the data and printing it. Contrast this with a Pentium based PC.
A PC can be used for any number of applications such as word processor, print-server, bank
teller terminal, Video game, network server, or Internet terminal. Software for a variety of
applications can be loaded and run. Of course the reason a pc can perform myriad tasks is that
it has RAM memory and an operating system that loads the application software into RAM
memory and lets the CPU run it.

In an Embedded system, there is only one application software that is typically burned
into ROM. An x86 PC contains or is connected to various embedded products such as
keyboard, printer, modem, disk controller, sound card, CD-ROM drives, mouse, and so on.
Each one of these peripherals has a Microcontroller inside it that performs only one task. For
example, inside every mouse there is a Microcontroller to perform the task of finding the
mouse position and sending it to the PC. Table 1-1 lists some embedded products.

ECE Department, NNRESI


RFID SMART SHOPPING CART

2. AVR MICROCONTROLLERS

2.1 Atmel mega AVR microcontrollers:

Atmel® megaAVR® microcontrollers (MCUs) are the ideal choice for designs
that need some extra muscle. For applications requiring large amounts of code, megaAVR
devices offer substantial program and data memories with performance up to 20 MIPS.
Meanwhile, innovative Atmel picoPower® technology minimizes power consumption.
All megaAVR devices offer self-programmability for fast, secure, cost-effective in-circuit
upgrades. You can even upgrade the Flash memory while running your application.

Based on proven, industry-leading technology, the megaAVR family offers our


widest selection of devices in terms of memories, pin-counts and peripherals. These
include everything from general-purpose devices to models with specialized peripherals
like Peripheral Touch Controller (PTC), USB, LCD controllers, as well as CAN, LIN and
Power Stage Controllers (PSC). You will easily find the perfect fit for your project in the
megaAVR product family. All these devices are supported by the Atmel Studio
development platform, which further reduces your time-to-market.

2.2 Key Features:

 Broad family — The megaAVR family offers our widest selection of devices in
terms of memories, pin counts and peripherals, enabling reuse of code and
knowledge across projects.

 picoPower technology — Selected megaAVR devices feature ultra-low power


consumption and individually selectable low-power sleep modes that make them
ideal for battery-powered applications.

 High integration — Devices feature on-chip Flash, SRAM, internal EEPROM,


SPI, TWI (I 2 C), and USART, USB, CAN, and LIN, watchdog timer, a choice of
internal or external precision oscillator, and general-purpose I/O pins, simplifying
your design and reducing the bill-of-materials.

 Analog functions — Advanced analog capabilities include ADC, DAC, a built-in


temperature sensor and internal voltage reference, brown out detector, a fast

ECE Department, NNRESI


RFID SMART SHOPPING CART

analog comparator and a programmable analog gain amplifier. This high level of
integration allows designs with fewer external analog components.

 Rapid development — megaAVR MCUs speed development with powerful in-


system programming and on-chip debug. In addition, in-system programming
simplifies production line programming and field upgrades.

 IoT ready — The IoT (Internet of Things) can extend to almost any application—
from typical building and home automation to medical and healthcare systems. IoT
designs typically require some form of processing power to perform embedded
computing tasks and transmit data to the Internet. Increasingly, these devices are
battery driven, thus power consumption often becomes the key success factor for a
user-friendly IoT-enabled product. megaAVR devices are among the best MCUs
in the world when it comes to power consumption, making them a natural choice
for IoT applications.

 High Performance, Low Power AVR® 8-Bit Microcontroller

 Advanced RISC Architecture – 135 Powerful Instructions – Most Single Clock


Cycle Execution – 32 x 8 General Purpose Working Registers – Fully Static
Operation – Up to 16 MIPS Throughput at 16MHz – On-Chip 2-cycle Multiplier

 Non-volatile Program and Data Memories – 16/32KB of In-System Self-


Programmable Flash – 1.25/2.5KB Internal SRAM – 512Bytes/1KB Internal
EEPROM – Write/Erase Cycles: 10,000 Flash/100,000 EEPROM C(1)C/ 100
years at 25– Data retention: 20 years at 85 – Optional Boot Code Section with
Independent Lock Bits In-System Programming by On-chip Boot Program True
Read-While-Write Operation Parts using external XTAL clock are pre-programed
with a default USB bootloader – Programming Lock for Software Security

 JTAG (IEEE® std. 1149.1 compliant) Interface – Boundary-scan Capabilities


According to the JTAG Standard – Extensive On-chip Debug Support –
Programming of Flash, EEPROM, Fuses, and Lock Bits through the JTAG
Interface

 USB 2.0 Full-speed/Low Speed Device Module with Interrupt on Transfer


Completion – Complies fully with Universal Serial Bus Specification Rev 2.0 –
8

ECE Department, NNRESI


RFID SMART SHOPPING CART

Supports data transfer rates up to 12Mbit/s and 1.5Mbit/s – Endpoint 0 for Control
Transfers: up to 64-bytes – Six Programmable Endpoints with IN or Out
Directions and with Bulk, Interrupt or Isochronous Transfers – Configurable
Endpoints size up to 256 bytes in double bank mode – Fully independent 832 bytes
USB DPRAM for endpoint memory allocation – Suspend/Resume Interrupts –
CPU Reset possible on USB Bus Reset detection – 48MHz from PLL for Full-
speed Bus Operation – USB Bus Connection/Disconnection on Microcontroller
Request – Crystal-less operation for Low Speed mode

 Peripheral Features – On-chip PLL for USB and High Speed Timer: 32 up to
96MHz operation – One 8-bit Timer/Counter with Separate Prescaler and Compare
Mode

2.3 Pin Configuration:

2.1 Pin diagram of ATmega32U4

ECE Department, NNRESI


RFID SMART SHOPPING CART

2.4 Overview:

The ATmega16U4/ATmega32U4 is a low-power CMOS 8-bit microcontroller based on


the AVR enhanced RISC architecture. By executing powerful instructions in a single
clock cycle, the device achieves throughputs approaching 1 MIPS per MHz allowing the
system designer to optimize power consumption versus processing speed.

The AVR core combines a rich instruction set with 32 general purpose working registers.
All the 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing
two independent registers to be accessed in one single instruction executed in one clock
cycle. The resulting architecture is more code efficient while achieving throughputs up to
ten times faster than conventional CISC microcontrollers. The device provides the
following features: 16/32K bytes of In-System Programmable Flash with Read-While
Write capabilities, 512Bytes/1K bytes EEPROM, 1.25/2.5K bytes SRAM, 26 general
purpose I/O lines (CMOS outputs and LVTTL inputs), 32 general purpose working
registers, four flexible Timer/Counters with compare modes and PWM, one more high-
speed Timer/Counter with compare modes and PLL adjustable source, one USART
(including CTS/RTS flow control signals), a byte oriented 2-wire Serial Interface, a 12-
channels 10-bit ADC with optional differential input stage with programmable gain, an
on-chip calibrated temperature sensor, a programmable Watchdog Timer with Internal
Oscillator, an SPI serial port, IEEE std. 1149.1 compliant JTAG test interface, also used
for accessing the On-chip Debug system and programming and six software selectable
power saving modes. The Idle mode stops the CPU while allowing the SRAM,
Timer/Counters, SPI port, and interrupt system to continue functioning. The Power-down
mode saves the register contents but freezes the Oscillator, disabling all other chip
functions until the next interrupt or Hardware Reset. The ADC Noise Reduction mode
stops the CPU and all I/O modules except ADC, to minimize switching noise during ADC
conversions. In Standby mode, the Crystal/Resonator Oscillator is running while the rest
of the device is sleeping. This allows very fast start-up combined with low power
consumption. The device is manufactured using the Atmel® high-density nonvolatile
memory technology. The On-chip ISP Flash allows the program memory to be
reprogrammed in-system through an SPI serial interface, by a conventional nonvolatile
memory programmer, or by an On-chip Boot program running on the AVR core. The boot
10

ECE Department, NNRESI


RFID SMART SHOPPING CART

program can use any interface to download the application program in the application
Flash memory. Software in the Boot Flash section will continue to run while the
Application Flash section is updated, providing true Read-While-Write operation. By
combining an 8-bit RISC CPU with In-System Self-Programmable Flash on a monolithic
chip, the device is a powerful microcontroller that provides a highly flexible and cost
effective solution to many embedded control applications. The
ATmega16U4/ATmega32U4 AVR is supported with a full suite of program and system
development tools including: C compilers, macro assemblers, program
debugger/simulators, in-circuit emulators, and evaluation kits.

2.5 Pin Descriptions

 VCC Digital supply voltage.

 GND Ground.

 Port B (PB7..PB0)

Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The Port B output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port B pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port B pins are tristated when a reset
condition becomes active, even if the clock is not running. Port B has better driving
capabilities than the other ports. Port B also serves the functions of various special
features of the device as listed on page 74.

 Port C (PC7,PC6)

Port C is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The Port C output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port C pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port C pins are tristated when a reset
condition becomes active, even if the clock is not running. Only bits 6 and 7 are present
on the product pinout. Port C also serves the functions of special features of the device as
listed on page 77.

 Port D (PD7..PD0)
11

ECE Department, NNRESI


RFID SMART SHOPPING CART

Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The Port D output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port D pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port D pins are tristated when a reset
condition becomes active, even if the clock is not running.

 Port E (PE6,PE2)

Port E is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The Port E output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port E pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port E pins are tristated when a reset
condition becomes active, even if the clock is not running. Only bits 2 and 6 are present
on the product pinout.

 Port F (PF7..PF4, PF1,PF0)

Port F serves as analog inputs to the A/D Converter. Port F also serves as an 8-bit bi-
directional I/O port, if the A/D Converter channels are not used. Port pins can provide
internal pull-up resistors (selected for each bit). The Port F output buffers have
symmetrical drive characteristics with both high sink and source capability. As inputs,
Port F pins that are externally pulled low will source current if the pull-up resistors are
activated. The Port F pins are tri-stated when a reset condition becomes active, even if the
clock is not running. Bits 2 and 3 are not present on the product pinout. Port F also serves
the functions of the JTAG interface. If the JTAG interface is enabled, the pull-up resistors
on pins PF7(TDI), PF5(TMS), and PF4(TCK) will be activated even if a reset occurs.

 DUSB

Full speed / Low Speed Negative Data Upstream Port. Should be connected to the USB
D- connector pin with a serial 22 resistor.

 D+

USB Full speed / Low Speed Positive Data Upstream Port. Should be connected to the
USB D+ connector pin with a serial 22 resistor.

 UGND
12

ECE Department, NNRESI


RFID SMART SHOPPING CART

USB Pads Ground.

 UVCC

USB Pads Internal Regulator Input supply voltage.

 UCAP

USB Pads Internal Regulator Output supply voltage. Should be connected to an external
capacitor (1μF).

 VBUS

USB VBUS monitor input.

 RESET

Reset input. A low level on this pin for longer than the minimum pulse length will
generate a reset, even if the clock is not running.

 XTAL1

Input to the inverting Oscillator amplifier and input to the internal clock operating circuit.

 XTAL2

Output from the inverting Oscillator amplifier.

 AVCC

AVCC is the supply voltage pin (input) for all the A/D Converter channels. If the ADC is
not used, it should be externally connected to VCC. If the ADC is used, it should be
connected to VCC through a low-pass filter.

 AREF

This is the analog reference pin (input) for the A/D Converter.

2.6 Arduino board:


13

ECE Department, NNRESI


RFID SMART SHOPPING CART

Arduino is a computer hardware and software company, project, and user community that
designs and manufactures microcontroller kits for building digital devices and interactive
objects that can sense and control objects in the physical world. The project's products are
distributed as open-source hardware and software, which are licensed under the GNU Lesser
General Public License (LGPL) or the GNU General Public License (GPL),[1] permitting the
manufacture of Arduino boards and software distribution by anyone. Arduino boards are
available commercially in preassembled form, or as do-it-yourself kits.

2.2 Arduino Board

The project's board designs use a variety of microprocessors and controllers. These
systems provide sets of digital and analog input/output (I/O) pins that may be interfaced to
various expansion boards ("shields") and other circuits. The boards feature serial
communications interfaces, including Universal Serial Bus (USB) on some models, for
loading programs from personal computers. The microcontrollers are mainly programmed
using a dialect of features from the programming languages C and C++. In addition to using
traditional compiler toolchains, the Arduino project provides an integrated development
environment (IDE) based on the Processing language project.

The Arduino project started in 2005 as a program for students at the Interaction Design
Institute Ivrea in Ivrea, Italy,[2] aiming to provide a low-cost and easy way for novices and
professionals to create devices that interact with their environment
using sensors and actuators. Common examples of such devices intended for beginner
hobbyists include simple robots, thermostats, and motion detectors.

3. HARDWARE IMPLEMENTATION
14

ECE Department, NNRESI


RFID SMART SHOPPING CART

3.0 Block diagram:

Regulated
Power Supply

RFID Tags

AT89S52 16 X 2 LCD
RFID Reader
Microcontroller

3.1 Block diagram

15

ECE Department, NNRESI


RFID SMART SHOPPING CART

3.2 Circuit Diagram

3.1 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 ,it's much handier to have a variable supply on hand,
especially for testing.

Mainly the microcontroller needs 5 volt power supply. To use these parts we
need to build a regulated 5 volt source. Usually you start with an unregulated power

16

ECE Department, NNRESI


RFID SMART SHOPPING CART

To make a 5 volt power supply, we use a 7805 voltage regulator IC (Integrated


Circuit).

Circuit Features:-

Tab 3.1 Circuit Features

Vout range 1.25V - 37V

Vin - Vout difference 3V - 40V

Operation ambient temperature 0 - 125°C

Output Imax <1.5A

Minimum Load Current max 10Ma

3.2 LCD Interfacing

3.3 16X2 LCD

This section describes the operation modes of LCDs, then describes how to program and
interface an LCD to art .8051 using Assembly and C.

17

ECE Department, NNRESI


RFID SMART SHOPPING CART

LCD operation

In recent years the LCD is finding widespread use replacing LEDs (seven-segment
LEDs or other multisegment LEDs). This is due to the following reasons:

1. The declining prices of LCDs.


2. The ability of display numbers, characters, and graphics. This is ain contrast to LEDs,
which are limited to numbers and a few characters.
3. Incorporation of a refreshing controller into the LCD, thereby relieving the CPU of
the task of refreshing the LCD. In contrast, the LED must be refreshed by the CPU (or
in some other way) to keep displaying the data.
4. Ease of programming for characters and graphics.

Interfacing an LCD to the 8951 Microcontroller

LCD pin descriptions:


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

3.4 Pin Diagram of LCD

18

ECE Department, NNRESI


RFID SMART SHOPPING CART

Tab 3.2 Pin description of LCD

Vcc, Vss, and VEE:

While Vcc and Vss provide +5V and ground, respectively, VEE is used for controlling
LCD contrast.

RS – register select:

There are two very important registers inside the LCD. The RS pin is used for their selection
as follows. If RS = 0, the instruction command code register is selected, allowing the user to
send a command such as clear display, cursor at home, etc. If RS = 1 the data register is
selected, allowing the user to send data to be displayed on the LCD.

R/W – read/write:

R/W input allows the user to write information to the LCD or read information from it. R/W
= 1 when reading; R/W =0 when writing.

19

ECE Department, NNRESI


RFID SMART SHOPPING CART

E – enable:

The enable pin is used by the LCD to latch information presented to its data pins. When data
is supplied to data pins, a high to low pulse must be applied to this pin in order for the LCD
to latch in the data present at the data pins. This pulse must be a minimum of 450 ns wide.

D0 – D7:

The 8 bit data pins, D0 – D7, are used to send information to the LCD or read the contents of
the LCD’s internal registers.

To display letters and numbers, we send ASCII codes for the letters A – Z, a – z, and
numbers 0 – 9 to these pins while making RS = 1.

There are also instructions command codes that can be sent to the LCD to clear the display or
force the cursor to the home position or blink the cursor. Table below lists the instruction
command codes.

20

ECE Department, NNRESI


RFID SMART SHOPPING CART

Tab 3.3 Commands of LCD

LCD Commands table

We also use RS = 0 to check the busy flag bit to see if the LCD is ready to receive
information. The busy flag is D7 and can be read when R/W =1 and RS = 0, as follows: if
R/W =1, RS =0. When D7 = 1(busy flag = 1), the LCD busy taking care of internal
operations and will not accept any new information. When D7 = 0, the LCD is ready to
receive new information. Note: It is recommended to check the busy flag before writing any
data to the LCD.

21

ECE Department, NNRESI


RFID SMART SHOPPING CART

3.5 Interfacing LCD to 89S52

3.3 RFID MODULE:


 Radio frequency identification is a powerful emerging technology that enables
companies to achieve total business visibility. By knowing the identity, location and
conditions of assets, tools, inventory, people and more, companies can optimize
business processes and reduce operational costs. Radio frequency identification
(RFID) is a generic term that is used to describe a system that transmits the identity
(in the form of a unique serial number) of an object or person wirelessly, using radio
waves.

 RFID reader module, are also called as interrogators. They convert radio waves
returned form the RFID tag into a form that can be pressed 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 and supported by our Reader 125 KHz.

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
22

ECE Department, NNRESI


RFID SMART SHOPPING CART

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.

3.6 RFID Reader

3.7 RFID Tag

Components:

A basic RFID system consists of three components:

 An antenna or coil
 A transceiver (with decoder)
 A transponder (RF tag) electronically programmed with unique information.

 The antenna emits radio signals to activate the tag and read and write data to it.
Antennas are available in a variety of shapes and sizes; they can be built into a
doorframe to receive tag data from persons or things passing through the door, or
mounted on an interstate tollbooth to monitor traffic passing by on a freeway.

23

ECE Department, NNRESI


RFID SMART SHOPPING CART

Transceiver:

Often the antenna is packaged with the transceiver and decoder to become a reader
(a.k.a. interrogator), which can be configured either as a handheld or a fixed-mount device.
The reader emits radio waves in ranges of anywhere from one inch to 100 feet or more,
depending upon its power output and the radio frequency used. When an RFID tag passes
through the electromagnetic zone, it detects the reader’s activation signal.

The purpose of an RFID system is to enable data to be transmitted by a portable


device, called a tag, which is read by an RFID reader and processed according to the needs of
a particular application. The data transmitted by the tag may provide identification or location
information, or specifics about the product tagged, such as price, color, date of purchase, etc.
RFID technology has been used by thousands of companies for a decade or more. . RFID
quickly gained attention because of its ability to track moving objects. As the technology is
refined, more pervasive - and invasive - uses for RFID tags are in the works.

A typical RFID tag consists of a microchip attached to a radio antenna mounted on a


substrate. The chip can store as much as 2 kilobytes of data.

To retrieve the data stored on an RFID tag, you need a reader. A typical reader is a
device that has one or more antennas that emit radio waves and receive signals back from the
tag. The reader then passes the information in digital form to a computer system.

More About Antennas

Antennas are the conduits between the tag and the transceiver, which controls the system's
data acquisition and communication. Antennas are available in a variety of shapes and sizes;
they can be built into a door frame to receive tag data from persons or things passing through
the door, or mounted on an interstate toll booth to monitor traffic passing by on a freeway.
The electromagnetic field produced by an antenna can be constantly present when multiple
tags are expected continually. If constant interrogation is not required, the field can be
activated by a sensor device.

Often the antenna is packaged with the transceiver and decoder to become a reader (a.k.a.
interrogator), which can be configured either as a handheld or a fixed-mount device.

24

ECE Department, NNRESI


RFID SMART SHOPPING CART

3.4 RFID Tags

RFID tags come in a wide variety of shapes and sizes. Animal tracking tags, inserted beneath
the skin, can be as small as a pencil lead in diameter and one-half inch in length. Tags can be
screw-shaped to identify trees or wooden items, or credit-card shaped for use in access
applications. The anti-theft hard plastic tags attached to merchandise in stores are RFID tags.
In addition, heavy-duty 5- by 4- by 2-inch rectangular transponders used to track intermodal
containers or heavy machinery, trucks, and railroad cars for maintenance and tracking
applications are RFID tags.

There are a variety of RFID tag types. Selecting the correct tag will be imperative to ensure a
proper functioning system. Selecting the proper tag will be discussed later. Tags can be
placed on wooden or plastic pallets, clothing, embedded into traditional barcode labels,
animals, metal surfaces, and much more.

The data associated with a tag is programmed into the chip. The tag is placed on merchandise
and is activated and read when it is energized by the reader and antenna system.

The IC contains an actual microchip where data is stored. Chips are available in many sizes
and configurations. They can be extremely small to be incorporated into small form factor
RFID tags. The chips' capability to carry data and have that data amended is defined by their
Read/Writecharacteristics.

An RFID tag can take on many form factors and power levels. The unique identifier is
encoded onto the integrated circuit and travels with this data. The data on the RFID IC is
transmitted to a reader through the antenna incorporated onto the tag. RFID tags can be as
tiny as an ant's head, larger than the palm of an adult hand, or any size in between. The form
factor that the RFID tag takes is dictated by factors including power, durability, and lifetime
requirements. Tag characteristics are defined by the application, and can vary in power
requirements, read/write capability, and frequency. RFID tags are developed using a

25

ECE Department, NNRESI


RFID SMART SHOPPING CART

frequency according to the needs of the system including read range and the environment in
which the tag will be read.

Active or Passive RFID …

RFID tags are categorized as either active or passive. Active RFID tags are powered by an
internal battery and are typically read/write, i.e., tag data can be rewritten and/or modified.
An active tag's memory size varies according to application requirements; some systems
operate with up to 1MB of memory. In a typical read/write RFID work-in-process system, a
tag might give a machine a set of instructions, and the machine would then report its
performance to the tag. This encoded data would then become part of the tagged part's
history. The battery-supplied power of an active tag generally gives it a longer read range.
The trade off is greater size, greater cost, and a limited operational life (which may yield a
maximum of 10 years, depending upon operating temperatures and battery type).

Passive RFID tags operate without a separate external power source and obtain operating
power generated from the reader. Passive tags are consequently much lighter than active tags,
less expensive, and offer a virtually unlimited operational lifetime. The trade off is that they
have shorter read ranges than active tags and require a higher-powered reader. Read-only tags
are typically passive and are programmed with a unique set of data (usually 32 to 128 bits)
that cannot be modified. Read-only tags most often operate as a license plate into a database,
in the same way as linear barcodes reference a database containing modifiable product-
specific information.

Frequencies

RFID systems are also distinguished by their frequency ranges.

 Low-frequency or LF (30 KHz to 500 KHz) systems have short reading ranges and
lower system costs. They are most commonly used in security access, asset tracking,
and animal identification applications.
 High-frequency or HF (850 MHz to 950 MHz and 2.4 GHz to 2.5 GHz) systems,
offering long read ranges (greater than 90 feet) and high reading speeds, are used for
such applications as railroad car tracking and automated toll collection. However, the
higher performance of high-frequency RFID systems incurs higher system costs.
26

ECE Department, NNRESI


RFID SMART SHOPPING CART

 Ultra high frequency or UHF

Advantages

The significant advantage of all types of RFID systems is the noncontact, non-line-of-
sight nature of the technology. Tags can be read through a variety of substances such as
snow, fog, ice, paint, crusted grime, and other visually and environmentally challenging
conditions, where bar codes or other optically read technologies would be useless. RFID tags
can also be read in challenging circumstances at remarkable speeds, in most cases responding
in less than 100 milliseconds. The read/write capability of an active RFID system is also a
significant advantage in interactive applications such as work-in-process or maintenance
tracking. Though it is a costlier technology (compared with bar code), RFID has become
indispensable for a wide range of automated data collection and identification applications
that would not be possible otherwise.

Developments in RFID technology continue to yield larger memory capacities, wider reading
ranges, and faster processing. It is highly unlikely that the technology will ultimately replace
bar code — even with the inevitable reduction in raw materials coupled with economies of
scale, the integrated circuit in an RF tag will never be as cost-effective as a barcode label.
However, RFID will continue to grow in its established niches where bar code or other
optical technologies are not effective.

Inventory efficiency - Because line of sight is not required to read RFID tags, inventory can
be performed in a highly efficient method. For example, pallets in a warehouse can be read,
inventoried, and their location can be determined no matter where the tag is placed on the
pallet. This is because the radio waves from the reader are strong enough for the tag to
respond regardless of location.

Return on investment - Though the cost may be high at first, the total cost of ownership
should go down over the years and provide a return on investment (ROI), if the
implementation provides a significant method to improve business processes.

Vulnerability to damage minimized - barcodes can be damaged in many ways. Although, 2D


barcode types such as Data Matrix can be read even when up to 40% of the barcode is
damaged.
27

ECE Department, NNRESI


RFID SMART SHOPPING CART

4. SOFTWARE IMPLEMENTATION

4.1 Arduino Software

Arduino is a prototype platform (open-source) based on an easy-to-use hardware and


software. It consists of a circuit board, which can be programed (referred to as a
microcontroller) and a ready-made software called Arduino IDE (Integrated Development
Environment), which is used to write and upload the computer code to the physical board.
The key features are:
 Arduino boards are able to read analog or digital input signals from different sensors
and turn it into an output such as activating a motor, turning LED on/off, connect to
the cloud and many other actions.
 You can control your board functions by sending a set of instructions to the
microcontroller on the board via Arduino IDE (referred to as uploading software).
 Unlike most previous programmable circuit boards, Arduino does not need an extra
piece of hardware (called a programmer) in order to load a new code onto the board.
You can simply use a USB cable.
 Additionally, the Arduino IDE uses a simplified version of C++, making it easier to
learn to program.
 Finally, Arduino provides a standard form factor that breaks the functions of the
micro-controller into a more accessible package.

28

ECE Department, NNRESI


RFID SMART SHOPPING CART

4.1 Arduino Software Model

4.2 Arduino Installation:


After learning about the main parts of the Arduino UNO board, we are ready to learn how to
set up the Arduino IDE. Once we learn this, we will be ready to upload our program onthe
Arduino board.In this section, we will learn in easy steps, how to set up the Arduino IDE on
our computerand prepare the board to receive the program via USB cable.

4.3 Steps Involved:


Step 1: First you must have your Arduino board (you can choose your favorite board) anda
USB cable. In case you use Arduino UNO, Arduino Duemilanove, Nano, Arduino Mega
2560, or Diecimila, you will need a standard USB cable (A plug to B plug), the kind
youwould connect to a USB printer as shown in the following image.

In case you use Arduino Nano, you will need an A to Mini-B cable instead as shown in the
following image.

29

ECE Department, NNRESI


RFID SMART SHOPPING CART

4.2 USB

Step 2: Download Arduino IDE Software.


You can get different versions of Arduino IDE from the Download page on the Arduino
Official website. You must select your software, which is compatible with your operating
system (Windows, IOS, or Linux). After your file download is complete, unzip the file.

4.3 Arduino IDE model

Step 3: Power up your board.


The Arduino Uno, Mega, Duemilanove and Arduino Nano automatically draw power from
either, the USB connection to the computer or an external power supply. If you are using
an Arduino Diecimila, you have to make sure that the board is configured to draw power
from the USB connection. The power source is selected with a jumper, a small piece of
plastic that fits onto two of the three pins between the USB and power jacks. Check that
it is on the two pins closest to the USB port.
Connect the Arduino board to your computer using the USB cable. The green power LED
30

ECE Department, NNRESI


RFID SMART SHOPPING CART

(labeled PWR) should glow.


Step 4: Launch Arduino IDE.
After your Arduino IDE software is downloaded, you need to unzip the folder. Inside the
folder, you can find the application icon with an infinity label (application.exe). Doubleclick
the icon to start the IDE.

4.4 Installed ARDUINO

Step 5: Open your first project.

Once the software starts, you have two options:

Create a new project.

Open an existing project example.

To create a new project, select File --> New.

31

ECE Department, NNRESI


RFID SMART SHOPPING CART

4.4 Software Model

To open an existing project example, select File -> Example -> Basics -> Blink.

32

ECE Department, NNRESI


RFID SMART SHOPPING CART

4.5 Blink ARDUINO

Here, we are selecting just one of the examples with the name Blink. It turns the LED on

and off with some time delay. You can select any other example from the list.

Step 6: Select your Arduino board.

To avoid any error while uploading your program to the board, you must select the correct

Arduino board name, which matches with the board connected to your computer.

Go to Tools -> Board and select your board.

Here, we have selected Arduino Uno board according to our tutorial, but you must select

the name matching the board that you are using.

Step 7: Select your serial port.

Select the serial device of the Arduino board. Go to Tools -> Serial Port menu. This is
likely to be COM3 or higher (COM1 and COM2 are usually reserved for hardware serial
ports). To find out, you can disconnect your Arduino board and re-open the menu, the entry

33

ECE Department, NNRESI


RFID SMART SHOPPING CART

that disappears should be of the Arduino board. Reconnect the board and select that serial
port.

Step 8: Upload the program to your board.


Before explaining how we can upload our program to the board, we must demonstrate the
function of each symbol appearing in the Arduino IDE toolbar.

A- Used to check if there is any compilation error.


B- Used to upload a program to the Arduino board.
C- Shortcut used to create a new sketch.
D- Used to directly open one of the example sketch.
E- Used to save your sketch.
F- Serial monitor used to receive serial data from the board and send the serial data
to the board.
Now, simply click the "Upload" button in the environment. Wait a few seconds; you will
see the RX and TX LEDs on the board, flashing. If the upload is successful, the message
"Done uploading" will appear in the status bar.
Note: If you have an Arduino Mini, NG, or other board, you need to press the reset button
physically on the board, immediately before clicking the upload button on the Arduino
Software.

34

ECE Department, NNRESI


RFID SMART SHOPPING CART

5. WORKING & RESULT

5.1 Working

An RFID Reader with electronics hardware system in fitted with the trolley to make
the purchase comfortable. All the items are fitted with a RFID card whose price is fixed into
the card. When the item is shown in front of the reader (fitted in the trolley) the amount for
the item is added to the purchase bill and is shown on the LCD Display. Once the items are
added the cost is added up and if it showed again its cost will be removed. This facilitates the
billing system even faster and reduces time.

5.2 Result

Here is the below figure which shows the output of the RFID smart shopping cart
during the scanning of the product with an RFID tag the amount is displayed on the LCD
display.

When the first product is added to the cart by scanning it through the EM 18 module
the amount of the product is displayed on the LCD display. During the second product the
amount of the product is displayed on the LCD.

35

ECE Department, NNRESI


RFID SMART SHOPPING CART

The total amount of tow products is displayed on the LCD display of the summation
of two values is show below:

36

ECE Department, NNRESI


RFID SMART SHOPPING CART

6. CONCLUSION & FUTURE ENHANCEMENT

6.1 Conclusion

The project “RFID SHOPPING CART” has been successfully designed and tested.
It has been developed by integrating features of all the hardware components used. Presence
of every module has been reasoned out and placed carefully thus contributing to the best
working of the unit.
Secondly, using highly advanced IC’s and with the help of growing technology the
project has been successfully implemented.
In this project RFID is used as safety access for the item which thereby enhances the
surveillance performance. This implementation initiates for an automated central billing
system in shopping malls and supermarkets. With this, shoppers no longer have to wait near
counters for payment of bills because of their purchased item information getting transferred
to central billing unit. By this billing process speed increases and becomes much more
simpler. In addition to this capability, the mechanism also assures recognition of cases of
theft induced by fraudulent consumers which makes the system more reliable and fascinating
to both customers as well as sellers. This will enhance the shopping experience to a new
level.

The objective is effectively attained in the prototype model developed. The developed
product is of low cost, amiable to use and does not require any specific practice. The ability
to take a decision can be done in the cart itself which can be used in the shopping complexes
for effortless and clever way of purchasing items to save vitality, time and money of the
customers.

37

ECE Department, NNRESI


RFID SMART SHOPPING CART

6.2 Future Enhancement

The proposed Smart Shopping Trolley System intends to assist shopping in-person
which will minimize the considerable amount of time spent in shopping as well as to time
required in locating the desired product with ease.
The customer just needs to type the name of the product he wants to search on the
Android device, and the cart will automatically guide him/her to the product/s location.
The customer can do the payment cart itself by providing the swiping or Payment of bills
using mobile can be implemented.
Smart cart can be interfaced with wireless technologies to make it completely portable in
the near future. It can also be extended by using more powerful RFID readers with enhanced
capacity incase of more number of products in the trolley.

Water sensitive and more powerful tags with more advanced features like metal
resistant and temperature resistant are under research which will be very useful in future.

38

ECE Department, NNRESI

You might also like