Project Noiseometer - Noise Pollution Grapher


#1

Project Description

Tired of those guys revving their motorcycles and setting off car alarms outside your window at 6am? Interested to know which nights are noisier than others? Ever wonder how much effect noise pollution has on your life? Noiseometer is a project to setup a network of noise level detectors to allow visualizing noise pollution across a wide area. Think weather underground but for noise pollution. Bring awareness to noise pollution in your area!

This project will use the new Arduino MKR1000 that is natively IoT capable along with the Sparkfun Sound Detector to sense noise level data and send it to a cloud data visualization system.

As part of this project, you will gain the following real world experience:

  • Go deep in all aspects of designing and prototyping an Internet enabled "thing".
  • Take your electronics projects to a new level with professional quality circuit boards.
  • Design and 3D print custom enclosures for your projects.
  • Work with state of the art IoT technologies and "the cloud".

The project build is split into 4 working sessions spread across 5 weeks. Each session will have a specific theme of what we will accomplish that week. Before each session, you should be willing to spend an hour or two watching some youtube videos and/or reading some websites for information about what we will be doing that week. The sessions are designed to be HANDS ON working sessions, actually APPLYING the knowledge that can be learned on your own via the videos and websites. Not watching the videos or reading the documents ahead of time will likely leave you lost during the working session, so please try and do it! Expert makers will be on hand during the working session to answer questions, guide the project and help if you get stuck.

Bill of Materials

This project will be built using the following components:

One prototype will be built during the project build to be hosted at MakerHQ after it is complete. If you would like to build one or more noiseometer devices along with the group build, you can either purchase the items listed above, or we also have a complete kit available for $70 that can be bought at the start of the class. If you would like to buy a kit from us, please send me an email at [email protected] to reserve a kit before the project build starts. Supplies are limited.

The device that is being built can easily be repurposed for other projects. The circuit board created during the project will use sockets to allow the Arduino MKR1000 to be easily added and removed. This allows it to be removed for other projects, if desired.

Software

Participating in this project will require the following software for the various aspects of prototyping. Please install all of the following software before the first project working session.

Project schedule

June 23rd - Session 1 : Electronics

During this session we will design the schematic, layout the PCB board and get the development parts functioning on the breadboard.

Videos to watch / documents to read BEFORE the working session:

July 7th - Session 2 : Software

During this session we will write the firmware that goes on the Arduino to read the sound data and transmit it to the backend system. For the backend system, this project will send the sound data to a free MQTT broker (such as adafruit.io). If after the project build, a team wants to work together to build a custom data visualization web interface, they will be invited to participate in that project. This code will be 100% open source and available to anyone. The goal is to provide a service online that anyone who wants to share their sound data will be able to see all the other sound data from other users in the network.

Videos to watch / documents to read BEFORE the working session:

July 14th - Session 3 : Enclosure

During this session we will design the enclosure for the noiseometer. We will then 3D print your design on the MakerHQ printers.

Videos to watch / documents to read BEFORE the working session:

July 21st - Session 4: Final Assembly

During this session we will do the final project assembly. We will have the PCB boards back from OSH Park and solder headers onto the PCB and create the final electronics assembly, which will then be fitted into the 3D printed enclosure. We will reserve some time for troubleshoot, question/answers and brainstorming of next steps for the project.


#6

I would love it if we could have about a hundred of these operating in midtown, gathering data in real time. We could produce a 3D map of the noise levels in Sacramento over a week, which would be very interesting to a lot of people.
Suppose one person or company produces an outrageous amount of noise at the same place and time on a regular basis. You could have the cops waiting.


#7

Exactly! I envision something like

https://www.wunderground.com/wundermap/

But for noise.


#8

I'm not sure how useful the audio will be if you don't have video footage to go along with it. If these are deployed in a large area you might need special permits to have them in public places. I'm curious if the mic is sensitive enough to pick up audio from more than 10 feet away in wide open outdoor setting. It would be cool to have the ability to send alerts if screams or gun shots are detected.

I would be interested in working on this project to make my own offshoot anti dog barking contraption. I want to send my neighbor an email, text, and phone call every time their yappy dog barks. A daily summary of barks counted would be useful information to alert them about at midnight every day.


#9

Hi @mike, can you put me down for the $70 kit as well ? Thanks.


#10

Ok, got you down for one.


#11

Hey everyone, great meetup last night! Rest assured now that the software on your laptops are all setup, the next meetups will flow a little smoother and we will get more done!

I built a schematic/board layout that should look a lot like the ones you guys did last night. I added some things to the silkscreen layer on the board to make it easier to know which pins do what and mounting holes so we can screw it into the enclosure we will build. I am happy to show how I did this at the next meetup. I also placed an order for the board. They should be here by next meetup.

My files can be found here: https://github.com/makerhqsac/noiseometer

