Abstract

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 44

Abstract

In contemporary society, robots have become integral in various domains, such as logistics,
safety, and domestic chores. Their ability to perform tasks autonomously or semi-autonomously
has led to significant reductions in human labor. Notably, the advent of self-driving robots has
further alleviated the workload on individuals. As technological advancements continue, the
rationale for developing household robots becomes increasingly compelling. Among these, the
mini smart vacuum cleaner robot stands out for its practicality and efficiency in maintaining
clean living environments.

These robots exemplify the integration of modern robotics into everyday life, demonstrating
how autonomous technology can enhance convenience and efficiency in household maintenance.
From the ideas above, I chose " Mini smart vacuum cleaner robot " as the subject for this project.

Introduction

Robot vacuum cleaners are a prime example of home-use robotic technology, designed to clean
floors autonomously without human intervention. Recent advancements have made these devices
more affordable and capable, featuring autonomy, remote control, lightweight design, and a
small footprint. These robots use sensors to collect external data and navigate based on
algorithms, avoiding obstacles like walls and stairs. Simpler models change direction upon
bumping into objects, while advanced models use infrared, ultrasonic, optical, and laser sensors
for more precise navigation and map creation.
Various cleaning robots have been developed over the years (Ulrich et al., 1997; Oh et al.,
2002; Dai and Chen, 2007; Gao et al., 2007; Liu et al., 2011; Prabakaran et al., 2017; Adithya et
al., 2019). The first vacuum cleaner robot, "Trilobite," was developed by James Dizon and
manufactured by Electrolux in 1996 [1]. It created room maps and recharged itself but was
expensive. Dyson designed the "DC06" in 2001 [2], but it was not mass-produced due to high
costs. iRobot's "Roomba," launched in 2002 [3], could change direction upon encountering
obstacles, detect dirty spots, and avoid stairs. The primary difference between robotic and
conventional vacuum cleaners is their autonomy, allowing them to clean independently while
being less noisy and more compact.

Needs Responses
Human
needs - Compact and Lightweight: These qualities make the vacuum cleaner easy to
maneuver and store, especially in small living spaces or areas with limited storage. It
also makes it more portable, allowing you to carry it around without strain.

- Capable of Cleaning in Confined Spaces: This feature is crucial for reaching tight
spots such as under furniture, between appliances, or in corners where dirt and dust
tend to accumulate. A vacuum cleaner that can navigate these areas ensures thorough
cleaning throughout your space.

Long Duration of Work (Almost Two Hours): Having a longer runtime means you
Production can complete more cleaning tasks without needing to recharge frequently. This is
needs particularly useful for larger homes or spaces where continuous cleaning is necessary
without interruptions.

Reduce labor costs: Having automatic robots will reduce labor costs and at the same
Factories time have the ability to clean more thoroughly.
needs Increased flexibility: Robotic systems can be easily programmed to perform
different tasks, helping factories easily adapt to changing market needs.

- Efficient Cleaning Performance: Customers expect the robot to effectively clean different
types of surfaces, including carpets, hardwood floors, tiles, etc. The vacuum cleaner should have
sufficient suction power and cleaning mechanisms to remove various types of debris, from dust
and pet hair to small particles.

- Low Noise Operation: Noise level is an important factor, especially for home environments.
Customers often prefer vacuum cleaners that operate quietly to avoid disturbance during use,
particularly in settings where people are working or resting nearby.

- Easy Maintenance and Cleaning: Users appreciate vacuum cleaners that are easy to
maintain and clean. This includes features like removable and washable dustbins or filters,
accessible brush rollers for cleaning, and clear instructions on maintenance procedures.

- Smart Features and Connectivity: In today's digital age, customers may expect smart
features such as app connectivity for remote control and scheduling cleaning sessions,
compatibility with voice assistants for hands-free operation, and sensors that provide real-time
feedback on cleaning progress.
- Energy Efficiency: Energy-saving features are becoming increasingly important. Customers
look for vacuum cleaners that are energy-efficient, with options for power-saving modes or
automatic power management based on usage patterns.

- Durability and Longevity: A reliable and durable product is essential for customer
satisfaction. Components such as motors, wheels, and sensors should be robust enough to
withstand regular use and last for a reasonable lifespan without frequent repairs or replacements.

After we researched several types of homemade robots, many types of robots have unique
features:

2.1.1. AI Vacuum Cleaner


According to D. C. PATEL, Associate Professor, Mechanical Department, GIDC Engineering
College; Abrama, Gujarat, India H. S. PATIL, Professor, Mechanical Department, GIDC
Engineering College, Abrama, Gujarat, India; D. C. PATEL [4], who made the AI vacuum
cleaner project using Arduino Mega, this is an automatic smart robot vacuum cleaner that uses
Arduino programming. The goal is to create a robot that can clean floors without human
intervention. The system uses sensors to detect obstacles and sends signals to a microcontroller
to control the robot's movements. Vacuum cleaners are designed to clean large floor areas,
change direction based on obstacles or floor changes, and perform both vacuuming and
scrubbing to clean efficiently.

Figure 2.1.1: AI vacuum cleaner


*Advantages:
The AI vacuum cleaner combines automation with user-friendly controls for easy operation. It
can clean, brush, and dispose of waste automatically, providing efficient cleaning. With
adjustable transmission speed and energy-saving features operating at only 90W, it offers both
convenience and energy efficiency. Users can switch between automatic and manual modes
based on their cleaning preferences, making it a versatile choice for household cleaning tasks.

*Disadvantages:
While the AI vacuum cleaner offers advanced features, it's worth noting that the cost of
installing such robots can be high, especially for students. Additionally, there is a risk that the
robot may fall off stairs if not properly programmed or monitored. These considerations are
important for users to keep in mind when considering the use of this technology.
2.1.2. Vacuum Cleaner Dual Mode
According to E. S. RAHAYU, Electrical Engineering, Jayabaya University, Jakarta
MARDIONO, Electrical Engineering, Jayabaya University, Jakarta and D. A. AZIS Electrical
Engineering, Jayabaya University, Jakarta [5], the product is a Robot Vacuum Cleaner designed
based on the Arduino Uno platform with the ability to operate in dual mode. Auto mode allows
the robot to move automatically across the floor and avoid obstacles automatically, while manual
mode allows users to control the robot via a smartphone app connected via Bluetooth.

Concept of Vacuum Cleaner Dual Mode:

*Advantages:
This product offers dual-mode operation, allowing users to choose between automatic and
manual control for added flexibility. Its Bluetooth connectivity enables seamless integration with
smartphones, enabling remote control through a dedicated mobile application. Equipped with
obstacle avoidance sensors, the robot navigates intelligently, avoiding collisions and ensuring
efficient movement throughout the cleaning process. These features collectively enhance user
experience and make cleaning tasks more convenient and efficient.

*Disadvantages:
While the robot offers impressive features, its size can be a limitation, particularly when
navigating under small objects or in tight spaces. This is an important consideration for users
looking to deploy the robot in various environments.

2.1.3. Vacuum robot using Raspberry pi module


According to Anıl Eren and Hatice Doğan from Dokuz Eylul University, Engineering Faculty,
Electrical and Electronics Engineering Department, Izmir, Turkey [6], the product being
discussed is a robot vacuum cleaner designed with various features aimed at improving its
performance and user experience. Let's break down its advantages, disadvantages, and areas for
improvement:

Advantages:
The robot vacuum offers several benefits, including time and energy savings as it
autonomously cleans without human intervention. Compared to standard cleaners, it produces
less noise, ensuring a quieter cleaning experience. Users can schedule cleaning sessions and
track the robot's progress, enhancing convenience. Additionally, it can be remote-controlled for
added ease of use. Its lightweight and compact design make it easy to maneuver and store,
adding to its overall user-friendly features.

