Sie sind auf Seite 1von 83

FINAL YEAR PROJECT REPORT

SBUR: A SMART CART

In fulfilment of the requirement for the degree of


BEE (Electrical)

By

RIDA ZAFAR 35457BEE(TELECOMMUNICATION)


SHAHROZ AHMED 35461 BEE (ELECTRONICS)
SYED UMAR FAROOQ 35476 BEE (ELECTRONICS)
SYED MUHAMMAD BILAL 35471 BEE(ELECTRONICS)

SUPERVISED BY
ENGR. TAIMOOR ZAFAR

BAHRIA UNIVERSITY (KARACHI CAMPUS)


2013-2017

1
SBUR: A SMART CART

RIDA ZAFAR
SHAHROZ AHMED
SYED UMAR FAROOQ
SYED MUHAMMAD BILAL

A project report submitted in partial fulfilment of the


Requirements for the award of the degree of
Bachelor of Electrical Engineering

Electrical Engineering
Bahria University, Karachi Campus

YEAR 2013-2017

2
iii

DECLARATION

We hereby declare that this project report is based on our original work except for
citations and quotations which have been duly acknowledged. We also declare that it
has not been previously and concurrently submitted for any other degree or award at
Bahria University or other institutions.

Signature : _________________________

Name : RIDA ZAFAR

Reg No. : 35457

Signature : _________________________

Name : SHAHROZ AHMED

Reg No. : 35461

Signature : _________________________

Name : SYED UMAR FAROOQ

Reg No. : 35476

Signature : _________________________

Name : SYED MUHAMMAD BILAL

Reg No. : 35471

iii
iv

Date : _________________________

APPROVAL FOR SUBMISSION

We certify that this project report entitled “SBUR: A SMART CART” prepared by
RIDA ZAFAR, SHAHROZ AHMED, SYED UMAR FAROOQ AND SYED
MUHAMMAD BILAL has met the required standard for submission in partial
fulfilment of the requirements for the award of Bachelor of Electrical Engineering
at Bahria University.

Approved by,

Signature : _________________________

Supervisor : ENGR. TAIMOOR ZAFAR

Date : _________________________

iv
v

The copyright of this report belongs to the author under the terms of the
copyright Ordinance 1962 as qualified by Intellectual Property Policy of Bahria
University. Due acknowledgement shall always be made of the use of any material
contained in, or derived from, this report.

© 2017, Rida Zafar, Shahroz Ahmed, Syed Umar Farooq, Syed Muhammad
Bilal. All right reserved.

v
vi

Specially dedicated to
my beloved siblings, mother and father
(RIDA ZAFAR)
my beloved grandmother, mother and father
(SHAHROZ AHMED)
my beloved grandmother, mother and father
(SYED UMAR FAROOQ)
my beloved grandmother, mother and father
(SYED MUHAMMAD BILAL)

vi
vii

ACKNOWLEDGEMENTS

We would like to thank everyone who had contributed to the successful completion
of this project. We would like to express my gratitude to my research supervisor,
Engr. Taimoor Zafar for his invaluable advice, guidance and his/her enormous
patience throughout the development of the research.

In addition, we would also like to express our gratitude to our loving parents
and friends who had helped and given us encouragement.

vii
viii

SBUR: A SMART CART

ABSTRACT

An inventive product with societal acceptance is the one that supports the ease,
expediency and productivity in everyday life. In this report we’ve discussed about
“Smart Cart”, developed to help a person in regular shopping by lessening the time
spend while acquiring. The principle idea of this project is to give an advancement
masterminded, insignificant exertion, successfully flexible, and intense system for
helping shopping in person.

To avoid this entire headache of pulling the trolley, waiting in billing queue,
thinking about budget, we’ve designed a smart trolley that would reduce the
customer’s effort and make shopping easier. The smart trolley follows the customer
while purchasing items and it maintains a safe distance between customer and itself.
When a product is kept in the trolley, it automatically calculates the bill. The final
billing will be a lot easier as no separate billing counter will be required. This system
liberates old and handicapped individuals from the weight of pushing shopping
trolley in light of the fact that our proposing shopping trolley is basically a kind of
self-governing portable robots that perceives its proprietor and pursues her.

This automatic trolley is controlled by Arduino with integrated circuit of


ultrasonic and Magnetometer. The 12V DC worm gear motor is used to move trolley.
The trolley is equipped with a billing system consisting of RFID reader and LCD to
allow users to self-checkout, operating through Arduino Mega. Ultrasonic sensors
are used to avoid obstacles whereas Magnetometer is used to obtain information
about the moving direction of a human.

viii
ix

TABLE OF CONTENTS

DECLARATION iii
APPROVAL FOR SUBMISSION iv
ACKNOWLEDGEMENTS vii
ABSTRACT viii
TABLE OF CONTENTS ix
LIST OF TABLES xiii
LIST OF FIGURES xiiii
LIST OF ABBREVIATIONS xvv
LIST OF APPENDICES xvi

CHAPTER

1 INTRODUCTION 1
1.1 Background 1
1.2 Problem Statements 2
1.3 Aims and Objectives 3
1.4 Scope of Project 3

2 LITERATURE REVIEW 5
2.1 Introduction Error! Bookmark not defined.
2.1.1 The Mini Forklift Robot
Error! Bookmark not defined.
2.1.2 RF based Remote Operated Spy Robot 5
2.1.3 Robot Follower Team and Human Leader 6
2.1.4 IR Sensor based Mobile Robot 7

ix
x

3 DESIGN AND METHODOLOGY 8


3.1 Methodology 8
3.2 Hardware Design 9
3.3.1 Mechanism of Smart Cart 9
3.3.2 Arduino Mega 9
3.3.3 Ultrasonic Sensor 11
3.3.4 RFID Reader 12
3.3.5 LCD 13
3.3.6 Bluetooth Modules 15
3.3.7 Magnetometer 16
3.3.8 Omni Wheels 18
3.3.9 DC Gear Motor 119
3.3 3D Designs 19

