Starts a 20-second timer when you put your hands under the tap, then beeps.
Built and tested by Drisya K S · Industrial Robotics Institute
Arduino IDE
A handwash timer that makes sure everyone washes for the recommended 20 seconds. An IR sensor near the tap detects hands; the ESP8266 lights an LED for 20 seconds while you wash, then sounds the buzzer to say you are done.
| Component | Qty |
|---|---|
| ESP8266 NodeMCU | 1 |
| IR Sensor Module | 1 |
| Buzzer | 1 |
| LED | 1 |
| Resistor 220Ω | 1 |
| Jumper Wires | As needed |
| Breadboard | 1 |
| Power Supply | 1 |
| From | Connect to |
|---|---|
| IR sensor VCC | 3.3V |
| IR sensor GND | GND |
| IR sensor OUT | D1 |
| Buzzer + | D2 |
| Buzzer − | GND |
| LED + (via 220Ω) | D3 |
| LED − | GND |
Complete, tested Arduino C++ code for this project. Copy it into Arduino IDE and upload it to the ESP8266 NodeMCU.
int sensorPin = D1;
int buzzer = D2;
int led = D3;
void setup() {
pinMode(sensorPin, INPUT);
pinMode(buzzer, OUTPUT);
pinMode(led, OUTPUT);
Serial.begin(9600);
}
void loop() {
if (digitalRead(sensorPin) == LOW) { // hand detected
Serial.println("Hand Detected - Start Washing");
digitalWrite(led, HIGH);
delay(20000); // 20-second timer
digitalWrite(led, LOW);
digitalWrite(buzzer, HIGH); // done
delay(2000);
digitalWrite(buzzer, LOW);
Serial.println("Handwash Completed");
}
}A handwash timer that makes sure everyone washes for the recommended 20 seconds. An IR sensor near the tap detects hands; the ESP8266 lights an LED for 20 seconds while you wash, then sounds the buzzer to say you are done.
You need: ESP8266 NodeMCU (1), IR Sensor Module (1), Buzzer (1), LED (1), Resistor 220Ω (1), Jumper Wires, Breadboard (1), Power Supply (1). Software: Arduino IDE.
Yes. It is rated beginner and takes about 1–2 hours to build, using the ESP8266 NodeMCU. The guide on this page explains every connection and step.
The complete, tested Arduino C++ code is free on this page. Copy it into Arduino IDE and upload it to the board.
Yes. IRI sells a kit with the parts for this project (PRJ-151). Message IRI on WhatsApp at +91 86060 82634 for the kit price and delivery details.