Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
174 views50 pages

FinalProjectReport PDF

The document is a project report for an RFID Based Shopping Cart with Web App, submitted by students of Solapur University for their Bachelor of Engineering in Computer Science and Engineering. It outlines the project's objectives, which include reducing customer wait times and promoting digital payments through an integrated RFID system and web application. The report includes sections on the project's background, proposed solutions, hardware and software requirements, methodology, and future work.

Uploaded by

jayanti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
174 views50 pages

FinalProjectReport PDF

The document is a project report for an RFID Based Shopping Cart with Web App, submitted by students of Solapur University for their Bachelor of Engineering in Computer Science and Engineering. It outlines the project's objectives, which include reducing customer wait times and promoting digital payments through an integrated RFID system and web application. The report includes sections on the project's background, proposed solutions, hardware and software requirements, methodology, and future work.

Uploaded by

jayanti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

A

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.

Lokesh Alli 71 763148


Deepak Awal 72 763151
Aditya Dhopade 73 763167
Swapnil Gade 74 763173

Under the Guidance of


Mrs. K. A. Khedikar

DEPARTMENT OF COMPUTER
COMPUTE SCIENCE AND ENGINEERING
WALCHAND INSTITUTE OF TECHNOLOGY
SOLAPUR – 413006
(2017-2018)
Certificate

This is to certify that the project entitled

RFID Based Shopping Cart with Web App


Is submitted by
Name Roll No. Seat No.

Lokesh Alli 71 763148


Deepak Awal 72 763151
Aditya Dhopade 73 763167
Swapnil Gade 74 763173

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

The Project Entitled

RFID Based Shopping Cart with Web App


Submitted by
Name Roll No. Seat No.

Lokesh Alli 71 763148


Deepak Awal 72 763151
Aditya Dhopade 73 763167
Swapnil Gade 74 763173

“Is hereby approved in partial fulfillment for the degree of

Bachelor of Computer Science and Engineering”

Mrs. K. A. Khedikar Prof. Mr. 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)

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.

We heartily thank Prof. Mr. R. V. Argiddi, Head of CSE Dept for


his moral support and promoting us through completion of our project.

We would also like to thank our Principal Dr. S. A. Halkude and


all staff members for their whole hearted co-operation in completing
this 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

Sr. No. Title Page No.

1 Introduction 7

1.1 Introduction 8

1.2 Problem Statement and Objective 9

2 Background 10

3 Proposed Solution 13

3.1 Solution 14

3.2 Advantages of proposed system 14

4 Working Environment 15

4.1 Hardware Requirements 16

4.2 Software Requirements 20

5 Methodology 31

5.1 System Architecture 32

5.2 Work Flow 33

6 Implementation 34

6.1 Code Snippet 35

6.2 Screenshots 38

7 Flow diagrams 42

7.1 Data Flow Diagrams 43

7.2 Sequential UML Diagrams 44

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.

The Objectives of the proposed solution are:

 To develop a Smart shopping experience for the customers.

 To reduce the waiting of customers in the long queue for payment.

 To encourage the cashless transaction.

 To develop a new, smart and efficient technique in the Shopping.

 Customer Reliable Technology.

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.

“Smart Shopping Cart with Customer Oriented Service” by Hsin-Han Chiang


(2016), developed a concept of automated shopping trolley with automated
billing where they used face recognition for customer authentication. It is not a

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.

“Shopping and Automatic Billing using RFID Technology” by Vinutha (2014),


has an automatic billing with server end. This scans products by Radio
Frequency Identification and then the bill is generated at the server end which is
then communicated to the customer. This requires server maintenance and
internet connectivity both for the customer and shopkeeper.

“Smart Shopping Cart with Automatic Billing and Bluetooth” proposed by


Prateek Aryan (2014), is a process where billing is done in a trolley and
transferred to the Android mobile of the user via Bluetooth. Every customer
can’t be expected to have an android smart phone so creates a platform
dependency and also Bluetooth can have connectivity issues and range is less.

“RFID Enabled Smart Billing System” by Vanitha Sheeba and Brindha


Rajkumari (2015), did a concept mode consists of RFID and ZigBee which
transmits generated bill to the server and then the bill is collected by the worker
in the bill counter by identifying customers. But this again will lead to queue for
billing since only bill generation alone automated by scanning using RFID also
increases the cost of maintaining the server.

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.

