✨ Use RCAPP and get 5% off 👇
Skip to content
Free Delivery on Orders Above Rs 999/- Pan-India
Cash on Delivery Available for Orders above Rs.500/- and Upto Rs 3000/-
SAVE more when you BUY more. Upto 30% Off on BULK PURCHASE
GST Invoices for Your Business
Dedicated Technical Support Team
Safely Delivering Genuine Products PAN INDIA

Hand Wash Timer Using Arduino – Simple IoT Project

Hand Wash Timer Using Arduino – Simple IoT Project
P
Written By Pranay Agarwal
📅 Updated on 12 Jun 2026
Summarize with AI
✅ Prompt copied

Summary

Discover the perfect solution to elevate your hand hygiene routine with an Arduino-powered Hand Wash Timer. In this informative blog, we delve into the world of DIY electronics and explore the components required, working principles, designing techniques, and an easy-to-understand interfacing diagram. Learn how this innovative device works seamlessly to ensure thorough handwashing every time. Additionally, we provide a step-by-step guide on coding the Arduino for optimal functionality. Upgrade your hygiene practices with this engaging, informative blog that will leave you eager to implement this exciting project. Don't miss out!

Introduction:

Handwashing is one of the most effective ways to prevent the spread of germs and illnesses. To ensure that people wash their hands for the recommended amount of time, it is possible to use an Arduino-based timer to intimate users to wash their hands for a certain period.

Components and Supplies

