Project maintained by mliu6723 Hosted on GitHub Pages — Theme by mattgraham

Cough Detection

This project dealt with using a machine learning model in order to accurately detect coughs and sneezes in the vicinity. Not only is this useful for the current pandemic, but it can also be applied for entertainment purposes. In this project, I modified the original design in order to activate a spray bottle whenever the model hears a sneeze in order to create a 4D viewing experinece.

Engineer School Area of interest Grade
Max Cupertino High School Computer Science Incoming Senior

Headstone Image

Demo Presentation

Demo Video


One of my largest weaknesses in doing this project was that I was scared to fully commit to an idea. The idea of hot gluing or duct taping something down seemed permanent but I was scared to do so as if that idea failed, then it would be extremely difficult to take apart the project. Over the course of bluestamp, however, I became able to overcome this weakness and recognize that I had to fully commit to an idea, even if it was not perfect, to properly test it.

Final Milestone

My third milestone involved modifying my original project. The base of my project was simply being able to detect coughing which I had already accomplished. However, in addition, I wanted to attach the arduino to a spray bottle in order to create a 4D Movie viewing experience. For those unfamiliar with 4D, it is essentially where, for example, a character sneezes in a movie, the audience is sprayed with water as well. This modification was the hardest part of my project as my strengths lie in software and not as much hardware. Coming up with a solution using only materials in my home without following a tutorial was a huge challenge and I had countless failed prototypes.

Final milestone

Second Milestone

My second milestone is the application of my machine learning model to the arduino. This required coding on the arduino IDE itself, which was challenging due to the fact that I was not too familiar with arduino specific commands. In this milestone, I also set up the breadboard and made it so that should the arduino detect a cough, it would light up an LED light. I struggled with this a lot at first because I was not very familiar with electrical circuits and electrical engineering, but after researching and also replacing my current arduino, I got the circuit to work and though the cough detection was not 100% accurate, it was still relatively consistent. Click the image below to view an expalantion of this milestone!

Second milestone

First Milestone

For the first week, I needed to not only get an understanding of arduino and the hardware but also start on the software of the project. The machine learning aspect of the project is definitely the most difficult and this week, I have essentially finished training my model. The biggest challenge in doing this is likely finding usable data sets that were most effective in training the model. Often they were either too big or too small and finding one that worked effectively was not easy. However, I ultimately settled on a data set and achieved the first milestone of having a working machine learning model to identify coughs. However, it does not yet identify sneezes well and will be something I need to obtain more data for. Click the image below to view an expalantion of this milestone!

First milestone