Introduction
An Automatic Hand Sanitizer is a touchless hygiene system that dispenses sanitizer automatically when it detects a hand near the dispenser. This system helps reduce the spread of germs and infections by eliminating physical contact.
It is widely used in hospitals, offices, schools, malls, and public places.
Objective of the Project
The main objectives of this project are:
- To provide touch-free sanitizer dispensing.
- To improve hygiene and safety.
- To reduce germ transmission.
- To understand sensor-based automation.
Working Principle
The Automatic Hand Sanitizer works using proximity sensing.
Step-by-Step Working
- An IR sensor or ultrasonic sensor continuously monitors the area.
- When a hand comes near the sensor, it detects the presence.
- Arduino processes the sensor signal.
- Arduino activates a relay or motor driver.
- The DC pump motor dispenses sanitizer for a fixed duration.
- The motor stops automatically.
Components Required
- Arduino Uno
- IR Sensor / Ultrasonic Sensor
- Relay Module / Transistor
- DC Pump Motor
- Diode (1N4007)
- Jumper Wires
- Power Supply (5V–12V)
- Sanitizer Bottle
Circuit Diagram
Connections
IR Sensor:
VCC -> 5V
GND -> GND
OUT -> D2
Relay Module:
IN -> D8
VCC -> 5V
GND -> GND
Pump Motor:
Connected to Relay Output
Arduino Code for Automatic Hand Sanitizer
int sensorPin = 2;
int relayPin = 8;
void setup() {
pinMode(sensorPin, INPUT);
pinMode(relayPin, OUTPUT);
digitalWrite(relayPin, LOW);
}
void loop() {
if (digitalRead(sensorPin) == HIGH) {
digitalWrite(relayPin, HIGH); // Pump ON
delay(1000); // Dispense time
digitalWrite(relayPin, LOW); // Pump OFF
delay(2000); // Delay before next use
}
}
Code Explanation
- IR sensor detects the hand.
- Arduino activates relay for 1 second.
- Pump dispenses sanitizer.
- Delay prevents continuous operation.
Advantages
- Touch-free operation
- Improves hygiene
- Reduces spread of infection
- Easy to install
Applications
- Hospitals
- Schools and colleges
- Offices
- Public places
- Smart homes
Future Enhancements
- Automatic refill alert
- IoT monitoring
- Adjustable dispense amount
- Solar-powered operation
Conclusion
The Automatic Hand Sanitizer project is a simple yet highly useful automation system that promotes hygiene and safety. It demonstrates real-world application of sensors, microcontrollers, and motor control, making it an ideal intermediate-level electronics project
