title: "Automatic UV-C Disinfection Robot: An Innovation for Pandemic Control with Embedded Systems" description: "A deep dive into building a smart cleaning robot that uses UV-C radiation to eliminate viruses, complete with a safety system that instantly stops operation upon human detection."
The Coronavirus Disease (COVID-19), caused by the SARS-CoV-2 virus, has had a massive impact on the global population. This virus is transmitted through droplets from coughing, sneezing, or by touching contaminated surfaces and then touching one's face. The most concerning aspect is the "incubation period," which can last up to 14 days, during which infected individuals may not show symptoms but can still transmit the virus.
To address the challenge of reducing the risk of pathogen exposure in public areas, this project involves developing an innovative "Automatic Disinfection Robot" utilizing UV-C radiation technology, which is scientifically proven to effectively destroy the genetic structure (RNA/DNA) of viruses and bacteria.
Project Objectives
The main goal is to create a prototype robot capable of autonomously moving across various surfaces to disinfect with UV-C radiation. Most importantly, it must incorporate an "advanced safety system" that will immediately cease operation if human movement is detected nearby, thereby preventing radiation hazards.
How this project works
Caution: UV-C radiation is highly concentrated and dangerous to human skin and eyes. Therefore, in this prototype robot, a Laser Diode is used instead for logical demonstration purposes only.
This robot operates based on the coordinated function of 3 main systems:
- Human Detection System (Safety System): Uses a PIR sensor (HC-SR501) to detect infrared radiation from human bodies. If movement is detected, the robot will immediately stop operation and turn off the UV radiation source.
- Automatic Propulsion System (Navigation System): Uses an Ultrasonic sensor (HC-SR04) mounted on a Servo Motor to measure distance and avoid obstacles in real-time.
- Disinfection System: Controls the on/off state of the UV-C lamp (or laser in the prototype) according to the safety status.
Hardware Connections
For the robot to function accurately, the device connections to the Arduino board must follow this circuit diagram:
1. L298N Motor Driver Module
Acts as an interface to receive PWM signals from Arduino to control the direction and speed of 2 DC motors.
- IN1: Digital Pin D7
- IN2: Digital Pin D6
- IN3: Digital Pin D5
- IN4: Digital Pin D4
- OUT1 / OUT2: Right Motor
- OUT3 / OUT4: Left Motor
2. Micro Servo Motor SG-90
Used for rotating the Ultrasonic sensor to check distances to the left and right.
- Signal (Orange/Yellow): Digital Pin D9
- VCC (Red): 5V
- GND (Brown/Black): Ground
3. Ultrasonic Sensor HC-SR04
Uses sound waves to calculate the distance from objects.
- Trig: Digital Pin D2 (Transmit Wave)
- Echo: Digital Pin D3 (Receive Wave)
- VCC/GND: 5V / Ground
4. PIR Motion Sensor HC-SR501
- Out: Digital Pin D8
- VCC/GND: 5V / Ground
5. Laser Diode (UV-C Lamp Substitute)
- Anode (+): Digital Pin D12
- Cathode (-): Ground
Code Logic Analysis
For the programming part, we need to install essential libraries: Servo.h for controlling the servo motor, and NewPing.h for accurate distance measurement with the Ultrasonic sensor.
Processing within void setup()
We start by setting the mode for each Pin, defining the L298N, Trig, and Laser connection pins as OUTPUT, and Echo and PIR as INPUT. Additionally, the Servo is set to a 90-degree position (facing straight) to initialize the system.
Algorithm in void loop()
The operation will loop according to the following priority:
Safety Check: Reads the value from the PIR Sensor. If a
HIGHsignal is detected (indicating movement), the robot will immediately stop all motors and turn off the laser. It will then wait until the signal becomesLOWbefore resuming operation.Obstacle Avoidance: If the safety check passes, the robot will move forward and turn on the disinfection laser. If the Ultrasonic sensor measures a distance less than 15 cm, the system will command it to:
- Stop and reverse slightly.
- Command the Servo to turn to 10 degrees to measure the distance to the right (
Rdistance). - Command the Servo to turn to 170 degrees to measure the distance to the left (
Ldistance). - Decision Logic: Compare the distances. If one side is clearer (greater distance), the robot will turn in that direction.
Disinfection Timing: In a real system, disinfection requires a dwell time of at least 30 seconds per spot for the radiation to completely destroy pathogens. In this prototype code, the timing has been scaled to allow the robot to move fluidly for demonstration purposes.
Conclusion
This UV-C disinfection robot represents an application of electronics and robotics knowledge to address a global health crisis. With a design that emphasizes safety (fail-safe design) through the PIR sensor, the robot can confidently operate alongside humans in buildings. This marks a significant step in utilizing automation to elevate hygiene standards in the New Normal era.