Back to Parent

Outcome


Problem Statement:

Since I live alone and have a subwoofer I have a habit of turning my music up. I never know if my neighbors are bothered because they don’t complain. To be kind to them I am designing a warning system that can let me know when I am being too loud  

Goal

I will place a microphone in the hallway and have it send a signal to me when it picks up any sound. This way I can be more aware of when my sound is loud enough to go through walls and adjust it. 

Process

This project was divided into 4 parts: Powering On/Off, Listening and Publishing

Powering on and off - Using a button and an LED I created a switch and indicator light. The switch, since it is a tactile push button, required programming to have an on state and off state. Originally I was going to let the device continually listen and send data until it hit a certain threshold. Understanding that it would not be able to handle that while on battery power I switched my tactics.

I added a button to be press to trigger the  on-state is stored. The LED will also turn on to indicate that the device is sampling. 

Listening -  The microphone is picking up the highest and lowest signals over a 50 millisecond period and subtracting them to figure out the range sound level. It would then compare it to a given sound level to see if it was too loud. 

To find that given sound level I would have run the microphone thorough the serial port to get ambient hallways sound levels. I had trouble doing that because the serial port didn't work with windows. Instead I got an average using the particle.variable output and added just a bit more sound outside of the error range. 

Publishing - Simply put the final part of the device was to use the checked sample data to know when I was being too loud. If the sampled sounds ever exceeded the average I calculated and entered it would publish a too loud event to the particle. Using IFTTT I then had the messages sent to my cell phone.

Reflection

In retrospect this project was pretty easy but a necessity in my apartment complex. I found roadblocks to completion that required new information to fix:

On and Off states: First lesson is if I want to use switches, I will use mechanical switches. Effectively using switch statements were complex "if" statements that would work under some conditions and not others. with some help I was able to find that using the "!=" and currentState variables can help you easily vary the between on and off. 

Sampling: Not having the serial port available can be hard but its not impossible to get around. To get the threshold value for sampling I needed ambient hallway noise. This was impossible to get since I have no internet at home. So I got ambient institute noise. Once I was able to get a good average over 5 quiet minutes I checked the St Dev and added it in.

This project has helped me gain skills in gathering real world data to use in my devices. In the future I'd love it if the device could learn it's surroundings and let me know what an ambient level of noise is.

Show Advanced Options
Turndownforwhat
Show Advanced Options
Show Advanced Options
Drop files here or click to select

You can upload files of up to 20MB using this form.