Table of Contents
Project Overview: Smart Sterilization Technology
Imagine returning home to a microbiologically sanitized environment where harmful pathogens have been systematically eliminated without chemical residues. This project creates an intelligent sterilization system that combines UVC germicidal lamps, Arduino automation, and millimeter-wave human detection technology. The device operates on a precise sterilization cycle (30 minutes active, 60 minutes idle) while ensuring absolute safety by instantly disabling UVC radiation when the RD-03E sensor detects human presence. Practical applications include:
- Bathroom deep-cleaning during nighttime hours
- Kitchen surface sterilization while occupants are at work
- Bedroom air purification cycles between uses
- High-touch area disinfection in shared living spaces
Why This Project Matters
The COVID-19 pandemic highlighted the critical importance of effective pathogen control, with UVC emerging as a scientifically validated sterilization method. Traditional chemical disinfectants require manual application and leave residues, while this automated system:
- Eliminates 99.9% of viruses and bacteria including SARS-CoV-2 through DNA/RNA disruption. Source: nih.gov, sciencedirect
- Operates without human intervention using smart scheduling
- Reduces cross-contamination risks in high-traffic home areas
- Provides chemical-free disinfection for allergy-sensitive environments
UVC Sterilization Science: Mechanisms and Safety
What are UVC Rays?
Ultraviolet (UV) rays are a type of electromagnetic radiation. There are three types:
- UVA – least harmful, used in tanning
- UVB – responsible for sunburn
- UVC – extremely effective at killing bacteria and viruses
UVC rays (wavelength ~254 nm) penetrate the cell walls of microorganisms and disrupt their DNA and RNA, rendering them inactive and unable to replicate. UVC light acts as a microscopic disruptor, damaging the genetic material of microorganisms. When pathogens absorb this high-energy radiation:
- Thymine dimers form in DNA/RNA strands
- Replication machinery fails due to genetic damage
- Pathogens become inert within seconds of exposure
Research confirms effectiveness against bacteria (E. coli, Salmonella), molds, and viruses (including coronaviruses) when applied at sufficient intensity.
Human Health Implications
Direct UVC exposure poses serious health risks:
- Eye damage: Photokeratitis (corneal burns)
- Skin effects: Erythema (sunburn-like damage)
- Long-term risks: Potential skin cancer promotion
The RD-03 sensor provides critical safety by:
- Detecting humans through millimeter-wave radar (24GHz)
- Triggering instant shutdown (<0.5 second response)
Component Selection: Building a Safe System
| Component | Specifications | Purpose |
|---|---|---|
| UVC Germicidal Lamp | 25W, 254nm wavelength, electronic ballast | Pathogen destruction |
| RD-03 Sensor | 24GHz mmWave, 5m range, 120° FOV | Human presence detection |
| Arduino Nano | ATmega328P, 5V logic | System controller |
| 5V Relay Module | 10A SPDT, optoisolation | High-voltage switching |
| Power Supplies | 5V/1A (Arduino), AC supply (UVC) | Stable voltage delivery |
Safety-Critical Features:
-
Power button to physically cutoff complete power to the whole system.
RD-03 mmwave human detection sensor
The RD-03 mmWave Sensor is a high-precision, radar-based presence detection module designed for applications that require non-contact human motion and presence detection. Utilizing 24GHz millimeter-wave radar technology, it can accurately sense micro-movements like breathing or slight gestures, making it ideal for smart home automation, security systems, and intelligent lighting.

Unlike PIR sensors, the RD-03 is highly sensitive to subtle human presence, even when the person is stationary. It’s less affected by environmental conditions like temperature, light, or humidity, ensuring consistent performance.
Key Specifications of RD-03 mmWave Sensor
- Operating Frequency: 24 GHz ISM Band
- Detection Range: Up to 6 meters (adjustable)
- Detection Angle: Horizontal ±60°, Vertical ±60°
- Output Type: UART (serial communication)
- Power Supply: 3.0V ~ 3.6V DC
- Power Consumption: ≥200mA
- Micro-motion Detection: Capable of detecting breathing and slight movements
- Environmental Immunity: Works reliably in light, dark, foggy, or dusty environments
Circuit Diagram
Connect all the required components according to the below circuit diagram.