4 IMPLMENTATION 24
4.1 Mechanical Structure Error! Bookmark not defined.
4.1.1 DC Gear Motor Error! Bookmark not
defined.
4.1.2 Wheels 22
4.1.3 Batery Error! Bookmark not defined.
4.1.4 Aduino Mega Error! Bookmark not defined.
4.1.5 Ultrasonic Sensors Error! Bookmark not defined.
4.1.5.1 Ultrasonic Sensors Coding 25
4.1.6 RFID Reader 30
4.1.7 LCD 31
4.1.7.1 LCD Coding 31
4.1.8 Magnetometer 39

5 RESULTS AND DISCUSSIONS 40


5.1 Results 40
5.2 Discussions 42
5.2.1 Interfacing Ultrasonic Sensors 42
x
xi

5.2.2 Interfacing Bluetooth Modules 42


5.2.3 Speed of the Trolley 42

6 CONCLUSION AND RECOMMENDATIONS 43


6.1 Conclusion 43
6.2 Recommendations 43

REFERENCES 45

APPENDICES 47

xi
xii

LIST OF TABLES

TABLE TITLE PAGE

3.1 Technical stipulations of Ardiono Mega 10

3.2 Difference between Barcode Reader and RFID


Reader 12

3.3 LCD interface pin function description 14

3.4 Features and benefits of Magnetometer 17

xii
xiii

LIST OF FIGURES

FIGURE TITLE PAGE

Figure 2.1: Forklift Robot’s outline Error! Bookmark not defined.

Figure 2.2: Radio Frequency based Remote Operated SPY Robot 6

Figure 2.3: Human Leader and Robot Follower concept 7

Figure 2.4: IR Sensor range 7

Figure 3.1: Block Diagram 8

Figure 3.2: Arduino Mega microcontroller, interfaced with all hardware


components 12

Figure 3.3: Ultrasonic Sensor 11

Figure 3.4: Block diagram of RFID Reader 12

Figure 3.5: RFID Reader 13

Figure 3.6: LCD 13

Figure 3.7: Block diagram of LCD 2004a 14

Figure 3.8: Bluetooth modules: HC-05 and HC-06 15

Figure 3.9: Pin configuration of HC-05 and HC-06 16

Figure 3.10: Magnetometer – HMC5883L 17

Figure 3.11: Co-effect of Omni Wheels 18

Figure 3.12: DC Worm Gear Motor 18

Figure 3.13: 3D Design of DC Gear Motor 19


xiii
xiv

Figure 3.14: 3D Design of Ultrasonic Sensor 19

Figure 3.15: 3D Design of Trolley 20

Figure 4.1: Trolley under mechanical construction phase 21

Figure 4.2: Wheels of the trolley 22

Figure 4.3: Power distribution and protection circuit 23

Figure 4.4: Power distributor circuit for Ultrasonic sensors and 23


Arduino Mega

Figure 4.5: Ultrasonic Sensors View 24

Figure 4.6: Flow chart of RFID Reader 31

Figure 4.7: Magnetometer readings 26

Figure 5.1: Ultrasonic Sensor readings 34

Figure: 5.2: LCD display 35

xiv
xv

LIST OF ABBREVIATIONS

AC alternating current
DC direct current
IMU inertial measurement unit
LCD liquid crystal display
PCB printed circuit board
RFID radio-frequency identification
Rx receiver
Tx transmitter

xv
xvi

LIST OF APPENDICES

APPENDIX TITLE PAGE

A LM1578 Datasheet 47

B LM7805 Datasheet 49

C Ultrasonic Sensor Datasheet 52

D RFID Datasheet 54

xvi
1

CHAPTER 1

1 INTRODUCTION

1.1 Background

The era has come where robots take the control over human labour. Many
customized robots are being used today for modern applications. Then again, the
keen robots have yet turned out to be prominent in day by day life applications. Later
on, a human-accommodating robots will be in need and they can bolster the clients
successfully and proficiently. The explanation behind human going after robotics
technology is to build up the relationship among people and the robot. For event, the
robot can pass on generous weights for people in specialist's offices, air terminals
and strip shopping centres. The robot can give administration to human as a
colleague in various sort of circumstances.

Now a days, every supermarket uses shopping baskets and shopping trolleys
remembering the true objective to aid customers to pick and store the things which
they plan buying. The customers drop everything which they wish to buy in the
shopping basket and thereafter keep on checkout at the cashier counter. The charging
procedure is very tedious and significantly monotonous and has made the
prerequisite for shops to use progressively human resource in the charging area, yet
then holding up time remains stunningly high. In this report, we propose the "Smart

1
2

Cart" which intends to take out the holding up time of consumers and lower the
aggregate work need.

1.2 Problem Statements

Nowadays, if a customer needs to buy something at a shopping center, clients need to


take the particular things from the rack and after that line up and sit tight for their
swing to make installment. It requires a great deal of investment for purchasers to sit
tight for the clients before the line to examine each and every thing taken after by
making installment. This condition turn out to be most exceedingly terrible during
the season of big sales, festivals and weekends. This circumstance makes purchasers
feel irritated by holding up too long.

On the other hand, customers worry over a ton of things while taking off to the
shopping centre. For example, most clients worry that the money they brought for
shopping is not enough to buy everything they want until their turn comes at the cash
counter. It will be an inconceivable solace if the customers are kept educated about
their bill.

Moreover, the shopping trolleys are constantly scattered all over the markets. It can
cause the trolley to runaway from its position and harm the general population. A
woman had been killed in China by a rapidly moving runaway trolley when she left
the lift [1]. A lady also lost her life and harmed her significant other in a mall by a
stacked runaway trolley [2].

To attempt to tackle the issues previously acknowledged, recent years have


