Documente Academic
Documente Profesional
Documente Cultură
NG YEN LENG
DEcIARAT|oNoFTHEs|s/UNDERGRADUATEPRoJEcTPAPERANDCoPYR|GHT
SIGNATURE
900216-01-6030 DR LIM CHENG SIONG
(NEW rC NO./ PASSPORT NO.) NAME OF SUPERVISOR
NoTEs : * tf th" ihesis is 66NFIDENT|AL or RESTRICTED, pleose ottoch with the letler from the orgonisotion
with period ond reosons for confidentiolity or restriction'
..Iherebydeclarethatlhavereadthisthesisandinmyopinionthisthesisis
purpose of awarding the degree of
sufficient in terms of scope and quality for the
BachelorofEngineering(Electrical-Mechatronics)''
Signature
CHENG SIONG
Name of SuPervisor
5 JUNE 2OI4
Date
i
NG YEN LENG
JUNE 2014
Trolley with
I declare that this thesis entitled "Automatic Human Guided Shopping
Smart Shopping System" i the result of my own research except as cited in the
references. The thesis has not been a any degree and is not concurrently
Signature :
NG YEN LENG
Name :
5 JUNE 2014
Date :
iii
ACKNOWLEDGEMENT
This project came from my proposed idea with some suggestions from my
supervisor, Dr Lim Cheng Siong. The research is done with the guidance given by
my supervisor. In my opinion, this project will be very useful and become a new
trend in the future. I am very thankful for those who have provided advices and help
in this project.
First and foremost, I am very grateful and appreciated with the help of my
final year project supervisor who has been guiding and encouraging me throughout
the developing process of this project. I am very thankful for his invaluable guidance
and support throughout these two semesters. Besides, I would like to express my
grateful and appreciation for all of my friends who gave me some suggestions and
advices in the project.
At last, my heartfelt gratitude goes to all the lecturers and course mates who
have provided me suggestions and lessons throughout my university life. With their
advices and helps, I am able to gain knowledge from them and become a better
person. This can be helpful to me on being to be a professional engineer and person
in the future.
v
ABSTRACT
ABSTRAK
TABLE OF CONTENTS
DECLARATION ii
DEDICATION iii
ACKNOWLEDGEMENT iv
ABSTRACT v
ABSTRAK vi
TABLE OF CONTENTS vii
LIST OF TABLES x
LIST OF FIGURES xi
LIST OF SYMBOLS xv
LIST OF ABBREVIATIONS xvi
LIST OF APPENDICES xviii
1 INTRODUCTION 1
1.1 Introduction 1
1.2 Problem Statement 2
1.3 Objectives of Research 3
1.4 Scopes of Work 4
1.5 Research Methodology 6
1.6 Thesis Outline 9
2 LITERATURE REVIEW 10
2.1 Introduction 10
viii
3 SYSTEM DESIGN 26
3.1 Introduction 26
3.2 Hardware Design 26
3.2.1 Mechanism of Mobile Shopping Trolley 27
3.2.2 Intel Board DE2i-150 28
3.2.3 Arduino Mega 2560 Board 29
3.2.4 RFID Technology for Mobile Robot 30
Localization
3.2.5 Ultrasonic Sensor 32
3.2.6 Bluetooth Module 33
3.2.7 Auto-Calibrating Line Sensor 33
3.2.8 Motor Driver 34
3.2.9 Electric Scooter Motor with Gear 35
3.3 Software Design 36
3.4 Summary 38
ix
5 CONCLUSION 51
5.1 Introduction 51
5.2 Conclusion 51
5.3 Future Works 52
REFERENCES 53
Appendices A-E 58-71
x
LIST OF TABLES
LIST OF FIGURES
4.3 RFID reader connected with Arduino Mega board and the
message receive after tagged will be displayed in serial
monitor where UART pin of RFID reader, TX pin is
connected to pin RX of Arduino Mega board. 41
4.4 The functionality of robot that is attached to the shopping
trolley is tested on the black line or path with white
background and the movement of robot is controlled by
using smartphone. 42
4.5 Screenshot (a) shows dialogue message of Bluetooth
permission request pops out once Android application is
opened if Android smartphone have not turn on Bluetooth
connection. Screenshot (b) shows that users can click on
the menu button and connect this Android application to
server system after Wi-Fi hotspot is turned on. 43
4.6 Screenshot (a) shows the GUI of server in disconnect
condition. Screenshot (b) shows the server was waiting for
client connection. Screenshot (c) shows server was
connect when client was connected to the server.
Screenshot (d) shows server had received the selected
items from Android application and it sent locations of
items in term of coordinates to the Android application
GUI automatically after processed. 44
LIST OF SYMBOLS
A - Ampere
cm - Centimeter
GHz - Giga Frequency, hertz
Hz - Frequency, Hertz
kB - Kilo Bytes
kHz - Kilo Frequency, Hertz
mA - Milliamperes
MHz - Mega Frequency, Hertz
Mm - Millimeter
Nm - Newton Meter
RM - Malaysia Ringgit
µs - Microsecond
V - Potential difference, Voltage
£ - Pound Sterling
$ - Dollars
xvi
LIST OF ABBREVIATIONS
LIST OF APPENDICES
CHAPTER 1
INTRODUCTION
1.1 Introduction
Nowadays, vision based robot has become a trend for navigation purpose.
However, the tradition method of line following navigation still plays an important
role in mobile robot technology. This is because a robot with line following
capability has lower cost to build and is simpler in design [4]. Besides, application of
Radio Frequency Identification (RFID) technology for robot nowadays has become
popular especially in localization scheme. It is a non-touching recognition system
where it can tag and send tag data wirelessly at various distances [5]. In order to
prevent objects collision, ultrasonic sensor was used in this project. Robot can react
2
based on data collected from sensors such as detection of an obstacle close to the
robot [6]. On the other hands, an enterprise can take advantage of networking
technology in managing the resource. There is a server system where it always
waiting to connect with client side. This server system would process the received
information and sending to client side. The database was stored in server system.
Both of server and client system were programmed in Java programming language.
This communicating system can work well and without limit either in local network
or internet [7].
In this project, a portable robot with human and line following functions was
developed to assist customers to carry a heavy load while shopping in the
supermarket. Meanwhile, a smart shopping system was also developed in order to
identify the location of each item in supermarket in assisting customers to locate the
desired items. Besides, the customer is informed of the current location of the
shopping trolley. This information is displayed in android smartphone application.
Cases of losing shopping trolley have caused grocery store owners a loss of
$8,000 to $10,000 per year, which is equal to RM 25,696.00 to RM 32,120.00. Robin
Webb, a manager of a big grocery store said that he had lost 50 to 100 trolleys every
six months. The shopping trolley loss happened because of theft [8]. Besides, there is
a weekly loss of shopping trolleys which is totally worth £3,000 (RM 16,218.35)
occurred in an Essex supermarket [9]. In Malaysia, a shopping trolley with 90 Litre
Standard Tube Base ST costs up to RM 509.90 [10]. On the other hand, a
supermarket or store will be fined £25 which is approximate to RM 135.15, if an
abandoned shopping trolley is found [11]. Supermarkets or stores have to hire trolley
collector or contract with trolley collector company to collect the trolley and this
increases the operating cost. According to Fair Work Ombudsman (FWO), some of
3
the companies such as Adelaide Company was fined $40,000 for underpaying of
about $30,000 to the six trolley collectors [12].
It was also found that shopping trolleys are always scattered around
everywhere inside or outside the supermarkets. This can cause the trolley runaway
from its position and injuring the people. A woman was killed by a quickly
approaching runaway trolley when she exited the escalator [13]. There was also a
loaded trolley runaway and caused a woman died and injury her husband in a
shopping centre [14]. In addition, there was also found that customers who were in
rush looking for their desired items. Sometimes the specific brand of item is difficult
to find. This caused them wasted a lot of time to find their desired items in
supermarkets.
In order to develop the project, three main parts are considered. They are
portable robot which will be installed under shopping trolley, client-server system
development and project performance test. The first part of the project focuses on the
portable robot development. Differential wheeled drive method is implemented on
the robot. As compare to other designs, differential wheeled drive has better
performance. This is because the wheel configuration is uncomplicated [15]. The two
driven wheels are located in between front and rear wheels of shopping trolley.
Therefore, it can change the direction of shopping trolley by changing each wheel’s
speed of rotation. The robot mechanism is designed by using Solidworks software.
Then, the robot is fabricated according to the design by using aluminium bars. This
robot is flexible to be installed and uninstalled from a shopping trolley. The
microcontroller, Arduino Mega 2560, RFID reader, Bluetooth module and line
sensor are placed on the robot. Meanwhile two ultrasonic sensors are put in the front
side of shopping trolley for obstacle avoidance purpose so that it will not collide with
any other dynamic or static object.
The second part of the project consists of software development. Both client
and server are developed by using Java programming language in eclipse software.
Android application is developed as client on Android phone, meanwhile server will
act as database system to store the items’ information. This database system will be
implemented in Intel board. The server on Intel board will open connection, listen
and accept request from client where server will receive and process the data sent
from client. Then server will send the data coordinates to client and displayed on
GUI of Android application in the smartphone. On the other hand, Android
application in the smartphone acts as client where it keeps track the items selected by
5
a user and then send to server system. Thus, the received coordinates from server will
be plotted on the shopping map, which is GUI of Android application. The size of
shopping map is limited to fit the screen size of 3.7 inches of smartphone. Wi-Fi
Hotspot in Intel board is used for client and server connection. On the other hand, the
communication between Android smartphone and robot is via Bluetooth.
The third part is real time live test on the functionality of portable robot and
client-server system. A shopping trolley is used to install the developed portable
robot. The functionality and efficiency of the developed shopping trolley and smart
shopping system are tested with the client-server system in indoor environment.
Table 1.1 shows the scope of the project where the application and features of
robot, hardware development and software development are listed. The 2D
Engineering drawing of robot mechanism with dimension are reported in
APPENDIX B.
6300
Communication Wi-Fi Hotspot and Bluetooth
technology
Algorithm i. Line following algorithm by using PID control
method.
ii. Interrupt method is used for line following
algorithm.
iii. Polling method is used for RFID reader algorithm,
Bluetooth connection algorithm and obstacle
avoidance algorithm.
iv. Differential wheeled drive method is applied in the
robot mechanism.
Performance i. Robot is plugged on the shopping trolley, then test
measurement the robot with line following function on the black
line path with white background card board.
ii. Test the communication between smartphone and
Intel board via Wi-Fi hotspot.
iii. Test the communication of robot and smartphone via
Bluetooth connection.
iv. Test overall system in the indoor environment,
Robotics Laboratory in UTM.
The research methodology is given in Figure 1.1. First of all, literature review
is carried out in order to gather the required information including the problem
statement that is needed to be solved. Then, the basic communication of client and
server is developed. The connection between server and client is tested through
keyed in text sending and receiving between both server and client.
Thirdly, server system is developed. The server system GUI is developed and
essential functions are also programmed. The server can receive and process the
received data from client, and send the processed data to client.
Start Problem
To develop an automatic human guided shopping trolley
with smart shopping system (AGSTS) to lead users to
items locations, provide convenience to users and
Literature review prevent shopping trolley being abandoned everywhere in
supermarket.
Objective 1
Communication To develop an Android application as client
between client and
server system Scope
development -- Java programming in eclipse software
-- Connection between server and client is established by
using Wi-Fi hotspot
Client as Android -- Connect to server and Bluetooth module on robot,
application select items from list view and send to server, display
development received items locations as coordinate in UI of shopping
map
Objective 2
To develop server as database system
Scope
Server as database
-- Java programming in eclipse software
NO system development
-- Export the program as .jar file and run it in Intel board
-- Server can only be connected to one client
-- Process received data from client and send back to
client
Objective 3
To develop a portable mobile robot mechanism for
shopping trolley
Objective 4
To test the performance of the client-server applications
and shopping trolley with attached robot in the indoor
environment
Experimental
Tested Working?
Scope
-- Test the communication between client and server
system in indoor environment
-- Test the robot hardware functionality
YES
-- Test the communication between robot and client in
indoor environment
End
CHAPTER 2
LITERATURE REVIEW
2.1 Introduction
This chapter mentions about the definition and usage of shopping trolley,
users’ review on shopping trolleys as well as some of the similar products which are
implemented with certain system or design to assist users and retailers as well as
enable users to enjoy shopping. Besides, line following robot, RFID technology and
theory of client-server applications are elaborated.
Shopping trolley is also called shopping cart which is like a carriage or basket
that can be used by customers to transport their purchased product inside grocery
shops or supermarkets. The shopping trolley is a cart supplied by supermarkets. In
united stated, supermarket workers will return the trolley to the storage area after
customers leave the carts in the parking lot. In European and Canada, the
supermarket performs a coin locks system on the shopping carts in order to
11
encourage the customers to return the carts themselves after use. In addition, the
design of shopping trolley was concerned. This is because poor designed shopping
trolley can cause potential musculoskeletal injuries from manually pushing or pulling
heavy loads [16]. A market survey was conducted where the results shown that most
of the users expected the shopping trolley to feature energy saving, pulling and
pushing motion and adjustable height [17]. Healthy and safety of users are prioritised
when they are shopping in the supermarkets.
Shopping trolley is a convenience and necessary tool for customers who are
shopping in a supermarket. They can put a lot of things inside without carrying
themselves but just have to push the shopping trolley. However, there is a problem
faced by retailers or manager of the supermarket nowadays. A manager from a
Ward’s supermarket claimed that they have probably three to four shopping carts
missing per day. The workers of the supermarket have ever seen some of the
customers take the shopping carts away after shopping. According to Sanitation
officers, it is illegal of taking shopping trolley from a supermarket but it is hardly to
control and take action on these people [18].
stressful during the shopping as she needs to hold her daughter’s hand constantly and
her another son who is just 10 months old was sat in the toddler seat [20] meanwhile
she has to push the shopping trolley.
Apart from this, a shopping cart which is designed to allow kids to be sat
inside can cause a problem to customers as well. There was a case happened to Orem
where a mother had her daughter sat on the shopping trolley was molested by a
stranger. The stranger took the opportunity to approach the victim when the mother
walked away for a few minutes [21]. Figure 2.1 shows the stranger approached the
victim when her mother is absence.
Figure 2.1: A stranger approached the victim when her mother walked away [21].
On the other hand, the new technology allows an automatic braking system to
be installed on a shopping cart. However, it can cause the users to get shocked and
hurt. The technology uses an underground antenna and it sets a perimeter around the
store. When a user pushes the shopping cart over the perimeter, a signal is sent to
automatically lock the wheel. However, there is no sign and warning at all and thus it
can cause a shock and hurt the user. This is one of the methods used by company to
prevent their carts to get stolen or damaged. The companies spent millions of dollars
to recover the lost shopping carts every year [22].
supermarket and websites, privacy or risk of online security, afraid of making wrong
decision, high quality conscious, as well as they always become hesitate to make
final payment [23]. This might be due to insecure for customer to purchase online.
provide the convenience to the customers as well as cost savings to the retailers.
There is an electronic scanner to scan line-encoded information and register the
identity of each item. The system can also record the cost of items. The system is
equipped with dual scanning method. When customers first scan the item, price and
identification of the item will be displayed. When customers decide to purchase the
item, they need to scan the item for second time and hence the same information will
be printed on customers’ receipt. When the item is placed into the equipped weight
sensing area in the trolley, the item’s weight will be compared with the known
weight of that item by central computer. If the weight is correct, the item will be
accepted. In order to prevent the customers from cheating the system, a security
system is also installed in the shopping trolley [34]. The system and the shopping
trolley is as shown in Figure 2.5.
Figure: 2.6: Side view of rear wheel equipped with a shroud [35].
equipped with a radio receiver to receive the emitted signal. With this system, a
missing shopping cart can be found at maximum range [36].
Figure: 2.7: VHF receiver and handle of shopping trolley are mounted with radio
transmitter [36].
This project developed a robot that can automatically return from parking to
store. The robot is installed into a shopping trolley. GPS and inertial measurement
are studied for self-localization system. It was found that self-localization by using
inertial measurement unit is more suitable and effective in short distance. Meanwhile
GPS is effective for destination estimation. For obstacle avoidance consideration, a
laser range scanner is used to detect obstacles while the robot is moving. However, it
was found that it is only satisfied with static obstacles [37]. Figure 2.8 shows the
graph of GPS localisation.
Figure 2.9: High level block diagram of novel low-cost intelligent shopping cart
[38].
Figure 2.11 show the mobile device and robot with displayed current shopping list
and product information.
Figure 2.10: A mobile device that can display a list written by users and the
identification QR-code [39].
Figure 2.11: Autonomous robot can display the current shopping list, product
information and image taken by robot [39].
2.9 Summary
Features:
-Reduce time-consuming of check-out
items
- Able to total the cost of items
- Security system to avoid customers
from attempting to take advantage of
the system
- Equipped with two scanners, printer
and a visual display unit
- Weighting sensing device is installed
to make sure the item same as the
weight data stored to ensure the item
purchased is correct.
Shopping Cart Theft Prevention System Objective: To invent a magnetic
[35] braking system for shopping cart’s
wheel
Features:
- Magnetic braking system is applied
where a shopping trolley wheel is
coupled to a rotating element
- Relatively low cost
Shopping Cart Retrieval System [36] Objective: To develop a shopping cart
retrieval system to detect and recover
the missing shopping carts
24
Features:
- Integrate two different units of
electronic equipment
- VHF “beacon” radio transmitter
implemented in the cart’s handle
which can emit signal continuously
when the cart leaves the store
- A search team is equipped with a
VHF radio receiver with both
omnidirectional antennas to detect
missing shopping carts at maximum
range
A Study of Functions for Robot Returned Objective: To develop an autonomous
from Parking to Store Autonomously [37] mobile robot on a shopping trolley
Features:
- Develop self-localization by using
GPS and inertial measurement unit
- By using a laser range scanner to
develop a program to recognize and
avoid obstacle avoidance
A Novel Low-Cost Intelligent Shopping Objective: To assist shoppers by
Cart [38] reducing time spent when purchasing
an item at available best price as well
as inform them on any promotion
deals and location of products
Features:
- Using infrared sensors to track and
detect location
- RFID tag is used to identify product
- ZigBee is used as wireless
communication with Server
25
Features:
- Consists of mobile devices,
autonomous robot and server database
system
26
CHAPTER 3
SYSTEM DESIGN
3.1 Introduction
The system design, which covers both hardware and software design for the
development of AGSTS is described. The overall project system flow is presented as
Unified Modelling Language (UML) in this chapter.
In hardware design, Arduino Mega 2560 was used as the microcontroller for
the portable robot. All hardware used including RFID reader, ultrasonic sensors,
Bluetooth module, auto-calibrating line sensor and motor driver were connected to
Arduino Mega 2560. RFID reader was used to read tag cards and sent tag data to
Android smartphone via Bluetooth module. Ultrasonic sensor was used for obstacle
avoidance. Line sensor was used for robot line following purpose. Motor driver was
used to drive electric scooter motor with gear. There was a robot base mechanism
installed under shopping trolley. Microcontroller, RFID reader, Bluetooth module,
27
auto-calibrating line sensor, motor driver and 12V acid battery were put on the robot
base in order to control the shopping trolley. Meanwhile ultrasonic sensors were
installed at each side of shopping trolley.
Mechanism design for mobile shopping trolley was based on the portability
concept. The mechanism can be attached under the bottom of shopping trolley and it
can be taken out easily. Shopping trolley was implemented with differential wheeled
drive. The two driven wheels are placed as middle wheels of the trolley. Therefore, it
can move in every direction. Besides, suspension mechanism was designed by using
springs so that the robot is able to touch with the uneven ground surface [40]. This
helps to increase the stability of the shopping trolley. Figure 3.1 and Figure 3.2 show
the robot mechanism and shopping trolley with attached robot respectively.
Figure 3.1: Side angle view and top view of robot mechanism with hardware and
components attached.
28
Intel board was used as the main platform in this project as a server database
system. Its operating system is Linux and acts as the central processing unit of the
system. It has Intel® Atom™ Dual Core Processor N2600 (1M Cache, 1.6GHz) and
is equipped with Intel® NM10 Express Chipset, DIP package Bios flash, GD25Q16,
4 USB 2.0 Host ports and 1 USB Blaster as well as Cyclone IV GXP4CGX150F31
FPGA device. Intel Atom processor and the FPGA device are linked together via two
high-speed PCIe lanes. There is a high communication speed between them. This
board will be placed in the supermarket and it was connected with Android
smartphone by using WIFI hotspot. The Intel board is as shown in Figure 3.3.
29
Figure 3.3: Intel® Atom™ Dual Core Processor N2600 which is used as server
database system to store the locations of items. Each item is set with specific
coordinate. The Intel Atom communicates with Android application via Wi-Fi
hotspot.
Figure 3.4: Arduino Mega 2560 microcontroller is used as the main microcontroller
to interface with all hardware and components
RFID tag [42]. Therefore, RFID reader, RDM6300 was chosen to be used in this
project in order to provide a specific coordinate for the robot to recognise its location.
Location of robot and items will be displayed in the shopping map in term of
the coordinate based on Android smartphone screen resolution. Frequency of tag
cards used must be the same as that of RFID reader. RFID reader of RDM630 has
two pins for Antenna 1 and Antenna 2, TX pin to transmit data, RX pin to receive
data, two pins for 5 V DC (Direct Current), and two pins for ground. There is also
one pin for LED. RFID reader was attached under the robot. Meanwhile RFID tag
card was placed on the floor. When RFID reader reads tag card and identifies that its
tag data is the same as selected items, tag data would be sent to Android application
via Bluetooth. The data was processed and matched with the coordinates of item’s
location and hence shopping trolley would stop moving. Thus, the location of
shopping trolley will be displayed on shopping map of Android application. In this
project, RFID reader TX pin was connected to RX3 pin of Arduino Mega 2560 in
order to receive data from RFID reader. There was LED blinking when there was no
RFID tag card detected but LED will be turned off when there is tag card detected.
RDIF reader RDM6300 is as shown in Figure 3.5 below.
Figure 3.5: RFID reader, RDM 6300 is used to scan 125 kHz tag cards in order to
know items’ locations where each tag card is assigned with respective item.
32
In this project, six distance sensors are used for obstacle avoidance. Both
front and rear shopping trolley were installed with one ultrasonic sensor respectively.
Meanwhile left and right sides of shopping trolley were respectively installed with
two ultrasonic sensors. These sensors were connected to the Arduino Mega 2560.
Shopping trolley will stop when an obstacle is sensed within 10 cm.
Figure 3.6: Ultrasonic sensor, HC-SR06 is used for obstacle avoidance in order to
allow shopping trolley to move without collision with any object.
33
Bluetooth module HC-06 is as shown in Figure 3.7. It was used in the project
for wireless data transmission between Arduino Mega 2560 and Android smartphone.
Its maximum sensitivity is 80 dBm. It has an Enhanced Data Rate modulation and
the change range of modulation depth is 2 Mbps to 3 Mbps. Besides, there is a build-
in 2.4 GHz antenna, external 8 Mbit flash. It can work at low voltage of 3.1 V to 4.2
V. The current in communication is 8 mA. The size is small and has a 2.4 GHz
digital wireless transceiver. This Bluetooth module is interfaced with Arduino Mega
2560 through UART port, which are TX and RX pins. In this project, the Bluetooth
module TX pin was connected to RX1 pin in Arduino Mega 2560. Meanwhile
Bluetooth module RX pin was connected to TX1 pin in Arduino Mega 2560 for two
way data transfer.
Figure 3.7: Bluetooth module HC-06 which is used to send and receive data
between Android smartphone and Arduino Mega 2560.
Figure 3.8: Line sensor LSS05 which is used to detect black line or path with white
background or vice versa in order to allow line following robot to follow the desired
line or path.
Motor driver was used to drive motor in this project. By controlling the PWM
speed, motor speed can be controlled. The model of motor driver is MD30C. It is
designed to drive medium to high power brushed DC motor. Its current capacity is up
to 80 Amperes (A) peak for 1 second and 30 A continuously. It has reverse polarity
protection. Its PWM generator enables it to operate without a host controller. This
motor driver has bidirectional control for 1 brushed DC motor and the voltage of
35
motor is 5 V to 25 V. Its logic level input is 3.3 V and 5 V. It has better efficiency
due to its full NMOS H-Bridge and there is no heat sink needed. The PWM
frequency of speed control can go up to 20 kHz. It can support both locked-antiphase
and sign-magnitude for external PWM operation. Figure 3.9 shows the MD30C
motor driver used in the project.
Figure 3.9: Two DC motor drivers are used in the project in order to drive two
motors for robot movement where the speed and direction can be adjusted in the
program.
This electric scooter motor with gear was used to drive shopping trolley. It is
a 450 W scooter motor and its DC voltage is 24 V with 11 Nm torque. It has 395 rpm
speed and with maximum current of 26.5 A.
36
The software design approach in this project involves Intel board DE2i-150
as a database server and Java programming language based Android application as
client. The Intel board running Linux operating system provides a communication
platform that receives data from the clients and acts as a central processing unit that
processes the data. Meanwhile the Android application provides a user interface to
the users in order to create desired shopping list, send and receive information from
server as well as from Arduino Mega 2560 board.
In general, the server is to store data and listening to the client to connect with
it. When there are clients connected, it will wait to receive the shopping items
information from the users. In default, the server will process the data received from
a buy list which is set by users, as it will identify the coordinates of the selected items
and informs the users by displaying a mark on the shopping map of Android
application. When a shopping map user interface was open, a dialogue message
would appear to allow the user to activate the shopping trolley to start moving.
When RFID reader detected a tag card with tag data (each tag data was
deemed as different coordinate in Android application) is the same as the coordinates
37
of the selected items, the trolley will stop moving. At the same time, a dialogue
message pops up to ask the user if he or she wants to continue to move the shopping
trolley (continue shopping). When RFID reader detected the last selected item’s
location, shopping trolley will keep stopping until the user presses the button from
the dialog message to allow the shopping trolley to move to a payment counter
automatically to end the shopping journey. Figure 3.10 shows the Unified Modelling
Language of overall system process.
System Process
Arduino Mega 2560 Android Application Intel Board
(Microcontroller) (Client) (Server)
Choose buy list and Process received
request for items data, get items
locations locations
No
Shopping trolley
move to counter
Figure 3.10: UML of ccommunication flow between Arduino board, Intel board and
Android application.
38
3.4 Summary
The hardware design and software design of the project are mentioned in this
chapter. The hardware and components are selected, designed and programmed on
the main microcontroller. All of the hardware and components are placed on the
robot and attached to the shopping trolley. The server is programmed by using Java
programming language. Server program is installed in the Intel board. The
communication between robot and smartphone is through Bluetooth while server and
smartphone communicate via Wi-Fi hotspot.
39
CHAPTER 4
4.1 Introduction
4.2 Results
The project involves both hardware and software. Each hardware was
connected to microcontroller and the data was collected.
40
First and foremost, ultrasonic sensor was connected with Arduino Mega 2560
board. There were six ultrasonic sensors used in the project. Figure 4.1 shows the
snapshot of 6 ultrasonic sensors output program was displayed in table form by using
Arduino IDE serial monitor.
Figure 4.1: Data collected from six ultrasonic sensors and the result was displayed
in table form by using serial monitor of Arduino IDE.
Secondly, line sensor was tested for line following function. Figure 4.2 shows
a line sensor detected the black line and the related sensors were lightened up and its
result was displayed in serial monitor.
Figure 4.2: Line Sensor detected the black line with white background. The LEDs
for the corresponding sensors detected the black line were lightened up.
41
RDIF Reader RDM6300 was tested and its result was shown in Figure 4.3.
Bluetooth module was also tested. The received tag number was sent to Android
application and displayed in GUI via Bluetooth. On the other hand, Android
application was also used to test to send data to Arduino Mega 2560 via Bluetooth in
order to control the motion of motor.
Figure 4.3: RFID reader is connected to Arduino Mega 2560, where TX pin of
RFID reader is connected to pin RX of Arduino Mega board. The message received
after tagged will be displayed in serial monitor.
Figure 4.4: The robot that is attached to the shopping trolley is tested on the black
line or path with white background and the movement of robot is controlled by using
smartphone.
(a) (b)
Figure 4.5: Screenshot (a) shows the dialogue message of Bluetooth permission
request. The dialogue will pop out once Android application is launched without
turning on the Bluetooth connection on Android smartphone. Screenshot (b) shows
that user can click on the menu button to connect this Android application to server
system after Wi-Fi hotspot is turned on.
44
(a) (b)
(c) (d)
Figure 4.6: Screenshot (a) shows the server GUI was in disconnect condition.
Screenshot (b) shows the server was waiting for client connection. Screenshot (c)
shows the server was connected to a client. Screenshot (d) shows the server had
received the selected items from Android application and it sent locations of items in
term of coordinates to the Android application GUI automatically after being
processed.
45
(a) (b)
Figure 4.7: Screenshot (a) shows the GUI of Android application with two selected
items from buy list. Screenshot (b) shows the dialog message was popped up once
shopping map activity was opened. The received coordinates from server were
marked on the shopping map.
(a) (b)
Figure 4.8: Screenshot (a) shows the GUI of shopping map on Android smartphone
with the marked items’ location for the selected items in To-Buy-List. Screenshot (b)
shows a dialogue message is popped up when the shopping trolley reaches and stops
at the selected item’s location. Users can press “Continue” to allow the shopping
46
trolley to move to the next item’s location, or press “Go Counter” after they have
collected all the selected items.
Figure 4.9: Screenshot picture shows the menu buttons where a user can manually
stop or enable shopping trolley to continue moving.
4.3 Discussion
Arduino mega 2560 was used as the main microcontroller to interface with all
hardware used in this project. Tag card data was used as a location indicator in term
of coordinate in order to let the user know the locations of shopping trolley and
selected items. The locations would be displayed on GUI of Android application.
Bluetooth module was used to transfer and receive data between Arduino Mega 2560
board and Android smartphone. Line following sensor allow shopping trolley to
move according to detected black line. Thus, shopping trolley can lead users during
shopping. In order to prevent the shopping trolley collides with other shopping
trolley or people in the supermarket, ultrasonic sensors were used to avoid collision.
47
On the other hand, the distance between line sensor and black line must be
within 1.5 cm in order to get a more accurate detection. When the distance is higher,
other IR sensors will light up and thus cause the direction difference. Furthermore,
after making sure each hardware can function properly, all algorithms in the
programs would be combined. This means that whole system will be tested. When
came to this stage, it was found that the line following robot and RFID reader cannot
function properly due to polling method. Microcontroller is continuously checking
the given device status. The device only performs the service from microcontroller
when the status condition is met. It is not efficient as the line following robot keeps
running and the RFID reader needs to scan RFID tag card at the same time.
Therefore, interrupt method is preferable to be used in the programming where each
device can perform based on the priority assigned by the microcontroller. This is
much more efficient compared to polling method.
Figure 4.11: MAC address of Bluetooth module, HC-06 must be declared in the
program.
49
Figure 4.12: Socket declaration, server port and server IP address set up in both
server and client system.
Server socket object was created in order to listen and accept connections
from clients. Server socket object is always in the state of opening and listening until
there is a message from client. In order to receive a response from server,
“InputStreamReader” was created to read the received text lines meanwhile
“OutputStream” was created for sending information out. “PrintWriter” is a class that
takes “OutputStream” and provides a simple way to print regular data types in the
human readable format on the stream. One of the most important elements for
successful communication between Java server and Android client is that there must
be a declaration for internet permission in Android Manifest.xml as shown in Figure
4.13.
module HC-06. Nevertheless, the second attempt to reconnect would just work fine.
This might somehow due to the signal disruptions that interrupt the connection
between the Android device and the Bluetooth module from the shopping trolley.
4.4 Summary
CHAPTER 5
CONCLUSION
5.1 Introduction
5.2 Conclusion
With the aid of automatic line following and human leading functions
portable robot, supermarket owners need only to purchase the portable robot and can
easily install it under shopping trolley. Users can enjoy shopping without pushing
shopping trolleys themselves. Meanwhile, smart shopping system allows users to
access the location of items that they plan to purchase in supermarket by using
Android application and call the shopping trolley to move automatically. Thus,
shopping trolley can lead the users to their desired location of items that they plan to
buy. This system is called server and client system. The location of shopping trolley
52
and items can always be tracked easily by using RFID technology as localization
scheme and Android application. Both communicate via Bluetooth function.
REFERENCES
[3] Kazuyuki. M., Lee, J-H. and Hideki, H. (2004). Human-Following Mobile
Robot in a Distributed Intelligent Sensor Network. IEEE Transactions on
Industrial Electronics. 51(1), 229–237.
[4] Li, Y., Wu, X., Shin, D., Wang, W., Bai, J., He, Q., Luo, F. and Zheng, W.
An Improved Line Following Optimization Algorithm for Mobile Robot. 84–
87.
[5] Han, S.S., Kim, D.K. and Lee, J. M. (2007). A New Tag Arrangement Pattern
for a Differential Driving Mobile Robot Based on RFID System.
International Conference on Control, Automation and System. 1228–1233.
[8] Kelly, W. (1999). Wheels of Fortune. Metroactive new & issues. Retrieved
on September 16, 2013, from
http://www.metroactive.com/papers/metro/06.03.99/shoppingcarts-9922.html
[10] MHE Trolley Shopping Supermarket 90 Litre Standard Tube Base ST SDT90.
Retrieved on September 16, 2013, from http://www.lelong.com.my/mhe-
trolley-shopping-supermarket-90-litre-standard-tube-base-st-sdt90-
bigandsmallstore-I1442104-2007-01-Sale-I.htm
[11] Stores face abandoned trolley fine in Carmarthenshire. BBC News. Retrieved
on September 16, 2013, from http://www.bbc.co.uk/news/uk-wales-south-
west-wales-12345485
[16] Hoozemans, MJM., van der Beek AJ., Frings-Dresen MHW., van Dijk FJH.,
van der Woude LHV. (2005). Pushing and pulling in relation to
musculoskeletal disorders: a review of risk factors. Ergonomics. 41(6), 757-
81.
[17] Enid Kwong, W. Y., Claudia Lai, K. Y, Ernesto, S. and Wong, C. M. (2010).
Views of Adults on Shopping Trolleys : Implications for the Development of a
Shopping Trolley. The Ergonomics Open Journal. 32–37.
[19] Dumped Trolleys Cost Taxpayer £150,000 A Year. The Telegraph. Retrieved
on September 16, 2013, from
http://www.telegraph.co.uk/earth/countryside/4786631/Dumped-trolleys-
cost-taxpayer-150000-a-year.html
[21] Police Searching For Wal-Mart Child Predator. Retrieved on September 16,
2013, from http://www.ksl.com/?nid=148&sid=3415425
[22] Shopping Cart Brakes Stop Local Shoppers in Their Tracks. Retrieved on
September 16, 2013, from
http://www.kerngoldenempire.com/mostpopular/story/Shopping-cart-brakes-
stop-local-shoppers-in their/d/story/BpUMKDS50UOIjAliXWqx3w
56
[23] Cho, C-H., Kang, J. and Cheon, H. J. (2006). Online shopping hesitation.
Cyberpsychology & Behaviour. 9(3), 261-274.
[25] Australian shopping trolley dilemma: Carrot and Stick strategies for recovery
of the ones that go missing. Retrieved on September 16, 2013, from
http://www.ausfoodnews.com.au/2012/01/06/australian-shopping-trolley-
dilemma-carrot-and-stick-strategies-for-recovery-of-the-ones-that-go-
missing.html
[26] Effective Ways to Collect Shopping Carts. Retrieved on September 16, 2013,
from http://cartmanagement.hubpages.com/hub/Effective-Ways-to-Manage-
Your-Shopping-Carts
[29] Emi, N., Daiki, T., Manato, F., Yuki, O., Tomotaka, W., Hiromi, O. and
Kouichi, M. (2012). A New Indoor Position Estimation Method of RFID
Tags for Continuous Moving Navigation Systems. 2012 International
Conference on Indoor Positioning and Indoor Navigation. November.
[31] Huang, C-T., Lo, L. W. and Chen, H-L. (2008). A study for optimizing the
reading rate of RFID tagged cartons in palletizing process. 2008 IEEE
International Conference Industrial Engineering Management. December.
1138–1142.
[33] Cai, M. (2012). The Design Method of Network Chat System Based on
Socket and Cloud Computing. 2012 International Conference Computer
Science and Service System. August. 610–613.
[34] Gogulski, I. P and Circle, M. (1978). U.S. Patent No. 4,071,740. Washington
DC:U.S. Patent and Trademark Office.
[35] Wolfe, I. M., John, V. and Biondo, J. (1994). U.S. Patent No. 5,357,182.
Washington DC: U.S. Patent and Trademark Office.
[36] Havens, I. R. (1989). U.S. Patent No. 4,868,544. Washington DC: U.S. Patent
and Trademark Office.
[37] Ryoma, A., Hiroshi, T. and Hiroshi, M. (2010). A Study of Functions for
Robot Returned from Parking to Store Autonomously. Proceedings of the
2010 SICE Annual Conference. Taipei, Taiwan: IEEE, 889–891.
[38] Suryaprasad, J., Praveen, K., Roopa, D. and Arjun, A. K. (2011). A Novel
Low-Cost Intelligent Shopping Cart. 1–4.
[39] Antonio, M-H., Guillermo, D. J. H-R., Marlon, G-A. and Luis, F. M-U.
(2012). Conception and Implementation of a Supermarket Shopping Assistant
System. 11th Mexican International Conference on Artificial Intelligent and
Applications, Special Session. October. 26–31.
58
APPENDIX A
PROJECT MANAGEMENT
A.1 Introduction
Project Gantt chart and milestone for semesters one and two are shown in
Tables 1 and 2 respectively. This table shows that it is very important to study
literature review throughout the process of project development. The project is
categorised in three parts, which is hardware development, software development as
well as mechanism design and fabrication. There is overlapped development where
the communication between hardware and software has to be tested during the
developing to make sure both systems can function properly. Then, the robot
mechanism design was carried out after both hardware and software development
had been completed to ensure the mechanical structure can fix the developed
hardware and components. This project schedule is important to ensure the project
can be done according to the guideline and complete on time efficiently.
No Activities
9 10 11 12 1 2 3 4 5 6 7 8
1 Literature review
2 Hardware development
7 Milestones A B C D E F G H
60
APPENDIX B
APPENDIX C
APPENDIX D
APPENDIX E