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

Muhammad Robot Cart Project

Design of a robotic cart carriage picker for supermarket

Uploaded by

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

Muhammad Robot Cart Project

Design of a robotic cart carriage picker for supermarket

Uploaded by

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

DESIGN AND IMPLEMENTATION OF A ROBOT CART FOR A

SUPERMARKET
(A Case Study of Jifatu Supermarket Gusau Zamfara State)

BY

MUHAMMAD SHAMSUDDEEN UMAR


(1710308010)

SEPTEMBER, 2023

DESIGN AND IMPLEMENTATION OF A ROBOT CART FOR A


SUPERMARKET
(A Case Study of Jifatu Supermarket Gusau Zamfara State)

i
BY

MUHAMMAD SHAMSUDDEEN UMAR


(1710308010)

BEING A PROJECT SUBMITTED TO THE DEPARTMENT OF COMPUTER


SCIENCE FACULTY OF SCIENCES, FEDERAL UNIVERSITY GUSAU,
ZAMFARA STATE. IN PARTIAL FULFILLMENT OF THE
REQUIREMENTS FOR THE AWARD OF BACHELOR OF SCIENCE (BSC)
DEGREE IN COMPUTER SCIENCE

SEPTEMBER, 2023

ii
iii
DECLARATION
I, the undersigned, acknowledge and declare my commitment to the successful
planning, design, and execution of the "Robot Cart System for Supermarkets" project.
I pledge to adhere to the project's goals, timelines, and objectives as outlined in this
declaration. I also commit to upholding the highest standards of professionalism,
quality, and ethics throughout the project's lifecycle.

__________________________ ________________
Muhammad Shamsuddeen Umar Date
(1710308010)

i
CERTIFICATION
This Project by Muhammad Shamsuddeen Umar with Admission Number
1710308010 has met the partial requirements for the award of the Degree of Bachelor
of Science (Programme) of the Federal University Gusau and is approved for its
contribution to knowledge.

__________________________
_________________________
Mohammed Ali K. Date
(Project Supervisor)

__________________________
__________________________
Mal. Muhammad Lawal Jabaka Date
(Head of Department)

___________________________
___________________________
Dr. N. A Sani Date
(Dean, Faculty of Science)

___________________________
___________________________
Prof. Abdulwahab Lawan Date
(External Examiner)

ii
DEDICATION
This project is dedicated to all those who have contributed their time, expertise, and
unwavering support to bring the "Robot Cart System for Supermarkets" project to
fruition.

To Our Project Sponsor: We extend our heartfelt appreciation for your belief in this
endeavour. Your vision and support have been the foundation upon which this project
was built.

To Our Families: We dedicate this project to our families, whose understanding,


patience, and encouragement sustained us during late nights, tight deadlines, and the
pursuit of innovation.

To Our Colleagues: Your valuable insights, guidance, and shared knowledge have
enriched our project journey, making it all the more rewarding.

To All Supermarket Customers: This project is ultimately dedicated to you. It is our


hope that the "Robot Cart System" will enhance your shopping experience and bring
convenience, enjoyment, and efficiency to your visits to the supermarket.

With gratitude and dedication,

MUHAMMAD SHAMSUDDEEN UMAR

SEPTEMBER-2023

iii
ACKNOWLEDGEMENT
All thanks due to Allah the most gracious, the most merciful and the most beneficial
for his enormous guidance and inspiration in enabling me to commence and complete
this Project. I would like to extend our heartfelt gratitude to the following individuals
and organizations whose contributions and support were instrumental in the successful
completion of the "Robot Cart System for Supermarkets" project:

Project Supervisor: Mohammed Ali K.

 I deeply appreciate Mohammed Ali K. visionary leadership and unwavering


support for this project. His commitment to innovation and willingness to
invest in cutting-edge technology made this endeavour possible.

Technical Experts: Abdulnasir Mahmud

 I am indebted to Abdulnasir Mahmud for sharing his technical expertise and


guidance throughout the project. Your insights were invaluable in overcoming
complex challenges.

Supermarket Management: JUFATU Supermarket

 We extend our gratitude to [Supermarket Name] for providing access to their


premises, valuable feedback, and a real-world testing environment. Your
collaboration was essential to our project's success.

Families and Friends:

 To our families and friends, we owe a debt of gratitude for your unwavering
support, understanding, and encouragement during this project's journey. Your
patience during long hours and your belief in our capabilities fuelled my
determination.

Test Participants:

 To the supermarket customers and individuals who participated in our project's


testing and provided feedback, thank you for your time and valuable input.
Your experiences were instrumental in refining our system.

iv
This project was a collaborative effort that would not have been possible without the
support and contributions of these individuals and entities. I deeply appreciate your
role in making my vision a reality.

With heartfelt thanks,

MUHAMMAD SHAMSUDDEEN UMAR

SEPTEMBER-2023