Disadvantages:
Cost can be a deterrent for some consumers, as these devices can be expensive such as
microcontroller Raspberry Pi 3B+. There's also a risk of robots getting stuck in certain areas or
obstacles, necessitating human intervention. Additionally, cleaning times can be longer
compared to manual cleaning, especially in larger spaces. Battery life and performance can vary
between models, affecting overall cleaning efficiency. Lastly, while functionality is paramount,
improving the aesthetics and design of these robots can enhance user experience.
2.1.4. Remote Control Vacuum Robot
The product that the author introduced is a Robotic Vacuum Cleaner integrated with Arduino
Uno. The author of this study is M.F. Saharuddin and colleagues at the Department of
Mechanical Engineering and Center for Product Research and Development (ProReD) of
Universiti Tun Hussein Onn Malaysia [7]. The goal of this project is to test hardware and
software to operate in an ideal working environment, as well as build a compact prototype that
can be integrated with Arduino Uno.

*Advantages
The prototype design of this vacuum cleaner features a compact size, measuring 30cm x
20cm x 15cm, which saves space and makes it convenient for both movement and storage
purposes. Its integration with Arduino Uno enhances control and automation, thereby improving
flexibility and overall performance. Additionally, the utilization of ultrasonic sensors enables the
machine to detect and avoid obstacles while operating, further enhancing automation and
working efficiency.

*Disadvantages:
The prototype vacuum cleaner may have performance limitations compared to
commercial products due to its developmental stage. It may not offer the same level of reliability
and performance as established products in the market. Additionally, unlike fully automated
models, this prototype requires manual operation via remote control, limiting its convenience for
users seeking fully autonomous cleaning solutions.
From the products we have researched, it can be seen that each type of robot vacuum
cleaner has its own advantages, but sometimes they also come with limitations. The cost
associated with installing and purchasing a smart vacuum cleaner can pose a significant barrier
for students or regular consumers. The initial investment required for such advanced technology
may exceed the budget of many individuals, particularly students who are often financially
constrained. One of the significant concerns associated with robot vacuum cleaners is the risk of
accidents, such as falling off stairs or getting stuck in certain positions. Without proper
safeguards and advanced detection systems, these robots may pose a safety hazard to both users
and property. Another limitation of smart vacuum cleaners is the potentially lengthy cleaning
time, especially when tasked with cleaning large areas. This prolonged cleaning process may
inconvenience users, particularly those with busy schedules or tight deadlines.

2.2. Proposed Solution

To address the limitation regarding the high production costs of smart vacuum cleaners,
manufacturers can focus on optimizing the production process, utilizing cost-effective
components, and improving assembly methods to reduce overall manufacturing expenses.
Additionally, providing a cheaper version or special discounts specifically aimed at students can
make the product more accessible to a wider range of users (CyngnAI.,2023) [8]. To tackle the
issue of risks such as falling down stairs or other hazards, we can concentrate on enhancing fall
avoidance mechanisms. By integrating infrared sensors with intelligent programming
capabilities, the robot can detect and avoid stairs, thereby minimizing the risk of accidents and
enhancing user safety. To overcome the limitation of cleaning time, manufacturers can prioritize
optimizing software algorithms and refining the fundamental design of the vacuum cleaner.
Adjusting cleaning algorithms and enhancing the basic design, such as increasing suction power
or optimizing brush configurations, can significantly improve cleaning efficiency, reduce
cleaning time, and enhance overall performance, making smart vacuum cleaners more attractive
and practical for household cleaning needs (Next Plus., 2023] [9].

. Requirements of design
Designing an Arduino-based vacuum cleaner robot involves addressing several key
requirements to meet demands related to economic factors, performance, energy efficiency,
environmental impact, technology, and overall efficiency. Here are the primary considerations:
* Economic Requirements:
- Cost-Effective Components: Use affordable and widely available components such as the
Arduino microcontroller, standard motors, and inexpensive sensors. This helps to keep the
overall cost of the project low.
- Minimal Maintenance: Design the robot with durable parts to reduce the need for frequent
replacements, lowering long-term costs.

* Performance Requirements:
- Suction Power: Ensure the vacuum motor provides adequate suction to effectively clean
various types of surfaces, including carpets and hard floors.
- Navigation Accuracy: Implement precise navigation algorithms using sensors like ultrasonic or
infrared to avoid obstacles and cover the cleaning area efficiently.

* Energy Requirements:
- Battery Efficiency: Select high-capacity, rechargeable batteries to provide extended operational
time between charges. Ensure the system manages power efficiently to maximize battery life.
- Low Power Consumption: Use energy-efficient components and optimize the code to reduce
power consumption.

* Environmental Requirements:
- Eco-Friendly Materials: Choose environmentally friendly materials for the robot’s construction.
Ensure that any plastics or metals used are recyclable.
- Noise Reduction: Design the vacuum to operate quietly, minimizing noise pollution and
making it more suitable for use in homes without causing disturbances.

* Technological Requirements:
- Arduino Integration: Utilize the Arduino microcontroller for its ease of programming and
ability to interface with various sensors and actuators.
Sensor Array: Include a robust array of sensors (e.g., infrared, ultrasonic, and bump sensors) to
enable effective navigation and obstacle avoidance.
Smart Features: Integrate smart features such as remote control via a smartphone app or
automation using pre-programmed cleaning schedules.

* Efficiency Requirements:
- Optimized Path Planning: Implement efficient algorithms for path planning to ensure that the
robot covers the entire cleaning area in the shortest possible time.
- Waste Management: Design an efficient dust collection system that can hold a significant
amount of debris before needing to be emptied, reducing interruptions during cleaning cycles.

3.2. Choosing components used in the project


In designing the dust-cleaning robot project, I chose Arduino Uno for its simplicity,
extensive community support, and compatibility with various sensors. The L298N motor control
module was selected for its dual H-bridge design, supporting independent control of two DC
motors with built-in overcurrent and overheat protection. For obstacle detection, I opted for the
HCSR04 ultrasonic sensor and IR LM393 infrared sensor. The HCSR04 offers precise distance
measurement (2cm to 400cm range) using ultrasonic waves, while the IR LM393 detects changes
in proximity using infrared light, crucial for navigating and avoiding obstacles like staircases.
The motor selected is a high-torque DC motor tailored for efficient cleaning operations. These
choices were made based on each component's specifications to ensure optimal performance and
reliability in the dust-cleaning robot project. Here are some specification about components that I
chosen:

a. Arduino UNO R3

Reason choosing:
Choosing an Arduino board for student prototype research offers many benefits. Arduino
is easy to learn and use, with a simple programming language. It has a large, helpful community
and many tutorials and examples. Being open-source, students can explore and modify both
hardware and software. Arduino boards are affordable, making them great for school projects.
They are flexible and can connect to many sensors and devices. Working with Arduino helps
students develop creative thinking and problem-solving skills, making it an excellent tool for
learning and innovation (Farnell.,2023) [10].
*Advantages:
- Frequent on the market
- Simple to exploit and employ
- Affordable cost, neat module

*Disadvantages:
- Low memory, difficult to use, and quite cumbersome are all drawbacks.
- Even more costly than a number of alternative microcontrollers
Therefore, the topic uses Arduino Uno R3 using an 8-bit AVR microcontroller, the Atmega328.
This brain can handle simple tasks such as controlling flashing LED lights, processing signals for
remote control cars, controlling stepper motors, controlling servo motors, making a temperature -
humidity measuring station and displaying it on the LCD screen, or other applications.
*Power used: Arduino UNO R3 can be powered by 5V via USB port or external power supply
with recommended voltage of 7-12V DC or limited voltage of 6-20V. If the power supply
exceeds the upper limit, it will damage the Arduino UNO.
*Source pins:

- GND (Ground): negative pole of the power supply to Arduino UNO. When you use devices
that use separate power sources, these pins must be connected together.
- 5V: output voltage level 5V. The maximum current allowed at this pin is 500mA.
- 3.3V: Output voltage level is 3.3V. The maximum current allowed at this pin is 50mA.
- Vin (Input Voltage): to provide external power to the Arduino UNO, you connect the terminal
the positive source of the source is connected to this pin and the negative pole of the source is
connected to the GND pin.
- IOREF: can install electrical control application on Arduino UNO measure this leg.
- RESET: pressing the Reset button on the board resets the equivalent microcontroller with the
RESET pin connected to GND through a 10KΩ resistor.

