Avoid Touching Your Face Using a Low-Cost Fitness Tracker
In addition to washing hands regularly and practicing social distancing, avoiding touching your face is a crucial measure to prevent the virus from entering your body. The coronavirus primarily enters through the nose, eyes, and mouth.
However, avoiding face-touching is easier said than done—we unconsciously touch our faces many times a day. Given that the virus can survive on surfaces for more than three days, it's important to minimize this behavior. This advice is particularly critical for healthcare professionals working in high-risk environments.
Smart Bands to the Rescue
Several companies, such as Immutouch and Shockbit, have developed smart bands that alert users when they are about to touch their face. However, you don’t necessarily need to buy a new smart band or fitness tracker to achieve this functionality.
Most existing fitness trackers have the capability to alert you when you’re about to touch your face, similar to how they automatically show the time when you twist your wrist. This feature isn't typically activated, but it can be implemented with minimal effort.
Implementing the Feature on Existing Fitness Trackers
The accelerometer in fitness trackers measures acceleration in the x, y, and z directions, which can be used to detect the tilt of your hand. If the hand tilts more than 30 degrees, the tracker can alert the user by vibrating.
To calculate the tilt, you can use the following equation, which utilizes the acceleration values from the x, y, and z axes.
Scientists from the MIT Media Lab have developed a custom firmware for a low-cost (~$10) fitness tracker using the above method. Fortunately, this work is open source, making it accessible for others to implement.
My Experience with Custom Firmware
Since I own the same fitness tracker, I was able to test the code immediately. The tracker in question is the DS-D6, and the code was originally developed by Aaron and Fanoush, who created a simple app for flashing custom firmware. Below, I’ll explain how to achieve this with the DS-D6 tracker, using Arduino to make it easy to understand and modify.
After uploading the MIT Media Lab code, I found a small bug: the code doesn’t work if the screen is active with another function running. This is because the face-touch alert system was added as an extra function to Aaron’s original code, which includes features like showing the time and playing games.
To address this, I removed all other functions from the MIT code and kept only the “no-touch-face” feature. Now, the tracker works seamlessly, and as a bonus, the battery life has improved. You can see a demonstration in this video below:
You can also access the code here.
I’m currently working on making this feature compatible with other functionalities, so users won’t have to sacrifice any features.
Compatible Fitness Trackers
Apart from the DS-D6, the code should work with other fitness trackers like the Mpow DS-D9/Lenovo HW02 and Lenovo HX03W. These trackers typically cost between $10 and $20 on platforms like eBay, Amazon, or AliExpress. I hope that mainstream companies like Apple and Fitbit will include this feature in their products soon, so new devices won’t be necessary.
Instructions to Make Your Own Face Touch Alert System
- Purchase one of the compatible fitness trackers.
- Upload the tracker with this simple bootloader code.
- Use this app to upload the bootloader. Watch this video for instructions.
- Finally, upload my code into the tracker using the same app.
Future Prospects
P.S. 1: It would be exciting to implement this feature using Tiny ML—I hope someone takes on this challenge.
P.S. 2: There are simpler DIY methods to achieve the “avoid touching face” function without relying on the smart capabilities of a fitness tracker. Check out this approach and another approach, though the latter’s code might not be as refined.
Acknowledgments
Special thanks to Sandeep Mistry, fanoush, atc1441, and the MIT Media Lab for their contributions.