My neighbors have had some construction going on recently and consequently it comes with noise right outside my window. I wanted to see how this sound carried over time so that I could plan ahead and make sure to find somewhere else to work without interruption.Big Sound Sensor
For the purposes of this project, I planned to collect data through the analog pin because the analog values would be best for recording real-time data.Circuit
I started off by connecting the Big Sound sensor to the Particle Argon.
"A0" on the sensor is connected row 12, corresponding to "A0" on the Particle Argon.
"G" on the sensor is connected to row 11 on my breadboard which corresponds to "GND" on the Particle Argon.
"+" on the sensor is connected row 14 on my breadboard which correlates to the "USB" pin on the Particle Argon.
"D0" on the sensor is connected to row 20, corresponding to "D3" on the Particle Argon.
I also made sure to use a screwdriver to adjust the sensitivity of the sensor (by twisting the little screw on top of the blue box in the image) so that LED2 would remain off until the sensor detected sound.
CoolTerm is a free serial port terminal application available at https://freeware.the-meiers.org/ thanks to Roger Meier. It's simple to use and quick to set up (just make sure that the right port shows up for your device).
I used CoolTerm to monitor the analog values coming in from the Big Sound sensor.
To test that the sensor was picking up different values, I played "Dancing with Myself" on my phone, and placed it near the sensor.
Then I stored them as a text file, and later opened the file as an Excel sheet in order to plot a line graph to show any noticeable trends.
Now that I knew the device seemed to be working well with the serial monitor, I flashed my code in the Particle IDE again and placed the Argon and sensor near my open window for a few hours so it could capture the construction sounds outside on CoolTerm.
After doing so, I repeated the process of saving the data from CoolTerm as a text file and plotting a graph with the data in excel.
By plotting a line graph, I was able to see there was a much greater range of sound at the beginning of the day, compared to later in the afternoon, which prompts me to make sure to expect a lot of sound early on. This way I know I can come back to my room in the afternoon and not have as much distraction while I'm working.Viewing Analog Values in Google Sheets
Much like CoolTerm, Google Sheets can be used to view real-time analog values coming in from the Big Sensor. Thanks to CoolTerm, I was able to store data locally through my computer. However, I wanted to try storing data on a google sheet so that it could stay in the cloud.
I was able to do this by appending my code to include sections that would trigger a webhook integration in the Particle environment. This integration would help me "push" the analog values from the sensor into a blank google sheets file I made.
Once values trickled in, I once again made another line graph in order to visualize the data more clearly.
As stated earlier, using this data I can see when sound is loudest outside my window by looking at the fluctuations picked up by the sensor, so I know when to move. Now I can visualize this data using a serial monitor and excel or with google sheets!