v
TABLE OF CONTENTS
DEDICATION................................................................................................................i
CERTIFICATION..........................................................................................................ii
DEDICATION..............................................................................................................iii
ACKNOWLEDGEMENT.............................................................................................iv
ABSTRACT...................................................................................................................x
LIST OF TABLES......................................................................................................viii
LIST OF FIGURES.......................................................................................................ix
CHAPTER ONE.............................................................................................................1
INTRODUCTION..........................................................................................................1
1.1 Introduction.......................................................................................................................1
1.2 Background of Study.......................................................................................................1
1.3 Statement of Problem......................................................................................................2
1.4 Aim and Objectives of the Study...................................................................................2
1.5 Significance of Study.......................................................................................................3
1.6 Limitation Of The Study.................................................................................................3
CHAPTER TWO: LITERATURE REVIEW.................................................................5
CHAPTER 3: RESEARCH METHODOLOGY............................................................7
3.1 Introduction.......................................................................................................................7
3.2 Analysis of the existing system......................................................................................7
3.2.1 Procedure of the existing system.................................................................................7
3.2.2 Fact Finding Technique................................................................................................8
3.2.3 Diagram of flowchart for the Existing System..........................................................9
3.3 Design of the new system.............................................................................................10
3.3.1 Diagram of flowchart for the Proposed System......................................................11
3.3.2 Hardware......................................................................................................................11
H-Bridge for Rotation Direction Control.....................................................................12
3.3.3 Hardware Block Diagram..........................................................................................13
3.3.4 Software.......................................................................................................................14
3.3.5 Flow Chart of the Robot cart.....................................................................................14
3.4 Design..............................................................................................................................15
Software Design...................................................................................................................16
CHAPTER 4: IMPLEMENTATION AND TESTING................................................17
4.1 Introduction.....................................................................................................................17

vi
4.2 System Components......................................................................................................17
4.2.1 Core..............................................................................................................................17
4.2.2 Detection......................................................................................................................19
4.2.3 Movement....................................................................................................................21
4.2.4 Power............................................................................................................................22
4.2.5 Others component.......................................................................................................23
4.3 Circuitry..........................................................................................................................24
4.3.1 Pin Connection............................................................................................................25
4.4 Hardware Block Diagram.............................................................................................26
4.4.1 Working Principle.......................................................................................................26
4.5 RESULT..........................................................................................................................29
CHAPTER FIVE (SUMMARY, CONCLUSION AND RECOMMENDATIONS)...32
5.1 SUMMARY....................................................................................................................32
5.2 CONCLUSIONS............................................................................................................32
5.3 RECOMMENDATIONS..............................................................................................32
REFERENCE........................................................................................................................33

vii
LIST OF TABLES

Table 1: PWM value range…………………………………………………………12

Table 2: Connection between IR Sensor and Arduino………...………………….…25

Table 3: Connection between IR Sensor and Arduino………………………………25


Table 4: Connection between Ultrasonic Sensor and Arduino………………………26

viii
LIST OF FIGURES
Figure 1: The robot follows the wrong object.
Figure 2: Flowchart for the Existing
System…………………………………………...9

Figure 3: Flowchart for the Proposed System…………………………………………


11 Figure 4: H-Bridge
circuit…………………………………………………………..13

Figure 5: Hardware block diagram ………………………………………………...13

Figure 6: Flow Chart ………………………………………..………………………15

Figure 7: Arduino Uno…………………………………………………………....18

Figure 8: Arduino board Motor driver……………………………………………….18

Figure 9: HC-SR04 ultrasonic sensor………………………………………………


19
Figure 10: Ultrasonic sensor detection……………………………………………20

Figure 11: Infrared sensor………………………………………………………….20

Figure 12: Wheels and Motors………………………………………………………..21

Figure 13: Servo motor Figure 14:


Batteries………………………………………….22

Figure 14: Batteries……………………………………………………………...…....22

Figure 15: Robot chasis…………………………………………………………...…


23..

Figure 16: Jumper


wires……………………………………………………………....24

Figure 17: Robot Circuitry Figure………………………………………………...


…..24

18: Hardware block diagram………………………………………………………….26

ix
Figure 19: Forward
motion………………………………………………………….27
Figure 20: Right turn motion……………………………...………………………..28
Figure 21: Left turn motion……………………………………………………….28
Figure 22: Backward motion……………………………………………………….29

Figure 23: Front view ………………………………………………………………30

Figure 24: Top view…………………………………………………………………30

Figure 25: Sides view…………………………………………………………….31

x
ABSTRACT
Customers have long faced challenges regarding the inefficiency and limitations of
traditional manual shopping carts in supermarkets, leading to inconveniences for
customers. this fact that several effort made to Improve the system, but the problem
persist, such challenges includes Physical limitations of staff, Limited availability of
staff need for innovative solutions in the retail industry, all of which can be effectively
addressed by implementing a Robot cart using Arduino with ultrasonic and IR sensors
for autonomous navigation, obstacle detection, and customer detection., resulting in a
significantly enhanced shopping experience, increased efficiency, and improved
customer satisfaction in supermarkets through the innovative "Robot Cart System."
Keyword: Physical limitations of staff, Limited availability of staff, Robot cart,
Arduino board, IR sensors

xi
xii
CHAPTER ONE
INTRODUCTION
1.1 Overview
Over the last few years, robotic technology has evolved significantly that innovations were
merely a utopian dream for some. The automation becomes first priority to any kind of works
which gives the birth to robot. Robot is a programmable, automation device that replace
human intervention from basic daily activities to activities that people think it cannot be
alternated like consultant or any field related to art. There are plenty of robots can assist
multiple aspects of human life. Among those machine assistant, a robot that can detect and
follow humans or obstacles within a certain range is known as a 'Human Following Robot'.
Human following robot cart can co-exist and enhance the life quality of people. This robot
presents as a carrier which deliveries items or packages in daily life in several places such as
restaurant, hospital, shopping mall. When it comes to require more strength and speed, the
robot can easily surpass the human limitation to acquire the goal more efficient and faster.
For example, in military field, the weight of luggage and the harshness of topography types
will definitely be a huge disadvantage for human. Thanks to this innovation, human
intervention will reduce and be even more productive despite enormous difficulties appeared
before.

1.2 Background of Study