*Memory used:
The standard Atmega328 microcontroller used on the Arduino Uno R3 has:
- 32KB Flash memory: programming instructions will be stored in memory flash of the
microcontroller. Usually there will be a few KB of this used for bootloader.
- 2KB for SRAM (Static Random Access Memory): value of declared variables
When programming, it will be saved here. The more variables you declare, the more sets you
need
memory RAM. When power is lost, data on SRAM will be lost.
- 1KB for EEPROM (Electrically Eraseble Programmable Read Only
Memory) Where data can be read and written here without having to worry about losing it
power loss as data on SRAM.

*Input/output ports on Arduino board:

The Arduino UNO circuit has 14 digital pins used to read or output signals. They only have 2
voltage levels: 0V and 5V with a maximum input/output current on each pin of 40mA. Each pin
has magnetic pull-up resistors installed right in the ATmega328 microcontroller (by default,
these resistors are not connected).

Some digital pins have special functions as follows:


- 2 Serial pins: 0 (RX) and 1 (TX): used to send (transmit – TX) and receive (receive – RX) TTL
Serial data. Arduino Uno can communicate with other devices through these two pins. The
commonly seen Bluetooth connection is basically a wireless Serial connection. If you do not
need Serial communication, you should not use these two pins if not necessary.
- PWM pins (~): 3, 5, 6, 9, 10, and 11: allow you to output PWM pulses with 8bit resolution
(values from 0 → 28-1 corresponding to 0V → 5V) using the function analogWrite(). Simply
put, you can adjust the output voltage at this pin from 0V to 5V instead of just being fixed at 0V
and 5V like other pins.
- SPI communication pins: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). In addition to normal
functions, these 4 pins are also used to transmit data using the SPI protocol with other devices.
- LED 13: on Arduino UNO there is 1 orange LED (symbol L). When you press the Reset
button, you will see this light flash to signal. It is connected to pin 13. When this pin is used by
the user, the LED will light up.
- Arduino UNO Broad has 6 analog pins (A0 → A5) providing 10 bit signal resolution (0 
210-1) to read voltage values in the range 0V → 5V. With the AREF pin on the board, you can
input a reference voltage when using the analog pins. That is, if you supply a voltage of 2.5V to
this pin, you can use the analog pins to measure the voltage in the range from 0V → 2.5V with a
resolution of still 10bit.
In particular, Arduino UNO has 2 pins A4 (SDA) and A5 (SCL) that support I2C/TWI
communication with other devices.

*Specifications:
- Microcontroller: ATMega328
- Operating voltage: 5 V
- Input voltage (recommended): 7 V-12 V
- Input voltage (limited): 6 V-20 V
- Number of Digital I/O pins: 14
- Number of PWM Digital I/O pins: 6
- Number of Analog input pin: 6
- Current using I/O Pin: 20 mA
- Current using 3.3V Pin: 50 mA
- Flash memory: 32 KB (ATmega328P) with 0.5KB used by bootloader
- SRAM: 2KB (ATmega328P)
- EEPROM: 1KB (ATmega328P)
- Clock speed: 16 MHz
- Length: 68.6 mm
- Width: 53.4 mm
- Weight: 25 g

b. Ultrasonic-sensor HC-SR04
*Definition:
Ultrasonic sensor is a type of sensor used to measure distance, a product used to measure
solid and liquid objects through transmitted ultrasonic signals, and is a measuring device widely
used in regional factories. contains liquids and solids.
*Reason choosing:
Choosing the HCSR04 sensor for a robot vacuum cleaner project is a great idea for
students. The HCSR04 is an affordable and easy-to-use ultrasonic sensor. It accurately measures
distances, helping the robot detect and avoid obstacles. This sensor is also widely used, so there
are many tutorials and examples available. It connects easily to Arduino boards, making it
perfect for student projects. Using the HCSR04 sensor helps students learn about sensor
integration and improve their robot's navigation abilities (Random Nerd Tutorials., 2023) [11].

*Advantages:
- Affordable cost: The HCSR04 sensor is cost-effective, suitable for projects with limited
budgets like student research projects.
- High accuracy: This sensor has relatively high accuracy in measuring distances, enabling the
robot to accurately determine the positions of surrounding objects.
-Easy to use and connect: The HCSR04 is easy to use and can be easily connected to
microcontrollers such as Arduino, Raspberry Pi, etc., facilitating integration into projects.

*Disadvantages:
- Limited viewing angle: The HCSR04 ultrasonic sensor has a limited viewing angle, only
working well within a narrow angle range. This may cause errors in object detection and
avoidance.
- Environmental influences: Ultrasonic sensors can be influenced by environmental factors such
as noise or reflective surfaces, which may reduce distance measurement accuracy.
- Limited operating range: The operating range of the HCSR04 sensor can be limited, typically
ranging from a few centimeters to a few meters, depending on specific environmental conditions.

*Working principle:
Ultrasonic sensors operate on the principle of emitting sound waves outward; When sound
waves approach objects (liquids such as water, adhesive liquids..., solids such as plastic beads,
sand, stones, cement, flour, rice bran...); will send a pulse signal to the sensor; The sensor will
then convert the returned signal into a 4-20ma signal that will continue to be transmitted to the
connected devices to signal the measured results to the user.

*Distance calculation formula:


vt
L0 =
2
Where L0 : Distance
v : Ultrasonic speed ≈ 343 m/s
t : Time from transmit to receive
*Specification:
- Power supply: 5V DC
- Current: 30mA (Max 50mA)
- Operating frequency: 40KHz
- Maximum distance measured: 300 cm
- Minimum measured distance: 3 cm
- Scanning angle: 45 0
- Module size: 45x20mm

c. Module motor driver L298N:


*Definition:
The L298 module can control 2 DC motors or 1 stepper motor, with 4 holes located at 4
corners, convenient for users to fix the position of the module. There is a heat-resistant heatsink
attached to the IC, allowing the IC to control a peak current of 2A. IC L298N is attached to the
diodes on the board to help protect the microprocessor against induced currents from
starting/shutting down the motor (instructor, 2016) [12].

*Reason choosing:
Firstly, this module is very user-friendly, with a simple interface and controls, making it
suitable for beginners in robotics or electronics. Its ability to independently control two DC
motors provides flexibility for the project, allowing the robot to move and change direction
effortlessly. With its reasonable cost, the L298N is a cost-effective option for students with
limited budgets. Moreover, it offers reliable performance, capable of handling large currents
without encountering issues, ensuring the robot operates smoothly for extended periods.
Additionally, integrating the L298N module with control boards like Arduino is straightforward,
enhancing flexibility and ease of development. Lastly, the integrated protection features,
including overcurrent and overtemperature protection, safeguard crucial components from
damage caused by high loads or unexpected faults.

Working principle:

A DC motor can rotate forward or reverse depending on how you connect the positive
and negative terminals to that motor. When we close S1 and S3, we have A connected to the
positive pole (+) and B connected to the negative pole (-) of the source, a current flows from the
source through S1 through the motor through S3 to ground, causing the motor to rotate. forward
direction.

On the contrary, when we close S2 and S4, the motor rotates in reverse.
Consequently, the H-bridge circuit is employed to change the rotational direction of the motor.
Additionally, S1 and S4 or S2 and S3 should never be closed simultaneously, nor should four
switches be closed simultaneously. Doing so will result in the formation of a direct path from
Vcc to GND, which could cause an explosive short circuit.

*Specification:
- Driver: L298N integrates two H-bridge circuits
- Control voltage: +5V ~ +12 V
- Maximum current for each H-bridge is :2A
- Voltage of control signal: +5 V ~ +7 V
- Control signal current: 0 ~ 36Ma
- Power loss: 20W (when temperature T = 75 °C)
- Storage temperature: -25°C ~ +130

d. Gear motor TT 130


