Cool Hand Wash Timer

Introduction: Cool Hand Wash Timer

Reference source: Here

How to stay safe during the COVID-19 period? One of the major factors to prevent ourselves from getting infected is to wash our hands very often to make sure the virus does not get a chance to invade our immune system. In this website, I will teach you guys how to create a timer that will let the users know the number of seconds required to make sure their hands are cleaned.

This design idea was developed based on the source. I started by using only an LCD panel to begin and developed the idea of creating a hand wash timer since the globe is struggling with managing the COVID-19. This hand wash timer will be very useful in this situation. This machine acts as a timer for the users to wash their hands for a minimum number of seconds, which makes sure their hands are clean after this process.

For this project, I added several elements, including an LCD panel, an ultrasonic distance sensor, and 6 LED light bulbs. Different from the original source, my final product is designed to be a machine that provides users with the number of seconds required to wash their hands.


  • Arduino Leonardo
  • USD Cable (x1)
  • LCD panel with I2C (x1)
  • LED Lightbulbs (Any colors you prefer) (x6)
  • BreadBoard (x1)
  • 220-ohm Resistors (x6)
  • Ultrasonic Distance Sensor (x1)
  • Wires (x20)
  • Cardboards (x1-2)
  • Tape
  • Scissors (x1)
  • A few colorful papers for decoration (x2-3)
  • Cutting mat (x1)

Step 1: Placing All the Elements Onto the Breadboard

To have the arduino board functions correctly, the wires must be inserted in the right spots in order to let this machine functions properly.

Wrong wire connections: different types of boards, such as Arduino Uno, Leonardo may have different functions under same wire connections. Therefore, before starting this project, make sure the wire connections are correct for the type of board being used. Another significant part of wire connections is not to install the incorrect connections of the wires for the positive and negative electrodes.

LCD panel:

The LCD panel is designed with four parts that need to be installed on the board. The four parts are: GND, VCC, SDA, and SCL. GND needs to be installed to the negative electrode. VCC needs to be installed to the positive electrode. SDA needs to be installed to the SDA port on the board, and SCL needs to be installed to the SCL port on the board.

GND --> Negative electrode on the board

VCC --> Positive electrode on the board

SDA --> SDA port

SCL --> SCL port

LED Light Bulbs:

LED light bulbs have two pins, one is for the positive pole and one is for the negative. The positive pole should connected directly to the digital pin. The negative pole must connect to the negative electrode with a 220-ohm resistor in between in order to have the light bulbs function properly.

The negative pole must be connected to the GND on the Arduino board. The negative pole can be connected to the GND port through the connection of the negative pole with the negative port of the board, which the negative port of the breadboard is connected to the GND port with a wire.

Orange --> D9

Blue#1 --> D8

Blue#2 --> D7

Blue#3 --> D6

Blue#4 --> D5

Blue#5 --> D4

Ultrasonic Distance Sensor:

The ultrasonic distance sensor is designed with four parts that need to be installed on the board. The four parts are: Gnd, Echo, Trig, and Vcc. Gnd needs to be installed to the negative electrode. Echo and Trig need to be installed to the digital pins. Vcc needs to be installed to the positive electrode.

Gnd --> negative electrode on the board

Echo --> D11

Trig --> D12

Vcc --> positive electrode on the board

Step 2: Code

After the circuit is correctly connected, you can start writing the code.

The code for this design can be copied Here

<p>#include <wire.h style="">					//改 加了I2C模組的支援 <br>#include 
<liquidcrystal_i2c.h> </liquidcrystal_i2c.h></wire.h></p><p>LiquidCrystal_I2C lcd = LiquidCrystal_I2C(0x27, 16, 2);//change from line 4-9</p><p>int echoPin = 11;
int trigPin = 12;
long duration;
int distance;</p><p>void setup() {
  for (int i = 4; i <= 9; i++) {//change from 12-19
    pinMode (i, OUTPUT);//改
  pinMode (trigPin, OUTPUT);
  pinMode (echoPin, INPUT);</p><p>  lcd.init();		
}</p><p>void loop() {
  // This part of the code tells the sensor to measure distance and reads the measured data
  digitalWrite(trigPin, LOW); //改
  digitalWrite(trigPin, HIGH);// 改
  delayMicroseconds(10);// 改
  digitalWrite(trigPin, LOW);// 改
  duration = pulseIn(echoPin, HIGH); //改
  distance = (duration * .0343) / 2;// 改</p><p>  // This "If Statement" detects if there is any object within 30 centimeters
  if (distance > 0 && distance <= 30) {//改
}</p><p>void delay4s() {	//改 加了這個程式碼可以改LCD顯示的字 
  for (int i = 0; i < 4; i++) {//改
    lcd.setCursor(0, 0);
    for (int j = 0; j < i; j++) {//改
      lcd.setCursor(0, 8 + j);
    delay(1000);// 改
}</p><p>void ledtimer() {
  digitalWrite (9, HIGH);// 改
  for (int i = 8; i >= 4; i--) {//改
    digitalWrite (i, HIGH);// 改
    if (i == 4) {//改
      digitalWrite (9, LOW);// 改
  for (int i = 8; i >= 4; i--) {// 改
    digitalWrite (i, LOW);// 改
  lcd.setCursor(0, 0); 	// 改 加了結束後LCD會顯示 Done! 這個字
  lcd.print("Done!");// 改

Step 3: Container Design

Container Design:

The container has a variety of ways to be done. For my project, I simply made a box that contains the arduino board and created a few holes on the box to extend my LED light bulbs, ultrasonic distance sensor, and LCD. The ultrasonic distance sensor is placed on the top in order to detect the hands of the users when they start using the handwash. The LCD placed below for the users to see the exact time for them to stop washing their hands. The LED light bulbs are used to better show when to stop. When the LED light bulbs stop shining, the process is successfully done.

Hope you enjoyed this creation!

Be the First to Share


    • Teach With Tinkercad Contest

      Teach With Tinkercad Contest
    • Fandom Contest

      Fandom Contest
    • Plywood Contest

      Plywood Contest