
Arduino
Automatic Hand Sanitizer Dispenser Using Arduino Nano, IR Sensor and Servo/Pump
Abstract:
The Automatic Hand Sanitizer Dispenser is a touchless hygiene automation system that automatically dispenses sanitizer when a hand is detected. It uses an Arduino Nano, an IR sensor, and either a servo motor or a mini DC pump to provide controlled sanitizer dispensing without physical contact.
Project Description:
This project is designed to improve hygiene and reduce the need for manual contact with sanitizer bottles. An IR sensor detects the presence of a hand near the dispenser and sends a signal to the Arduino Nano. The Arduino processes the sensor input and activates the dispensing mechanism.
The system supports two actuator options. A servo motor can operate a mechanical pump or dispenser lever, while a mini DC pump can transfer sanitizer through a tube and nozzle. The dispensing duration or servo movement can be controlled through the Arduino program.
Working Principle:
1. The IR sensor continuously monitors the area in front of the dispenser.
2. When a hand is detected, the sensor sends a digital signal to the Arduino Nano.
3. The Arduino processes the signal and activates the selected actuator.
4. In the servo-based design, the servo rotates to press or operate the sanitizer mechanism.
5. In the pump-based design, the DC pump runs for a configured duration to dispense sanitizer.
6. After dispensing, the servo returns to its original position or the pump switches OFF.
7. The system waits for the next hand detection.
Notes:
- Arduino Nano acts as the main controller.
- The IR sensor detects hand presence within its sensing range.
- An SG90 servo motor can operate a mechanical pump or dispenser lever.
- A 5V mini DC pump can dispense liquid sanitizer through suitable tubing and a nozzle.
- Servo and pump are alternative dispensing mechanisms; their wiring and control code are different.
- A separate power supply may be required for the actuator, depending on its current requirements.
- All modules must share a common GND when using a separate non-isolated supply and common control signals.
- Use a suitable liquid-compatible pump and tubing, and keep liquid away from the Arduino and other electronics.
- Adjust sensor sensitivity and dispensing duration to avoid repeated or accidental dispensing.
Expected Outcome:
A functional touchless sanitizer dispenser that detects hand presence and automatically releases a controlled amount of sanitizer. The project demonstrates practical applications of embedded systems, sensor-based automation, and hygiene technology in homes, schools, hospitals, and public spaces.
All Projects




