20 second Handwash


Amid the covid-19 outbreak in the world. To prevent from spreading or contracting with the disease washing the hands is very important.
Hands must be washed with soap. Liquid soap is recommended because most of them don't have some harmful chemicals. I would not recommened using sanitizers a lot as because of alcohol, you skin may become dry and it would burn a lot. It has happened to me.
So use soap.

Why does soap work?

One side of the soap molecule (the one that’s attracted to fat and repelled by water) buries its way into the virus’s fat and protein shell. Fortunately, the chemical bonds holding the virus together aren’t very strong, so this intrusion is enough to break the virus’s coat. “You pull the virus apart, you make it soluble in water, and it disintegrates,”
Then the harmless shards of virus get flushed down the drain. And even if it the soap doesn’t destroy every virus, you’ll still rid them from your hands with soap and water, as well as any grease or dirt they may be clinging to. Soap will also wash away bacteria and other viruses that may be a bit tougher than coronavirus, and harder to disintegrate.
The trick is this all takes a little time to happen, and that’s why you need to take at least 20 seconds to wash your hands.
First off, your skin is wrinkly, and it takes time for soap to penetrate into all the tiny folds and demolish the viruses that lurk within. Then the soap needs a few moments to do its chemical work. “You do need a bit of time for all the soap to interact back and forth with the virus particle,” Twenty seconds should do the trick just fine.
Alcohol, the main ingredient in hand sanitizer, can destroy viruses, too. Sanitizers “actually work in a similar way, the alcohol molecules are somewhat amphiphiles”. The thing is, you need a very high concentration of alcohol to achieve the same effect. (Chemicals called quaternary ammonium compounds — the main ingredient in Lysol — kill viruses too but can be a bit harsher on the skin.)

The idea

Because washing hands for 20 seconds is must and to keep track of time is also difficult.
So, I wanted to design a simple solution that can tell when the time is up but also to which you don't need to actually physically touch.


So here is my basic design idea:
  • There will be an ultrasonic sensor measuring the distance. When you put soap and move the hand closer to the sensor the tic-tok starts
  • The arduino will then count 20 seconds and then blinks RED led thrice to know that you have done washing your hands.
  • The cycle resets


  • Arduino Uno ( any can be used. Make sure you have Ultrasonic senros supporting that voltage)\
  • HC-SR 05 (Ultrasonic Sensor)
  • 100 Ohm resistor

Coding and Assembling

I used program called PictoBlox to code Arduino. It is a scratch based application to basically write Arduino Programs. Its free and opensource.
I generally just use Arduino IDE, but wanted to try this for simple projects and it works really great and you can do things fast. I could write the whole code (more like drag and drop) in less than 15 minutes.
They have great tutorials on their website. A must read for this powerful tool.
The code is very simple and extremely easy to read.
notion image
notion image
Here is the file. https://bit.ly/20sHandwash
//This arduino code is generated by PictoBlox

//MACROS are defined here
float getDistance(int trig,int echo){
        pinMode(echo, INPUT);
        return pulseIn(echo, HIGH)/58.0;

//Gloabl Variables are declared here
float d;

void setup() {
    //put your setup code here, to run once:
    pinMode(13, OUTPUT);
    pinMode(11, OUTPUT);
    pinMode(12, OUTPUT);
    digitalWrite(13, true);
    digitalWrite(11, true);

void loop() {
    //put your main code here, to run repeatedly:
    d = getDistance(2, 3);
    digitalWrite(11, false);
    if((d < 7)) {
        digitalWrite(11, true);
        digitalWrite(12, false);
        delay(20 * 1000);
        digitalWrite(12, true);
        for(int i = 0; i < 3; i++) {
            digitalWrite(13, false);
            delay(0.5 * 1000);
            digitalWrite(13, true);
            delay(0.5 * 1000);
        delay(4 * 1000);



So, this was a simple project but I think that such simple projects can collectively help all of us to combat the current global crisis i.e., https://who.int/covid-19