1. Introduction
Automatic hand dryers are widely used in public restrooms to maintain hygiene and reduce the spread of germs. In this project, we design an Automatic Hand Dryer System using Arduino and an IR sensor, which activates a fan (or dryer motor) when hands are detected.
This system helps in touchless operation, improving cleanliness and user convenience.
2. Components Required
- Arduino Uno / Nano
- IR Sensor Module
- DC Fan / Mini Blower (any Turbo fan for better result)
- Relay Module (5V)
- External Power Supply (for fan)
- Breadboard
- Jumper Wires
3. Circuit and Connections
| Pinout Diagram of Arduino Uno |

Pinout Diagram IR Module

Pinout Diagram of Single Channel Relay Module
IR Sensor Connections
- VCC → 5V (Arduino)
- GND → GND
- OUT → Pin 2
Relay Module Connections
- VCC → 5V
- GND → GND
- IN → Pin 8
Fan Connections
- One terminal → Relay NO
- Other terminal → Power Supply
- Relay COM → Power Supply
4. Detailed Step By Step Circuit Working
- The IR sensor continuously emits infrared rays.
- When a hand is placed near the sensor, the IR rays reflect back.
- The sensor detects this reflection and outputs a signal.
- Arduino reads this signal from pin 2.
-
When detection occurs:
- Arduino activates the relay
- Relay turns ON the fan (hand dryer)
-
When the hand is removed:
- Relay turns OFF
- Fan stops automatically
5. Libraries to be Included
No external libraries required.
6. Code
#define sensorPin 2
#define relayPin 8
void setup() {
pinMode(sensorPin, INPUT);
pinMode(relayPin, OUTPUT);
digitalWrite(relayPin, LOW);
}
void loop() {
int sensorValue = digitalRead(sensorPin);
if (sensorValue == LOW) { // Hand detected
digitalWrite(relayPin, HIGH);
} else {
digitalWrite(relayPin, LOW);
}
delay(100);
}
7. Detailed Step By Step Code Working
-
digitalRead(sensorPin)reads IR sensor output -
IR sensor gives:
- LOW → Object detected
- HIGH → No object
-
When hand is detected:
- Relay is activated
- Fan turns ON
-
When no hand:
- Relay OFF
- Fan OFF
- Small delay ensures stable switching
8. Testing and Calibration
- Power ON the circuit
- Place your hand near the IR sensor
- Fan should turn ON instantly
- Remove hand → fan should stop
- Adjust IR sensor potentiometer for sensitivity
9. Applications
- Public restrooms
- Hospitals and clinics
- Shopping malls
- Offices and schools
- Contactless hygiene systems
10. Advantages
- Touchless operation
- Improves hygiene
- Easy to build
- Low cost system
11. Disadvantages
- Limited detection range
- May trigger falsely due to reflections
- Requires external power for fan
12. Future Improvements
- Add timer (auto OFF after few seconds)
- Use ultrasonic sensor for better accuracy
- Add temperature control (hot air dryer)
- Convert to IoT monitoring system