Hand Washing Timer
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:
- Arduino Nano - https://s.click.aliexpress.com/e/_dSy8Tr5
- RGB WS2812 NeoPixel ring - https://s.click.aliexpress.com/e/_d7AYoo3
- Assorted resistors - https://s.click.aliexpress.com/e/_d8nGDtp
Working With Bare PIR Element
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
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
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
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.