seen the presence of a few innovative answers for hypermarket help. Every single
such arrangement have similar goals: spare customer’s time and cash, help the
retailers to win steadfast customers.

2
3

1.3 Aims and Objectives

The aims and objectives are as follows:

i) To design a versatile trolley that is user friendly for

human and makes their life more productive.

ii) To design an automatic trolley that can carry a heavy thing to move

starting with one point then onto the next point.

iii) To automate a shopping trolley that can lessen long lasting cash counter lines

and give a heap free shopping to the customer.

iv) To keep customers informed about their bill.

1.4 Scope of Project

This project is mainly designed to carry heavy weights in order to lessen human

labour. So its scope is, everywhere, where there is a need to carry heavy materials.

Basically, we’ve focused on applying this project in supermarkets but after few

amendments it can also be used in industries.

For industrial practise, the objective indicated is to help industry that needs

move heavy instruments from one point to another. This trolley can accordingly

diminish the labour. At the point when there is need to convey overwhelming

3
4

instruments, it can be taken care of just by one worker since this trolley would follow

him. So, it can diminish the cost of labourers enlisted.

4
5

CHAPTER 2

LITERATURE REVIEW

2.1 Introduction

This segment discusses about data assembled to pick up information and thoughts in
settling the project. The choice to make a smart cart has been produced using a blend
of some moving robots with a manual trolley. There are a few sources that had been
taken as an asset, for example, books, proposition and sites. This part says about a
portion of the comparable items which are actualized with certain framework or
configuration to help customers and retailers and also empower customers to
appreciate shopping. Taking after are a few robots devotees that have a rule to
outline the Smart Cart.

2.1.1 The Mini Forklift Robot

S.Liawatimena et al. presented the design of a forklift robot that can store and get
object from indicated stockpiling opening from/to a based utilizing line follower and
RFID. As of now, in warehouse stockpiling framework are predominantly still done
in a customary way utilizing human administrator to store and pick merchandise into
indicated area [3]. This venture is expected to build a self-sufficient scaled down
forklift robot that utilizing Radio Frequency Identification Device (RFID) innovation
to discover the directions of directed storage slot and products identification.

5
6

The control of development comprises of DC Motor with Pulse Width


Modulation and Infrared sensor for the line adherent. Be that as it may, the cost of
RFID is extensive on the grounds that it is intricate innovation.

Figure 2.1: Forklift Robot’s outline

2.1.2 RF based Remote Operated Spy Robot

T. Krishnan et al. created a RF based Remote Operated SPY Robot. It is a spy robot
circuit which could be wirelessly controlled through a remote. It catches sound and
video insights from ambiances then sends it to a remote station over RF signals [4].
This robot was built to spy and capture audio but the concept of RF Remote
Controller can be used to the Human Following Robot.

6
7

Figure 2.2: Radio Frequency based Remote Operated SPY Robot

2.1.3 Robot Follower Team and Human Leader

Based Johann Bornstein et al. played out a few examinations, in which the pioneer
supporter group moved along an extremely intriguing way of generally bending
avenues, some of which with soak slants. Each analysis was for around 9-15 minutes.
The devotee utilized it's ready sensor to distinguish and track the pioneer with the
exception of when viewable pathway was quickly hindered after the pioneer pivoted
a corner. The supporter's separation to the pioneer was constantly short, changing
between 0.5-2.0 m. Thus, coordinate line-of - sight blackouts were typically short on
the request of 1-3 seconds [5]. It utilized direct observable pathway based sensor
which are not reasonable when a client is around a corner. This is almost the same
concept of our project but we’ve modified it so that the robot won’t have any
problem when human turn around a corner

7
8

Figure 2.3: Human Leader and Robot Follower concept

2.1.4 IR Sensor based Mobile Robot

Youg Jen Wen et al. revealed the tangible setup and calculation for target taking after
on the portable robot. The course recognition of the objective is accomplished by the
setup of nine IR recipients which screen the signs from the transmitter mounted on
the objective. But an IR sensor is not precise compare to the ultrasonic
sensor.

8
9

Figure 2.4: IR Sensor range

CHAPTER 3

DESIGN AND METHODOLOGY

3.1 Methodology

 When a person enters the mall and get trolley, the motor driver will drive the
motors and trolley will start following that person using Magnetometer
 Ultrasonic sensors will continuously check for obstacles around the trolley
 If there is an obstacle then an interrupt will be generated on Arduino mega
and trolley will stop moving
 When the obstacle is moved then trolley will start following that person by
tracking the map generated by Magnetometer
 If the person wants to buy something he will have to pick up that product,
scan it through RFID reader then simply place it in trolley
 When a person scans any product its price will be displayed on LCD
including the total price of all he products scanned

9
10

Figure 3.1: Block Diagram


Start

Initialize trolley

Get sensor values

If distance > 1 foot Don’t move

No
Yes

Start following

Search for obstacles Stop moving


Yes
No
Keep following

Scan product through RFID reader

NO
Visible tag?

Yes

Read data

Display price of product on LCD

Pay the bill

Stop
10
11

Figure 3.2: Flow chart of trolley


3.2 Hardware Design

In the project we have used Arduino Mega 2560 as a main microcontroller for the
trolley. All the equipment which we have utilized including ultrasonic sensors,
Bluetooth modules, Magnetometer, RFID reader, LCD, DC gear motor and its driver
are connected to Arduino Mega 2560. RFID reader is used to read RFID tags
attached to different products and display the tag’s data on LCD. Ultrasonic sensors
are used for obstacle avoidance purpose. Magnetometer is used for human following
purpose. Bluetooth modules are used to send the Magnetometer data to Arduino
attached with trolley wirelessly. Motor driver is used to drive dc gear motor. We
introduced a system under trolley containing Arduino, Bluetooth module, motor
driver and 12V dc battery in order to control the shopping trolley. At three different
sides of the cart six ultrasonic sensors have been installed whereas Magnetometer
will be held by the person having that trolley. [6]