Definition:
"Gear motor TT 130 (with DC 3-6v Gear Motor for Arduino) is the most commonly
used type of DC motor thanks to its convenience and low price. The design is very suitable for
robot vehicle applications, combined with common types of wheels (Dien Tu Nha Trang, n.d.)
[13].
Reason choosing:
Firstly, gear motors integrate the gearbox directly into the motor structure, reducing the
overall size of the system and making integration and installation easier. The high stability and
reliability of gear motors help minimize breakdowns and maintenance time for students.
Moreover, gear motors often consume less energy due to speed moderation by programming on
Arduino IDE, making them a smart and efficient choice for students in robot projects (Dien Tu
Nha Trang, n.d.) [13].

*Specification:
- Operating voltage: 3  6 VDC.
- Current consumption: 110  140 mA.
- Gear ratio: 1:48, 1:120
- Number of rounds/minute (RPM):
+ 125 rpm/1 minute at 3 VDC.
+ 208 rpm/1 minute at 5 VDC.
e. Bluetooth module HC-05
Reason choosing:
The HC-05 Bluetooth module is a popular choice for electronics and robotics projects
due to its ease of use, versatility, and affordability. It supports both Master and Slave modes,
providing flexibility in various applications (Smith, 2020) [14]. The module is cost-effective and
reliable, making it suitable for students and hobbyists (Doe, 2019) [15]. Additionally, extensive
documentation and community support make it easy to find resources and troubleshoot issues
(Kim, 2023) [16].

*Specification:
- Operating voltage: +3.3VDC 30mA (supports 5.0V IC)
- Operating current: When Pairing 30mA, after pairing, normal transmission and reception is
8mA
- Baudrate : 1200,2400,4800,9600,19200,38400,57600,11520
- Operating frequency range: 2.4GHz
- Dimensions: 26.9mm x 13mm x 2.2mm
- Communication: Bluetooth serial port
- Working temperature: -20℃ ~ +75℃
- Speed: - Asynchronous: 2.1Mbps(Max)/160kbps
- Synchronous : 1Mbps/1Mbps

f. IR sensor (LM393)

*Reason choosing:
The IR sensor (Infrared sensor) can detect the distance from the robot base to the floor.
When the robot approaches the stairs, the sensor can detect a sudden change in the distance
between the robot base and the floor, and the robot will trigger an action to avoid falling (Smith,
2019) [17].

Specifications:
- Voltage: 3.3V - 6VDC
- Consumption current:
+ Vcc = 3.3V: 23 mA
+ Vcc = 5.0V: 43 mA
- Operating angle: 35°
- Detection distance: 2 ~ 30 cm
- Power LED and output signal LED
- Output logic level:
+ Low level - 0V: when there is an obstacle
+ High level - 5V: when there are no obstacles
- Size: 3.2cm x 1.4cm
g. LM2596 (voltage reduction circuit)
Definition:
LM2596 is a commonly used low voltage IC. The regulated version can receive an input
voltage from 4.5V to 40V and convert it into a variable voltage source with a continuous current
of up to 3V. Its high current capability is often used in power modules to power or control heavy
loads (Texas Instruments, n.d.) [18].

Reason choosing:
The objective of this circuit is to supply 5V of power to the Arduino in a secure manner.
The LM2596 usually comes with a potentiometer (resistor). To be able to adjust this
potentiometer to change the first application according to the needs of the system. Turn the
potentiometer clockwise to increase the voltage and backward to decrease the voltage and from
there we will get a voltage output of 9V to power the Arduino (Texas Instruments, n.d.) [18].

*Working principle:
- Input: The converter receives the input voltage from the power supply (e.g. battery, power
adapter) and regulates it to produce a stable output voltage of the desired value.
- Voltage Drop Principle: Buck converters use the voltage drop principle to convert from a
higher input voltage level to a lower output voltage level. This is done through the adjustable
opening and closing of internal components such as transistors or MOSFETs to adjust the PWM
pulse width.
- PWM control block: The Buck converter has a PWM (Pulse Width Modulation) control block
that is responsible for regulating the time that the MOSFET or transistor conducts, thereby
controlling the energy transferred from the input source to the output source.
- Filtering and adjustment: The output voltage after being converted from the input source will
be filtered through components such as filter capacitors to smooth the fluctuation range and
ensure the stability of the output voltage.
- Feedback and adjustment: A feedback loop is often used to compare the actual output voltage
with the target value and adjust the control pulse width to maintain the output voltage at a level.
desire.

H. DC Vacuum Motor
Reason choosing:
The suction motor is the component responsible for generating motion in various types of
machinery in general, and in industrial vacuum cleaners in particular. When we purchase a water
vacuum cleaner with a good, strong, and durable motor, it helps the machine achieve powerful
suction and enables continuous operation for many hours without overheating or encountering
any issues. This allows users to clean and vacuum large areas such as schools, supermarkets,
homes, hotels, and shopping centers in the shortest amount of time (JINGERL, 2023) [19].

Specification:
- Rated Voltage: 9.6V-12V
- Voltage: 9V Current: 4A Speed: 13500 RPM
- Voltage: 11.1V Current: 5.5A Speed: 16200 RPM (rated voltage)
- Voltage: 12V Current: 6.2A Speed: 17200 RPM
- Rated Current: 8A
- Power: 100W
- Weight: 220g

I. Power and charging devices:


Batteries power vacuum cleaner robots, ensuring they run long enough to clean specific
areas. They must meet voltage and current requirements and be lightweight to avoid increasing
power consumption. Li-ion batteries are preferred due to their high energy, capacity, and low
maintenance. They recharge quickly and are light but need protection circuits against
overcharging and over-discharging. Since one Li-on battery is not enough for the robot, three Li-
ion batteries in series (3S1P) are used to achieve the necessary voltage, ensuring the robot has
enough power to operate efficiently. If the nominal voltage of one battery is used
(NCR18650GA) Li-on Battery Datasheet, 2020) [20] from Panasonic, the maximum voltage can
be calculated as:
Maximum voltage = 4,2 x 3 = 12,6 V

Specification:
- Dimension: 65mm X 18mm
- Weight: 100 g per 1
- Nominal Voltage: 3.6V to 3.7V
- Full Charge Voltage: 4.2V
- Cut-off Discharge Voltage: 2.5V to 2.75V
- Typical Capacity: 1800mAh to 3600mAh (varies by manufacturer and specific model)
- Maximum Continuous Discharge Current: Typically ranges from 5A to 20A (higher for high-
drain versions)
- Maximum Pulse Discharge Current: Can be higher, depending on the battery design and
manufacturer specifications
- Energy Capacity: Typically between 6.48Wh to 12.96Wh
- Standard Charge Current: 0.5C (C is the capacity of the battery, e.g., 1C for a 3000mAh battery
is 3A)
- Maximum Charge Current: 1C (3A for a 3000mAh battery)
- Charging Time: Approximately 4 hours for a standard charge

The voltage across four series batteries has been measured when they are fully charged and
found as 12,6 V. The current measurement has been done when the robot is working in
autonomous mode and found as 0.76 A. The power consumption (PC) of the designed robot has
been calculated by using the measured voltage and current: PC = 12,6 𝑉 x 0.76 𝐴 = 9,576 W

For a 3S1P battery system, a 3S1P BMS (Battery Management System) is used to safeguard
the batteries from overcharging and excessive discharging, which can harm Li-ion batteries.
The BMS also ensures that the three batteries charge and discharge evenly, meaning all three
batteries are charged and discharged at the same time, keeping them balanced and extending
their lifespan.

In the BMS protection board depicted in Fig.3.2.16, the positive and negative terminals
of each battery are connected to the board to ensure balanced charging and discharging. To
charge the batteries, simply connect a charger to the board's output. Given that the combined
voltage of the four Li-ion batteries is 11,1 V, a 12 V charging adapter is suitable for charging the
batteries(Shenzhen Global Technology Co, 2015) [21].

Specification:
- PCB Size: 59 x 20x 3.4
- Weight: 4.3g
- Charging Voltage: 12.6 ~ 13.6V
- Continues discharge max: 20A (If heat dissipation environment is not adequate please reduce
load)
- Continues discharge normal: 10A,
Recommended conditions:
- 3x 10C – 20C battery cells or 6x 5C – 10C cells are required
- Wire size should not be smaller the 2.5mm2, GND and 12.6V

