I have been working on a project using Arduino Uno and Raspberry Pi. The goal of the project is to remind you if you haven’t brushed your teeth that night. I interfaced the Arduino with the Raspberry Pi so that they worked together.
How does it work?
There is an FSR (Force-sensitive resistor) that has the toothbrush holder on it. When the toothbrush is in, there is more weight, so the sensor adds resistance. When the toothbrush is lifted, the sensor removes some resistance. Every time the weight changes, the sensor prints out a number. If that number is below a certain point, then there will be a detected brush lift. If it changes back above a certain point, there will be a detected brush put back down. These are logged in a database. The sensor only starts after 7 30 PM, so that it doesn’t sense morning brushing events. If the lift and put back down times are one minute apart, then a brushing event is logged. If not, an email is sent saying “You didn’t brush your teeth, but there is still time!” If you did brush your teeth, then it prints out “You brushed your teeth!” There are two programs: One, running all the time, that logs the weight changes and saves them into the database. Two: The program that you run at night every day, that detects changes and determines whether or not you brushed your teeth.
Source Code
There were two programs that we used to complete this project.
build3/smartcoaster.py at main · enchiladus/build3 (github.com) – This is the code that is running constantly. It senses changes in the current, which means there was a change in the weight. Then it logs them in a database.
build3/brush_checker.py at main · enchiladus/build3 (github.com) – This is the code that you run at night every day. It checks whether there were any entries that day. If there weren’t, then you didn’t even pick up your brush. If there were, but they were less than one minute apart, then you didn’t brush for a sufficient amount of time. If they were one minute apart or more, then you brushed that night.
The Circuit
Here is a diagram of the circuit we used. The black wire is connected to ground, which is where the electricity goes after flowing from the power source and through the sensor. The red wire is connected to the 5-volt power supply. The sea-green wire is connected to the Analog Pin 3, which is what is reading the output. There is also a resistor, which makes sure that the output current varies over a wide range when we change the weights.
The Process
I did this for an engineering course I took which was made by Mark Rober. He taught us this engineering design process: “Big Robots Pop Footballs.” It is an acronym for Brainstorm, Research, Prototype, Final Build. The first step, brainstorm, involves thinking about scenes related to the prompt. This particular project had to be something to do with habits. It could be making a new one, or breaking an old one, or reinforcing one you already have. Once you have thought of some scenes, think about problems involving those scenes. Finally, you think of solutions to those problems. That didn’t really work with this specific prompt, however, so we just thought of some habits and solutions to make or break them. Once we had come up with something we wanted to do, we had to research. This phase involves looking for parts and doing a few small experiments to help you find out what exactly you need. Once you have completed this and gotten all the parts you need, its time for the prototyping stage. During this stage, you must make a version of your project that hasn’t had the finishing touches put on it yet; it should just be functional. For this project, we didn’t really do a prototype, but we slowly put together the components one by one. First the FSR, then the Raspberry Pi, and finally we wrote the code. However, I did not do this by myself. I looked up a lot of the code in this project, but I made changes to fit it to my needs. The final step, the final build, is your completed project, with all the little finishing touches that you may need.
Thank you for reading this, I hope this inspires you to make cool stuff of your own!
– Abhishek
How much $ for it? (It’s VERY cool)
Can I have one (better give me a discount cause I worked on it too)
This is the only one there is