3.2.1 Mechanism of Smart Cart

System plan for versatile shopping trolley depends on the conservativeness idea. The
instrument is appended under the base of shopping cart. The trolley is implemented
with two generator wheels at the back with two Omni wheels at front. Therefore, it
can move in every direction.

3.2.2 Arduino Mega 2560

11
12

Arduino Mega 2560 contains 54 advanced info/yield pins, 16 Analog contributions


and 256kB of glimmer memory. In this venture, Arduino Mega 2560 is utilized to
provide interconnection between all the equipments utilized as a part of the venture,
for example, RFID reader, LCD, Bluetooth module, ultrasonic sensor, Magnetometer
and engine drives. [7]
Table 3.1: Technical stipulations of Arduino Mega

Figure 3.3: Arduino Mega microcontroller, interfaced with all hardware


components

12
13

3.2.3 Ultrasonic Sensor

Ultrasonic sensor contains 4 pins, which includes 5V, echo, ground and trigger pin.
In this project, we have used six ultrasonic sensors for obstacle avoidance. Front of
the shopping trolley is installed with two ultrasonic sensors. Meanwhile two
ultrasonic sensors are installed on each left and right sides of trolley. These sensors
are connected to the Arduino Mega 2560. Now by continuously monitoring the
readings of these sensors, when any of these sensors detect an obstacle, it can know
the distance of the obstacle from itself. Now on uncovering of obstacle, we will
check the other sensor’s reading. If the obstacle for a sensor is away related to the
obstacle of other sensor, trolley will move in that direction. Thus the trolley keeps a
safe distance from the user and also avoids hitting other trolleys or the racks. While
doing this, trolley follows the person with the help of Magnetometer.

Figure 3.4: Ultrasonic Sensor

13
14

3.2.4 RFID Reader

RFID innovation is an ID framework which relies on upon remote recurrence and


little chips to transmit and prepare data in surroundings without collaboration. Latent
labels assemble vitality from a nearby by RFID reader looking at radio waves.
Dynamic labels have a nearby power source, for instance, a battery and may work at
a few meters from the RFID reader. Not in any manner like a scanner tag, the tag
requires not be inside the detectable pathway of the reader, so it may be embedded in
the followed question.

It is introduced in trolley which scans the products passing through the inlet
and are moved in to the cart. After reading the RFID number corresponding data
about the product gets displayed on the LCD.

Product RFID Tag RFID Reader Microcontroller

Figure 3.5: Block diagram of RFID reader

Table 3.2: Differences between Barcode Reader and RFID Reader

14
15

Figure 3.6: RFID Reader

3.2.5 LCD

LCD displays the product’s cost when the product is scanned by the RFID reader. It
also displays total number of products scanned and the total amount of products
scanned. As we put the item its cost will be added to total. Thus the billing will be
done at the trolley itself.

Figure 3.7: LCD

15
16

Table 3.3: LCD interface pin function descript

Figure 3.8: Block diagram of LCD 2004a

16
17

3.2.6 Bluetooth Modules

Two Bluetooth modules are used in this project which are HC-05 and HC-06.
Sensitivity of HC-06 can reach -80dBm and it has a 2.4GHz digital wireless
transceiver. HC-05 can be used in either Master or Slave mode though HC-06 works
only in Slave mode. In this project we have used HC-05 module in master mode
while HC-06 in slave mode. HC-05 is connected with Magnetometer while HC-06 is
connected with Arduino mega in trolley. The master module will send the data of
Magnetometer to the slave module at trolley. This is how the trolley will follow a
specific person because the slave module will make it to move towards the directions
given by master module.

Figure 3.9: Bluetooth modules: HC-05 and HC-06

17
18

Figure 3.10: Pin configuration of HC-05 and HC-06

3.2.7 Magnetometer

The Honeywell HMC5883L is proposed for low attractive field detecting with a
propelled interface for applications, for instance, minimal effort compassing and
magnetometry. The HMC5883L is a 3.0x3.0x0.9mm surface mount 16-stick leadless
chip bearer (LCC). Its applications fuse Mobile Phones, Netbooks, Consumer
Electronics, Auto Seafaring Theoretical account, and Personal Navigation Twist. The
HMC5883L uses Honeywell's Anisotropic Magnetoresistive (AMR) ontogenesis that
gives purposes of enthusiasm over other attractive sensor headways. Honeywell's
Magnetic Sensors are among the most delicate and tried and true low-field sensors in
the business. The sensor has 3 hub which are X, Y and Z hub [8].

In this project we’ve used X and Z axis for directions. The sensor will be given
to a person to tie it in his thigh. Magnetometer will send its reading via Bluetooth to
the trolley and then trolley will start to move after that person.

18
19

Figure 3.11: Magnetometer (HMC5883L)

Table 3.4: Features and benefits of Magnetometer

19
20

3.2.8 Omni Wheels

The Omni wheel is an Omni multi-directional wheel which can either move like an
ordinary wheel or roll horizontally utilizing the wheels along its circumference. The
Omni wheel gives the capacity to move in any course without the need of a
conventional swivel mount. Each wheel demonstrations autonomously to enhance
control and permits you to turn and move sideways in confined spaces. In the
meantime, these wheels permit moving forward/in reverse and pivot without
changing its orientation. In this project we’ve used two Omni wheels in front of
trolley so that trolley can be moved easily in any direction. The Omni wheels used in
this project are of 50mm.

Figure 3.12: Co-effect of Omni Wheels

3.2.9 DC Gear Motor

A gear motor is a particular kind of electrical motor that is proposed to deliver high
torque while supporting a low strength, or low speed, engine yield. It has a rigging
course of action in which a worm (an apparatus as a screw) catches with a worm

20
21

outfit (comparable in appearance to a goad adapt). Adapt engines can be found in