The background of this project can be framed by highlighting the challenges that
supermarkets face in providing effective customer service. For instance, traditional methods
of customer assistance, such as stationary information desks, can often lead to long wait times
and customer dissatisfaction. Moreover, the current systems in place for ensuring store
security may not be efficient or effective enough to meet the demands of modern
supermarkets.

In this context, a robot cart for a supermarket has the potential to address these challenges and
enhance the shopping experience for customers. By providing personalized assistance, and
increasing overall efficiency, such a robot could improve customer satisfaction and reduce the
workload of supermarket staff. Additionally, a robot can help minimize the risk of virus
transmission by reducing the need for face-to-face interactions and enhancing store security.

The background of this project could also include information on the existing research and
technology in the field of robotics and automation. It could provide an overview of previous

1
attempts to design and construct similar robots, the hardware and software components used
in these designs, and the limitations and challenges faced by these previous attempts.

Overall, the background of this project provides an overview of the problem or situation that
the project aims to address and highlights the potential benefits of the solution. It sets the
stage for the rest of the project by framing the problem and providing context for the solution

1.3 Statement of Problem


The main problems that lead to the design and construction of a robot cart for a supermarket
using Arduino include the Physical limitations of staff i.e supermarket staff may face physical
limitations in terms of lifting heavy items or walking long distances, which can impact their
ability to assist customers effectively, another problem is the Limited availability of staff for
which in some regions, there is a shortage of staff for retail stores, leading to increased
workload and stress for existing staff and can result in long wait times and frustration for
customers. A robot cart can assist in reducing the workload of staff and providing additional
customer service, so also in the term of Innovation, with the advancements in robotics and
automation, there is a need for innovative solutions in the retail industry. A robot cart can
provide a unique and innovative shopping experience for customers.

Overall, the design and construction of a robot cart for a supermarket using Arduino can
address the above problems and provide a more efficient, safe, and innovative shopping
experience for customers.

1.4 Aim and Objectives of the Study


The aim of this project is to design and construct a robot cart for a supermarket using Arduino
components

To achieve this aim, the following objectives have been identified:

1. Survey of the Existing System: Evaluate drawbacks in the manual cart system,
understand customer needs, explore sensor integration feasibility, and identify
operational challenges.

2. Design of Proposed System: Create a new robot cart with autonomous navigation.
Define functions, integrate sensors, design user interface, establish software architecture,
and implement safety measures.

2
3. Implementation of Existing System: Construct physical robot cart, integrate sensors,
and develop navigation algorithms.

4. Testing of Proposed System: Thoroughly test the robot cart for accurate
navigation, obstacle detection, user interface usability to validate its functionality,
reliability, and effectiveness in enhancing the shopping experience and ensuring
safety and security.

1.5 Significance of Study


When we look closely at the environment or our surroundings, we notice the need for
such robots to help and serve people. Robots like this can be used for a variety of
purposes. With few modifications the robot can also be used as a human companion.
This robot's possibilities are limitless, and also include assisting people in hospitals,
libraries, airports, and other settings.

The robot can work around the clock and be more accurate than humans in order to
save time, minimize staff and increase productivity. Code compatibility and scalability
across different Arduino boards is also a definite advantage In addition, the ultrasonic
sensor has a large range and can be used in any lighting conditions. The schematic of
Arduino is open source. So, for future enhancements to the project, the board can be
expanded to add more hardware capabilities.

1.6 Limitation of the Study


Detection constraint: Suppose there are two targets like in the Figure below, target A
and target B. First, the robot is following target A and suddenly target B passes
between the robot and target A. At that time the robot will lose the track of target A
and detect target B. Finally, the robot will switch to follow target B instead of the
original target which is A. To fix this problem, in the future work, a target-centric
approach is adopted. First, the locally sensed information is used to create a partial
map of the environment; traditional SLAM-based techniques (Simultaneous
localization and mapping) are most commonly used for this purpose. Robot creates a
3D (depth) map of the partially observed environment in order to find the optimal path
for person-following. Such reactive path planning sometimes leads to non-smooth
trajectories, particularly if the person moves fast in a zigzag trajectory. Anticipatory
planning, i.e., predicting where the person is going to be next and planning

3
accordingly, can significantly alleviate this problem and thus widely used in practical
applications

figure 1: The robot follows the wrong object.

Load Capacity Constraints: One limitation of this project is that the developed

system, having a prototype nature, might have constraints regarding the amount of

load it can handle. Since this project focuses on demonstrating the feasibility and

concept of the robot cart system with ultrasonic and IR sensors, it might not be

optimized for heavy or extensive use. The prototype's design, components, and

software might not be scaled up to handle the demands of a full-scale supermarket

operation. Therefore, while the prototype showcases the core functionalities and

benefits of the system, it may not be able to carry a substantial load of items due to its

scaled-down nature and design considerations, which is a limitation that needs to be

acknowledged.

4
CHAPTER TWO
LITERATURE REVIEW

2.1 Review of Related Literature

The literature review for the project on the design and construction of a robot cart for

a supermarket using Arduino is as follows:

Several studies have investigated the use of robots in retail and service industries,

including supermarkets. In a study by (Darvish et al., 2019), a mobile robot was

developed to provide guidance and information to customers in a retail store. The

robot used a natural language processing algorithm to understand and respond to

customer queries, enhancing the customer experience, so also in a study by (Duong et

al., 2020), a mobile robot was developed to navigate autonomously in a shopping mall

environment. The robot used a 3D camera and a depth sensor to detect obstacles and

navigate through the environment. The study showed that the proposed robot was able

to navigate safely and efficiently in a crowded environment, additionally in a study by

