FinalProjectReport PDF
FinalProjectReport PDF
PROJECT REPORT
FOR
SUBJECT: LAB II- PROJECT PHASE II
ON
RFID Based Shopping Cart with Web App
Submitted in partial fulfillment of the requirement for the award of
Bachelor of Engineering
In
Computer Science and Engineering
Solapur University
By
Name Roll No. Seat No.
DEPARTMENT OF COMPUTER
COMPUTE SCIENCE AND ENGINEERING
WALCHAND INSTITUTE OF TECHNOLOGY
SOLAPUR – 413006
(2017-2018)
Certificate
Mrs. K. A. Khedikar
Prof. R. V. Argiddi
Project Guide Head CSE Dept
Dr. S. A. Halkude
Principal
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
WALCHAND INSTITUTE OF TECHNOLOGY
SOLAPUR – 413006
(2017-2018)
Project Approval Sheet
Dr. S. A. Halkude
Principal
3
Acknowledgment
At the outset, we would like to take this opportunity to express
our deep gratitude to our guide Mrs. K. A. Khedikar of CSE Department
for his guidance and moral support throughout this successful
completion of our project.
4
Abstract
In recent years, Manufacturers are developing products that ensure comfort for
all people. One of a trait that is evolved will be providing them with a trouble-
free shopping experience. In Online shopping Experience, we cannot tactile the
essence of the product but the people can get the tactility of the product and can
manually compare it with other brands in a shopping mall. When shopping in a
mall, customers are unaware of the total bill amount till the end of shopping.
Also, customers don’t have any idea of the location of a product. For a single
product purchase, customers are required to wait in a long queue at the billing
counter. These problems can be tackled by adopting new technologies. RFID
technology and web application are the primary technologies used for designing
our system. The shopping cart is integrated with Raspberry Pi and RFID
hardware module which recognizes the RFID tags attached to products. The
RFID reader interfaced with Raspberry pi scans ID stored in a tag and displays
the information of the product fetched from database into the web app with its
amount. The web app can be run on any browser on smart phones or on portable
devices. Along with this, sections of the products are displayed on the basis of
their order of sorting in a mall. The in-app wallet is used for payment of the bill.
5
Index
1 Introduction 7
1.1 Introduction 8
2 Background 10
3 Proposed Solution 13
3.1 Solution 14
4 Working Environment 15
5 Methodology 31
6 Implementation 34
6.2 Screenshots 38
7 Flow diagrams 42
8 Future Work 45
9 Conclusion 47
10 References 49
6
Chapter 1
INTRODUCTION
7
1.1 Introduction
The automation industry is now blooming with the new technologies and
providing assistance in many fields. Radio-Frequency Identification is
abbreviated as RFID. It depicts tiny electronic devices that which consist of a
small chip and an antenna and is capable of carrying 2,000 bytes of data or less.
Generally, RFID Reader and RFID Tags are the two classes of it. Mainly three
types of tags are available i.e. active tags, passive tags, and battery-assisted
passive tags. An active tag has a built-in battery and transmits RFID signals
periodically whereas passive tag has no any battery. The passive tag transmits
signals only when connected to an external battery. The battery-assisted passive
tag has a small incorporated battery thereby enables only when in contact with
RFID reader. The RFID Tags are containing information which may be a single
binary bit or be a large array bit.
The RFID readers are used to read those RFID Tags. The RFID devices they
can be used for the identification, tracking objects etc. The RFID device
presents the same purpose as a barcode or a magnetic strip on a transactional
card; it provides a unique identifier for that object. The RFID device must be
scanned to get back the identifying information relating to it, which is in the
same manner as a bar code or magnetic strip must be scanned to get the
information. RFID technology has the power to eradicate the Barcode
Technology with its increasing use and also more economical than the Barcode.
RFID overcomes the Barcode in terms of reading the items as for the Barcode it
needs to be in the Line of Sight. Also, they are as cheap as the Barcode scanner
if purchased in the bulk.
8
1.2 Problem Statement and Objectives
Today we are facing many problems like waiting in queue for a long time
irrespective of numbers of product they buy. As per a survey money and
average time spent of each customer is high especially in over-crowded
supermarkets. The project “RFID Based Shopping Cart with Web App” will
reduce the waiting time for customers and also would encourage digital
payments.
9
Chapter 2
Background
10
2.1 Background
In the paper “RFID Based Intelligent Shopping Cart Using 2.4 GHz Open Band
Transmission” May 2016 by Arjun P, Vishnu V Nambeesan, CP Razal, Asst.
Prof. Bopanna KN had proposed a system in which there are two sections i.e.
transmitter and receiver. The RFID reader system is attached with the trolley.
While purchasing, the items are shown to the reader. When the tag is brought
near to the RFID reader, the details of the products are fetched by the reader
containing the details of that product, which is directly interfaced to the
microcontroller. In this MCU calculates the total amount by adding that product
price with the purchase bill. If the total purchased exceeds the budget value the
microcontroller activates the alarm circuit to ring also a dedicated remove key is
given. A 16 X 2 character LCD is used to display product price and purchased
amount. The heavy maintenance is needed for the MCU units, Transceivers also
the platform dependence.
In the paper “RFID Based Smart Shopping and Billing” December 2013 by
Zeeshan Ali, Reena Sonkusare proposed a system that includes Infra-Red
Transmitters(IR), RFID Tags, Zigbee, EEPROM . Infra-Red Transmitters
placed at both ends of the aisle and on the cart to collect information on the
entry/exit status of the cart. All the product information is stored in a database at
a central server with the location information. The product resolution is done by
keeping the record of the aisle number for the products. RFID tags are used to
uniquely identify the products. It contains the hardware unit comprising of the
IR, RFID Tags, Zigbee and EEPROM also the software unit comprises of
Zigbee interfaced to the server. The IR receivers are placed on the shopping
carts. Whenever the receiver detects an IR signal, it indicates that a shopping
cart is in that aisle. Once the cart location and entry/exit status is detected, this
information is then sent to the main server using the wireless Zigbee unit. All
the products and their respective details stored in that particular aisle are
retrieved and sent back to the shopping cart. As the products are selected and
added into the cart, the RFID reader will identify the product. The remove
button is also provided for deleting unwanted items and bill is transferred by the
Zigbee Unit. There are a few aspects that could be root for problems to begin
with the communication is not very secure. Secondly another Zigbee module
operating at the same frequency can easily intercept the transmitted data.
Further, a more sophisticated micro-controller and larger display system could
provide better consumer experience.
11
simple process as face recognition of customers during shopping hours will not
be easy and accurate as malls can be crowded. Many errors are possible while
using recognition for authentication.
“Smart RFID based Interactive Kiosk Cart using Wireless Sensor Node” by
Narayana Swamy (2016), applied RFID for automated shopping. They used
dedicated website for billing maintenance and for user interaction. Every user
with the unique id accesses the web server for the bill payment and invoice
information. Internet service is quite mandatory in this type of service. The
process may get fail due to Internet instability and server error problems may
also occur due to high load.
12
Chapter 3
PROPOSED SOLUTION
13
3.1 Solution
These days so many advanced technologies are evolving by which people are
concentrating more on online facilities and digitalization. Automation and
Smartphone technology are the leading ones by which people can manage their
time accordingly. Development of these two technologies enables a new tactic
to e-marketing.
This system primarily consists of two sections. The first part consist of RFID
Tag is attached to each product which contains all the info about the product
and which is read by RFID Reader and Raspberry Pi which is mounted on the
cart. The second is a web app which accesses the cart information for user
convenience. When a customer adds the first product in the cart the product
information is fetched and the information of it and total amount to be paid is
displayed on the web app. The purchase information is sent to billing computer
via Wi-Fi for checkout also the amount can be paid by wallets.
14
Chapter 4
WORKING ENVIRONMENT
15
4.1 Hardware Requirements
16
The first generation (Raspberry Pi 1 Model B) was released in February 2012,
followed by the simpler and cheaper Model A. In 2014, the Foundation released
a board with an improved design, Raspberry Pi 1 Model B+. These boards are
approximately credit-card sized and represent the standard mainline form-
factor. Improved A+ and B+ models were released a year later. A "Compute
Module" was released in April 2014 for embedded applications. The Raspberry
Pi 2 which added more RAM was released in February 2015.
A Raspberry Pi Zero with smaller size and reduced input/output (I/O)
and general-purpose input/output (GPIO) capabilities was released in November
2015 for US$5. By 2017, it became the newest mainline Raspberry Pi. On 28
February 2017, the Raspberry Pi Zero W was launched, a version of the Zero
with Wi-Fi and Bluetooth capabilities, for US$10. On 12 January 2018,
the Raspberry Pi Zero WH was launched, the same version of the Zero W with
pre-soldered GPIO headers.
Raspberry Pi 3 Model B was released in February 2016 with a 64 bit quad
core processor, and has on-board Wi-Fi, Bluetooth and USB boot
capabilities. On Pi Day2018 model 3B+ appeared with a faster 1.4 GHz
processor and a 3 times faster network based on gigabit ethernet (300 Mbit / s)
or 2.4 / 5 GHz dual-band Wi-Fi (100 Mbit / s). Other options are: Power over
Ethernet (PoE), USB boot and network boot (an SD card is no longer required).
This allows the use of the Pi in hard-to-reach places (possibly without
electricity).
The organization behind the Raspberry Pi consists of two arms. The first two
models were developed by the Raspberry Pi Foundation. After the Pi Model B
was released, the Foundation set up Raspberry Pi Trading, with Eben Upton as
CEO, to develop the third model, the B+. Raspberry Pi Trading is responsible
for developing the technology while the Foundation is an educational charity to
promote the teaching of basic computer science in schools and in developing
countries.
The Foundation provides Raspbian, a Debian-based Linux distribution for
download, as well as third-party Ubuntu, Windows 10 IoT Core, RISC OS, and
specialized media centre distributions. It promotes Python and Scratch as the
main programming language, with support for many other languages. The
default firmware is closed source, while an unofficial open source is available.
17
4.1.2 Mifare RC522 RFID Reader
4.1.2.1. Overview:-
Mifare RC522 is the high integrated RFID card reader which works on non-
contact 13.56MHz communication, is designed by NXP as low power
consumption, low cost and compact size read and write chip, is the best choice
in the development of smart meters and portable hand-held devices.
This module can fit directly in hand held devices for mass production. Module
use 3.3V power supply, and can communicate directly with any CPU board by
connecting through SPI protocol, which ensure reliable work, good reading
distance.
4.1.2.2. Specifications:-
Voltage: DC 3.3V
Operating Current :13-26mA
Idle Current :10-13mA
Peak current: <30mA
18
Operating Frequency: 13.56MHz
Dimensions: 40mm × 60mm
Module Interface SPI Data Transfer Rate: Max. 10Mbit/s
Card reading distance :0-30mm (Mifare1 card )
4.1.3.1. Overview:-
This is a blank 13.56MHz RFID card - often used for train/bus passes but also
found in other systems where a proximity card is desired. The tag contains a
small RFID chip and an antenna, and is passively powered by the
reader/writer when placed a couple inches away. These can be read by almost
any 13.56MHz RFID reader but make sure it can handle ISO/IEC 14443 Type
A cards as there are a few other encoding standards. They are tested and work
great with both our Mifare RC522 RFID reader and Raspberry Pi 3 Model B.
4.1.3.2. Specifications:-
Main Chip: Philips Mifare 1 S50;
Storage capacity: 8Kbit, 16 partitions, each partition with 2 ground
passwords;
Size: 30 * 40 * 3mm;
Operating Frequency: 13.56 MHz;
Read and write distance: 2.5 ~ 10cm;
Read and write time: 1 ~ 2ms;
Operating Temperature: -20 ℃ ~ 85 ℃;
Endurance: > 100,000 times
19
4.2 Software Requirements
4.2.2.1. Overview:-
The initial build of over 35,000 Raspbian packages, optimized for best
performance on the Raspberry Pi, was completed in June of 2012. However,
Raspbian is still under active development with an emphasis on improving the
stability and performance of as many Debian packages as possible.
SD Card
20
Keyboard and mouse
Any standard USB keyboard and mouse will work with your Raspberry Pi for
first time setup of raspbian. Wireless keyboards and mice will work if already
paired. For keyboard layout configuration options see raspi-config.
Power supply
The Pi is powered by a USB Micro power supply (like most standard mobile
phone chargers). You'll need a good-quality power supply that can supply at
least 2A at 5V for the Model 3B, or 700mA at 5V for the earlier, lower powered
models. Low current (~700mA) power supplies will work for basic usage, but
are likely to cause the Pi to reboot if it draws too much power.
Need an image writer to write the downloaded OS into the SD card (micro SD
card in case of Raspberry Pi B+ model).
Insert the SD card into the laptop/pc and run the image writer. Once open,
browse and select the downloaded Raspbian image file. Select the correct
device that is the drive representing the SD card. If the drive (or device)
selected is different from the SD card then the other selected drive will become
corrupted. SO be careful. After that, click on the "Write" button in the bottom.
As an example, see the image below, where the SD card (or micro SD) drives is
represented by the letter "G:\".
Once the write is complete, eject the SD card and insert it into the Raspberry Pi
and turn it on. It should start booting up.
There might be situations when the user credentials like the "username" and
password will be asked. Raspberry Pi comes with a default user name and
password and so always use it whenever it is being asked.
21
When the Pi has been booted for the first time, a configuration screen called the
Setup Options" should appear and it will look like the image.
The raspi-config tool helps you to configure your Raspberry Pi; several settings
can be changed with this tool without having to know the correct commands to
use. It is written as a bash script, run in a terminal window, and uses whiptail
(whiptail is a "dialog" replacement using newt instead of ncurses, see "man
whiptail") to create the windows, menus and messages. Some changes require
"administrator" permissions, so the tool must be run in a terminal with:
22
sudo raspi-config
This can be run from the command line or from a terminal window if using the
GUI. Older versions of Raspbian would boot to the command line and the raspi-
config tool would run on first boot after installation. NeIr versions boot to the
GUI and do not run raspi-config. There is a similar GUI configuration tool that
can be run from the menus. Although it is already installed on Raspbian, and
there is an update option within the menus, it is installed or updated from
package raspi-config.
Sometimes it is not convenient to work directly on the Raspberry Pi. Maybe you
would like to work on it from another device by remote control.
VNC is a graphical desktop sharing system that allows you to remotely control
the desktop interface of one computer (running VNC Server) from another
computer or mobile device (running VNC Viewer). VNC Viewer transmits the
keyboard and either mouse or touch events to VNC Server, and receives updates
to the screen in return.
You will see the desktop of the Raspberry Pi inside a window on your computer
or mobile device. You'll be able to control it as though you were working on the
Raspberry Pi itself.
First we need to setup static IP address for the RPi for remote access.
• Type ifconfig command RPi shell and note the wlan0 inet address.
• Now type netstat -nr and note down the gateway address.
23
• Now type sudo nano /etc/dhcpcd.conf and add following lines at the
top and save it:
interface wlan0
static ip_address =<inet address>
static_routers=
static_routers=<gateway address>
static_domain_server=8.8.8.8
• Download VNC Viewer for Windows and run the exe file.
• It will ask now for username and password. Default username and
password of RPi are pi and raspberry and hit ok.
4.2.2.1. Overview:-
4.2.1.2. Features:-
25
o Joyent
o Microsoft Azure
o Google App Engine
o SFTP/FTP
Support for public and private projects
Plug-in support
Syntax highlighting for the following languages:- C#, C/C++, Clojure,
CoffeeScript, ColdFusion, CSS, Apache Groovy, Java, JavaScript,
LaTeX, Lua, MarkDown, OCalm, PHP, Perl, PowerShell, Ruby, Scala,
SCSS, SQL, Textile, X(HTML), XML
Front End:-
HTML:-
HTML code ensures the proper formatting of text and images so that your
Internet browser may display them as they are intended to look. Without
HTML, a browser would not know how to display text as elements or
load images or other elements. HTML also provides a basic structure of
the page, upon which Cascading Style Sheets are overlaid to change its
appearance. One could think of HTML as the bones (structure) of a web
page, and CSS as its skin (appearance).
Bootstrap 3.3.6:-
Overview:-
26
Features:-
JavaScript:-
Back End:-
Node.JS:-
27
Framework:-
Express:-
Overview:-
You can then use a database like MongoDB with Mongoose (for
modeling) to provide a backend for your Node.js application.
Express.js basically helps you manage everything, from routes, to
handling requests and views.
Features of Express:-
28
Database:-
MongoDB:-
High Performance
Data Aggregation
Text Search and Geospatial Queries.
High Availability
A replica set is a group of MongoDB servers that maintain the same data
set, providing redundancy and increasing data availability.
Horizontal Scalability
29
writes covered by a zone only to those shards inside the zone. See
the Zones manual page for more information.
Firebase:-
30
Chapter 5
METHADOLOGY
31
5.1 System Architecture
Figure
gure 5.1.1: System Architecture
Our system primarily consists of two sections. One is the integration of RFID
reader with the Raspberry Pi 3 model b and the second is a web app which
accesses the cart information for user convenience. After entering the shopping
mall take the cart which is integrated with the 13.56MHz RFID reader
interfaced with Raspberry pi 3 model b and open the web app on their smart
phone’s browser. Each product in the mall has an RFID tag of the same
frequency as a reader. Each RFID tag has a unique Id which is stored in the
central database manually at the time of attaching to a product. First, register
and login to the web app. When a customer adds the first product in the cart, the
cart’s unique id (Raspberry Pi & its IP address) stored in his account on
database and product information is fetched simultaneously by comparing
product’s id on the database. The above two actions are via Wi-Fi. Wi The
information includes product id, its description, available offers on it and price
which can be displayed in the app. Now onwards, as the customer adds a
product to cart, the information of it and total amount to be paid is displayed on
the app. At the time of exit, the customer has to hit the submit button in the app
and the purchase information
on is sent to billing computer via Wi-Fi for checkout.
Billing computer generates the bill automatically and sends it to the users
account for payment. The customer can now pay the total amount through the
app wallet.
5.2 Work flow:
1. Open the web app and take the shopping cart, when entered into
shopping mall.
2. If you are not registered to the web app then do register by entering
specified details and login to your account for shopping.
3. Take overview of the sections specifies in the web app and search
for the required products.
4. First check whether the product to be added to cart has a RFID tag
attached. If yes, then add it to cart by scanning over the reader. If
not, don’t add it to cart.
5. The RFID tag will send its ID to reader and will be stored in
Firebase realtime database. Do the same for all products.
6. While paying bill, the purchase information and total amount will
be displayed on the web app.
7. You can use the in-app wallet for paying amount.
34
6.1 Code Snippet
import MFRC522
import signal
import time
import requests
import json
firebase_url = 'https://shopcart-1d3dc.firebaseio.com/shop'
continue_reading = True
def end_read(signal,frame):
global continue_reading
continue_reading = False
GPIO.cleanup()
signal.signal(signal.SIGINT, end_read)
MIFAREReader = MFRC522.MFRC522()
35
# This loop keeps checking for chips. If one is near it will get the UID and
authenticate
while continue_reading:
(status,TagType)=
MIFAREReader.MFRC522_Request(MIFAREReader.PICC_REQIDL)
# If a card is found
if status == MIFAREReader.MI_OK:
(status,uid) = MIFAREReader.MFRC522_Anticoll()
if status == MIFAREReader.MI_OK:
# Store UID
cart_location = '/cart1/.json'
my_dict = literal_eval(result.text)
key_list = []
value_list = []
36
#Get keys from dictionary
index = value_list.index(str1)
print("Product removed...")
print("Product inserted...")
time.sleep(0.2)
37
6.2 Screen shots
In this the admin can glance at all the payments by customers which are done
until now.
Firstly the user needs to login. Then gets redirected to the home page where
they can search for particular item.
In this the customer has to enter the particular cart number in the respective
field.
In this users can see all the earlier orders made by them
42
7.1 Data flow diagrams
grams
45
8. Future work
46
9. CONCLUSION
47
9. Conclusion
The Important fields of application of “RFID based Shopping Cart with Web
App” are shopping malls, super bazaars, grocery shops, E- gadgets etc. It can
play a crucial role when there is much more crowd in the shopping mall as it
reduces the time required for billing. Because of in-app wallet, the customers
don’t have to stand in a long queue for payment. This makes the shopping
trouble-free and well-off. In addition, the billing facility avoids the queue at the
check-out so that the better shopping experience for customers can be created.
Because of low weight hardware requirements, we can easily mount the module
to cart and the customers can easily carry the cart for shopping.
48
10. REFERENCES
49
10. References
[4] RFID Based Intelligent Shopping Cart Using 2.4 GHz Open Band
Transmission Suganya. R, Swarnavalli. N, Vismitha. S, Mrs. G. M.
Rajathi, “Automated Smart trolley with Smart Billing using Arduino”,
Volume 4 Issue 3, March 2016.
50