various applications, and are likely utilized as a part of numerous gadgets in your
home. In this project we’ve used 12V DC gear motor whose work is to drive the
trolley. It’s no load speed is 150rpm and no load current is <= 5 amperes. The motor
keeps its speed constant regardless of increasing load.

Figure 3.13: DC Worm Gear Motor

3.2.10 IMU Sensor (MPU 6050)

An inertial quantification unit (IMU) is an electronic contrivance that measures and


reports a body's exact constrain, rakish rate, and here and there the alluring field
bordering the body, utilizing a coalescence of accelerometers, gyrators and
magnetometers. It creates a guide wherever it is taken or moved, making it simple for
anybody to catch up that track. This is precisely why we've utilized it in our venture
so that wherever the human goes we keep up his track and tail it.

In this venture we're utilizing just accelerometers since we have no worry


about rakish movement. Straight accelerometers measure non-gravitational
increasing speeds of the vehicle. Since it can move in three tomahawks (up/down,
left/ideal, forward/back), there is a straight accelerometer for every pivot, and these
are the tomahawks which are required in our venture. IMU readings are used to count

21
22

the steps taken by person hence trolley will start to move after that person by
covering the total steps taken.

Figure 3.14: IMU Sensor, MPU 6050

3.3 3D Designs

22
23

Figure 3.15: 3D Design of DC Gear Motor

Figure 3.16: 3D Design of Ultrasonic Sensor

23
24

Figure 3.17: 3D Design of Trolley

Chapter 4
3
3
IMPLMENTATION

4.1 Mechanical Structure

Mechanical structure of trolley includes changing trolley tires, selecting proper motor
and installing it then placing a proper box to put battery and other components.
Afterwards installing sensors and billing system.

24
25

Figure 4.1: Trolley under mechanical construction phase


4.1.1 DC Gear Motor

First we calculated the torque for the motor to be used as the total weight to be
carried by trolley was selected to be 50kg. Total torque was calculated to be
0.635Nm for two motors. A 12V DC gear motor was selected to be used for this
project on the basis of required torque.

4.1.2 Wheels

Trolley’s original tires were


removed as they were not
appropriate for our project’s

25
26

requirement. For the back of trolley two generator wheels of 4inch diameter were
selected and for the front portion Omni wheels were selected. Motor shafts were built
and generator wheels were then attached to them. After attaching the wheels to the
motor, motors were assembled in trolley. Afterwards two Omni wheels of 2inch
diameter were assembled at the front side of the trolley.

Figure 4.2: Wheels of the trolley

26
27

4.1.3 Battery

At the bottom of trolley a 12V and 46amp battery is placed inside a proper box. A
power distributor board is attached with battery which supplies suitable voltage to
every component installed on trolley. A single battery is supplying power to whole
trolley. For Arduino mega, main microcontroller interfacing every hardware of
trolley, lm2578 a power distributor circuit of 12V and 3amp dc current is connected
with battery while for ultrasonic sensors there is lm7805 12V and 1amp circuit.

Figure 4.3: Power


distribution and
protection circuit

Figure 4.4: Power distributor circuit for Ultrasonic sensors and Arduino Mega
4.1.4 Arduino Mega 2560

Arduino Mega 2560 is placed in a box at the bottom of trolley. It is interfaced with
each hardware component of trolley. It monitors ultrasonic sensor and Magnetometer
readings and then on their evaluation drives the trolley. Every decision which our

27
28

smart cart makes either to move forward or stop or to follow a specific person is
controlled by Arduino.

4.1.5 Ultrasonic Sensors

Six ultrasonic sensors, two at the front side, two on left side and two on right side of
trolley are installed. Each ultrasonic sensor is attached with Arduino Mega 2560
board and they are also being controlled by it.

Figure 4.5: Ultrasonic Sensors View

4.1.5.1 Ultrasonic Sensors Coding

#define trigPin0 3
#define echoPin0 4

28
29

#define trigPin1 5
#define echoPin1 6

#define trigPin2 7
#define echoPin2 8

#define trigPin3 9
#define echoPin3 10

#define trigPin4 11
#define echoPin4 12

#define trigPin5 13
#define echoPin5 52

#define trigPin6 50
#define echoPin6 54

#define trigPin7 55
#define echoPin7 56

#define in1 14
#define in2 15

#define in3 16
#define in4 17

long cm=0;
long inches=0;
long cm1=0;
long inches1=0;
long duration=0,

29
30

long distance=0,

RightSensor1=0,BackSensor1=0,

FrontSensor1=0,LeftSensor1=0,
RightSensor2=0, BackSensor2=0,

FrontSensor2=0,LeftSensor2=0;