(Zhu et al., 2021), a robot was developed to assist customers in a supermarket by

carrying and delivering items. The robot used a deep learning algorithm to identify

and locate items, and a manipulator arm to pick up and deliver the items. The study

showed that the proposed robot was able to assist customers effectively and

efficiently.

In a study by H. Alwi et al. (HUMAN FOLLOWING ROBOT Technology and

Communication 2022, n.d.), a mobile robot was developed to follow and assist

customers in a supermarket. The robot used a camera and a depth sensor to detect and

track customers, and a voice recognition system to understand and respond to

customer queries. The study showed that the proposed robot was able to provide

effective assistance and improve the customer experience, likewise in a study by A.


5
M. A. Alzahrani et al. (2018), a mobile robot was developed to navigate

autonomously in a hospital environment to deliver medications and medical supplies

(Emergency, 2021). The robot used a LiDAR sensor and a depth sensor to detect

obstacles and navigate through the environment. The study showed that the proposed

robot was able to navigate safely and efficiently in a complex environment.

Overall, the reviewed studies highlight the importance of navigation, detection,


human-robot interaction, and efficiency in designing and constructing a mobile robot
for service industries. The studies also demonstrate the potential of robots to enhance
the customer experience and improve efficiency in service industries. These findings
provide valuable insights for the development of a robot cart for a supermarket using
Arduino.

Another relevant study is the work of (Hassan et al., 2018) who developed a mobile
robot for a shopping mall to guide customers and provide product information. The
robot used a sensor fusion algorithm combining information from a camera, a laser
range finder, and a depth sensor to navigate and detect obstacles in the environment.
The study showed that the proposed robot was able to provide effective guidance and
enhance the customer experience, In another study by (Mišković et al., 2022),a mobile
robot was developed for a warehouse environment to transport goods from one
location to another. The robot used an RGB-D camera to detect and recognize objects,
and a control algorithm to navigate through the warehouse. The study demonstrated
that the proposed robot was able to perform transportation tasks efficiently and
accurately.

Moreover, in a study by (Sati et al., 2021), a mobile robot was developed for a retail
store to detect and report misplaced items. The robot used a deep learning algorithm to
recognize objects and identify misplaced items, and a navigation algorithm to move
around the store. The study showed that the proposed robot was able to detect and
report misplaced items with high accuracy and efficiency.

These studies demonstrate the diverse applications of mobile robots in service


industries, including retail, warehouse, and hospital environments. The use of sensor
fusion, deep learning, and navigation algorithms are common approaches to design

6
and construct efficient and effective mobile robots. These approaches can also be
applied in the development of a robot cart for a supermarket using Arduino.

CHAPTER THREE
SYSTEM ANALYSIS AND DESIGN
3.1 Introduction
The system analysis and design phase serves as a critical bridge between understanding the
project's objectives and transforming them into a well-defined plan. It involves a systematic
investigation of the project's scope, goals, and requirements, coupled with an evaluation of
the existing system's limitations. By employing various fact-finding methods like interviews,
observations, and surveys, the project team gains valuable insights into user expectations,
operational challenges, and technological possibilities. These insights are then translated into
a comprehensive requirement specification that outlines the desired features, functionalities,
and constraints of the new robot cart system. Furthermore, this phase involves architectural
design, where the system's components, interactions, and data flows are meticulously
structured. The user interface design focuses on creating an intuitive and engaging experience
for customers interacting with the robot cart. Overall, this phase lays the groundwork for a
successful project execution by ensuring alignment between stakeholders' needs,
technological feasibility, and design principles

3.2 Analysis of the existing system


3.2.1 Procedure of the existing system

The existing system of using traditional shopping carts in supermarkets involves customers
manually navigating through the store to collect their desired items. Customers typically grab
a shopping cart at the entrance, push it through the aisles, and place selected products inside.
They then proceed to the checkout counter to pay for their items. This system relies on the
customer's own decision-making and physical effort to move through the store, select items,
and complete the shopping process. While they serve their basic purpose of carrying goods,
several limitations and inefficiencies are associated with this system such as:

1. Manual Operation and Navigation: The traditional shopping cart relies on manual
operation, requiring customers to push and maneuver the cart themselves. This manual

7
navigation can be challenging, especially in crowded or congested store aisles, leading to
potential discomfort and frustration for shoppers.
2. Physical Effort: Shoppers need to exert physical effort to move the cart, which can be
particularly strenuous when the cart is loaded with items. This aspect might deter some
customers, particularly those with limited mobility or physical disabilities, from enjoying
a seamless shopping experience.
3. Limited Assistance: The original cart system lacks any form of assistance or
guidance for shoppers. Customers are solely responsible for locating items
throughout the store, potentially leading to longer shopping times and
difficulty in finding specific products.
4. Loss Prevention: Traditional carts lack effective measures to prevent misuse or
theft. Unattended carts can be vulnerable to theft, both inside and outside the
store, potentially causing losses for the supermarket.

3.2.2 Fact Finding Technique

Fact-finding methods in a project refer to techniques used to gather information, data,


and insights about the project's objectives, requirements, existing systems, and user
needs. In the context of the proposed robot cart system, various fact-finding methods
are employed to ensure a comprehensive understanding of the project's scope and
requirements. Here are some key fact-finding methods used in the proposed robot cart
system:
Certainly, here is the arrangement of the fact-finding methods for the robot cart
project based on your preference:
1. Observation: Observation is the first method used to gather some information
regarding the proposed system. Observations involve directly watching
customers as they interact with the current cart system during their shopping.
This method offers real-world insights into user behaviours, identifying
patterns, bottlenecks, and usability issues that might not be apparent through
other means. For this project, JIFATU supermarket was visited to observe the
operation carried out in the supermarket. From the observation, it is found that
operation is been carried out manually.