3.2 Advantages of the proposed system:

 It is platform independent and can operate on Android, iOS, Windows


etc.
 Promotes digital cash payment.
 Barcode and QR code technology can be easily replaced with it.
 Tracing a product is very easy.
 Doesn’t need any dedicated device for display of products.
 The billing facility avoids the queue at the check-out.

14
Chapter 4
WORKING ENVIRONMENT

15
4.1 Hardware Requirements

4.1.1 Raspberry Pi 3 Model B

Figure 4.1.1: Raspberry Pi 3 Model B

The Raspberry Pi is a series of small single-board computers developed in


the United Kingdom by the Raspberry Pi Foundation to promote the teaching of
basic computer science in schools and in developing countries. The original
model became far more popular than anticipated, selling outside its target
market for uses such as robotics. It does not include peripherals (such
as keyboards, mice and cases). However, some accessories have been included
in several official and unofficial bundles.
According to the Raspberry Pi Foundation, over 5 million Raspberry Pis were
sold by February 2015, making it the best-selling British computer. By
November 2016 they had sold 11 million units, and 12.5m by March 2017,
making it the third best-selling "general purpose computer". In July 2017, sales
reached nearly 15 million. In March 2018, sales reached 19 million.
Several generations of Raspberry Pis have been released. All models feature
a Broadcom system on a chip (SoC) with an integrated ARM compatible central
processing unit (CPU) and on-chip graphics processing unit (GPU).
Processor speed ranges from 700 MHz to 1.4 GHz for the Pi 3 Model B+; on-
board memory ranges from 256 MB to 1 GB RAM. Secure Digital (SD) cards
are used to store the operating system and program memory in either SDHC or
MicroSDHC sizes. The boards have one to four USB ports. For video
output, HDMI and composite video are supported, with a standard 3.5 mm
phono jack for audio output. Lower-level output is provided by a number of
GPIO pins which support common protocols like I²C. The B-models have
an 8P8C Ethernet port and the Pi 3 and Pi Zero W have on-board Wi-Fi 802.11n
and Bluetooth. Prices range from US$5 to $35.

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.

MF RC522 use the advanced modulation system, fully integrated at 13.56MHz


with all kinds of positive non-contact communication protocols.
Support 14443A compatible answer signal. DSP deals with ISO14443A frames
and error correction. Furthermore, it also supports rapid CRYPTO1 encryption
to validate Mifare series products. MFRC522 support Mifare series higher
speed non-contact communication, duplex communication speed up to 424 kb/s.
As a new family member in 13.56MHz RFID family, MF RC522 has many
similarities to MF RC5200 and MF RC530, and also has more new features.

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.

Figure 4.1.2: Mifare RC522 RFID Reader

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 Mifare 13.56 MHz RFID Key Chain Tags

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.

These chips can be written to & store up to 1 KB of data in writable


EEPROM divided into banks, and can handle over 100,000 re-writes. You can
use our Mifare RC522 RFID reader to read and write data to the EEPROM
inside the tag. There is also a permanent 4-byte ID burned into the chip that
you can use to identify one tag from another - the ID number cannot be
changed.

Figure 4.1.3: Mifare 13.56MHz RFID Card

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. Raspbian OS:-

4.2.2.1. Overview:-

Figure 4.2.1: Raspbian OS

Raspbian is a free operating system based on Debian optimized for the


Raspberry Pi hardware. An operating system is the set of basic programs and
utilities that make your Raspberry Pi run. However, Raspbian provides more
than a pure OS: it comes with over 35,000 packages; precompiled software
bundled in a nice format for easy installation on your Raspberry Pi.

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.

4.2.2.2. Operating System Installation and Setup:-

SD Card

Recommend an 8GB class 4 SD card Display & connectivity cable Any


DMI/DVI monitor and any TV should work as a display for the Pi. For best
results, use one with HDMI input.

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.

Step 1:-Downloading Raspbian and Image writer

Need an image writer to write the downloaded OS into the SD card (micro SD
card in case of Raspberry Pi B+ model).

Step 2:- Writing the image

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.

Step 3:- Setting up the Pi

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.

The credentials are:


Login: pi
Password: raspberry

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.

Figure 4.2.2: Raspbian OS

The raspi-config Tool

Figure 4.2.3: Raspberry Pi Software Configuration Tool

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.

