Introduction
An Automatic Hand Wash System is a touchless electronic system that automatically dispenses water when a person's hand is detected.
The system uses an IR sensor to detect the presence of a hand. When the hand comes within the sensor's detection range, the Arduino activates a water pump through a relay or MOSFET driver.
This project is useful for learning about Arduino, sensors, motor control, automation and touchless systems.
Working Principle
The basic operation is:
Hand Detection → IR Sensor → Arduino → Pump Driver → Water Pump
When a user places their hand near the sensor:
- The IR sensor detects the hand.
- The sensor sends a signal to the Arduino.
- Arduino processes the signal.
- Arduino activates the pump driver.
- The water pump starts.
- Water is dispensed.
- When the hand is removed, the pump stops.
Block Diagram
┌──────────────────┐
│ IR Sensor │
│ Hand Detection │
└────────┬─────────┘
│
▼
┌──────────────────┐
│ Arduino │
│ UNO / Nano │
└────────┬─────────┘
│
▼
┌──────────────────┐
│ Relay / MOSFET │
│ Driver │
└────────┬─────────┘
│
▼
┌──────────────────┐
│ Water Pump │
└────────┬─────────┘
│
▼
Water Outlet
Hardware Requirements
| Component | Quantity |
|---|---|
| Arduino Uno/Nano | 1 |
| IR Proximity Sensor | 1 |
| DC Water Pump | 1 |
| Relay Module or MOSFET Driver | 1 |
| Water Pipe | As required |
| Water Container | 1 |
| External Power Supply | 1 |
| Jumper Wires | As required |
| Breadboard | 1 |
Circuit Diagram
+----------------+
| IR SENSOR |
| |
VCC ---| 5V |
GND ---| GND |
OUT ---| D2 |
+-------+--------+
|
▼
+----------------+
| ARDUINO |
| UNO |
| |
| D8 -----------+|
+----------------+
|
▼
+-------------+
| RELAY |
| MODULE |
+------+------+
|
▼
+-------------+
| WATER PUMP |
+------+------+
|
▼
Water Outlet
Arduino Code
const int sensorPin = 2;
const int pumpPin = 8;
void setup() {
pinMode(sensorPin, INPUT);
pinMode(pumpPin, OUTPUT);
digitalWrite(pumpPin, LOW);
Serial.begin(9600);
}
void loop() {
int sensorState = digitalRead(sensorPin);
if (sensorState == LOW) {
digitalWrite(pumpPin, HIGH);
Serial.println("Hand detected - Pump ON");
} else {
digitalWrite(pumpPin, LOW);
Serial.println("No hand detected - Pump OFF");
}
delay(100);
}
Applications
Automatic hand-wash systems can be demonstrated in:
- Schools
- Colleges
- Laboratories
- Offices
- Restaurants
- Hospitals
- Public facilities
- Smart-home projects
Conclusion
The Automatic Hand Wash System using Arduino and an IR sensor is a simple and practical embedded-systems project that demonstrates sensor-based automation and motor control.
When a hand is detected, the Arduino activates the water pump automatically, providing a touchless water-dispensing mechanism.
The project can be further enhanced with automatic soap dispensing, water-level monitoring, LCD display, adjustable dispensing time and IoT-based monitoring, making it a good starting point for more advanced smart hygiene systems.