void setup()
{
pinMode(in1,OUTPUT);
pinMode(in2,OUTPUT);
pinMode(in3,OUTPUT);
pinMode(in4,OUTPUT);

pinMode(trigPin0, OUTPUT);
pinMode(echoPin0, INPUT);

pinMode(trigPin1, OUTPUT);
pinMode(echoPin1, INPUT);

pinMode(trigPin2, OUTPUT);
pinMode(echoPin2, INPUT);

pinMode(trigPin3, OUTPUT);
pinMode(echoPin3, INPUT);

pinMode(trigPin4, OUTPUT);
pinMode(echoPin4, INPUT);

pinMode(trigPin5, OUTPUT);

30
31

pinMode(echoPin5, INPUT);

pinMode(trigPin6, OUTPUT);
pinMode(echoPin6, INPUT);

pinMode(trigPin7, OUTPUT);
pinMode(echoPin7, INPUT);

Serial.begin (57600);

void loop()
{
SonarSensor(trigPin0, echoPin0);
LeftSensor1 = distance;

SonarSensor(trigPin1, echoPin1);
FrontSensor1 = distance;

SonarSensor(trigPin2, echoPin2);
FrontSensor2 = distance;

SonarSensor(trigPin3, echoPin3);
RightSensor1 = distance;

SonarSensor(trigPin4, echoPin4);
RightSensor2 = distance;

SonarSensor(trigPin5, echoPin5);
LeftSensor2 = distance;

SonarSensor(trigPin6, echoPin6);

31
32

BackSensor1 = distance;

SonarSensor(trigPin7, echoPin7);

BackSensor2 = distance;

Serial.print("RightSensor1 ");
Serial.print(RightSensor1);

Serial.print(" ");
Serial.print("FrontSensor1 ");
Serial.print(FrontSensor1);

Serial.print(" ");
Serial.print("LeftSensor1 ");
Serial.print(LeftSensor1);

Serial.print(" ");
Serial.print("RightSensor2 ");
Serial.print(RightSensor2);

Serial.print(" ");
Serial.print("FrontSensor2 ");
Serial.print(FrontSensor2);

Serial.print(" ");
Serial.print("LefttSensor2 ");
Serial.print(LeftSensor2);

Serial.print(" ");
Serial.print("BackSensor1 ");
Serial.print(BackSensor1);

32
33

Serial.print(" ");
Serial.print("BackSensor2 ");
Serial.print(BackSensor2);

Serial.print(" ");
Serial.println();

delay (10);
}
void SonarSensor(int trigPin,int echoPin)
{
digitalWrite(trigPin, LOW);
delayMicroseconds(2);

digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);

duration = pulseIn(echoPin, HIGH);


distance = (duration/2) / 29;

if(LeftSensor1<10&&LeftSensor2<10)
{
right();
}

else if(RightSensor1<10&&RightSensor2<10)
{
left();
}

else if(FrontSensor1<20&&FrontSensor2<20)
{

33
34

forward();
}
else if(FrontSensor1<20&&RightSensor1<10)
{
left();
}

else if(FrontSensor2<20&&RightSensor1<10)
{
left();
}

else if(FrontSensor1<20&&LeftSensor1<10)
{
// right();
}

else if(FrontSensor2<20&&LeftSensor1<10)
{
right();
}

else
{
stop();
}
delay (1000);
}

void forward()
{
digitalWrite(in1,HIGH);

34
35

digitalWrite(in2,LOW);
digitalWrite(in3,HIGH);
digitalWrite(in4,LOW);
}

void left()
{
digitalWrite(in1,LOW);
digitalWrite(in2,LOW);
digitalWrite(in3,LOW);
digitalWrite(in4,HIGH);
}

void right()
{
digitalWrite(in1,LOW);
digitalWrite(in2,LOW);
digitalWrite(in3,HIGH);
digitalWrite(in4,LOW);
}

void stop()
{
digitalWrite(in1,LOW);
digitalWrite(in2,LOW);
digitalWrite(in3,LOW);
digitalWrite(in4,LOW);
}

35
36

4.1.6 RFID Reader

RFID reader is attached at the top side of trolley. It has three parts which consists of
a scanning antenna, a transceiver to interpret the data with a decoder and a
transponder i.e. RFID tag which is programmed with product’s information. Each
product that a person picks up and places in trolley is firstly scanned by RFID reader.
It reads the tag attached to each product and displays its price on LCD, interfaced
with it.

Figure 4.6: Flow chart of billing system

36
37

4.1.7 LCD

A 4 rows X 20 columns LCD is attached at the top side of trolley along with RFID
reader. It displays the price of products and the total amount of products bought.

4.1.7.1 LCD Coding

#include <LiquidCrystal.h>

LiquidCrystal lcd(2, 3 , 4, 5, 6, 7);

#include <RFID.h>
/*
* Pin layout should be as follows (on Arduino Uno):
* MOSI: Pin 11 / ICSP-4
* MISO: Pin 12 / ICSP-1
* SCK: Pin 13 / ISCP-3
* SS/SDA: Pin 10
* RST: Pin 9
*/

#include <SPI.h>
#include <RFID.h>

#define SS_PIN 10
#define RST_PIN 9

RFID rfid(SS_PIN,RST_PIN);

int self = 7;
int bat = 8;
int s = 6;
int sum = 0;

37
38

int Tot=0;
int sop;
int prod;
int price;
int bz=5;
int serNum[5];

int cards[][5] = {
{42,249,70,213,64}
};

bool access = false;

void setup(){

Serial.begin(9600);
lcd.begin(20,4);

SPI.begin();
rfid.init();

pinMode(bz,OUTPUT);

pinMode(self, OUTPUT);

pinMode(bat ,OUTPUT);

pinMode(s,OUTPUT);

// pinMode(led,OUTPUT);

digitalWrite(self, LOW);
digitalWrite(bat , LOW);

38
39

Serial.print(" THANK YOU FOR USING SBUR :-) ");

Serial.println(" ");

lcd.setCursor(0,0);

lcd.print("THANK YOU FOR USING ");

lcd.setCursor(8,1);

lcd.print("SBUR");

//lcd.println(" ");

delay(5000);

lcd.clear();
}