Virtual Network Computing:-

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.

 Enabling VNC Server Graphically:-

 On your Raspberry Pi, boot into the graphical desktop.

 Select Menu > Preferences > Raspberry Pi Configuration >


Interfaces.

 Ensure VNC is Enabled.

First we need to setup static IP address for the RPi for remote access.

 Setting Up Static IP for Raspberry Pi:-

• Connect your RPi and laptop to the same Wi-Fi connection.

• 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

• Finally reboot the Pi by typing the command sudo reboot.

 Access RPi remotely on laptop:-

• Download VNC Viewer for Windows and run the exe file.

• Enter the static IP address of RPi which we set to it.

• It will ask now for username and password. Default username and
password of RPi are pi and raspberry and hit ok.

• Now you can remotely


otely access your RPi on your laptop.

4.2.2. Cloud 9 Integrated Development Environment (IDE):-

4.2.2.1. Overview:-

Figure 4.2.4: Cloud9 IDE

Cloud9 IDE is an online integrated development environment,, published


as open source from version 3.0. It supports hundreds of programming
languages, including C, C++,
C++ PHP, Ruby, Perl, Python, JavaScript with Node.js,
and Go. It enables developers to get started with coding immediately with pre-
configured workspaces, collaborate with their peers with collaborative coding
features, and web development features like live preview and browser
compatibility testing.
A valid credit card is required for new user registration, and the service cannot
be used without one.
It is written almost entirely in JavaScript, and uses Node.js on the back-end.
The editor component uses Ace. As of July 2014, it uses Docker containers for
its workspaces, and is hosted on Google Compute Engine.
Cloud9 had been acquired by Amazon in July 2016. As of March 2018, existing
accounts on Cloud9's original website may be used, but new accounts may not
be created. Cloud9 is now a part of Amazon Web Services (AWS), and as such,
you must use an AWS account to use Cloud9.

4.2.1.2. Features:-

 Built-in terminal, with npm and basic Unix commands


 Code completion for snippets and identifiers
 Multiple cursors for simultaneous editing
 Real-time language analysis for JavaScript (marking common JavaScript
pitfalls)
 Variable/function name refactoring for JavaScript
 Parenthesis, bracket, and quote character matching
 Line numbers, warnings, and errors in the gutter
 Debugger
 Tabbed file management
 Themes
 Customizable key-bindings, including presets for Vim, Emacs, and
Sublime Text
 Built in Image Editor
 Code reformatting via JSBeautify and CSSLint
 Ability to drag-and-drop files into your project
 Support for the following code repositories:
o GitHub
o Bitbucket
o Mercurial repositories
o Git repositories
o FTP servers
 Support for deployment to:
o Heroku

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

4.2.3. Technologies Used:

 Front End:-

 HTML:-

First developed by Tim Berners-Lee in 1990, HTML is short for


Hypertext Markup Language. HTML is used to create electronic
documents (called pages) that are displayed on the World Wide Web.
Each page contains a series of connections to other pages called
hyperlinks. Every web page you see on the Internet is written using one
version of HTML code or another.

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:-

Bootstrap is a free front-end framework for faster and easier web


development. Bootstrap includes HTML and CSS based design
templates for typography, forms, buttons, tables, navigation, modals,
image carousels and many other, as well as optional JavaScript
plugins Bootstrap also gives you the ability to easily create responsive
designs.

26
 Features:-

 Easy to use: Anybody with just basic knowledge of HTML and


CSS can start using Bootstrap
 Responsive features: Bootstrap's responsive CSS adjusts to
phones, tablets, and desktops
 Mobile-first approach: In Bootstrap 3, mobile-first styles are part
of the core framework
 Browser compatibility: Bootstrap is compatible with all modern
browsers (Chrome, Firefox, Internet Explorer, Safari, and Opera)

 JavaScript:-

JavaScript (JS) is a scripting language, primarily used on the Web. It is


used to enhance HTML pages and is commonly found embedded in
HTML code. JavaScript is an interpreted language. Thus, it doesn't need
to be compiled. JavaScript renders web pages in an interactive and
dynamic fashion. This allows the pages to react to events, exhibit special
effects, accept variable text, validate data, create cookies, detect a user’s
browser, etc.

 Back End:-

 Node.JS:-

Node.js is a server-side platform built on Google Chrome's JavaScript


