Hi! We’re Lucas and Gautam, two makers in New York 🏙 who have been collaborating on projects with friends at Google Creative Lab.
Using proper hand-washing technique is one of the five things you can do right now to help keep yourself and others healthy. The CDC recommends washing for 20 seconds, so while stuck at home, we made this DIY hand washing timer to help nudge everyone in the right direction. We call it - the Wash-A-Lot-Bot!
This project is for people of all ages and skill-levels, and all the parts can be ordered from Adafruit, SparkFun, or any electronics retailer for roughly $35.
We’re sharing our project to hopefully inspire other makers out there to come up with their own creative ideas to help fight the spread of COVID-19 in whatever ways they can.
Note: 20 seconds of scrubbing with soap is recommended; wet and rinse your hands outside of the 20 seconds.
Gather all the parts you will need.
These are the parts we used, but you can probably find similar ones that work just as well.
- 3 Male / Male Jumper Wires
- 4 Female / Male Jumper Wires
- SG-90 Micro Servo (save the white plastic pieces called 'servo horns', you'll need one later)
- Arduino Uno
- HC-SR04 Ultrasonic Sensor
Additionally, you can collect these materials you may already have around your house.
- An indicator dial to tape on-to the servo. We cut this out of blue paper.
- A Post-it sized piece of paper to draw the dial on
- Tape and Scissors
Finally, download the Arduino IDE from here if you don't have it installed.
Next, wire up the sensor and servo according to the wiring diagram below. Some ultrasonic sensors come with 90 degree headers; we bent ours straight to fit into our sink better.
Note: You can also check out the video for a step-by-step wiring guide.
For the Ultrasonic sensor, use the Female / Male wires to connect the following pins:
- VCC -> 5V on the Arduino
- Trig -> Pin 9 on the Arduino
- Echo -> Pin 10 on the Arduino
- GND -> GND on the Arduino
For the Servo Motor, use the Male / Male wires to connect the following:
- Red Servo Wire (5V) -> Vin on the Arduino
- Black Servo Wire (GND) -> GND on the Arduino
- Orange Servo Wire (Signal) -> Pin 7 on the Arduino
Once the electronics are complete, it's time to put it all together. You may need to change this part of the project for your particular sink. Here's what we did:
Get a Post-it or Post-it sized piece of paper, and cut out rectangular hole for the servo to fit through. On that paper, write down some indicators to show how much time is left, fit it onto the servo, and use some tape to secure it.
⏲ Now, we can create the dial. We used a small cutout piece of paper that we attached to the servo horn. Some servo horns will be included in the plastic bag your servo comes in. When installing the horn onto the servo, rotate the servo to its left most position, and line up the dial with the 20 written on the post I
The final step to create the hand wash timer is to put it all together. Again, this is an area of the project that can be adapted to work for your sink. We taped our servo to the Arduino, and used it to stand the timer up. You could also tape the servo to a mirror or somewhere else more visible depending on your space.
The wash timer is wired and assembled. The last step before you bring it to your sink is to flash the code onto the Arduino. See the video for a full step by step breakdown of flashing the software.
Make sure to install the NewPing, EWMA, and Queue libraries from the Arduino library manager before running the sketch!
For instructions on how to install libraries using the Arduino IDE check here.
There are two different versions of the software provided below, the first is a more advanced version that includes some signal processing to make the ultrasonic sensor work more consistently in different sinks. The second is a barebones, simple version that requires no external libraries, and is easier to understand and modify.
Your Arduino will always run the last sketch that was uploaded to it, even if its not plugged into your computer.
Alright, it's time to get washing! Bring your wash-a-lot bot to the sink and tape the ultrasonic sensor around the rim. Positioning is key here: you want to find a balance of being close to the area where hands are in the sink, far enough away to avoid splashes, and pointed down into the sink enough to avoid false positive triggers by say, someone walking by.
The ultrasonic sensor works by sending out ultrasonic sound waves and measuring how long it takes for them to return. If the sensor is receiving reflections from things that aren't hands in the sink, it may trigger the timer unnecessarily.
Warning: electronics and water don't mix! think about the location of your Arduino.
Once the sensor is in a good position, plug the Arduino into a USB wall adapter nearby. The servo should sweep back and forth, indicating the timer is active.
Try washing your hands and see if the countdown starts! If it doesn't, or if it starts on its own, check out our troubleshooting tips below.
- If you find your timer constantly turning on without anyone's hands in the sink, consider repositioning the ultrasonic sensor to more directly point at the area where your hands go.
- Also considering decreasing the sensitivity though increasing the 'threshold' variable in the Arduino sketch.
- If hands in the sink don't activate the timer, try increasing the sensitivity by decreasing the threshold variable in the Arduino Sketch.
- If the behavior is erratic, try reconnecting the wires and make sure the connections to the Ultrasonic Sensor are tight. We've noticed they can come loose very easily and might need to be reinforced by tape.
We're still experimenting with different approaches to this idea. For example, we got curious to see if we could use a camera and machine learning to avoid false positives, like whenever someone washes a dish vs washing their hands. So we've been using Google's Coral to try this out. Here's a sneak peek at our prototype so far. (Thanks to our friend @HanaTanamura! for the fun GIF on the display). Keep up with us at @lucas0choa and @gautambose18
If you wanted to build some of the other versions of the hand washing timer that we had shown in the video (the segment display and LED versions) you can find them here: https://github.com/GautamBose/hand-washing-timers