From the above circuit diagram you can see the RD-03 mmwave human detection sensor is powered using 3.3V and GND pins from Arduino and the Output pin from the sensor OT2 is connected to Digital pin D2 of Arduino which send signals HIGH when human detected and LOW when no humans detected.
The relay module is powered using 5V and GND pins of Arduino, The UVC lamp is connected to AC power supply and flows through the relay Normally Open(NO) connections.
Professionalize Your UVC Sterilizer Project with PCBWay – Custom PCB & 3D Printing Services
You’ve built an innovative Humansafe Automatic UVC Air & Surface Sterilizer using Arduino, sensors, and relays. Now, it’s time to elevate your project from a DIY prototype to a professional-grade product — and PCBWay is your perfect partner to make that happen!
Imagine having a custom-designed PCB where all your components—the Arduino, RD-03 radar sensor, relay module, power circuits, and connectors—are neatly arranged and soldered on a single high-quality board. This not only reduces wiring complexity but also makes your project reliable, compact, and installation-ready.
With PCBWay’s PCB fabrication services, you can easily upload your Gerber files and get precision-manufactured PCBs at unbeatable prices. They also provide SMT assembly, so you can get your boards fully assembled and tested.
But there’s more—why leave your project open on a breadboard when you can house it in a custom-designed 3D-printed enclosure? PCBWay’s 3D Printing Services allow you to design and print an enclosure that perfectly fits your PCB, UV lamp mounts, and wiring, giving your sterilizer a sleek, commercial-quality finish.
PCBWay Advantages:
- Custom PCB fabrication starting at $5 for 5 pcs
- Professional PCB Assembly Services (SMT/Through-hole)
- High-quality 3D printing with multiple material options
- One-stop solution from PCB design to a finished product
- Fast production & global shipping
If you’re serious about turning your project into a market-ready product or just want to showcase a clean and professional build, PCBWay is your go-to solution.
Visit www.pcbway.com and bring your project to life like a pro!
Arduino code
Our next step is to upload the code to Arduino by connecting it to the PC where Arduino IDE is installed. Copy and paste the below program code in the Arduino IDE workspace and choose correct port, baudrate and upload it.
This program doesn’t need any external libraries.
/*
Circuitschools Human-Safe UV-C Sterilizer
Connections:
- RD-03E Human Sensor: Pin 2
- Relay Module (UV Light): Pin 7
Operation:
- UV ON for 30 minutes when no human detected
- UV OFF for 1 hour (rest period)
- UV immediately OFF when human detected
- When human leaves, starts 30-min cycle immediately
*/
// Pin definitions
const int HUMAN_SENSOR = 2;
const int UV_RELAY = 7;
// Timing (in milliseconds)
const unsigned long STERILIZE_TIME = 30UL * 60UL * 1000UL; // 30 minutes
const unsigned long REST_TIME = 60UL * 60UL * 1000UL; // 1 hour
// Variables
bool humanPresent = false;
bool uvOn = false;
unsigned long cycleStartTime = 0;
bool inSterlizeMode = false; // true = sterilizing, false = resting
void setup() {
Serial.begin(9600);
Serial.println("UV Sterilizer Started");
pinMode(HUMAN_SENSOR, INPUT);
pinMode(UV_RELAY, OUTPUT);
// Start with UV OFF (safety first)
digitalWrite(UV_RELAY, LOW);
uvOn = false;
cycleStartTime = millis();
inSterlizeMode = false; // Start in rest mode
Serial.println("System ready - monitoring for humans...");
}
void loop() {
// Check for human presence
humanPresent = digitalRead(HUMAN_SENSOR);
// SAFETY: Turn OFF UV immediately if human detected
if (humanPresent) {
if (uvOn) {
digitalWrite(UV_RELAY, LOW);
uvOn = false;
Serial.println("HUMAN DETECTED - UV OFF");
}
return; // Don't do anything else while human present
}
// No human present - continue with cycles
unsigned long currentTime = millis();
unsigned long elapsedTime = currentTime - cycleStartTime;
if (inSterlizeMode) {
// STERILIZING MODE (30 minutes)
if (!uvOn) {
digitalWrite(UV_RELAY, HIGH);
uvOn = true;
Serial.println("UV ON - Sterilizing for 30 minutes");
}
// Check if sterilize time is up
if (elapsedTime >= STERILIZE_TIME) {
digitalWrite(UV_RELAY, LOW);
uvOn = false;
inSterlizeMode = false; // Switch to rest mode
cycleStartTime = millis();
Serial.println("UV OFF - Rest for 1 hour");
}
}
else {
// RESTING MODE (1 hour)
if (uvOn) {
digitalWrite(UV_RELAY, LOW);
uvOn = false;
}
// Check if rest time is up
if (elapsedTime >= REST_TIME) {
inSterlizeMode = true; // Switch to sterilize mode
cycleStartTime = millis();
Serial.println("Rest complete - Starting sterilization");
}
}
delay(500); // Check every 500ms
}
Code Explanation – Simple UV-C Sterilizer
Hardware Setup
- Pin 2: Reads RD-03E human detection sensor (HIGH = human detected)
- Pin 7: Controls relay module that switches UV light ON/OFF
Timing System
- 30 minutes: UV sterilization time when no human present
- 1 hour: Rest period between sterilization cycles
- 500ms: How often the system checks for humans
Main Logic Flow
- Setup Phase
- Initialize pins and serial communication
- Start with UV OFF for safety
- Begin in “rest mode”
- Safety Check (Every 500ms)
if (humanPresent) { Turn UV OFF immediately Stop all other operations } - When No Human Present – Two Modes: Sterilizing Mode (30 min):
- Turn UV ON
- Count down 30 minutes
- When time up → switch to Rest Mode
Rest Mode (1 hour):
- Keep UV OFF
- Count down 1 hour
- When time up → switch to Sterilizing Mode
Key Variables
humanPresent: True/false if sensor detects humanuvOn: Current UV light statusinSterlizeMode: Which cycle we’re in (sterilize or rest)cycleStartTime: When current cycle started (for timing)
Safety Priority
The human detection check runs first in every loop – if a human is detected, everything else stops and UV turns OFF immediately. Only when the area is clear does the normal timing cycle continue.
Calibration and Testing Protocol
Note: While testing use Normal white LED light to check the working of the system.
Phase 1: Sensor Calibration
- Position RD-03 facing entry ways and analyze how it is responding to the human presence in all areas of the room.
- Adjust detection threshold using serial monitor output
- Validate coverage with test movements through space
Phase 2: UVC Efficacy Verification (Optional)
- Biological Indicators: Place Bacillus atrophaeus test strips
- Dosimeter Cards: Confirm minimum 40mJ/cm² exposure
- Timer Validation: Confirm 30-minute cycles deliver >99% kill rates
Phase 3: Safety Validation
- Leakage Test: Use UV-sensitive cards at enclosure seams
- Response Test: Enter room during operation – shutdown <1s
- Endurance Test: 72-hour continuous operation monitoring
Real-World Implementation Guide
Home Applications:
- Bathroom Installation: Mount above shower area (post-use cycle)
- Bedroom Unit: Under-bed configuration (activate during work hours)
- HVAC Integration: Duct-mounted units for air sterilization
Commercial Adaptations:
- Medical Equipment Rooms: Sterilize portable devices between uses
- Food Preparation Areas: Non-chemical surface sanitation
- Shared Workspaces: Overnight keyboard/desk disinfection
Maintenance Requirements:
- Monthly: Clean UVC tube with 70% isopropyl alcohol
- Biannual: Replace UVC lamp (even if functional)
- Annual: Recalibrate RD-03 sensors
Frequently Asked Questions
Q1: Can UVC penetrate fabrics to sterilize underneath?
A: No. UVC has limited penetration capability and works only on direct line-of-sight surfaces. For optimal results, expose target surfaces directly.
Q2: Will this system eliminate odors?
A: Indirectly. While UVC destroys odor-causing bacteria and molds, it doesn’t eliminate odor molecules. Combine with ventilation for best results.
Q3: How does RD-03E compare to PIR sensors?
A: Millimeter-wave radar (RD-03E) detects stationary humans and breathing, unlike PIR which requires motion. This prevents accidental exposure.
Q4: Does UVC produce ozone?
A: Standard 254nm lamps produce minimal ozone. Avoid 185nm lamps marked “ozone-generating” unless specifically needing ozone purification.
Q5: Can I use UV-C LEDs instead of mercury lamps?
A: Yes, but verify wavelength (260-280nm) and power output (>5mW). LEDs require heat sinking and current drivers different from fluorescent tubes.
Conclusion: Towards Intelligent Sterilization Homes
This automated UVC sterilization system represents a significant advancement in home hygiene technology, merging proven germicidal science with modern safety systems. By implementing the human-aware sterilization cycles described, households gain:
- Continuous Pathogen Control: Automatic operation maintains baseline cleanliness
- Chemical-Free Sanitation: Ideal for homes with children/pets, but always check for detection of small pets before operating
- Adaptable Architecture: Scalable from single rooms to whole-house systems
Future enhancements could incorporate air quality sensors to trigger intensive cycles during illness outbreaks, or Wi-Fi connectivity for remote monitoring. As studies continue confirming UVC’s efficacy against emerging pathogens, such systems will become integral to healthy living spaces – not through constant sterilization, but through precisely timed, intelligent intervention.
Safety Disclaimer: UVC radiation poses serious health risks. This project should only be attempted by individuals with electrical safety knowledge. Always verify the system with normal LED in the place of UVC before operation and never look at operating UVC lamps. Commercial UL-certified alternatives are recommended for non-technical users
