Project Report
Project Report
FOR HOSPITAL
A PROJECT REPORT
Submitted by
JAHNAVI H (110322121011)
KAVINA G (110322121012)
SUMITHRA A (110322121034)
of
BACHELOR OF ENGINEERING
IN
BIOMEDICAL ENGINEERING
APRIL 2026
i
ANNA UNIVERSITY: 600 025
BONAFIDE CERTIFICATE
Certified that this project report “AI DRIVEN INFECTION CONTROL ROBOT FOR
HOSPITAL” is the Bonafide work of “JAHNAVI H (110322121011),
KAVINA G (110322121012), SUMITHRA A (110322121034)” who carried
out the project work under my supervision.
SIGNATURE SIGNATURE
Dr. S. A. YUVARAJ M. E, Ph.D., Mr. S. PRASANTH M. Tech.,
HEAD OF THE DEPARTMENT PROJECT SUPERVISOR
Professor Assistant Professor
Department of BME Department of BME
GRT Institute of Engineering and GRT Institute of Engineering and
Technology Technology
Tiruttani-631209. Tiruttani-631209.
ii
ACKNOWLEDGEMENT
First and foremost, we place this project work on the feet of GOD
ALMIGHTY and PARENTS who is the power of strength in each step of
progress towards the successful completion of our project.
iii
ABSTRACT
iv
TABLE OF CONTENTS
v
3.3.6 MOTOR DRIVER 40
3.3.7 MOTOR 42
3.3.8 LITHIUM ION BATTERY 44
3.3.9 LM2596 CONVERTER 46
3.3.10 5VOLT RELAY 48
3.3.11 XL6009 DC-DC BOOST 50
CONVERTER MODULE
4 RESULT & DISCUSSION 51
4.1 RESULT 54
4.2 DISCUSSION 55
5 CONCLUSION & FUTURE WORK 57
5.1 CONCLUSION 57
5.2 FUTURE WORK 58
REFERENCES 59
vi
LIST OF FIGURES
vii
LIST OF ABBREVIATION
1 UV Ultraviolet
2 HAIs Hospital Acquired Infections
3 PPE Personal Protective Equipment
4 ICU Intensive Care Unit
5 AI Artificial Intelligence
6 LIDAR Light Detection and Ranging
7 LED Light Emitting Diode
8 GPIO General-Purpose Input/Output
9 PWM Pulse Width Modulation
10 UART Universal Asynchronous Receiver-Transmitter
11 SPI Serial Peripheral Interface
12 VCC Voltage at the Common Collector
13 BMS Battery Management System
viii
LIST OF TABLES
ix
CHAPTER 1
INTRODUCTION
10
Overall, this project represents an innovative step toward smart healthcare
solutions, combining robotics and AI to create safer and more efficient
hospital environments. The implementation of such systems can play a vital
role in reducing the spread of infections and improving the quality of patient
care.
1.1 AIM
The aim of this project is to develop an intelligent robot that can control and
reduce hospital-acquired infections using AI technology. The system is
designed to perform automatic disinfection, monitor environmental
conditions, and assist healthcare workers in maintaining hygiene.
1.2 OBJECTIVE
11
1.3 MOTIVATION
The motivation behind this project is to develop an intelligent system that can
reduce infection spread by using artificial intelligence and robotics.
Patients often get infections during treatment due to poor sanitation and
contamination.
Places like ICUs, operating theatres, and isolation wards require strict
hygiene, which is difficult to maintain manually.
12
1.5 PROPOSED SYSTEM
13
Allows remote monitoring, control, and data analysis through cloud
platforms or mobile applications.
CHAPTER 2
LITERATURE SURVEY
Year:2020
Autonomous mobile robots are widely used in hospitals for automatic
cleaning and disinfection purposes. These robots help reduce the spread of
infections by maintaining a high level of hygiene in healthcare
environments. They can move independently without human intervention,
using sensors to detect obstacles and navigate safely through hospital areas.
Most of these robots use UV-C light or disinfectant spraying systems to
eliminate bacteria, viruses, and other harmful microorganisms. They ensure
uniform and complete coverage of rooms, including patient wards, ICUs,
and operation theatres. By doing so, they significantly reduce hospital-
acquired infections (HAIs) and improve overall patient safety.
14
can also be monitored and controlled remotely through wireless
communication systems. Overall, autonomous mobile robots reduce the
workload of hospital staff, improve operational efficiency, and play a crucial
role in the development of modern smart hospitals.
Year:2021
The study titled “UV Disinfection Robots for Reducing Hospital-Acquired
Infections” by Anderson and Lewis (2021) focuses on the use of robotic
systems equipped with ultraviolet (UV) light for improving hospital hygiene.
The paper explains how UV-C based robots are used to disinfect hospital
environments effectively. These robots emit UV-C radiation, which can
destroy the DNA and RNA of microorganisms such as bacteria and viruses.
As a result, they help in significantly reducing hospital-acquired infections
(HAIs). The robots are designed to operate autonomously, allowing them to
move through hospital rooms and corridors without human assistance. They
ensure that all surfaces are exposed to UV light for proper disinfection.
The study highlights that UV disinfection robots are more efficient than
traditional cleaning methods. They provide consistent results and reduce the
chances of human error during cleaning. These robots are especially useful
in high-risk areas such as intensive care units (ICUs), operation theatres, and
isolation wards. Another important advantage is that they reduce direct
exposure of healthcare workers to harmful pathogens. The system is also
timesaving, as robots can disinfect large areas quickly. Safety mechanisms
are included to prevent human exposure to UV radiation. The research
concludes that UV disinfection robots are a reliable and advanced solution
for infection control. Overall, the use of these robots enhances hospital
15
safety, improves hygiene standards, and supports the development of smart
healthcare systems.
Year :2022
The study titled “Smart Hospital Robots Using IoT and AI” by Sharma and
Verma (2022) focuses on the design and implementation of intelligent robotic
systems in healthcare environments. It explains how the combination of Internet
of Things (IoT) and Artificial Intelligence (AI) technologies improves the
efficiency and functionality of hospital robots. These robots are capable of
performing various tasks such as patient monitoring, medicine delivery, and
assisting in disinfection processes. IoT enables real-time communication between
the robot and hospital devices, allowing continuous data collection and
monitoring. AI helps the robot analyse data, make decisions, and adapt to
different situations effectively. The robots are equipped with sensors for
navigation, obstacle detection, and environmental monitoring. They can move
autonomously within hospital premises without human intervention.
The study also highlights that these robots help reduce the workload of healthcare
staff and improve operational efficiency. They can monitor vital parameters such
as temperature and environmental conditions. By reducing direct human contact,
they play an important role in infection control and prevention. Remote
monitoring allows doctors and staff to control and track the robot’s activities
from a distance. The system ensures timely alerts and responses in emergency
situations. These robots also enhance patient care by providing assistance
whenever needed. The integration of IoT ensures seamless connectivity across
different hospital systems. AI improves accuracy, decision-making, and overall
16
performance of the robot. The research concludes that smart hospital robots are
essential for modern healthcare systems. They contribute to improved safety,
better hygiene, and efficient hospital management. Overall, IoT and AI-based
robots support the development of advanced and smart hospitals.
17
manage robotic operations. The paper concludes that AI-based robotics has a
significant impact on improving healthcare quality. It enhances patient safety,
increases efficiency, and supports the development of smart hospitals. Overall,
AI-powered robots are becoming an essential part of modern healthcare
systems.
18
like delivery robots, cleaning robots, and disinfection robots. The paper
concludes that vision-based obstacle avoidance is an effective and advanced
solution for autonomous robot navigation. It plays a key role in making robots
smarter, safer, and more reliable in real-world environments.
19
The research also emphasizes that such robots reduce the workload of healthcare
staff and minimize direct contact with infected surfaces. The system provides
consistent and uniform disinfection compared to manual cleaning methods. It also
saves time and increases operational efficiency. The study concludes that
autonomous UV disinfection robots with sensor fusion are highly effective for
infection control.
20
7. Title: AI-Driven Hospital Service Robots for Efficient Patient Care and
Infection Control
Author: N. Reddy, L. Martin
Year:2023
The study titled “AI-Driven Hospital Service Robots for Efficient Patient Care
and Infection Control” by Reddy and Martin (2023) focuses on the use of
artificial intelligence in robotic systems to improve healthcare services. The
paper explains how AI-powered robots are designed to perform multiple tasks
such as patient assistance, monitoring, and hospital sanitation. These robots
use advanced algorithms to analyse data, make decisions, and operate
autonomously within hospital environments. They are equipped with sensors,
cameras, and communication modules to interact with patients and medical
staff. The study highlights that these robots can deliver medicines, transport
medical supplies, and assist patients with basic needs.
In terms of infection control, the robots play a vital role by reducing human
contact and minimizing the spread of diseases. They can perform automated
disinfection using UV light or disinfectant sprays. The robots can navigate
through hospital corridors using obstacle detection and path planning
techniques. AI enables them to adapt to dynamic environments and improve
their performance over time. The study also emphasizes the importance of
real-time monitoring, where robots collect and transmit data to healthcare
professionals. This helps in quick decision-making and improves patient care
quality. Remote operation features allow doctors to control and monitor robots
from a distance. The research concludes that AI-driven hospital service robots
significantly enhance efficiency, safety, and hygiene in healthcare settings.
They reduce the workload of hospital staff and improve overall productivity.
These robots ensure consistent performance and reliable results compared to
manual methods. The integration of AI also supports predictive analysis and
smarter healthcare management.
21
8. Title: IoT-Based Smart Sanitization System for Automatic Disinfection and
Infection Control
Year:2022
The study titled “IoT-Based Smart Sanitization System for Automatic
Disinfection and Infection Control” by Sharma and Gupta (2022) focuses on
the development of an intelligent sanitization system using Internet of Things
(IoT) technology. The paper explains how IoT enables automatic and real-
time monitoring of sanitization processes in different environments, especially
in hospitals. The system is designed to perform disinfection tasks without
manual intervention, ensuring improved hygiene and safety. It uses various
sensors to detect environmental conditions such as presence of people,
humidity, and contamination levels. Based on this data, the system activates
sanitization mechanisms like disinfectant spraying or UV light.
The study highlights that IoT connectivity allows the system to send real-time
data to a central server or mobile application. This helps healthcare staff
monitor the sanitization status remotely and take necessary actions when
required. The system also supports automation, which reduces human effort
and minimizes the chances of human error. It ensures that sanitization is
carried out regularly and efficiently in high-risk areas such as hospital rooms,
ICUs, and public spaces. The use of smart sensors improves accuracy and
ensures proper coverage during disinfection.
Year: 2021
The study titled “UV-C Disinfection Robots in Clinical Environments” by
Chen and Wong (2021) focuses on the use of ultraviolet-C (UV-C) based
robotic systems for effective disinfection in healthcare settings. The paper
explains how UV-C radiation is used to destroy harmful microorganisms such
as bacteria, viruses, and fungi by damaging their DNA and preventing
reproduction. These robots are designed to operate autonomously and move
through different areas of a hospital, including patient rooms, operation
theatres, and intensive care units. They ensure that all exposed surfaces
receive adequate UV-C light for proper disinfection.
The study highlights that UV-C disinfection robots provide a more consistent
and reliable cleaning method compared to manual cleaning. They reduce the
chances of human error and ensure uniform coverage of the environment. The
robots are equipped with sensors and navigation systems to avoid obstacles
and move safely within clinical spaces. Safety features are also included to
prevent human exposure to harmful UV radiation during operation. The
research emphasizes that these robots are particularly useful in high-risk areas
where infection control is critical.
23
[Link]: Machine Learning for Healthcare Automation
Year: 2020
The study titled “Machine Learning for Healthcare Automation” by Verma
and Singh (2020) focuses on the application of machine learning techniques to
automate various healthcare processes. The paper explains how machine
learning algorithms can analyse large amounts of medical data to identify
patterns, make predictions, and support decision-making. These systems are
used in applications such as disease prediction, patient monitoring, medical
diagnosis, and treatment planning. By learning from historical data, machine
learning models can improve accuracy and efficiency over time. The study
highlights that automation helps reduce the workload of healthcare
professionals and minimizes human errors.
The research also discusses how machine learning can be integrated with
hospital systems and devices for real-time monitoring and analysis. It enables
early detection of diseases and timely intervention, improving patient
outcomes. In infection control, machine learning can predict the risk of
infection spread and assist in preventive measures. The system can also be
combined with robotic technologies to automate tasks such as disinfection,
monitoring, and assistance. The study concludes that machine learning plays a
vital role in modern healthcare by enhancing efficiency, accuracy, and
reliability. Overall, it supports the development of intelligent and automated
healthcare systems.
24
CHAPTER 3
On the input side, the system incorporates three different sensors, each serving a
specific purpose. The ultrasonic sensor is used for distance measurement or object
detection by emitting ultrasonic waves and calculating the time taken for the echo
to return. This can be applied in level sensing, obstacle detection, or proximity
monitoring. The MPU6050 sensor, which combines a 3-axis accelerometer and a
3-axis gyroscope, is used to detect motion, tilt, vibration, and orientation. This
allows the system to respond to positional changes or instability. The third input,
the MQ135 gas sensor, is designed to monitor air quality by detecting the
presence of harmful gases such as carbon dioxide (CO₂), ammonia (NH₃),
benzene, and smoke. It provides analog output corresponding to the concentration
of gases in the environment.
All sensor data is continuously fed into the ESP32, A relay module is used as an
electrically operated switch to control the UV-C strip, allowing the
microcontroller to safely turn the high-power UV-C sterilization device on or off
without direct electrical connection. The mist maker is activated when required to
generate fine mist, which can be used for humidification or disinfection purposes.
A buzzer is included to provide audible alerts or warnings, for example when
unsafe gas levels are detected or abnormal motion is sensed. Additionally, a motor
driver module is used to interface the ESP32 with a motor, enabling controlled
26
operation such as starting, stopping, and adjusting speed or direction, which cannot
be done directly by the microcontroller due to power limitation.
This board is widely used for robotics, automation, and smart systems
because it can process data quickly and communicate with other devices
wirelessly.
It receives input signals from sensors such as the tank level sensor and
ultrasonic sensor, processes the data, and then controls the output devices.
Based on the programmed instructions, it activates components like the UV-
C lamp, mist maker, buzzer, and motor driver to perform disinfection and
movement tasks.
The board also supports multiple GPIO pins, analog inputs, PWM outputs,
and communication protocols such as UART, SPI, and I2C.
These features allow easy connection with different sensors and modules
used in the robot. Due to its high performance, low power consumption, and
wireless capability, the ESP32-WROOM-32 Dev Board is an ideal choice
for developing intelligent robotic systems.
27
Fig 3.2. ESP32-WROOM-32 DEV BOARD
SPECIFICATION RANGE
Operating Voltage 3.3V
Input Voltage 5V
Clock Speed Up to 240 MHz
Wi-Fi Frequency 2.4 GHz
Bluetooth Frequency 2.4 GHz
Flash Memory 4 MB
RAM 520 KB
GPIO Pins 30+
ADC Resolution 12-bit
Wi-Fi Range 50–100 m
28
Table 3.1 Specification table of ESP32-WROOM-32 DEV BOARD
MERITS
Affordable cost
Compact size
APPLICATIONS
3.3.2 SENSORS
30
Fig.3.4 Ultrasonic Sensor Interfacing with ESP32 WROOM-32
DEV Board
SPECIFICATION RANGE
Operating Voltage 5V
Operating Current 15 Ma
Operating Frequency 40 kHz
Measuring Distance 2 cm – 400 cm
Accuracy ±3 mm
Measuring Angle 15°
Trigger Input Pulse Width 10 µs
Echo Output Signal TTL Pulse
Response Time Fast response
Operating Temperature -15°C to 70°C
MERITS
31
Non-contact sensing
Easy to use
Low cost
Fast response
APPLICATIONS
Distance measurement
Security systems
In the robot system, the MQ135 collects real-time air quality data and sends it
to the microcontroller (such as ESP32), where it is analyzed using AI
algorithms to assess the level of pollution or potential infection risk. Based on
this analysis, robots can take intelligent actions such as activating air
32
purification systems, increasing ventilation, or prioritizing certain areas for
disinfection using UV light or sanitizing sprays.
Overall, integrating the MQ135 sensor into an AI-based hospital robot enables
smart decision-making, improves indoor air quality monitoring, and contributes
to reducing the spread of infections in healthcare settings.
Parameter Specification
Gas Sensor (Air Quality
Sensor Type
Monitoring)
CO₂, NH₃, NOₓ, Alcohol,
Detectable Gases
Benzene, Smoke
Operating Voltage 5V
Output Type Analog and Digital
Sensing Material Tin Dioxide (SnO₂)
Preheating Time ~20 seconds (minimum)
Power Consumption Approx. 800 mW
33
Table 3.3 Specification table of MQ135 SENSOR
MERITS:
APPLICATIONS:
34
The sensor also contains a temperature sensor to compensate for drift and
maintain accuracy. It offers selectable measurement ranges for both
acceleration and angular velocity, allowing flexibility based on application
needs. Due to its compact size and ease of interfacing, it is commonly used
in robotics, drones, gaming devices, and health monitoring systems.
SPECIFICATION RANGE
Sensor Type 6-axis (3-axis Accelerometer +
Gyroscope)
Operating Voltage 3.3V – 5V
Communication I2C Protocol
I2C Address 0x68 / 0x69
Accelerometer Range ±2g, ±4g, ±8g, ±16g
Gyroscope Range ±250, ±500, ±1000, ±2000 °/s
ADC Resolution 16-bit
Digital Processor Built-in DMP
35
Power Consumption ~3.9 mA
Temperature Sensor Built-in
MERITS:
APPLICATION:
36
During operation, the UV strip is activated when the robot enters a designated
area for sterilization and remains ON for a specific duration to ensure proper
disinfection.
Additionally, safety measures are incorporated to prevent human exposure to
UV radiation. The LED UV strip offers advantages such as compact size, low
power consumption, and instant operation.
MERITS
Long life
Fast operation
Chemical-free sanitization
APPLICATIONS
It converts the disinfectant liquid into very small droplets, which helps
in spreading the solution evenly over hospital surfaces and surrounding
areas.
SPECIFICATION RANGE
39
Frequency 1.7 MHz
Water Depth 2 cm – 5 cm
Disc Diameter 16 mm – 20 mm
MERITS
APPLICATIONS
Humidifiers
Agriculture
40
Home and office sanitization
Cooling system
3.3.5 BUZZER
41
Fig.3.9 Buzzer
MERITS
Improve safety
Quick response
APPLICATIONS
42
3.3.6 MOTOR DRIVER
MERITS
APPLICATIONS
Speed regulation
44
Smart delivery robots
3.3.7 MOTOR
It helps the robot travel from one place to another inside hospital rooms,
corridors, and other areas where disinfection is needed. By using motors, the
robot can move automatically and cover a larger area without continuous
human support. This makes the infection control process faster, easier, and
more efficient.
In this project, the motor is connected to the motor driver, which receives
control signals from the ESP32-WROOM-32 Dev Board. Based on sensor input
and programmed instructions, the controller sends signals to the motor driver,
and the motor rotates accordingly.
This allows the robot to move forward, backward, stop, or change direction
while avoiding obstacles detected by the ultrasonic sensor. Because of this, the
motor plays an important role in navigation and mobility.
45
Fig.3.11 Motor
SPECIFICATION RANGE
Shaft Diameter 3 mm – 6 mm
MERITS
Easy to control
47
Additionally, the integration of a Battery Management System (BMS)
enhances safety by preventing overcharging, overheating, short circuits.
SPECIFICATION RANGE
MERITS
Lightweight
Low Self-Discharge
Fast Charging
APPLICATION
49
Laptops and Computers
The LM2596 operates as a switching buck converter, providing high efficiency (up
to ~90%) with minimal heat generation. This is especially useful in battery-
powered robotic systems, where energy saving and long operational time are
important.
50
Fig.3.13 LM2596 CONVERTER
SPECIFICATION RANGE
Input voltage 4V-40V DC
Output voltage 1.25v-35v
Output current Up to 3A
Efficiency Up to 90%
Switching frequency 150 kHz
MERITS:
APPLICATONS:
51
3. Motor Driver and Mobility System Support
4. IoT Communication Modules Powering
5. Battery-Based Portable Power System Integration
In the infection control robot, the 5V relay module is used to automate and
control various hospital sterilization and support systems. It helps in switching
ON/OFF UV-C disinfection lamps, disinfectant spray pumps, motors, and other
high-power devices based on AI-based decisions. This ensures that sterilization
is performed only when required, improving safety and energy efficiency.
The relay operates using a 5V control signal from the microcontroller. When
the AI system detects infected or high-risk areas through sensors, it sends a
signal to the relay module, which then activates or deactivates connected
devices. This makes the system fully automated and reduces human
intervention in hazardous environments. Another important feature of the relay
module is electrical isolation, which protects sensitive electronic components
like ESP32 from high-voltage spikes and faults.
52
Fig.3.14 5VOLT RELAY
SPECIFICATION RANGE
Operating Voltage 5V DC
APPLICATIONS:
The XL6009 DC-DC Boost Converter Module plays a crucial role in the AI-
driven infection control robot used in hospital environments by ensuring stable and
efficient power management.
It is a high-efficiency step-up (boost) converter that increases lower input voltage
from the battery to a higher, regulated output voltage required by various
components of the robot.
In this system, the XL6009 supplies consistent voltage to essential modules such
as the microcontroller (like ESP32), UV disinfection unit, sensors, and motor
drivers, preventing fluctuations that could affect performance. Its adjustable output
capability, high conversion efficiency, and compact design make it ideal for
portable medical robots.
By maintaining reliable power distribution, the XL6009 enhances the robot’s
operational stability, ensuring continuous disinfection and monitoring processes
critical for infection control in hospitals.
54
Fig.3.15 XL6009 DC-DC Boost Converter Module
SPECIFICATION RANGE
Input Voltage 3V – 32V DC
Output Voltage 5V – 35V DC (Adjustable)
Output Current Up to 3A
Efficiency Up to 94%
Switching Frequency 400 kHz
55
MERITS:
1. High Efficiency
2. Adjustable Output Voltage
3. Stable Power Supply
4. Compact and Lightweight
5. Built-in Protection
APPLICATIONS:
1. Battery-Powered Systems
2. AI Infection Control Robots
3. Medical Equipment
4. Robotics and Automation
56
CHAPTER 4
4.1 RESULT
The integration of the ESP32 controller, motor driver, buzzer, and other
supporting modules ensured smooth operation and alert-based safety. The
system reduced the need for direct human involvement in disinfection tasks,
thereby lowering the risk of infection spread among hospital staff and
patients.
The results obtained show that robots can serve as an efficient, reliable, and
cost-effective solution for maintaining cleanliness and infection control in
hospitals.
57
Left side View Right side View
58
Top View UV Light
Mist
4.2 DISCUSSION
The AI infection control robot for hospitals was developed to improve
hygiene and reduce the spread of infections in healthcare environments. The
robot combines different components such as the ESP32-WROOM-32 Dev
Board, ultrasonic sensor, UV-C lamp, mist maker, motor driver, motors, and
buzzer to perform automatic disinfection and safe movement. The ESP32 acts
as the main controller and manages the overall functioning of the robot. The
ultrasonic sensor helps the robot detect obstacles and move safely without
collision. The motor driver and motors support smooth navigation through
hospital rooms, corridors, and isolation areas.
59
CHAPTER 5
5.1 CONCLUSION
60
5.2 FUTURE WORK
61
REFERENCES
1. Al-Kaff, A., et al. (2020). Autonomous navigation system for indoor service
robots. IEEE International Conference on Autonomous Robot Systems.
2. Boyce, J. M. (2016). Modern technologies for improving environmental
cleaning in hospitals. Antimicrobial Resistance & Infection Control, 5(10).
3. Chen, B., et al. (2020). AI-based path planning and obstacle avoidance for
healthcare robots. IEEE Transactions on Automation Science and
Engineering, 17(4).
4. Chen, J., et al. (2021). Design and implementation of a smart disinfection
robot based on ROS. IEEE International Conference on Mechatronics and
Automation (ICMA).
5. Fu, L., et al. (2021). IoT-enabled intelligent disinfection robot system.
Sensors, 21(5).
6. Gupta, N., et al. (2021). IoT and AI-based smart sanitization robot.
International Conference on Advances in Computing, Communication, and
Control (ICAC3).
7. Khan, Z. H., Siddique, A., & Lee, C. W. (2021). Robotics utilization for
healthcare digitization in global COVID-19 management. International
Journal of Environmental Research and Public Health, 18(7).
8. Kim, S., et al. (2021). Vision-based human detection for safe UV disinfection
robots. IEEE International Conference on Computer Vision Workshops
(ICCVW).
9. Kumar, M., and R. Patel. (2019). AI-Based Robotics for Healthcare
Applications. IEEE Access, 210, 210–218.
[Link], C., et al. (2021). Autonomous mobile robot for hospital disinfection using
AI-based navigation. Robotics and Autonomous Systems, 136.
[Link], H., et al. (2020). UV disinfection robot with SLAM-based navigation.
IEEE/RSJ International Conference on Intelligent Robots and Systems
62
(IROS).
[Link], R. R., Gandudi, V. B., & Adams, J. (2020). Applications of robots
for COVID-19 response. IEEE Robotics & Automation Magazine, 27(3).
[Link], R., et al. (2021). AI-powered healthcare robot for infection control in
hospitals. International Conference on Smart Healthcare (ICSH).
[Link], S. E., et al. (2021). Impact of UV-C disinfection robots on hospital-
acquired infection rates. American Journal of Infection Control, 49(4).
[Link], A., et al. (2020). Low-cost autonomous disinfection robot using
embedded systems. IEEE Region 10 Conference (TENCON).
[Link], M., Carriere, J., & Torabi, A. (2020). Robotics, smart wearable
technologies, and autonomous intelligent systems for healthcare during
COVID-19. Advanced Intelligent Systems, 2(7).
[Link], J., et al. (2021). Autonomous indoor disinfection robot using deep
learning and LiDAR. IEEE International Conference on Intelligent Systems.
[Link], G. Z., et al. (2020). Combating COVID-19—The role of robotics in
managing public health and infectious diseases. Science Robotics, 5(40).
[Link], Y., et al. (2020). Path planning optimization for hospital service
robots. IEEE International Conference on Robotics and Biomimetics
(ROBIO).
[Link], Z., et al. (2020). Design of an autonomous UV disinfection robot for
hospital environments. IEEE Access, 8.
63
/*
* ============================================================
* DISINFECTANT BOT — FULL AUTONOMOUS EDITION
* ESP32 | MPU6050 | HC-SR04 x3 | MQ135 | L298N | UV | Mist
* ============================================================
* BLUETOOTH COMMANDS:
* F/B/L/R/S — Forward / Back / Left / Right / Stop
* U — Toggle UV Light
* M — Toggle Mist Maker
* Z — Honk Horn
* D — Run Sensor Diagnostics
* A — Start Autonomous Mode
* X — Stop Autonomous Mode
* ============================================================
*/
#include "BluetoothSerial.h"
#include <Wire.h>
#include <MPU6050.h> // Install: "MPU6050 by Electronic Cats" in Arduino
Library Manager
BluetoothSerial SerialBT;
MPU6050 mpu;
// ============================================================
// 📍 PIN DEFINITIONS
// ============================================================
// ============================================================
64
// ⚙️ TUNABLE PARAMETERS
// ============================================================
const int BASE_SPEED = 200; // Normal drive speed (0–255)
const int TURN_SPEED = 180; // Turning speed (0–255)
const int SLOW_SPEED = 120; // Cautious approach (0–255)
// ============================================================
// GLOBAL STATE
// ============================================================
bool uvIsOn = false;
bool mistIsOn = false;
bool autoMode = false;
// ============================================================
// SETUP
// ============================================================
void setup() {
[Link](115200);
// 1. Bluetooth
[Link]("Disinfectant_Bot");
[Link]("SYSTEM ONLINE: Waiting for Bluetooth...");
// 2. I2C + MPU6050
[Link](); // SDA=21, SCL=22 by default on ESP32
[Link]();
if ([Link]()) {
[Link]("MPU6050 OK");
calibrateIMU();
} else {
[Link]("MPU6050 FAILED — Check wiring!");
}
// 3. Motor pins
pinMode(enA, OUTPUT); pinMode(enB, OUTPUT);
pinMode(in1, OUTPUT); pinMode(in2, OUTPUT);
pinMode(in3, OUTPUT); pinMode(in4, OUTPUT);
// 4. Ultrasonic pins
pinMode(trigFront, OUTPUT); pinMode(echoFront, INPUT);
pinMode(trigLeft, OUTPUT); pinMode(echoLeft, INPUT);
pinMode(trigRight, OUTPUT); pinMode(echoRight, INPUT);
65
// 5. Payloads & buzzer
pinMode(mistOpto, OUTPUT); digitalWrite(mistOpto, LOW);
pinMode(buzzer, OUTPUT); digitalWrite(buzzer, LOW);
pinMode(uvRelay, OUTPUT); digitalWrite(uvRelay, LOW);
// 7. Startup tone
honkHorn(); delay(100); honkHorn();
[Link](">> Disinfectant Bot ONLINE. Send 'A' for autonomous
mode.");
}
// ============================================================
// 🔄 MAIN LOOP
// ============================================================
void loop() {
// ── Bluetooth command intake ──────────────────────────────
if ([Link]()) {
char cmd = [Link]();
handleCommand(cmd);
}
// ============================================================
// 📲 COMMAND HANDLER
// ============================================================
void handleCommand(char command) {
switch (command) {
// Movement (manual — disables auto mode)
case 'F': autoMode = false; moveForward(); break;
case 'B': autoMode = false; moveBackward(); break;
case 'L': autoMode = false; turnLeft(); break;
case 'R': autoMode = false; turnRight(); break;
case 'S': autoMode = false; stopMotors(); break;
// Payloads
case 'U': toggleUV(); break;
case 'M': pulseMist(); break;
case 'Z': honkHorn(); break;
// Diagnostics
case 'D': runDiagnostics(); break;
66
// Autonomous mode
case 'A':
autoMode = true;
[Link](">> AUTONOMOUS MODE: ON");
honkHorn();
break;
case 'X':
autoMode = false;
stopMotors();
[Link](">> AUTONOMOUS MODE: OFF");
break;
}
}
// ============================================================
// 🤖 AUTONOMOUS MODE — OBSTACLE AVOIDANCE ALGORITHM
// ============================================================
/*
* Strategy:
* 1. Read all 3 ultrasonic sensors.
* 2. If front is CLEAR → move forward (optionally slow if approaching).
* 3. If front is BLOCKED → stop, assess left & right clearance.
* 4. Turn toward the side with more space.
* 5. If both sides blocked → reverse + turn 180°.
* 6. Gas alert overrides movement — stop and alert.
*/
void runAutonomous() {
// --- Gas safety override ---
int gas = analogRead(gasSensor);
if (gas > GAS_WARNING_LEVEL) {
stopMotors();
[Link]("!! GAS ALERT: ");
[Link](gas);
triggerGasAlert();
return;
}
} else {
67
// BLOCKED — stop and decide
stopMotors();
delay(150);
} else {
// Both sides blocked — back up and spin
[Link](">> Dead end! Reversing...");
moveBackward();
delay(700);
stopMotors();
delay(100);
// ============================================================
// ⚙️ MOTOR CONTROL
// ============================================================
void moveForward() {
digitalWrite(in1, HIGH); digitalWrite(in2, LOW);
digitalWrite(in3, HIGH); digitalWrite(in4, LOW);
ledcWrite(enA, BASE_SPEED); ledcWrite(enB, BASE_SPEED);
}
void moveBackward() {
digitalWrite(in1, LOW); digitalWrite(in2, HIGH);
68
digitalWrite(in3, LOW); digitalWrite(in4, HIGH);
ledcWrite(enA, BASE_SPEED); ledcWrite(enB, BASE_SPEED);
}
void turnLeft() {
digitalWrite(in1, LOW); digitalWrite(in2, HIGH);
digitalWrite(in3, HIGH); digitalWrite(in4, LOW);
ledcWrite(enA, TURN_SPEED); ledcWrite(enB, TURN_SPEED);
}
void turnRight() {
digitalWrite(in1, HIGH); digitalWrite(in2, LOW);
digitalWrite(in3, LOW); digitalWrite(in4, HIGH);
ledcWrite(enA, TURN_SPEED); ledcWrite(enB, TURN_SPEED);
}
void stopMotors() {
digitalWrite(in1, LOW); digitalWrite(in2, LOW);
digitalWrite(in3, LOW); digitalWrite(in4, LOW);
ledcWrite(enA, 0); ledcWrite(enB, 0);
}
// ============================================================
// 🧪 PAYLOAD FUNCTIONS
// ============================================================
void toggleUV() {
uvIsOn = !uvIsOn;
digitalWrite(uvRelay, uvIsOn ? HIGH : LOW);
[Link](uvIsOn ? ">> UV Light: ON ⚠️ WARNING" : ">> UV Light:
OFF");
}
void pulseMist() {
mistIsOn = !mistIsOn;
[Link](mistIsOn ? ">> Mist Maker: ON" : ">> Mist Maker: OFF");
digitalWrite(mistOpto, HIGH);
delay(250);
digitalWrite(mistOpto, LOW);
}
void honkHorn() {
digitalWrite(buzzer, HIGH);
delay(200);
digitalWrite(buzzer, LOW);
}
void triggerGasAlert() {
// Rapid beeps for gas warning
for (int i = 0; i < 5; i++) {
digitalWrite(buzzer, HIGH); delay(100);
digitalWrite(buzzer, LOW); delay(100);
}
}
// ============================================================
// 📡 SENSOR DIAGNOSTICS (Ultrasonics + Gas + IMU)
// ============================================================
void runDiagnostics() {
// --- Ultrasonics ---
69
int distFront = getDistance(trigFront, echoFront);
int distLeft = getDistance(trigLeft, echoLeft);
int distRight = getDistance(trigRight, echoRight);
70
[Link](" Pitch : "); [Link](pitch, 1);
[Link](" deg");
[Link](" Roll : "); [Link](roll, 1);
[Link](" deg");
[Link]("-- System Status --");
[Link](" UV Light : "); [Link](uvIsOn ? "ON" :
"OFF");
[Link](" Mist : "); [Link](mistIsOn ? "ON" :
"OFF");
[Link](" Auto Mode: "); [Link](autoMode ? "ON" :
"OFF");
[Link]("===========================\n");
}
// ============================================================
// 📏 ULTRASONIC DISTANCE
// ============================================================
int getDistance(int trigPin, int echoPin) {
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// ============================================================
// 🎯 IMU CALIBRATION (run at startup, robot must be still)
// ============================================================
void calibrateIMU() {
[Link](">> Calibrating IMU — keep robot still...");
[Link]("Calibrating MPU6050...");
71
[Link](" GX:"); [Link](gx_offset);
[Link](" GY:"); [Link](gy_offset);
[Link](" GZ:"); [Link](gz_offset);
}
72