Original Arduino Uno R3 microcontroller board with ATmega328P and USB port - Arduino Uno Board -RobocrazeOriginal Arduino Uno R3 microcontroller board with ATmega328P and USB port - Arduino Uno Board -Robocraze

    Arduino Uno R3 Original

    Arduino UNO R3 Original The Arduino Uno R3 is a microcontroller board based on the ATmega328P chip and is widely recognized as the best original Arduino Uno board for beginners and projects. This board has 14 digital I/O pins (6 support PWM), 6 analog...
    Rs 1,843/-
    Rs 1,843/-
    Rs 2,649/-
    Save Rs 806/-
    GL12 840 Points Solderless Breadboard for Large Prototyping - Electronic Components -RobocrazeGL12 840 Points Solderless Breadboard for Large Prototyping - Electronic Components -Robocraze

      GL12 840 Points Solderless Breadboard

      GL12 MB102 840 Points Solderless Breadboard Introducing the GL12 840 Points Breadboard at Robocraze! This solderless breadboard is an essential tool for any electronics engineer or hobbyist. It allows you to make temporary prototypes for your electronics projects, making it perfect for experimenting with...
      Rs 61/-
      Rs 61/-
      Rs 90/-
      Save Rs 29/-
      SG90 Micro Servo Motor-RobocrazeSG90 Micro Servo Motor-Robocraze

        SG90 Micro Servo Motor

        SG90 9G Micro Servo Motor The TowerPro SG90 Micro Servo Motor is a small yet powerful motor that rotates 180° (90° in each direction). It features a metal gear system for fast and precise control, with a stable torque of 1.2 kg-cm, making it...
        Rs 90/-
        Rs 90/-
        Rs 149/-
        Save Rs 59/-
        HC-SR04 Ultrasonic Distance Sensor ModuleHC-SR04 Ultrasonic Distance Sensor Module – Sensor for Arduino & distance detection -HC SR04 Ultrasonic Sensor

          HC-SR04 Ultrasonic Distance Sensor Module

          HC-SR04 Ultrasonic Sensor The HC-SR04 Ultrasonic Sensor Module is a popular tool for measuring distance and detecting objects. It’s small, easy to use, and combines everything you need: a transmitter, receiver, and control circuit in one module. It works like a sonar, sending out...
          Rs 89/-
          Rs 89/-
          Rs 124/-
          Save Rs 35/-
          Piezo Buzzer (Big) 6-12VPiezo Buzzer (Big) 6-12V

            Piezo Buzzer (Big) 6-12V

            6-12V Piezo Buzzer (Big) Use this economical piezo-electric buzzer in experiments that require a doorbell or buzzer. This electric buzzer works off 6-12V volts. We recommend our 6-volt or 9-volt battery.  A Piezo buzzer is an electronic device commonly used to produce sound. Lightweight, simple construction and low...
            Rs 30/-
            Rs 30/-
            Rs 44/-
            Save Rs 14/-
            Male to Male Jumper Wires (20cm) (20pcs) – Versatile wires for breadboard connections. Electronic Components - RobocrazeMale to Male Jumper Wires (20cm) (20pcs) – Versatile wires for breadboard connections. Electronic Components - Robocraze

              Male to Male Jumper Wires (20cm) (20pcs)

              Male to Male Type Jumper Wires (20cm) (20pcs) These male-to-male Jumper/Dupont Wires are for multipurpose use and are very handy and best for quick prototyping and testing. These Dupont Cables are used for connecting FRC pins, Header pins, Berg pins, etc. Made from high-quality...
              Rs 26/-
              Rs 26/-
              Rs 47/-
              Save Rs 21/-

              Components Required:

              Working:

              The handwash timer uses an Ultrasonic sensor to detect the presence of a hand with a precise measurement value of distance. There is a servo motor attached to this project wherein the time left to finish the handwash is shown in a form of an arc, so when the servo is pointing to the starting position, it is the time when we begin our handwash process. As time passes gradually the servo motor is slowly moving its way up to the end of the arc and making an indication that we have to terminate our handwash process. This is a fun way to motivate young children to wash their hands at least for a specific period.

              The servo will start at 0 degrees and move until the end position gradually for around 30 seconds which acts like a clock to keep track of the time, in addition, this process works only when the ultrasonic sensor reads our hands within a specific distance. Once the time is completed the buzzer will go on to indicate the hand wash process is over.

               

              read more : How 433MHz RF Module Works & Interfacing With Arduino

              Designing:

              The design of the hand wash timer is simple, it consists of sensors like an ultrasonic sensor, servo motor, and buzzer. The connections to these are pretty simple to navigate.

              The servo motor’s signal terminal is connected to Digital pin 9 on the Arduino. The Vcc and Gnd on the servo to 5v and Gnd on the Arduino.

              The ultrasonic sensor’s Echo, trigger pin is connected to Digital pins 2, and 3 in Arduino. The Vcc and Gnd of the ultrasonic sensor to 5v and Gnd in Arduino.

              Connect the Buzzer’s one terminal to Digital pin 11 on Arduino, and connect the other terminal of the buzzer to the 220-ohm resistor and another end of the resistor to GND on Arduino.

              After doing all the necessary connections, define the connected PINs onto the code to ensure the proper functionality of the project. Download the appropriate package for the Servo motor which is an inbuilt package to make the servo controls seamless.

               

              read more : Arduino Interfacing with Ultrasonic Sensor

              Interfacing Diagrams:

              • Arduino to sensors interfacing:

               

               

              Connections:

              • Servo to Arduino:

              Servo 

              Arduino 

              Vcc 

              5V 

              Gnd 

              GND 

              Signal 

              GPIO 9 

               

              • Ultrasonic to Arduino: 

              Ultrasonic 

              Arduino 

              Vcc 

              5V 

              Trig 

              GPIO 3 

              Echo 

              GPIO 2 

              Gnd 

              GND 

               

              • Buzzer to Arduino: 

              Buzzer 

              Arduino 

              Positive 

              GPIO 11 

              Negative 

              GND (via resistor) 

              How it works:

              The servo motor activates only when the distance read by ultrasonic is less than 30 cm.

              Then, the code understands the hand is recognized and starts the timer for 30 seconds. To intimate the user about the running time, the servo motor is turning from 0 degrees to 180 degrees to give it a clock-like feel to make the timer a fun way so children are excited to wash their hands regularly.

              When the timer ends, a buzzer present inside the circuit is triggered indicating the time has been completed.

              Once the user removes his hand away from the sensor, the servo motor returns to its original position (0 Degrees) and waits until someone else starts to wash their hands.

              This is a simple approach to make washing hands a fun activity that will motivate children to wash their hands frequently to ensure their hands are germ-free.

               

              read our blog on infrared sensor arduino, which provides comprehensive information about IR sensors and their application in Arduino projects.

              Coding:

              The code for the hand wash timer uses sensors like an ultrasonic sensor, a Servo motor, and Buzzer to update the user on how much time he needs to wash his hands. This is depicted in the code below.

              
              #include 
              
              const int echoPin = 2;
              
              const int trigPin = 3;
              
              const int buzzer = 11;
              
              int buzzer_flag = 0;
              
              Servo myservo;
              
              long duration;
              
              int distance, count;
              
              void setup() {
              
              myservo.attach(9);
              
              pinMode(trigPin, OUTPUT);
              
              pinMode(echoPin, INPUT);
              
              Serial.begin(9600);
              
              }
              
              void loop()
              
              {
              
              digitalWrite(trigPin, LOW);
              
              delayMicroseconds(2);
              
              digitalWrite(trigPin, HIGH);
              
              delayMicroseconds(10);
              
              digitalWrite(trigPin, LOW);
              
              duration = pulseIn(echoPin, HIGH);
              
              distance = duration * 0.034 / 2;
              
              Serial.print("Distance: ");
              
              Serial.println(distance);
              
              while (distance < 30)
              
              {
              
              count ++;
              
              if (count < 30)
              
              {
              
              digitalWrite(buzzer, LOW);
              
              int servo_angle = count * 6;
              
              myservo.write(servo_angle);
              
              Serial.println("Hand detected");
              
              delay(1000);
              
              buzzer_flag = 0;
              
              }
              
              else
              
              {
              
              if (buzzer_flag == 0)
              
              {
              
              digitalWrite(buzzer, HIGH);
              
              delay(1500);
              
              buzzer_flag = 1;
              
              digitalWrite(buzzer, LOW);
              
              }
              
              break;
              
              }
              
              }
              
              if (distance > 30)
              
              {
              
              digitalWrite(buzzer, LOW);
              
              Serial.println("Hand removed");
              
              count = 0;
              
              myservo.write(count);
              
              delay(300);
              
              }
              
              }
              

              Conclusion:

              A hand wash timer using Arduino is a simple project to encourage children to wash their hands frequently in a fun way and this ensures overall hygiene of them and helps them stay away from harmful germs.

               

              If you appreciate our work don't forget to share this post and leave your opinion in the comment box.

               

              Please do check out other blog posts about Popular electronics

               

              Make sure you check out our wide range of products and collections (we offer some exciting deals!)

              Excerpt

              Learn how to build a hand wash timer using Arduino. A simple project to ensure proper handwashing time with circuit details and code.

              Frequently Asked Questions

              1. What is hand wash timer?

              A hand wash timer is a device or system that helps individuals maintain proper hand hygiene by providing a timed reminder for handwashing. It is designed to ensure that individuals wash their hands for a specific duration, typically around 20 seconds, which is considered an effective length of time to remove bacteria and viruses from the hands.

              A hand wash timer using Arduino is a specific implementation of a hand wash timer using the Arduino microcontroller platform. Arduino is an open-source electronics platform that enables the creation of interactive projects. In this case, Arduino is used to build a hand wash timer with additional features and functionalities.

              The hand wash timer using Arduino typically involves the use of components such as an Arduino board, sensors (e.g., ultrasonic sensor or infrared sensor), a display module, and possibly a motor or buzzer for feedback. The Arduino board is programmed to detect the presence of hands using the sensor and initiate a timer for the recommended duration of handwashing. The display module may show the countdown timer, and the motor or buzzer can provide feedback when the timer is complete.

              By using a hand wash timer, individuals can ensure that they wash their hands thoroughly for the recommended duration, promoting better hand hygiene and reducing the spread of germs and infections.

              read more :  HOME AUTOMATION USING ARDUINO AND BLUETOOTH

              2. What are the advantages of hand wash timer?

              The advantages of using a hand wash timer include:

              1. Promotes proper hand hygiene: Hand wash timers encourage individuals to wash their hands for an adequate amount of time, typically 20 seconds or more. This helps ensure thorough hand cleaning and reduces the risk of spreading germs and infections.

              2. Consistency: Timers provide a consistent and measurable duration for handwashing. They help establish a standard duration that can be followed consistently by individuals, ensuring that they spend enough time washing their hands each time.

              3. Automation: Hand wash timers using Arduino or other microcontrollers automate the timing process. Once activated, they run the timer automatically, eliminating the need for manual timing or guesswork. This makes the handwashing process more convenient and user-friendly.

              4. Visual and auditory cues: Hand wash timers often include visual and auditory cues to indicate the start and end of the handwashing process. This helps individuals stay engaged and aware of the duration, making the handwashing experience more engaging and effective.

              5. Education and awareness: Hand wash timers can be used as educational tools to raise awareness about the importance of proper hand hygiene. They serve as visual reminders and prompts for individuals to follow the recommended handwashing guidelines, leading to better hygiene practices.

              6. Compliance monitoring: In certain settings, hand wash timers can be connected to a monitoring system to track handwashing compliance. This can be useful in healthcare facilities, food service establishments, and other environments where adherence to hand hygiene protocols is crucial.

              Overall, hand wash timers offer several advantages by promoting consistent and effective handwashing practices, improving hygiene compliance, and enhancing public health awareness.

              read more :  Which Arduino Board to Buy

              Prev Post
              Next Post

              Leave a comment

              Please note, comments need to be approved before they are published.

              Thanks for subscribing!

              This email has been registered!

              Shop the look

              Choose Options

              Edit Option
              Back In Stock Notification
              Compare
              Product SKU Description Collection Availability Product Type Other Details

              Choose Options

              this is just a warning
              Login
              Shopping Cart
              0 items
              FREE SHIPPING!
              ₹100 OFF
              ₹200 OFF
              ₹999
              ₹2500
              ₹4900
              WhatsApp Chat Chat