Hand Washing Timer

by taste_the_code in Circuits > Arduino

1480 Views, 6 Favorites, 0 Comments

Hand Washing Timer

Fighting COVID-19 - Arduino hand washing timer with PIR sensor and NeoPixel ring

Hi everyone,

Today we will build a simple prototype circuit of an Arduino based hand washing timer with Arduino Nano and a NeoPixel RGB ring.

The project is excellent for beginners and it teaches you how to work with NeoPixels and also how to use a simple PIR element without extra circuitry for near movement detection.

Once a movement is detected, the ring lights up a rainbow pattern for approximately 20 seconds as per the instructions given by the World Health Organization.

Supplies

Tools and materials needed to make this project:

Working With Bare PIR Element

VID_20200503_074150.mp4.00_00_27_07.Still001.jpg
VID_20200503_072728.mp4.00_00_07_23.Still001.jpg
VID_20200503_073533.00_05_06_16.Still002.jpg

The timer needs to be able to be triggered without any contact with it for the purposes of reducing the risk of contaminating it with the COVID 19 virus.

In a previous video I made, I looked at different PIR modules and how we can use them but my main goal then was to see if a bare PIR element can be used for certain projects.

As it turns out it can, with a combination of a 47K Ohm resistor between its source and ground pins. The output from the source pin is then read through analog input on the Arduino and when a certain threshold is detected, we turn on the RGB ring.

Check out my other video for more details on working with PIR modules:

An extra trick that we do with the bare PIR element is that we need to cover half of the sensor with tape in order to get a better reading from it when used without extra circuitry.

Connect the NeoPixel Ring

VID_20200503_072813.mp4.00_00_11_05.Still001.jpg
VID_20200503_073533.00_04_00_25.Still006.jpg

The NeoPixel ring consists of 12 LEDs and it is connected to Vin pin on the Arduino to get its 5V through the USB cable. This is important as the LEDs draw a lot of current that can otherwise overload the Arduino.

The input pin on the LED ring is then connected to pin 6 on the Arduino with a 360 Ohm resistor.

Program the Arduino

VID_20200503_073533.00_03_12_12.Still005.jpg

The sketch that is uploaded to the Arduino is a combination of the example sketch from the Adafruit NeoPixel library where I extracted the rainbow function from it and a simple analog read call where I get and compare the value coming out of the sensor.

When a threshold is detected in the input signal, the LED ring is turned on and it displays the rainbow pattern 5 times with a 15 millisecond delay between each LED change. In total, this comes to around 20 seconds and the entire cycle repeats again waiting for a new signal from the sensor.

The entire code is available on my Github page at: https://github.com/bkolicoski/arduino-hand-wash-ti...

Next Steps

VID_20200503_073533.00_06_39_28.Still001.jpg
VID_20200503_073533.00_06_03_03.Still004.jpg

The circuit only displays a prototype so the next step will be to create a nice enclosure for it and place it in your bathroom where it can be powered from any cell phone charger plugged in the wall.

The project was especially fun for my kids as anything with some colorful light excites them. Additionally, it is an important reminder for all of us that we need to properly take care of ourselves in these strange times and be more careful.

If you liked this project be sure to check some of my others and also make sure to subscribe to my YouTube channel.

Thanks for reading.