8
2. Interviews: Interview is the second method used to gather some information
regarding proposed system. Interviews involve direct communication with
stakeholders, such as supermarket staff and customers, to gather qualitative
insights about the pain points, challenges, and expectations related to the
existing cart system. They provide a personalized and in-depth understanding
of user needs and experiences.
3. Expert Consultation: Expert consultation is the third method used to gather
some information regarding proposed system. Expert consultation involves
seeking advice from professionals with expertise in relevant fields, like
robotics and retail operations. Experts offer specialized insights,
recommendations, and guidance to address technical challenges, feasibility
concerns, and innovative solutions for the new robot cart system.
3.2.3 Diagram of flowchart for the Existing System

Figure 2: Flowchart for the Existing System

9
Design of The New System
The proposed new system involves the introduction of a robot cart to replace the
traditional manual cart in a supermarket. The robot cart aims to enhance the shopping
experience, improve efficiency, and provide additional functionalities. The key design
aspects of the robot cart system are as follows:
1. Autonomous Navigation and Obstacle Avoidance: The robot cart would be equipped
with ultrasonic and IR sensors strategically placed around its chassis. These sensors
would enable the cart to detect obstacles, such as customers, shelves, or other objects,
in its path. Using this sensor data, the cart would autonomously navigate through the
store aisles, ensuring safe and efficient movement while avoiding collisions.
2. Ergonomic Design and Comfort: The robot cart's ergonomic design ensures shopper
comfort. It offers adjustable handles, easy-to-maneuver wheels, and a smooth ride,
reducing physical strain.
3. Energy Efficiency: The cart employs energy-efficient components, along with
rechargeable batteries that can last through multiple shopping trips before needing to
be recharged.
4. Maintenance and Upgrades: The robot cart's modular design allows for easy
maintenance and updates. Faulty components can be quickly replaced, and software
improvements can be remotely deployed.
In summary, the robot cart system offers autonomous navigation, and
personalized assistance to revolutionize the shopping experience. It aims to improve
convenience, efficiency, and customer engagement while addressing the limitations of
the original manual cart system in supermarkets.

10
3.3.1 Diagram of flowchart for the Proposed System

Figure 3: Flowchart for the Proposed System

The robot cart has two building stages: Hardware and Software.

3.3.2 Hardware

Our system is made up of a four-wheel robotic vehicle with its own microprocessor and
control unit, as well as various sensors and modules, such as ultrasonic sensors and infrared
sensors, which help them to follow people and objects in their surroundings. The
aforementioned sensors work in coordination with each other to help the robot operate and
navigate its path by avoiding obstacles and maintaining a specific distance from objects.
Ultrasonic sensors were used to avoid obstacles and keep objects at a specific distance. Two
infrared sensors on both sides are used to detect orientation.

11
PWM for Speed Controlling
The speed of a DC motor can be controlled by varying its input voltage. A common
technique for doing this is to use Pulse Width Modulation (PWM)

PWM is a technique where average value of the input voltage is adjusted by sending a
series of ON-OFF pulses. The average voltage is proportional to the width of the
pulses known as Duty Cycle. The higher the duty cycle, the greater the average
voltage being applied to the DC motor (High Speed) and the lower the duty cycle, the
less the average voltage being applied to the dc motor (Low Speed).

The PWM value is in the range of 0-255.The greater the value, the faster the motors
turn.

4WDRobot D2 D5(PWM) D4 D6(PWM)

Forward HIGH 0-255 LOW 0-255

Backward LOW 0-255 HIGH 0-255

Rotate to left LOW 0-255 LOW 0-255

Rotate to right HIGH 0-255 HIGH 0-255

Stop / 0 / 0

Table 1: PWM value range

H-Bridge for Rotation Direction Control


The rotation direction of the DC motor can be controlled by changing polarity of its
input voltage. A common technique for doing this is to use an H-Bridge. An H Bridge
circuit contains four switches with the motor at the centre forming a letter “H”
arrangement. Closing two particular switches at the same time reverses the polarity of
the voltage applied to the motor. This causes change in spinning direction of the
motor.

12
Figure 4: H-Bridge circuit

3.3.3 Hardware Block Diagram

Figure 5: Hardware block diagram

13
3.34 Software

The Arduino integrated development environment (IDE) is a cross-platform application (for

Windows, mac OS, Linux) that is written in the Java programming language. It is used to

write and upload programs to Arduino compatible boards, but also, with the help of third-

party cores, other vendor development boards. The source code for the IDE is released under

the GNU General Public License, version 2. The Arduino IDE supports the C and C++

languages using special rules of code structuring. The Arduino IDE supplies a software

library from the wiring project, which provides many common input and output procedures.

The user-written code only requires two basic functions, for starting the sketch and the main

program loop that are compiled and linked with a program stub main() into an executable

cyclic executive program with the GNU toolchain, also included with the IDE distribution.

The Arduino IDE employs the program avrdude to convert the executable code into a text file

in hexadecimal encoding that is loaded into the Arduino board by a loader program in the

board's firmware.

3.3.5 Flow Chart of the Robot cart

The idea of this project was visualized as figure 5. The robot waited for the trigger of any

sensors. All of the sensors worked simultaneously, so robot did not have to wait for any

latency delay. If ultrasonic distance sensor detected human in range between 10-30

centimetres, the robot would follow that human and go forward. Otherwise, it would stay at