Engine (V8 Engine). Node.js was developed by Ryan Dahl in 2009 and
its latest version is v0.10.36.

Node.js is an open source, cross-platform runtime environment for


developing server-side and networking applications. Node.js applications
are written in JavaScript, and can be run within the Node.js runtime on
OS X, Microsoft Windows, and Linux.

Node.js also provides a rich library of various JavaScript modules which


simplifies the development of web applications using Node.js to a great
extent.

27
 Framework:-

 Express:-

 Overview:-

This is over simplifying it, but Express.js is to Node.js what Ruby


on Rails or Sinatra is to Ruby.

Express 3.x is a light-weight web application framework to help


organize your web application into MVC architecture on the server
side. You can use a variety of choices for your templating language
(like EJS, Jade, and Dust.js).

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:-

 Server-side web and mobile application framework


 Language: written in JavaScript
 Express builds:
o Single-page, multi-page, and hybrid mobile and web apps
o Common back-end functions for web applications
o APIs (application programming interfaces)
 Templating engines: Express comes with two templating
engines, Jade and EJS, which facilitate the flow of data into a
website structure.
 MVC pattern: Express supports the Model-View-Controller
architecture, a really helpful way to build websites in a model-
driven format.
 Platform: Node.js
 Operating system: It’s cross-platform, so it’s not limited to one
OS.
 The Express Generator lets you create complex applications
quickly.

28
 Database:-

 MongoDB:-

MongoDB is a free and open-source cross-platform document-oriented


database program. Classified as a NoSQL database program, MongoDB
uses JSON-like documents with schemas. MongoDB is developed by
MongoDB Inc., and is published under a combination of the GNU Affero
General Public License and the Apache License.

High Performance

MongoDB provides high performance data persistence. In particular,

 Support for embedded data models reduces I/O activity on


database system.
 Indexes support faster queries and can include keys from
embedded documents and arrays.

Rich Query Language

MongoDB supports a rich query language to support read and write


operations (CRUD) as well as:

 Data Aggregation
 Text Search and Geospatial Queries.

High Availability

MongoDB’s replication facility, called replica set, provides:

 automatic failover and


 data redundancy.

A replica set is a group of MongoDB servers that maintain the same data
set, providing redundancy and increasing data availability.

Horizontal Scalability

MongoDB provides horizontal scalability as part of its core functionality:

 Sharding distributes data across a cluster of machines.


 Starting in 3.4, MongoDB supports creating zones of data based on
the shard key. In a balanced cluster, MongoDB directs reads and

29
writes covered by a zone only to those shards inside the zone. See
the Zones manual page for more information.

 Firebase:-

Firebase is a mobile and web application development platform


developed by Firebase, Inc. in 2011, then acquired by Google in 2014.

Firebase is a BaaS, i.e., Backend as a Service. We can call it a real-time


database which is the best feature of it. By using the API given by
Firebase, the web developers and mobile developers can build high-
quality apps.

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.

Figure 5.1.2: Flow Chart of Proposed System


Chapter 6
IMPLEMENTATION

34
6.1 Code Snippet

/*** Code snippet of reading and deleting a RFID tag ***/

from ast import literal_eval

import RPi.GPIO as GPIO

import MFRC522

import signal

import time

import requests

import json

firebase_url = 'https://shopcart-1d3dc.firebaseio.com/shop'

continue_reading = True

# Capture SIGINT for cleanup when the script is aborted

def end_read(signal,frame):

global continue_reading

print ("Ctrl+C captured, ending read.")

continue_reading = False

GPIO.cleanup()

# Hook the SIGINT

signal.signal(signal.SIGINT, end_read)

# Create an object of the class MFRC522

MIFAREReader = MFRC522.MFRC522()

