The other day, I was talking with Jay about tracking street noise. I thought it would be neat to record a video of the street for however many hours and giving it away to anyone who wanted to extract data from it. Taxi frequency, direction of pedestrians, or noise level, for example. I mentioned how the noise from the street was impacting my sleeping, Jay said something about tracking sound, and at that moment, voilà! An idea was born.
Tracking the sound of the street below and relating it to my sleep habits is applicable to two separate classes. Our lab in Physical Computing this week is to send the output from a sensor into the computer via the serial port. Having this raw data on the desktop will open us up to all sorts of cool data visualization and analysis. Very cool. Complementing that is DIY Health, where one of the topics we’ve covered is the Quantified Self (QS) movement. QS defines itself as “a collaboration of users and tool makers who share an interest in self knowledge through self-tracking.” Also very cool. So if I could track the sound and compare it to my personal experience sleeping… you see where I’m going with this?
Fast-forward to this afternoon, when I picked up an electret microphone from my local electronic parts supplier. I had also come across this StackExchange post about how an electret mic needs to be amplified before its signal gets sent into the Arduino. The chosen answer contains this schematic:
It uses an operational amplifier, or “opamp,” which I had heard of but never actually used. It amplifies the relatively small voltage output of the electret 100x (see this Talking Electronics post for a good explanation with some neat animated gifs). After I set everything up on my breadboard to confirm it all worked, I hit the PCB and I am now the proud owner of…
You can see it’s precariously inserted into my Arduino and this will soon to change. Knocking it can cause the absolute mess of wire that is the non-pictured side to throw things way off. But don’t touch it, and it works. It sends its raw data to Processing via
Serial.write() and is pretty good at picking up noise pollution when I place it by my window. Below, three images. 1) the baseline, “normal street noise” reading, 2) a truck barreling down the street, and 3) the dreaded taxi honk.
Here’s what I hope for this project. I would love to collect 24 hours of data to track honks, trucks, people yelling, construction etc., and use it to create a “portrait” of this particular intersection. I could track sound overnight and couple it with data from Sleep Cycle to see if there is any correlation between outside noise and disturbances in my sleep. I could film the traffic light and combine it with the sound data to could calculate the average driver’s response time between a light turning green and them honking. Lots more to explore!