Initial Proposition
The initial proposition was this: When you clap, the holder thing ejects the toothbrush (using a fly wheel that the toothbrush sits on) and starts a timer on an LCD display. A limit switch then detects when the toothbrush is put back in and stops the timer. The LCD display stops at your time for a few seconds then the whole thing goes back to waiting for a clap. The clap has a photo-transistor so it only works when the bathroom light is on and wont shoot my toothbrush randomly.
I succeeded in every realm of this and more. Although some parts were changed, such as the photo-transistor being swapped for a photo-resistor, everything remained the same. I did additionally make a nice encasing for the project and add a relay to power the motor.
This project was made just because I thought it would be funny. Unless you really have a problem picking up a toothbrush and not brushing your teeth for long enough so much so that it requires a stopwatch, there's no actual practical use for this project. But its funny; so there's that.
[logic map]
Successes & ChallengesTwo of the easier things were wiring and controlling the LCD display and the circuitry. It was pretty straight forward how to program the display once I got a hold of the ADA-FRUIT library and documentation. Additionally, the whole concept and wiring generally came to me pretty quickly. There were no problems I hadn't for seen in terms of the circuitry and overall design of the project.
Two of the harder things were testing and designing the structure as well as calibrating the sound sensor. The structure was hard due to the smaller DC motor and wheel I was using and not being able to push that much current through it. I did some simple physics (ignoring a lot of imaginary things like air resistance) to find the optimal launch angle for my toothbrush as 51 degrees above the counter.
However when I built the initial structure at this angle, the motor was unable to get enough grip on the toothbrush to launch it. If I put a spring loaded thing on top to increase the normal force on the motor, the friction was now too much and the motor wouldn't spin.
To fix this without doing a complete overhaul, I decided the best way to eject the toothbrush would be to make the launch tube horizontal and have the toothbrush kinda flop out rather than shoot. With that, it gets ~3 feet off my counter before hitting the ground. This turned out to be plenty of time for me to catch it.
Wiring the motor was also no simple task. It needed more than the 3.3V pins could supply and its also ill-advised to connect a motor directly to the micro controller due to power spikes on startup. To f this, I added a whole relay module connected to the vUSB (5V in this case) so the motor could get the voltage it needed. See circuit diagram.
Calibrating the sound sensor was also a problem. It was super unreliable at detecting my clap. I couldn't get the sensitivity correct, especially if the average environment sound varied, or the time between reads correct. In the end, I came up with a clever way to average the sound sensor as a digital calibration.
int averageAmbientSound(){
int sum = 0;
for (int i = 0; i < 100; i++){
Particle.process();
sum += analogRead(A1);
delay(10);
}
return sum / 100;
}This returns an int of the average recorded sound.
ConclusionIn sum, this project wasnt terribly hard. It was a fun one with some smaller difficulties that I had to overcome, but I never hit a true roadblock. To improve upon this project, I would primarily get a bigger motor and a better motor controller. The current relay system works, but is janky and needs to be upgraded. Also, having a motor that can shoot the toothbrush a more meaningful distance as well as survive a little extra normal force to keep the toothbrush down is desperately needed. Overall, I'm happy how this turned out but there could always be some improvements.
Here's the final thing in all its glory:















Comments