the same position. Meanwhile, both two IR sensors on the left or right perceived any

movement from human on that side which led the robot to turn depend on that signal

direction. In combination, when both distance sensor and any of those IR sensors triggered

concurrently, this innovation would move straight ahead and bias toward the IR sensors

received radiation.

14
Figure 6: Flow Chart

3.4 Design
The Robot cart for Supermarkets involves both hardware and software aspects. It
encompasses the overall structure and layout of the robot, as well as the algorithms
and programming required for its functionality.

Hardware Requirements:

1. Arduino board (e.g., Arduino Uno or Arduino Mega)


2. Motor driver (e.g., L298N) to control the robot's motors
3. Ultrasonic sensors or infrared sensors for obstacle avoidance
4. Wheels or motors for movement
5. Chassis or frame to hold the components together
6. Power source (e.g., batteries)
7. Servo motor for orientation adjustments

15
Hardware Design

1. Select a suitable chassis design that can accommodate all the components

while providing stability and mobility.

2. Position the infrared sensors or camera on the front of the robot for human

detection and tracking.

3. Mount the ultrasonic sensors on the front or sides of the robot for obstacle

detection.

4. Securely integrate the motors, wheels, and motor drivers for smooth mobility.

Software Requirements:

1. Arduino IDE (Integrated Development Environment) for programming the

Arduino board.

Software Design:

1. Choose the Arduino platform as the core of the robot's control system due to

its user-friendly programming environment.

2. Develop algorithms for human detection and tracking using infrared sensors.

3. Implement obstacle avoidance logic based on data from the ultrasonic sensors.

4. Program the motor control logic to enable the robot to follow humans and

navigate through the supermarket safely.

16
CHAPTER FOUR
IMPLEMENTATION AND TESTING
4.1 Introduction
The implementation and testing phase of the "Robot Cart System for Supermarkets" project

represents a crucial step in bringing our vision to life. This phase involves physically building

the robot cart, integrating advanced sensors and, and developing the navigation algorithms.

Subsequently, rigorous testing will ensure the system's autonomous navigation, obstacle

detection, and meet our objectives. Success in this phase will validate the project's feasibility

and its potential to revolutionize the supermarket shopping experience.

4.2 System Components


4.2.1 Core

Arduino Uno and L293D Driver Shield are the brain of this project. They are presented in

more detail in the following sections.

Arduino Uno (e.g., Arduino Uno or Arduino Mega):

Arduino Uno is an open-source microcontroller board based on the Microchip ATmega328P

microcontroller and developed by Arduino.cc. It serves as the central control unit and brain of

the robot cart, providing a platform for sensor integration, data processing, and motor control.

With its versatile input/output pins and compatibility with various sensors (e.g., ultrasonic,

infrared, or camera), the Arduino Uno can gather real-time data about the environment and

the position of the human it needs to follow. The microcontroller processes this data and

executes algorithms to calculate the appropriate movements and directions for the robot to

follow the human safely and accurately. Additionally, the Arduino Uno's programmability

allows for easy customization and implementation of sophisticated behaviours, making it an

indispensable component in the creation of an efficient robot cart.

17
Figure 7: Arduino Uno

