Smart Hand Washing

Smart Hand Washing

Now, more than ever, with the spread of COVID-19, washing your hands is very important! Sometimes we all need a reminder to keep washing our hands for the recommended time of at least twenty seconds. This project uses Wirelings to create a smart hand washing experience so that you can help stop the spread of germs!

This smart hand washing project uses a moisture sensor, OLED screen, and buzzer. The moisture sensor detects when you are washing your hands, the screen will encourage you to keep washing until it has been at least twenty seconds, and if you stop too soon, the buzzer alarm goes off to remind you to keep washing!

New to Wirelings? Learn more about the Wireling platform! 


Materials

 Picture of hardware materials at a sink

Hardware

Software

Other

  • Tape (or a different method to hold the moisture sensor beneath the running faucet)
  • Warm water and soap!
  • (Optional, but recommended) Alpaca soap holder 

Assembly (Hardware)

Plug the OLED Screen, Moisture Sensor, and Buzzer Wirelings into the WirelingZero using 5-pin cables. The default port assignments from the program (you can follow these, or change them in the program):

  • Port 0: Moisture Sensor (200mm Wireling cable recommended to fasten easily to sink while keeping other electronics safe)
  • Port 2: Buzzer Wireling
  • Port 3: 0.69" OLED Screen Display Wireling 

NOTE: Be mindful when inserting Wireling Cables - the connector pins inside the 5-pin connectors on Wirelings can be bent when cables are inserted at an angle.


Software 

For this project, you will need to download the Wireling, Graphics Buffer Library, and Tinier Screen Arduino Libraries. Download the zip folders for the libraries above under software. To install an Arduino library, check out our Library Installation Help Page.

Then you will just need the Smart Hand Washing program found above under the Software section. Click the link to download it, and open the program in the Arduino IDE.


Arduino Code

Make the correct Tools selections for your development board. If unsure, you can double-check the Help page that mentions the Tools selections needed for any TinyCircuits processor. Then upload the program to the WirelingZero, or development board of your choice.

Once the program is uploaded, you can test it by opening the Arduino Serial Monitor to see the moisture sensor values, and holding the moisture sensor between your fingers (You may want to decrease the WASH_TIME variable to a few seconds rather than 20 while testing). From these moisture sensor values, you will want to test the moisture under a faucet of running water, and the moisture readings once the faucet is turned off, and edit the below variables accordingly. (Note: You will not want to set these variables rigorously, more broad values will work best)

To edit the moisture thresholds in the program you will want to look toward the top of the program:

/* * * * * * * * * * HAND WASHING THRESHOLDS * * * * * * * * * */
int WASH_TIME = 20000; // Wash hands for at least this amount of time (At least 20 seconds)
int FAUCET_ON = 80; // Minimum moisture reading when washing hands (Scale 0-100)
int FAUCET_OFF = 55; // Max moisture reading when faucet is off and not washing hands

You can also change the hand washing time to be greater than 20 seconds if you choose. It is recommended that you wash for at least 20 seconds, so I would advise not setting a lower time!

After 20 seconds of moisture readings higher than FAUCET_ON, the screen will display an "All done!" message so you know you have washed your hands for long enough:

 All done message after washing hands


Tape

After you have done some testing and have value thresholds just where you want them, you need to install the device to your sink!

 close up of hardware under running faucet/></p>
<p>The moisture sensor is coated with a water-resistant coating to help protect the electronics </p>
<p style=

The best way I found (partly because I'm lazy and I value function over beauty) is to use electric tape.

 Side view of tape fastening moisture sensor to faucet

You will want to install the sensor to be out of the way of the stream of water coming from the faucet, so make sure to test with the faucet running. 


That's all, folks!

 Picture of tutorial creator's and alpaca reflection in sink

My alpaca soap holder and I hope this project can help you and your loved ones stay safe and healthy during this difficult time facing COVID-19! 


Contact Us

As always, if you have any questions or feedback, feel free to email us at info@tinycircuits.com.

Show us what you make by tagging @TinyCircuits on Instagram, Twitter, or Facebook so we can feature it!

Thanks for making with us!