At this point, you should have a functioning arduino board wired to the sound sensor. The next steps are to:

  1. Sign up for an adafruit.io account at https://io.adafruit.com/
  2. Create a new feed called 'noiseometer' from the adafruit dashboard: https://io.adafruit.com/feeds
  3. Download the sample arduino code at https://gist.github.com/machadolab/f8b7ca79441d2b9421bc7e89d7dd962d
  4. Fill in your wifi credentials and adafruit.io username/key in the above code - look carefully as the username goes in a few different places

And if all worked well, you should be seeing data uploaded to your adafruit.io feed!

Feel free to play around with the arduino code, adafruit.io, etc.

Next meetup is July 7th, and we will be digging deeper into MQTT and the adafruit code. Please be sure to watch the videos listed above for this session BEFORE the session!


#12

Hey guys, just a followup from last night.

1 - I was wrong about the ADC value range. Everyone who said 0 - 4095 was right: that is the range for a 12 bit ADC. A 10 bit ADC, such as on an arduino UNO is 0 - 1023.

2 - Regarding converting the ADC value to decibels, Brett was right on. Here is the comment thread from the sound detector link on sparkfun: https://www.sparkfun.com/products/12642#comments-tab

The formula is:

(20 * ( log ( measured_adc / ref_adc ) ) )

The first few comments talk about how to do the conversion. Both require a reference sound though, so we will have to figure that out. But once we have a reference sound, we would basically play that sound and see what the ADC value is. This becomes the ref_adc in the formula above, at the dB output by the calibration device.

So for example, if we play a 90dB tone and it measures 1000 on the adc as a reference. Then we play a louder volume tone and measure 2000 on the adc, to figure this out in dB, it would be

(20 * ( log ( 2000 / 1000 ) ) ) = 6.02 db change

Add 6.02 to the reference 90dB and we know that the louder tone is 96.02 dB.


#13

I missed meeting 2, so I'm behind, but I'm not clear how to get the .ino code running on the Arduino. How's that work?


#14

@freedom_nut - You can find the latest code here: https://github.com/makerhqsac/noiseometer/tree/master/firmware

Basically, make sure you have the MKR1000 board added to your arduino install, make sure to add the wifi101 and MQTT libraries referenced above in the software section. You will also need an adafruit.io account and create a feed called 'noiseometer'. Put your wifi credentials into the above code, as well as replace all occurances of AIO_USER with your adafruit.io key, and AIO_PASS with your adafruit.io token.

Reply back here with specific questions/errors if you have problems.


#15

Hey everyone,

As part of this weeks session, we will be using Fusion 360 to design the enclosure. I have created some basic 3D models for the MKR1000, the sound detector and our circuit board to make designing a dimensionally accurate enclosure easier. If you sign up for autodesk account, which is required to use fusion, I will invite you to the noiseometer project on A360 (their all in one project management dashboard) and you will have access to these models. Just send me a message with your email address either here, on meetup.com or email [email protected].

See you Thursday!


#16

Hi Mike,

I have now added the MKR1000 board to Arduino IDE and added WIFI101 and Adafruit MQTT, but I am getting the following errors when I attempt to upload noiseometer_v1.ino file after adding my wifi and adafruit login info:

C:\Users\dad\Desktop\noiseometer-master\firmware\noiseometer_v1\noiseometer_v1.ino:8:24: fatal error: MQTTClient.h: No such file or directory

#include

                    ^

compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino MKR1000.


#17

@freedom_nut sounds like you might have added the wrong mqtt library. There are several. Make sure to get the by Joel Gaewiler.


#18

I got the correct MQTT library now, thanks, Mike. "Checking wifi..." succeeds, however I'm not able to connect to adafruit successfully. I get "connecting..." and the dots continue to grow. I'm using the following:

Serial.print("\nconnecting...");
while (!client.connect("freedom_nut", "freedom_nut", "CurrentPassword")) {
Serial.print(".");
delay(1000);
}


#19

Make sure to use the adafruit IO token for the password, not your actual adafruit password. You can find your token by going to an adafruit.io dashboard and clicking the yellow key icon.


#20

Up and running now! Thanks, Mike!


#21

I'm successfully uploading data to adafruit.io. I created a dashboard there that graphs out recent data, but I'm wondering how much data adafruit.com will store. I only see data in my feed as old as 3 days, but I've been uploading for over two weeks now. Does anybody know how long adafruit.com stores our data and makes it available?


#22

@freedom_nut - adafruit spells out their data policies here:

https://learn.adafruit.com/adafruit-io/data-policies


#23

Thanks, Mike, I was unsuccessful searching that out myself. This will be important information once I start uploading temperature data and make it available to my home insulation and HVAC contractors.


#24

Hello, @mike

I just found out about this project. I am located a couple hours drive from you. Is this project setup where all I would have to do is build my own devices and then it will tie into your online map data? I really want to start making and deploying these where I live. I have an arduino Uno right now that I haven't really had the time to start learning to use.
It would be great if you are creating a simple instruction guide on the process as you go through this for people late to the game.
Please reach out to me.