Arduino board (e.g., Arduino Uno or Arduino Mega Motor driver (e.g., L298N) to
control the robot's motors : Motor drivers play a crucial role in a human-following
robot by controlling and regulating the movement of its motors. These drivers
interpret signals from sensors, such as cameras or ultrasonic sensors, that detect the
presence and position of a human target. Based on these inputs, the motor drivers
facilitate the precise control of the robot's wheels or other locomotion mechanisms, ,
the robot can accurately track and follow a human, adjusting its motion to maintain a
safe and appropriate distance, avoid obstacles, and adapt to changes in the
environment. This enables the robot to maintain a safe and accurate distance from the
human, ensuring smooth and responsive tracking while minimizing the risk of
collisions or accidents

18
Figure 8: Arduino board Motor driver

A1, A2, B1, B2 of the motor Arduino shield is the interface of the motor. The motors
connected to the A1 interface and the A2 interface have the same speed and the same
direction. The motors connected to the B1 and B2 ports have the same speed and the
same direction. The D2 digital I/O port controls the direction of the motor of the port
A, and the D5 digital I/O port outputs the PWM signal to control the speed of the
motor of the port A. The D4 digital I/O port controls the direction of the motor of the
interface B, and the D6 digital I/O port outputs the PWM signal to control the speed of
the motor of the interface B.

4.2.2 Detection

We used two fundamental sensors for object detection: the HCSR04 ultrasonic

sensor and the IR infrared sensor.

Ultrasonic sensor: An ultrasonic sensor is employed in the robot cart to facilitate


reliable and safe navigation by enabling distance measurement and obstacle
avoidance. The sensor emits high-frequency sound waves and measures the time it
takes for the waves to bounce back after hitting an object, thus determining the
distance between the robot and the obstacle. By continuously monitoring its
surroundings, the robot can adjust its movements, maintaining an optimal distance
from the person it follows while avoiding collisions with obstacles along the way.
This technology enhances the robot's ability to track and accompany a human,
ensuring a seamless and secure human-robot interaction in various environments.

Figure 9: HC-SR04 ultrasonic sensor

19
The HC-SR04 ultrasonic sensor uses sonar to determine distance to an object like
what bats do. It offers excellent non-contact range detection with high accuracy and
stable readings in an easy-to-use package. It comes complete with ultrasonic
transmitter and receiver modules. The HC-SR04 or the ultrasonic sensor is being used
in a wide range of electronics projects for creating obstacle detection and distance
measuring application as well as various other application. Here we have brought
the simple method to measure the distance with Arduino and ultrasonic sensor and
how to use ultrasonic sensor with Arduino

Figure 10: Ultrasonic sensor detection

Infrared sensors for obstacle avoidance: The use of an Infrared sensor on the robot
cart is to detect and track the presence of humans in its vicinity. The sensor emits
infrared radiation, which bounces off objects, including humans, and returns to the
sensor. By analysing the reflected signals, the robot can determine the distance and
position of nearby individuals. This information allows the robot to follow a
designated person or avoid obstacles intelligently, ensuring safe and effective
navigation while maintaining proximity to the human it is intended to follow.

20
Figure 11: Infrared sensor

4.2.3 Movement

In order to make the robot move itself, wheels, TT direct circuit motor, and servo
motor was used. The TT DC motor manipulated the direction of robot movement. It
controlled independently four wheels of robot that it could mimic any 4-wheel
behaviour that could enable the robot to turn in any direction.

Wheels or motors for movement: The use of motor wheels and motors on a robot cart
is to enable autonomous mobility and tracking capabilities. Motor wheels provide the
robot with the means to move efficiently and smoothly, allowing it to navigate various
terrains and environments while following a designated human target. The motors are
responsible for controlling the movements of the wheels, adjusting speed, direction,
and distance from the person it is following. This combination of motor wheels and
motors ensures that the robot can keep pace with the human, maintain a safe distance,
and adapt to changes in the person's movements, making it an ideal companion for
tasks of carrying loads.

21
Figure 12: Wheels and Motors

Servo motor for orientation adjustments: A servo motor is used in the robot cart to
control the movement of the robot's sensors or camera that track and detect human
presence. The servo motor enables precise rotation or tilting of these sensors, allowing
the robot to constantly adjust its orientation towards the detected human, ensuring it
follows the person smoothly and accurately. By employing the servo motor, the robot
can maintain a consistent and reliable visual lock on the human, enhancing the overall
effectiveness and safety of the human-following functionality in various applications

Figure 13: Servo motor

4.2.4 Power

To power the whole robot, we needed batteries.

Power source (e.g., batteries): The power source in a robot cart provides the
necessary energy for its autonomous operation, enabling it to track and follow humans
effectively. It powers the robot's components, such as sensors, processors, motors, and
communication systems, allowing it to perceive its surroundings, make decisions, and
move accordingly. This power ensures the robot's sustained function, making it a
dependable companion in various applications

22
Figure 14: Batteries

4.2.5 Others component

1) Chassis or frame to hold the components together: The chassis of a human-following robot

serves as its physical foundation and structural support, playing a crucial role in the robot's

mobility and stability. By housing and integrating various components like motors, sensors,

batteries, and control systems, the chassis facilitates smooth movement, enables efficient weight

distribution, and ensures precise tracking of the user. Additionally, the chassis design can impact

the robot's agility, durability, and adaptability to different terrains, making it an essential element

for creating a reliable and effective human-following robot capable of safely navigating and

following its user with ease.

Figure 15: Robot chasis

23
2) Jumper wires: Jumper wires are used in a human-following robot to establish electrical

connections between various components, such as sensors, motors, and microcontrollers. They

serve as essential conduits for transmitting signals and power, facilitating communication

between different modules in the robot's circuitry. In the context of a human-following robot,

jumper wires play a crucial role in linking the sensors responsible for detecting the human's

presence and movement with the control circuitry that directs the robot's actions, enabling it to

navigate and follow the human effectively. These wires ensure efficient and reliable data

transmission, contributing to the smooth operation and functionality of the robot during its

interaction with its human companion.

Figure 16: Jumper wires

24
4.3 Circuitry

Figure 17: Robot Circuitry

4.3.1 Pin Connection

Table 1: Connection
between Motor Driver and
Arduino
Motor Arduino
Driver UNO
Motor1
Table 2: Connection between 2
Motor2
IR Sensor and Arduino 3

IR Sensor Motor3
Arduino 4
Motor4
UNO 5

Sensor 1: VCC/ 12V Vin / 5v

VCC GND
VCC GND

GND 5V
GND 5V

OUT A0 Table 2: Connection between IR Sensor and Arduino

Sensor 2:
VCC VCC 25
GND GND
OUT A1
Table 3: Connection between IR Sensor and Arduino

Table 3: Connection between


Ultrasonic Sensor and
Arduino
Ultrasonic Arduino UNO
Sensor
GND GND
ECHO A3

TRIG A5
VCC VCC

Table 4: Connection between Ultrasonic Sensor and Arduino

4.4 Hardware Block Diagram

26
Figure 18: Hardware block diagram

4.4.1 Working Principle

First of all, when the power supplies a motor driver, the Servo motor will instantly be
heading to the left side making an angle of 180 degrees and heading to the right side,
making an angle of 0 degrees, then goes back to the beginning position which is
facing straight ahead. After all it is ready to go.

Go forward: If the ultrasonic sensor detects an object in range between 10 centimeters


and 30 centimeters, four wheels will go straight ahead toward the object and stop
when the distance between the robot and the object is less than 10 centimeters.

27
Figu
re 19: Forward motion

Turn Right: If the Right IR sensor detects an object, two motors on the right side,
which are motor 3 and motor 4, will rotate backward and two motors on the left side,
which are motor 1 and motor 2, will rotate forward. That makes the robot turn to right.

28
Figure 20: Right turn motion