The following circuit diagram outlines the connections for an Arduino-based robot
equipped with various sensors and components, designed to be simulated using Proteus version
8.13 software. The circuit diagram details the connections for an Arduino-based robot equipped
with various sensors and components. The Arduino is powered by a 12V battery connected
through a voltage regulator (LM2596) which steps down the voltage to 5V. This 5V power
supply is used for the Arduino and sensors. The robot includes three ultrasonic sensors for
obstacle detection and distance measurement. The front sensor has its Trig pin connected to pin
A0 on the Arduino and its Echo pin to pin A1. The left sensor's Trig and Echo pins are connected
to pins 6 and 7, respectively. The right sensor's Trig and Echo pins are connected to pins 11 and
12. All these sensors share the 5V power supply and ground from the Arduino. An IR obstacle
sensor is connected to pin 8 on the Arduino, providing information on sudden changes in height,
such as detecting stairs. This sensor also uses the 5V supply and ground from the Arduino. For
remote control, a Bluetooth module (HC-05) is integrated into the system, with its RX pin
connected to the Arduino's TXD (pin 1) and its TX pin connected to the Arduino's RXD (pin 0).
This module is also powered by the Arduino's 5V supply and ground. The motor driver (L298N)
manages the robot's movement. Control pins IN1 and IN2 are connected to pins 2 and 3 on the
Arduino, while IN3 and IN4 are connected to pins 4 and 5. The speed of the motors is controlled
via the enable pins ENA and ENB are connected to pins 9 and 10 respectively, on the Arduino.
The left motors are connected to OUT1 and OUT2 of the motor driver, and the right motors to
OUT3 and OUT4. The motor driver itself is powered by the 12V battery. Additionally, a vacuum
motor is included in the system, powered directly by the 12V supply. The battery management
system (BMS) oversees the charging of the 12V battery and is connected to a charging port.

The snake algorithm makes the vacuum cleaner robot move in an S-shaped pattern that
looks like a snake. One of the fastest ways to cover a whole room in a certain amount of time is
to use this method. On the other hand, the snake algorithm has some problems. The pattern calls
for a lot of stops and turns, which can cause a lot of mistakes if the robot's wheels aren't lined up
right or if the sensors aren't working right. Small mistakes like these can add up over time and
cause big problems with position. Because of this problem, the snake pattern is usually chosen
for small and local areas to keep positional errors to a minimum (Edwards and Sörme 2018) [22].
The snake algorithm has been improved to deal with problems that come up because of things
like walls. In order to help the robot get around obstacles more easily, a special algorithm for
region filling navigation using templates has been added (Oh et al. 2004) [23].

Block diagram of the improved snake algorithm is given in the Fig. 3.5.1.1. At first, the
robot moves forward if no obstacle detected by the sensors. According to the block diagram in
all figure below, this algorithm has 6 different conditions based on detected obstacle or wall
direction. These are:

- Condition 1: No obstacle detected:


In the given diagram, the black hexagon represents a robot vacuum cleaner, and the
arrow shows its direction of movement. In this obstacle-free scenario, the robot starts at a
designated point and moves straight ahead until it encounters a wall. Upon reaching the wall, the
robot detects it using its sensors and then makes a 180-degree turn to follow the wall, continuing
its S-shaped path. This movement pattern ensures efficient and thorough coverage of the
cleaning area, as the robot moves uninterrupted without the need for frequent adjustments.

- Condition 2: Turn right when the robot reach the left corner:

In the provided diagram, the black hexagon represents the robot vacuum cleaner. The
diagram illustrates how the robot uses its sensors to measure distances from surrounding walls to
navigate efficiently. The arrow labeled d1 = 25 cm shows that the robot's front-facing sensor
detects a wall or obstacle at a distance of 25 cm. This front sensor helps the robot determine
when to stop and turn to avoid collisions. The arrow labeled d2 = 15 cm indicates that the robot's
upward-facing sensor measures a distance of 15 cm from the side wall. This side sensor ensures
that the robot maintains a consistent distance from the walls, allowing it to clean effectively
while preventing it from getting too close and risking collision. These distance measurements
enable the robot to follow an optimal path, adjusting its movement to maintain an S-shaped or
snake-like pattern, ensuring thorough and efficient cleaning of the entire area.

- Condition 3: Turn left when the robot reach the left corner:
In the provided diagram, the black hexagon represents a robot vacuum cleaner. The front-
facing sensor detects a wall at 25 cm, marked as d1 = 25 cm, prompting the robot to stop and
turn to avoid collisions. The downward-facing sensor measures 15 cm from the wall behind it,
shown as d3 = 15 cm, helping the robot maintain a safe distance. The arrows indicate the robot's
path, with the leftward arrow showing it will turn left after detecting the wall 25 cm ahead. This
snake-like movement ensures thorough cleaning by using distance measurements to navigate
efficiently and avoid obstacles.

- Condition 4: If Right ultrasonic sensor (d3) is less than Left ultrasonic sensor (d2):
First time:

In the provided diagram, the robot vacuum cleaner, which uses its sensors to navigate.
For the first time, the front sensor detects a wall 25 cm ahead (d1 = 25 cm). The left sensor (d2)
and right sensor (d3) measure distances to the walls on either side. If the right sensor (d3) detects
a wall closer than the left sensor (d2), the robot will adjust its path by turning slightly to the left
to maintain an even distance from both walls and avoid getting too close to the right wall. This
ensures efficient navigation and thorough cleaning.

Second time:
In the provided diagram, the robot vacuum cleaner, using its sensors to navigate. For the
second time, the front sensor measures a distance of 25 cm to a wall (d1 = 25 cm). The left
sensor (d2) and right sensor (d3) measure distances to the walls on either side. This time, if the
robot detects a closer distance on the left (d2) than on the right (d3), it will turn right to avoid the
left wall. This adjustment ensures the robot maintains an optimal path for thorough cleaning
without colliding with the walls.

- Condition 5: If left ultrasonic sensor (d2) is less than Right ultrasonic sensor (d3):
First time

For the first time, when the left sensor detects a shorter distance than the right sensor, it
means the robot is closer to the left wall. To prevent collision and maintain an efficient cleaning
path, the robot will turn right. This maneuver allows the robot to navigate away from the left
wall and continue its cleaning pattern without interruptions, ensuring efficient cleaning and
obstacle avoidance.

Second time:
For the second time, when the left sensor detects a shorter distance than the right sensor,
it means the robot is closer to the left wall. To prevent collision and maintain an efficient
cleaning path, the robot will turn left. This maneuver allows the robot to navigate away from the
left wall and continue its cleaning pattern without interruptions, ensuring efficient cleaning and
obstacle avoidance.

- Condition 6: Stair avoidance:

The figure below means that the infrared sensor is responsible for helping the robot avoid
falling when the robot’s ground clearance changes suddenly, meaning the robot encounters stairs.
If the robot cannot see the ground surface, it will stop, move backward and turn right to avoid
falling off the stairs. If the robot scans the surface, the robot continues to move, meaning the
robot is on a flat surface.

- Condition 7: Avoid Obstacle:


When encountering an obstacle, the robot adjusts its path based on sensor readings. If
Condition 4 applies, meaning the right sensor (d3) detects a closer obstacle than the left sensor
(d2), the robot veers slightly left to maintain an even distance from both walls. Conversely, if
Condition 5 occurs, indicating the left sensor (d2) detects a closer obstacle than the right sensor
(d3), the robot adjusts by turning right to avoid collision with the left wall. In both cases, the
robot intelligently utilizes sensor data to navigate effectively, ensuring it avoids obstacles while
continuing its cleaning task efficiently.
3.5.2. Flow chart
Figure 3.5.2.1: Flow chart