print ("Welcome to Shopping Mall\nScan your products before adding to


cart...")

35
# This loop keeps checking for chips. If one is near it will get the UID and
authenticate

while continue_reading:

# Scan for cards

(status,TagType)=
MIFAREReader.MFRC522_Request(MIFAREReader.PICC_REQIDL)

# If a card is found

if status == MIFAREReader.MI_OK:

print ("ProductID detected...")

# Get the UID of the card

(status,uid) = MIFAREReader.MFRC522_Anticoll()

# If we have the UID, continueu

if status == MIFAREReader.MI_OK:

# Store UID

str1 = str(uid[2]) + str(uid[3])

print("ProductID: ", str1)

# Cart Location in firebase database

cart_location = '/cart1/.json'

#Get data from firebase to check whether item inserted

result = requests.get(firebase_url + '/cart1.json')

#Convert retrieved data to dictionary format

my_dict = literal_eval(result.text)

#Initialize list for storing keys and values

key_list = []

value_list = []

36
#Get keys from dictionary

key_list = key_list + list(my_dict.keys())

#Get values from dictionary

for value in my_dict.values():

for each_value in value.values():

value_list = value_list + [each_value]

#Check whether product ID exists in database

if str1 in value_list: #If exist then delete only one entry of it

index = value_list.index(str1)

requests.delete(firebase_url + '/cart1/' + key_list[index] + '.json' )

print("Product removed...")

else: #If not exist then post/insert it to database

data = {'value': str1}

result = requests.post(firebase_url + cart_location,


data=json.dumps(data))

print("Product inserted...")

time.sleep(0.2)

37
6.2 Screen shots

6.2.1 Admin Panel:-

6.2.1.1 Admin Panel Home


Firstly the admin needs to login. In this the admin can add products in their
respective sections where admin can see his current orders and even can search
for particular item.

Screenshot 6.2.1: Admin Panel (Home Page)

6.2.1.2 Orders in Admin Panel


In this the admin can have a glance at the recent orders received.

Screenshot 6.2.2: Orders in Admin Panel


6.2.1.3 Admin Payment Logs

In this the admin can glance at all the payments by customers which are done
until now.

Screenshot 6.2.3: Admin Payment Logs

6.2.2 User Panel:-

6.2.2.1 User Panel Home

Firstly the user needs to login. Then gets redirected to the home page where
they can search for particular item.

Screenshot 6.2.4: User Panel Home


6.2.2.2 Cart Entry Page

In this the customer has to enter the particular cart number in the respective
field.

Screenshot 6.2.5: Cart Entry Page

6.2.2.3 User’s Log of Orders

In this users can see all the earlier orders made by them

Screenshot 6.2.6: Users Log of Orders


6.2.2.4 Invoice Page

The customer’s total current bill can be seen here

Screenshot 6.2.7: Invoice Page

6.2.2.5 Checkout Page

The information for transaction is entered here.

Screenshot 6.2.8:Checkout Page


Chapter 7
FLOW DIAGRAMS

42
7.1 Data flow diagrams
grams

7.1.1. Level 0 DFD:-

Figure 7.1.1: Level 0 DFD

7.1.2. Level 1 DFD:-

Figure 7.1.2: Level 1 DFD

7.1.3. Level 2 DFD:-

Figure 7.1.3: Level 2 DFD


7.2 Sequential UML Diagrams

Figure 7.2.1: Sequence Diagram of Proposed System


8. FUTURE WORK

45
8. Future work

 In future, we can increase the accuracy of the read range of RFID


reader by using higher range supporting RFID reader.
 In future, we can implement the inventory system along with this
system to make the environment more efficient not only for customers
but for shopping mart owners also.
 In future, we can extend the project by implementing the thief
detection system to alert the owner from theft of the product.
 In future, we can extend the project by implementing automatic
moving of cart by using IR sensors.

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

[1] Arjun P, Vishnu V Nambeesan, CP Razal, Asst. Prof. Bopanna KN,


“RFID Based Intelligent Shopping Cart Using 2.4 GHZ Open Band
Transmission”, International Journal of Advanced Research in Computer
Science and Software Engineering, Volume 6, Issue 5, May 2016.

[2] Dr. Suryaprasad J, Praveen Kumar B O, Roopa D, Arjun A Novel Low-


Cost Intelligent Shopping Cart, Proceedings of the 2nd IEEE International
Conference on Networked Embedded Systems for Enterprise
Applications, NESEA 2011, Perth, Australia, December 8-9, 2011.

[3] Arjun P, Vishnu V Nambeesan, CP Razal, Asst. Prof. Bopanna KN,


“RFID Based Intelligent Shopping Cart Using 2.4 GHZ Open Band
Transmission”, International Journal of Advanced Research in Computer
Science and Software Engineering, Volume 6, Issue 5, May 2016.

[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.

[5] Robu website. [Online]. Available: https://robu.in/

[6] Raspberry Pi website. [Online]. Available: https://www.raspberrypi.org/

50

You might also like