Turn Left: If the Left IR sensor detects an object, two motors on the left side,
which are motor 1 and motor 2, will rotate backward and two motors on the
right side, which are motor 3 and motor 4, will rotate forward. That makes the
robot turn to left.

Figure 21: Left turn motion

29
Go backward: If the ultrasonic sensor detects an object less than 5 centimetres,
four wheels will go backward away from the object and stop when the distance
between the robot and the object is greater than 5 centimetres.

Figure 22: Backward motion

4.5 RESULT
Several experiments were carried out, and the performance of robot was evaluated.
The ultrasonic and infrared sensors were tested. It was discovered that the sensor was
accurate within a range of 30centimeters. An ultrasonic sensor is used to move the
robot forward and backward. Infrared sensors are used to move the robot in the left or
right direction accordingly. Then we ran the test to see if the robot kept a specific
distance from the target object. The serial communication between Arduino, motor
shield, and various motors was then tested. We made the necessary changes to the
processing and control algorithm based on the results of these tests and experiments.
This robot took a lot of time to complete this project. I faced lots of problems
regarding the program code, as there were huge numbers of error in the code which
was further rectified it and lastly it works. Motors drivers’ connections got
interchanged which was rectified and our robot works perfectly fine. Finally, after the

30
lots of effort and time my objective was achieved which was to implement a good
Human-Robot interaction.

Figure 23: Front view

Figure 24: Top view

31
Figure 25: Side view (a)

Side view (b)

32
CHAPTER FIVE
(SUMMARY, CONCLUSION AND RECOMMENDATIONS)
5.1 SUMMARY
The "Robot Cart System for Supermarkets" project represents a groundbreaking effort to
redefine the shopping experience in supermarkets. This initiative aims to overcome the
limitations of the traditional manual cart system by introducing a robotic shopping cart
equipped with ultrasonic and IR sensors. The primary objective is to provide customers with
a more convenient, efficient, and way of shopping. This robot cart offers autonomous
navigation, obstacle detection, and an intuitive touchscreen interface for item selection,
personalized recommendations, and streamlined transactions. Leveraging cutting-edge sensor
technologies and user-centric design principles, the project aspires to significantly enhance
the overall supermarket shopping experience. By minimizing physical effort and maximizing
convenience, this innovation promises to deliver higher customer satisfaction and operational
efficiency for supermarkets

5.2 CONCLUSION
A successful implementation of a prototype robot cart is illustrated in this paper. This robot
does not only have the detection capability but also the following ability as well. While
making this prototype it was also kept in mind that the functioning of the robot should be as
efficient as possible. Tests were performed on the different conditions to pinpoint the
mistakes in the algorithm and to correct them. The different sensors that were integrated with
the robot provided an additional advantage. The robot cart is an automobile system that has
ability to recognize obstacle, move and change the robot's position toward the subject in the
best way to remain on its track. This project uses Arduino, motors, different types of sensors
to achieve its goal. This project challenged all the separate parts to cooperate with each other,
communicate, and expand understanding of electronics, mechanical systems, and their
integration with programming.

5.3 RECOMMENDATIONS
This research has a variety of interesting applications in several fields, especially military and
medical. A wireless communication capability can be added to the robot to increase its
versatility and allow it to be controlled from afar. A robot with this functionality might also
be exploited for military purposes. We can also add some modifications to the algorithm and
structure to make it suitable for a different application. In retail malls, it can correspondingly

33
aid the public. Consequently, it may be used as a luggage carrier, eliminating the need to lift
or draw the weights. Correspondingly, this prototype might be modified in a variety of ways
to suit a variety of purposes.

REFERENCE
Darvish, K., Penco, L., Ramos, J., Cisneros, R., & Jan, R. O. (2019). Teleoperation of
Humanoid Robots : A Survey.

Duong, L. N. K., Al-fadhli, M., Jagtap, S., & Bader, F. (2020). A review of Robotics
and Autonomous Systems in the food industry : From the supply chains

34
perspective.

Emergency, C.-. (2021). A Robotic Health-Care. March, 71–81.


https://doi.org/10.1109/MRA.2020.3044953

Hassan, M. S., Khan, M. W., & Khan, A. F. (2015). Design and Development of
Human Following Robot 1. Student Research Paper Conference, 2(15), 79.

HUMAN FOLLOWING ROBOT Technology and Communication 2022. (n.d.).

Mišković, D., Milić, L., Čilag, A., Berisavljević, T., Gottscheber, A., & Raković, M.
(2022). Implementation of Robots Integration in Scaled Laboratory Environment
for Factory Automation. Applied Sciences (Switzerland), 12(3).
https://doi.org/10.3390/app12031228

Sati, D., Avkirkar, S., Pandey, R., & Somnathe, A. (2021). Human Following Robot
Using Arduino. International Journal of Advanced Research in Science,
Communication and Technology, 07, 347–350. https://doi.org/10.48175/ijarsct-
1025

Zhu, F., Zhu, Y., Lee, V. C., Liang, X., & Chang, X. (2021). Deep Learning for
Embodied Vision Navigation: A Survey. 1–20. http://arxiv.org/abs/2108.04097

K. Morioka, J.-H. Lee, and H. Hashimoto, “Human-following mobile robot in a


distributed intelligent sensor network,” IEEE Trans. Ind. Electron., vol. 51, no.
1, pp. 229–237, Feb. 2004.

Y. Matsumoto and A. Zelinsky, “Real-time face tracking system for human-robot


interaction,” in 1999 IEEE International Conference on Systems, Man, and
Cybernetics, 1999. IEEE SMC ’99 Conference Proceedings, 1999, vol. 2, pp.
830– 835 vol.2.

35

You might also like