void loop()
{
if(rfid.isCard())
{
if(rfid.readCardSerial())
{
digitalWrite(bz, HIGH);
delay(500);

digitalWrite(bz, LOW);

delay(500);

39
40

//Serial.print(rfid.serNum[0]);

//Serial.println(" ");

/* Serial.print(rfid.serNum[1]);

Serial.print(" ");

Serial.print(rfid.serNum[2]);

Serial.print(" ");
Serial.print(rfid.serNum[3]);

Serial.print(" ");
Serial.print(rfid.serNum[4]);

Serial.println("");*/

for(int x = 0; x < sizeof(cards); x++){

for(int i = 0; i < sizeof(rfid.serNum); i++ ){

if(rfid.serNum[i] == cards[x][i]) {
access = false;
break;
}
else
{
access = true;
}
}
if(access) break;
}
}
40
41

delay(500);

if(access)
{
Serial.println("CARD ACCEPTED");
lcd.setCursor(3,1);

//lcd.println("CARD ACCEPTED");
// delay(500);

lcd.clear();
digitalWrite(bat,HIGH);
digitalWrite(self,HIGH);
delay(500);
digitalWrite(self,LOW);

}
else {
//Serial.println("Not allowed!");
digitalWrite(s,HIGH);
delay(500);
digitalWrite(s,LOW);
digitalWrite(bat,LOW);
}

if(rfid.serNum[0]==65)
{
Serial.println("PRODUCT's PRICE: 100 PKR");
lcd.print("PRODUCT's PRICE:100");
lcd.setCursor(0,1);
lcd.print("Rs");
delay(1500);
lcd.clear();

41
42

price = 100;
prod=1;
}

else if (rfid.serNum[0]==240)
{
Serial.println(" PRODUCT's PRICE: 300 PKR ");
lcd.print("PRODUCT's PRICE:300");
lcd.setCursor(0,1);
lcd.print("Rs");
delay(1500);
lcd.clear();
price = 300;
prod=1;
}

else if (rfid.serNum[0]==16)
{
Serial.println("PRODUCT's PRICE: 500 PKR ");
lcd.print("PRODUCT's PRICE:500");
lcd.setCursor(0,1);
lcd.print("Rs");
delay(1500);
lcd.clear();
price = 500;
prod;

else if (rfid.serNum[0]==248)
{
Serial.println("PRODUCT's PRICE: 800 PKR" );

42
43

lcd.print("PRODUCT's PRICE:800");\
lcd.setCursor(0,1);
lcd.print("Rs");
delay(1500);
lcd.clear();
price = 800;
prod=1;

else if (rfid.serNum[0]==208)
{
Serial.println("PRODUCT's PRICE: 1000 PKR ");
lcd.print("PRODUCT's PRICE:1000");

lcd.setCursor(0,1);
lcd.print("Rs");
delay(1500);
lcd.clear();
price = 1000;
prod=1;

}
else if(rfid.serNum[0]==0)
{
Serial.println("PRODUCT's PRICE: 50 PKR");
lcd.print("PRODUCT's PRICE:50");

lcd.setCursor(0,1);
lcd.print("Rs");
delay(1500);
lcd.clear();

43
44

price = 50;
prod=1;
}

else if(rfid.serNum[0]==48)
{
Serial.println("PRODUCT's PRICE: 700 PKR");
lcd.print("PRODUCT's PRICE:700");

lcd.setCursor(0,1);
lcd.print("Rs");
delay(1500);
lcd.clear();

price = 700;
prod=1;
}
else if(rfid.serNum[0]==192)
{
Serial.println("PRODUCT's PRICE: 250 PKR");

lcd.print("PRODUCT's PRICE:250");

lcd.setCursor(0,1);
lcd.print("Rs");
delay(1500);

lcd.clear();

price = 250;
prod=1;
}
else if(rfid.serNum[0]==224)

44
45

{
Serial.println("PRODUCT's PRICE: 650 PKR");

lcd.print("PRODUCT's PRICE:650");

lcd.setCursor(0,1);
lcd.print("Rs");
delay(1500);
lcd.clear();

price = 650;
prod=1;
}
sum = sum + price;
Serial.print(" TOTAL AMOUNT : ");
Serial.print(sum);

lcd.print(" TOTAL AMOUNT:");


lcd.print(sum);

lcd.print("Rs");
Serial.println(" ");

//lcd.println(" ");

sop=sop+prod;
Serial.print("TOTAL PRODUCTS SCANNED:");

Serial.print(sop);

//delay(1000);
lcd.setCursor(0,3);

45
46

lcd.println(" ITEMS SCANNED:");


lcd.print(sop);

delay(1500);
lcd.clear();

}
//rfid.halt();
}

4.1.8 Magnetometer

A Magnetometer circuitry is made which includes magnetometer itself, IM sensor,


Arduino and Bluetooth module i.e. HC-05. This circuitry is placed in a small bag
which will be attached to a person’s thigh. When a person moves magnetometer will
start to give directions in two different axis. These directions will be sent to Arduino
Mega placed at the bottom of trolley via Bluetooth and hence trolley will start to
follow that particular person by covering up the directions being generated by
magnetometer.

46
47

Figure 4.7: Magnetometer readings

47
48

Chapter 5

RESULTS AND DISCUSSIONS

5.1 Results

The project involves both hardware and software. The microcontroller is connected
to all hardware and it collects data from them. First of all, ultrasonic sensors were
linked with Arduino Mega. Six ultrasonic sensors have been used in this project
whose readings are shown by the figure 5.1.

Figure 5.1: Ultrasonic Sensor readings

Secondly, Magnetometer and IMU sensor were connected with


microcontroller via Bluetooth modules. The trolley gets directions from
Magnetometer of either to turn or to just move forward and starts to follow it.

48
49

At the end billing system was made by using RFID reader, its tags and an
LCD. The result of billing system which includes displaying of product’s cost and
total amount when few products were scanned has been shown in figure 5.2.

Figure 5.2: LCD display

Figure 5.3: Billing system

49
50

The greater part of the equipment and segments are modified in the
fundamental microcontroller. Six ultrasonic sensors are placed in three distinct sides
of the shopping trolley with a specific end goal to maintain a strategic distance from
hindrances. Magnetometer which acts as a location indicator is set in a little sack
which gets tied up on individual's thigh. The correspondence amongst Magnetometer
and trolley is by means of Bluetooth association. The development of shopping
trolley is controlled by Arduino Mega 2560. The execution of the venture completed
in indoor condition is appeared in figure 5.4.

50
51

Figure 5.4: Project performance


5.2 Discussion

Many problems were generated while carrying out the project mostly due to the
software interfacing.

5.2.1 Interfacing Ultrasonic Sensors

Interfacing six ultrasonic sensors at a same time was a huge task as they were
connected at different positions hence giving different readings at the same time.
There was a delay problem, the microcontroller was monitoring their readings one by
one, not all at a time. Due to which the trolley was taking quite a time to stop due to
obstacles. This problem was solved by making numerous changes in coding.

5.2.2 Interfacing Bluetooth modules

There are two Bluetooth modules used in this project, HC-05 and HC-06. First
there was a problem of getting these modules in AT Mode, which was resolved by
proper handling their connections and having a proper look at their datasheets.
Then when the modules were paired we were unable to send the Magnetometer
data to other module. It took quite a time to understand the problem. There were
some changes in coding like syntaxes, loops, baud rate and libraries. Then finally
the problem was resolved and we were able to send data from one module to
another.

5.2.3 Speed of the Trolley

The trolley was running very fast regardless of heavy weight. We were unable to
make it have a constant speed. Then we made a proper MOSFET speed control

51
52

circuit for it which converted 150rpm into 60rpm and this problem was also
resolved.

Chapter 6

CONCLUSION AND RECOMMENDATIONS

6.1 Conclusion

Innovation is intended to make one's life less demanding. At the point when an issue
is found, engineers meet up to unravel them utilizing innovation. This critical
thinking will propel the innovation for the person, and therefore give them comfort.
The proposed project was intended to finish this provision. The smart shopping
cart could wipe out the obstacle of emptying the things from the trolley; in this
manner, the time spent at the cashier could be diminished. Customers could
appreciate the time spared with doing different things instead of standing inertly to
sit tight for their swing to pay [9].

In Smart Cart, there is no compelling reason to pull heavy weighted trolley,


no compelling reason to wait in billing line and no need of pondering about budget.
The microcontroller based trolley consequently follows the customer. Additionally it
keeps up safe separation amongst customer and itself. The proposed system is highly
reliable, endorse, trust-worthy and time-effective. The aids of using this scenario in
terms of cost and time effectiveness may be summed up as the salary amount given
by the mart to the employees will shrink since the manpower is going to minimize as
the whole system is becoming smart. Meanwhile the customers can enjoy shopping
without pushing shopping trolleys themselves. [10]

52
53

6.2 Recommendations

The difficulties here are to make the trolley smart via automation, as well as to deal
with the worries that are raised because of the automation procedure, for example,
likelihood of false alerts, vitality utilization, cost-adequacy, and so forth.

The following changes can be done to the trolley:


 Enhance the trolley design
 Track and show the area of shopping trolley to permit grocery store staffs and
clients to know the present areas shopping trolley
 All the charging data can be send to focal PC utilizing ZigBee innovation to
print the bill slip

Notwithstanding the previously mentioned highlights, the planned system ought to


likewise incorporate the treatment of the accompanying unique cases, which
guarantees that the system is not reasonable. Every one of the cases said beneath
ought to be identified by the system:
 Those products which are kept into the trolley without looking over RFID
reader
 When the customer has scanned a product, yet neglected to put it in the
trolley
 Scanning one product, yet putting multiple products in the trolley
 Attempt to escape one result of high cost by examining the standardized
identification of another result of lesser cost

53
54

REFERENCES

[1] Runaway shopping trolley kills Chinese woman in


supermarket. http://www.nydailynews.com/news/world/video-supermarket-cart-
killschinese-woman-article-1.1380903

[2] Candice, M. Trolley Crushed Shopper http://www.abc.net.au/news/2011-10-


10/coroner-looks-intotravelator-death/3460304

[3] https://www.researchgate.net/publication/252022763_A_mini_forklift_robot

[4]. .http://www.academia.edu/6438030/Radio_Frequency_based_Remote_operated
_SPY_Robot

[5]. .https://www.google.com.pk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=
2&ved=0ahUKEwjYkyqgsLTAhVIuBQKHfmJCVYQFggkMAE&url=http%3A%2F%2F
www.dtic.mil%2Fget-tr doc%2Fpdf%3FAD%3DADA538163&usg=AFQjCNGh4Wp -
GzFjSDBmP32IXAxFmgNY6w&cad=rja

[6] http://www.jurnalteknologi.utm.my/index.php/jurnalteknologi/article/view/4246

[7] https://www.arduino.cc/en/Main/arduinoBoardMega2560

54
55

[8]…https://www.google.com.pk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&
cad=rja&uact=8&ved=0ahUKEwjl15K4gsrTAhVBWhQKHfj1CCEQFggfMAA&url
=https%3A%2F%2Fcdn-shop.adafruit.com%2Fdatasheets%2FHMC5883L_3-
Axis_Digital_Compass_IC.pdf&usg=AFQjCNHvrLeVoBdrXbV4gABsJjWhuxTl0Q

[9]https://www.google.com.pk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad
=rja&uact=8&sqi=2&ved=0ahUKEwi6t_q2mdHTAhXGYlAKHQJTD2oQFggfMA
A&url=http%3A%2F%2Fwww.ele.uri.edu%2Ffaculty%2Fhe%2FSeniorDWebsite%
2Fsmartshoppingcart%2Finformation%2FProject_proposal.pdf&usg=AFQjCNFEwI
XY7IabW5cCHUUAyS0F34QPYw

[10] Smart Trolley in Mega Mall


https://www.google.com.pk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0
ahUKEwju396u9LzSAhVJs48KHT7lBlEQFggXMAA&url=http%3A%2F%2Fwww
.ijetae.com%2Ffiles%2FVolume2Issue3%2FIJETAE_0312_82.pdf&usg=AFQjCNH
iyn8TopeUK2ftpVFF-Vl62XKEDA&bvm=bv.148747831,d.c2I&cad=rja

55
56

APPENDICES

APPENDIX A

Datasheet of LM1578

56
57

57
58

Appendix B

Datasheet of LM87805

58
59

59
60

60
61

61
62

Appendix C

Ultrasonic Sensor Datasheet

62
63

63
64

Appendix D

RFID Reader Datasheet

64
65

65
66

66
67

Plagiarism Report

67

Das könnte Ihnen auch gefallen