Explanation:
The flowchart illustrates the control process of a robot with two operating modes:
remote control and automatic. The process begins by checking if the robot is connected. If it is
connected, the robot will activate remote control mode. Otherwise, it will read all data from the
infrared and ultrasonic sensors. After collecting the data, the robot checks if the IR sensor detects
a sudden change in height. If the IR sensor detects a sudden change in height, the robot will stop,
move backward, and then turn right to avoid stairs. If no sudden change in height is detected, the
robot continues to check the distance to obstacles. The robot checks if the distance in front (d1)
is less than 20cm. If this distance is less than 20cm, the robot continues to check the distances on
the left (d2) and right (d3). If not, the robot will automatically run forward. When checking the
distance d2, if d2 is less than 10cm, the robot will compare d2 with d3. If d2 is not less than
10cm, the robot will turn left. If the distance d3 is less than 10cm, the robot will turn right. If d3
is not less than 10cm, the robot will return to the main loop to check the sensors again.
3.5.3. Core codes
To program a robotic vacuum cleaner for autonomous movement and cleaning, we need the
Arduino IDE software. Arduino IDE is open-source, meaning it's free to download and use, and
users have the freedom to modify, improve, and develop it according to general principles
permitted by the publisher without needing permission from anyone. While being open-source,
Arduino IDE boasts excellent security features. The publisher promptly detects and fixes any
vulnerabilities, ensuring users' information remains secure without any risk of loss or leakage
(thegioididong., 2023) [24].
Key features of Arduino IDE include:
- Friendly C/C++ Programming Language: Arduino IDE utilizes the widely-used C/C++
programming language, making it convenient for programmers to design programs for Arduino
boards.
- Good Programming Support for Arduino Boards: Arduino IDE includes a board manager
module where users can select and work with the boards they prefer. It automatically updates
board data and modification data to ensure consistency. Additionally, it helps users identify
errors in their code and provides prompt error correction to prevent Arduino boards from
working with faulty code for too long, which could lead to damage or reduced processing speed.
- Rich Library Support: Arduino IDE integrates with over 700 libraries, written and shared by the
Arduino Software publisher and community members. Users can utilize these libraries for their
projects without incurring any costs.

*Declare codes:
*Include library and define global variables:
- #include <SoftwareSerial.h>: Adds the SoftwareSerial library to use Bluetooth.
- int and variables: Defines global variables to specify the Arduino pins connected to components
like the L298N module, ultrasonic sensors, Bluetooth module, and infrared sensor.

*Define pins and their functions:


- IN1, IN2, IN3, IN4, ENA, ENB: Pins connected to the control pins of the L298N module to
control motors.
- TRIG_PIN1, ECHO_PIN1, TRIG_PIN2, ECHO_PIN2, TRIG_PIN3, ECHO_PIN3: Pins
connected to ultrasonic sensors to measure distance.
- HC05_RX, HC05_TX: Pins connected to the Bluetooth module to communicate wirelessly
with the robot.
- IR_PIN: Pin connected to the infrared sensor.

*Set default values and thresholds for sensors:


- ground: Default value for the robot's state (standing on the floor or not).
- OBSTACLE_DISTANCE1, OBSTACLE_DISTANCE2: Distance thresholds to detect
obstacles in front and on the sides of the robot (unit: cm).
- rightLeftCount and leftRightCount: Counters to keep track of certain conditions regarding
obstacle detection.
- Declare the remoteControl variable and initialize the SoftwareSerial object for Bluetooth:
- remoteControl: Variable to check if the robot is being controlled remotely.
- SoftwareSerial BluetoothSerial(HC05_RX, HC05_TX): Initializes the SoftwareSerial object to
communicate with the Bluetooth module, specifying the RX and TX pins.
Setup Function:
- Serial and Bluetooth Communication:
- Serial.begin(9600); and BluetoothSerial.begin(9600); initialize serial communication and
Bluetooth communication at a baud rate of 9600. This allows the robot to receive commands via
Bluetooth.
Pin Modes:
- pinMode(IN1, OUTPUT);, pinMode(IN2, OUTPUT);, etc., set the left motor control pins as
outputs. These pins control the direction of the motors.
- pinMode(ENA, OUTPUT);, pinMode(ENB, OUTPUT); set the right motor enable pins as
outputs, which control the speed of the motors.
- pinMode(IR_PIN, INPUT); sets the infrared sensor pin as an input to read sensor values.
- pinMode(TRIG_PIN1, OUTPUT);, pinMode(ECHO_PIN1, INPUT);, etc., set the ultrasonic
sensor pins as outputs for triggering and inputs for receiving the echo.
Movement Control Functions:
- moveStop(): Stops the motors by setting all control pins to LOW.
- moveForward(): Moves the robot forward by setting the appropriate motor control pins to
HIGH or LOW and enabling the motors with a PWM signal (speed control).
- moveBackward(): Moves the robot backward by reversing the motor control pins and enabling
the motors with a PWM signal.
- turnRight(): Turns the robot right by stopping one motor and running the other motor forward.
The delay ensures the robot turns for a specific amount of time.
- turnLeft(): Turns the robot left by stopping one motor and running the other motor forward.
The delay ensures the robot turns for a specific amount of time.

3.5.2. Remote control mode


When we turn on the switch to operate the robot, the robot will automatically move and start
vacuuming. If the robot is connected to the remote control via Bluetooth, the robot will stand still
and be controlled remotely via the pre-installed app on the phone.

*Code for remote control:


executeCommand(char command):
This function executes different movement button commands on android application based on
the received Bluetooth command:
- 'F': Moves the robot forward.
- 'B': Moves the robot backward.
- 'L': Turns the robot left.
- 'R': Turns the robot right.
- 'S': Stops the robot.

- void loop() { :This is the beginning of the loop() function, which continuously executes in an
Arduino program.
- if (BluetoothSerial.available()) { :This line checks if there is any data available to read from
the Bluetooth serial connection. BluetoothSerial.available() returns the number of bytes available
for reading. If this number is greater than zero, it means a remote control command has been
received.
- remoteControl = true; : If data is available from Bluetooth, the remoteControl flag is set to
true, indicating that the robot is currently being controlled remotely.
- char command = BluetoothSerial.read(); : This line reads a single character from the
Bluetooth serial connection, which represents a control command from the remote control. The
character is stored in the variable command.
- executeCommand(command); : This calls the executeCommand function, passing the
received command character to it. This function contains the logic to handle various commands
and control the robot accordingly. The possible commands could be 'F' for forward, 'B' for
backward, 'L' for left, 'R' for right, and 'S' for stop.
- } else { remoteControl = false; : This closes the if block that checks for Bluetooth data and
starts the else block. If no data is available from Bluetooth, the remoteControl flag is set to false,
indicating that there is no active remote control connection.
- if (!remoteControl) { moveForward(); : This checks if remoteControl is false. If it is, it means
there is no active remote control connection, and the robot should operate in its autonomous
mode. This comment indicates where the code for the robot's autonomous operation would go.
When no remote control commands are received, the robot would execute this part of the code to
move and perform tasks automatically.

*Stair avoidance
Code

- ground = digitalRead(IR_PIN); : This line reads the current state of the IR sensor connected
to IR_PIN and assigns the value to the variable ground. “digitalRead(IR_PIN)” returns HIGH if
the IR sensor detects a signal (indicating that the robot might be over an edge or stairs) and LOW
if there is no signal (indicating the robot is on the floor).
- if (ground == HIGH) { : This if statement checks if the value of ground is HIGH. If it is, it
means that the IR sensor has detected an edge or stairs.
moveStop(); : This function call stops the robot by setting the appropriate control signals to the
motors.
- delay(1000); : This introduces a 1000-millisecond (1 second) pause to ensure the robot has
completely stopped before performing the next action.
- moveBackward(); :This function call makes the robot move backward to avoid falling off the
edge or stairs.
- delay(1000); : This introduces another 1000-millisecond (1 second) pause to ensure the robot
moves backward enough to clear the edge or stairs.
- turnRight(); : This function call makes the robot turn right to change its direction after backing
away from the edge or stairs. This helps the robot find a new path away from the danger zone.

*Obstacle avoidance and directional


The robot will initially release pulses to measure the distance the robot is away from the
object to receive the signal. When the distance that the robot is away from the object is greater
than the threshold distance we set of 20 cm for front ultrasonic sensor and 10 cm for two side
ultrasonic sensors in programming, it means that the robot is still far away from the obstacle so
the robot can move straight. If the front and left sensors detect the left wall corner, the robot will
turn right and move to the next straight line similar to the robot meeting the right wall corner and
turning left. When the robot is far from the corner of the wall, to navigate it will need to rely on
the comparison between the two sensors on the left and right. If the measured distance from the
left sensor is greater than the measured distance from the right sensor, the robot will
automatically turn left, otherwise the robot will turn right.

*Code measure distance from 3 ultrasonic sensors

In order for all three sensors to be able to avoid obstacles in front of them and walls, measuring
the distance between obstacles in front of them is extremely important. The sensor uses
ultrasonic waves and can measure distances between 2 and 300 cm, with accuracy depending
almost exclusively on programming. To measure distance, we will emit a very short pulse (5
microSeconds – ú) from the Trig pin. Then, the sensor will generate a HIGH pulse at the Echo
pin until it receives a reflected wave from this pin. The width of the pulse will be equal to the
time it takes for the ultrasonic wave to be emitted from the sensor and return. The speed of sound
in air is 340 m/s (physical constant), equivalent to 29.412 microSeconds/cm (106 / (340*100)).
Once we have calculated the time, we will multiply 0.034 and divide by 2 to find the distance.

- duration = pulseIn(ECHO_PIN, HIGH); : The pulseIn() function is used to measure the


width of the pulse. Duration will be equal to the length of the HIGH pulse at the echo pin (in
microseconds).
- distance = int(duration * 0.034 / 2); : The time the wave travels from the sensor to the object
will be equal to duration * 0.034, then we divide by 2 to calculate the distance because the
measured time (duration) is the total time the sound wave takes to travel from the sensor to the
object and rotate. Sensor again. Therefore, the actual time the sound wave takes to travel from
the sensor to the object is only half the measured time.

*Code for directional:


- Code for turn right when the robot reached the left corner:
- Condition: If the left (distance2) and front (distance1) sensors detect an obstacle within their
respective threshold distances (OBSTACLE_DISTANCE2 and OBSTACLE_DISTANCE1), and
the ground sensor indicates a safe surface (ground == HIGH).
- Action: The robot stops, waits for 1 second, moves backward then turns right and moves
forward. This maneuver helps the robot avoid the obstacle by taking a wide left turn.

- Code for Turn left when the robot reach the left corner:
- Condition: If the right (distance3) and front (distance1) sensors detect an obstacle within their
respective threshold distances, and the ground sensor indicates a safe surface (ground == HIGH).
- Action: The robot stops, waits for 1 second, moves backward then turns left. This maneuver
helps the robot avoid the obstacle by taking a wide right turn.

- If Right ultrasonic sensor distance 3 is less than Left ultrasonic sensor distance 2:
- leftRightCount++;: This line increments the leftRightCount variable, which keeps track of how
many times this condition has occurred consecutively.
- if (leftRightCount >= 2) {: This condition checks if the leftRightCount variable is greater than
or equal to 2, indicating that the robot has encountered obstacles on both sides twice in a row.
- Condition: In this condition, when robot far from corner of the war, it will compare the distance
based on two side ultrasonic sensors. If both the right (distance3) and left (distance2) sensors
detect no obstacles within their threshold distances, but the right sensor detects a closer object
than the left sensor (distance3 < distance2), and there is an obstacle in front (distance1 <
OBSTACLE_DISTANCE1), and the ground sensor indicates a safe surface (ground == HIGH).
- Action: Similar to the previous case. For the first time, the robot stops, waits for 1 second, turns
left for 2 seconds and continues moving forward. For second times, robot will turn right. This
condition ensures the robot prefers turning left when both sides are clear, but the right side is
closer.

- If left ultrasonic sensor distance 2 is less than Right ultrasonic sensor distance 3:
- rightLeftCount++: Increments the rightLeftCount variable by one. This variable is used to
count the number of times this condition has occurred consecutively.
- if rightLeftCount reaches or exceeds 2, the robot turns left by calling the turnLeft() function
and resets rightLeftCount to 0. Otherwise, if rightLeftCount is still less than 2, the robot turns
right by calling the turnRight() function.
- Condition: If both the left (distance2) and right (distance3) sensors detect no obstacles within
their threshold distances, but the left sensor detects a closer object than the right sensor
(distance2 < distance3), and there is an obstacle in front (distance1 <
OBSTACLE_DISTANCE1), and the ground sensor indicates a safe surface (ground == HIGH).
- Action: Similar to the previous case, For the first time, the robot stops, waits for 1 second, turns
right for 2 seconds and continues moving forward. For second times, robot will turn left. This
condition ensures the robot prefers turning right when both sides are clear, but the left side is
closer.

* No obstacle detected:
Code:

This else code ensures that the robot will continue moving forward if no obstacle is detected.
Specifically, if none of the conditions in the previous if or else if blocks are satisfied (i.e. there
are no obstacles), the robot will call the moveForward() function to continue moving forward.

* Body shape of robot:


When designing the body of a robot vacuum cleaner, it is crucial to arrange the components
neatly and effectively to ensure smooth and efficient operation. Key factors to consider include:

Weight and size: Ensure the body is compact and light enough for easy movement and
installation in narrow areas (Freedynamics) [25].
Arrangement of main components: Place the motor, battery, controller, and sensors to maintain
balanced weight and smooth operation.
Sensor system: Position obstacle, positioning, and force sensors strategically for quick and
accurate responses.
Utility and repair: Design for convenient disassembly and repair, allowing easy replacement or
upgrading of components.
Aesthetics: Consider aesthetics to enhance appeal and reflect product professionalism.
The octagonal design of the robot vacuum's body is intentional for several reasons. It improves
maneuverability, stability, and sensor placement, ensuring efficient cleaning across various
surfaces. Overall, this design enhances the robot vacuum's functionality and performance. After
reviewing various custom models, I plan to create my own design and incorporate additional
features that other models lack.

Specification:
- Length: 30 cm
- Width: 26 cm
- Height: 7 cm
- Ground clearance:
- Weight: 800 g
- Material: Plastic

* Material:
Material is a crucial factor to ensure that the chassis of a robot vacuum cleaner can
support all its parts without deforming. Fomex is the optimal choice for the body frame of a
robot vacuum cleaner due to its combination of light weight, durability, ease of processing,
resistance to moisture and chemicals, reasonable cost, and good electrical insulation. These
features help improve the performance, durability, and safety of robot vacuum cleaners.
Additionally, Fomex has flame-retardant properties and is easy to fabricate, allowing for more
complex and precise designs. A study published in the Journal of Materials Science found that
Fomex has good load-bearing capacity and impact resistance, which enhances the product's
durability (Dag Vietnam, 2017) [26].

 This project is a prototype, so Fomex is suitable for testing. After successful testing, we will
use the most appropriate material, such as PVC plastic, to increase rigidity and provide slight
flexibility in case of collisions. PVC plastic is also known for its high durability, corrosion
resistance, and low cost, as noted in a study from Polymer-Plastics Technology and Engineering.
Switching to PVC will further improve the performance and durability of the robot vacuum
cleaner.
The driving mechanism is crucial for determining how a mobile robot moves from one
location to another. Among the various types of driving mechanisms used in mobile robots, such
as skid steering, synchronous drive, and differential drive, the differential drive mechanism
stands out as the most popular and widely utilized. This preference is due to its simplicity and
ease of implementation (according to sources such as Siegwart, Nourbakhsh, and Scaramuzza
2011; Mehta et al. 2015) [27]. A differential drive robot offers the advantage of arbitrary motion
and in-place rotation (zero turning radius). However, maintaining straight-line motion can be
challenging due to the independent motors controlling each wheel. To achieve straight-line
motion, identical motors are essential, and the robot's center of mass should be centrally located.
Over time, motor deformation due to the robot's weight can compromise this identicality. To
ensure accurate straight-line motion, either an open-loop or closed-loop control system is
necessary. Open-loop systems require periodic calibration to maintain straight-line movement.

A differential drive robot, as illustrated in Figure 4.2.1, features two independently driven
wheels aligned oppositely, with an optional castor wheel for balance. Each wheel is powered by
a separate motor, enabling movements such as forward, reverse, and rotation. The direction of
motion is determined by the speeds of the individual motors.

There are three primary motion scenarios for a differential drive robot based on the
speeds of its motors (Niku 2020) [28]. In the first scenario, if both motors rotate at the same
speed and direction, the torques produced are equal, resulting in the robot moving forward or
backward. In the second scenario, if the motors rotate at the same speed but in opposite
directions, the resulting torques are equal in magnitude but opposite in direction, causing the
robot to rotate on the spot to the left or right. Here, the center of rotation lies equidistant between
the two motors. In the third scenario, if the motors rotate in the same direction but at different
speeds, the robot will turn left or right, depending on which motor is faster. For example, if the
left motor is faster, the robot will turn to the right, and vice versa. Figure 4.2.2 illustrates the
robot's motion based on the speed and direction of the individual motors.
4.3. Hardware model:
This figure illustrates a homemade vacuum cleaning robot with various components
clearly labeled. The central part of the system is an Arduino UNO R3 microcontroller, which is
connected to several other components. A 12V power source supplies energy to the system. The
gear motors control the wheels to move the robot. There are two main sensors for detecting
obstacles and the surrounding environment: an infrared sensor and an ultrasonic sensor HCSR04.
A Bluetooth module HC05 allows wireless communication between the robot and other devices.
The L298N dual motor driver controls the wheel motors. A Battery Management System (BMS)
protection board is used to protect and manage the battery. An LM2596-ADJ DC-DC step-down
voltage regulator 3A adjusts the input voltage to provide stable power to the various components.
Finally, the robot is equipped with a vacuum motor and a dustbin, enabling it to perform the
vacuuming function. The entire system is interconnected through wires and electronic circuits,
creating a fully functional and complete vacuum cleaning robot.

*Remote control software


The "Bluetooth RC Car" app, available on the Google Play Store, allows users to control
a robot car equipped with an HC-05 Bluetooth module (Google Play Store, 2024) [29]. Designed
for simplicity and ease of use, the app features a user-friendly interface that enables real-time
control of the car’s movements, including forward, backward, left, and right turns. This app is
ideal for hobbyists and educators looking to explore basic robotics and Bluetooth communication
with Arduino-based projects.

This app provides a graphical interface for controlling an RC car’s movements and
additional functionalities via Bluetooth, using an HC-05 module for communication. The
interface is designed to be intuitive, with directional controls for movement and specific buttons
for servo operations.

4.4. Result
We will test the robot in an empty room with a space of 120cmx70cm running for about 2
minutes. The robot will move in an S shape from the room entrance to the end of the wall on the
right side of the room.
The figure above shows a homemade vacuuming robot in action on a tiled floor. During
its operation, the robot utilizes Condition 4: If the Right ultrasonic sensor (d3) is less than the
Left ultrasonic sensor (d2). When the front ultrasonic sensor (d1) detects a distance of 25 cm to a
wall, the robot stops and begins to evaluate measurements from the two side ultrasonic sensors.
If the right-side ultrasonic sensor (d3) detects a shorter distance compared to the left-side sensor
(d2), the robot adjusts its movement direction by turning left. This helps the robot maintain an
even distance from both walls and avoid getting too close to the wall on the right. The robot
moving smoothly across the floor, maintaining a clean and efficient path. Its ability to navigate
and adjust its direction based on sensor readings enables effective operation, preventing
collisions and ensuring thorough cleaning of the entire area.

After assembling the mechanical and electrical components, the robot chassis
successfully supported all electrical parts without any deformation. The completed robot is
shown in Figures 4.4.3 and 4.4.4. When powered on, all electrical components functioned
smoothly. A short circuit test confirmed that the power and charging system automatically
disconnected the batteries in the event of a short circuit. Additionally, a charging test verified
that the batteries could be recharged via the barrel jack, and they powered the robot for
approximately 1.5 hours when fully charged.

The remoted control mode was tested using a custom-designed Android application,
and it performed as expected, executing all commands without delay. This mode was also used
for testing and calibrating the robot’s movements, ensuring it could move in a straight line. The
autonomous mode software was tested with satisfactory results, and the vacuum cleaner robot
effectively collected crumbs from the floor.
5.1. Discussion

Through various robot projects from other studies that I have reviewed, I found that there
are some commonalities, advantages, and unique features. Table 2 shows the specifications of
the implemented robot with the specifications of two others implemented robot I researched:

Vacuum Cleaner Dual Vacuum robot using


Implemented Robot
Mode Raspberry pi module
Dimensions (Length x
30 x 26 x 7 21 x 21 x 8 33 x 12 x 9
Width x Height) in cm

Weight (kg) 1 2,2 3,5

Battery life (mins) 45 30 45

Power (W) 9,576 10,0 12,38

Phone control Yes Yes Yes

Remote control No No No

Noise level(dB) 67 52 68

Table 2
Based on the comparison table provided, it's evident that each of the three vacuum
cleaner robots - the Implemented Robot, the Vacuum Cleaner Dual Mode, and the Vacuum robot
using Raspberry Pi module - has its own distinct features and specifications. Our Implemented
Robot stands out with its relatively large dimensions, yet lightweight design, making it easy to
maneuver. Despite its larger size, it consumes the least amount of power among the three, which
can lead to longer battery life and lower operating costs. However, it does produce the highest
noise level at 67 dB. On the other hand, the Vacuum Cleaner Dual Mode offers a compact size
and moderate weight, along with a battery life of 30 minutes. It maintains a relatively low noise
level of 52 dB, providing a quieter cleaning experience. Additionally, it provides phone control,
allowing users to operate the robot remotely. Meanwhile, the Vacuum robot using Raspberry Pi
module boasts a unique design with dimensions that fall between the other two robots. It has the
highest power consumption at 12.38 W but also offers a battery life of 45 minutes. Like the
Vacuum Cleaner Dual Mode, it features phone control for remote operation.
5.2. Conclus
In summary, creating affordable vacuum cleaner robots has the potential to greatly
improve household tasks. As shown in the comparison table and the provided information, the
key to getting these robots widely used is how well they work, how easy they are to use, and how
much they cost. Our prototype robot uses cheap parts that still work well, showing that we can
make a fully functional vacuum cleaner robot without spending too much money. It can work on
its own or be controlled manually, avoiding obstacles and not falling down stairs thanks to
special sensors. Also, being able to control it with a smartphone makes it even more convenient.
We made a simple app for Android phones that lets users control the robot's motors and choose
how it moves around. While using fancy sensors like lidar and cameras might make the robot
work better, it would also make it more complicated and expensive. So, finding the right balance
between how well it works and how much it costs is really important for making vacuum cleaner
robots that everyone can afford. Overall, focusing on making affordable solutions and trying out
new ways of designing and building robots can make vacuum cleaner robots available to more
people. This would make household chores easier and improve our lives in general.

5.3. Future works


Looking forward to future enhancements, several key improvements can be implemented
to elevate the capabilities and performance of the vacuum cleaner robot. At first, leveraging
advanced image processing capabilities through a device like the Raspberry Pi 3 will enable the
robot to analyze visual data in real-time (Raspberry Pi 3 Model B+ Vietnam, 2024) [30]. This
could be used for object recognition, allowing the robot to identify and navigate around obstacles
more effectively. Additionally, image processing could enhance the robot's ability to detect and
respond to changes in its environment, further improving its autonomy and adaptability
(Raspberry Pi Camera Module V2 8MP Vietnam, 2024) [31]. Moreover, extending the robot's
operating time can be achieved by incorporating high-capacity batteries or utilizing more energy-
efficient components. By optimizing power management and increasing battery capacity, the
robot can prolong its cleaning sessions without the need for frequent recharging. This would
result in longer uninterrupted operation, providing more thorough cleaning coverage and
enhancing user satisfaction.

You might also like