Citizen Science badge is a multi-sensor PCB meant for citizen science enthusiasts to conduct their own experiments, collect data and upload them to the cloud. In this project, I demonstrate using a microphone to detect common sounds like a coffee machine or an automobile and collect the air quality data.
The image below shows the front and back sides of the badge.
The motivation for this project comes from developing a tool to develop consistency in data collection from citizen science enthusiasts. The data collected can provide valuable information on local air quality. The dial on the PCB is inspired by the Air Quality Index published by the EPA for various regions of the United States (shown in the image below).
The PCB badge automates data collection with the use of microphone to detect known sounds.
Some applications of the PCB include:
- Automating Air Quality data logging using known sounds
- Conducting community science experiments using a combination of sensors.
In this project, the first line item is discussed.Badge Description
The image below shows the major components of the badge. They are as follows:
The components of the badge are listed below according to their corresponding number along with their application. They are:
- Invensense ICS-41350 MEMS Microphone. The audio captured from the microphone is used to detect sound using Edge Impulse
- Raspberry Pi RP2040 microcontroller with 64MB flash.
- Blues Wireless cellular module is used to upload data points to the cloud as well as receive "Save The Air" alerts from the cloud.
- Automotive Gauge Stepper Motor (x27.168) - Used to indicate measured air quality index.
- Bosch BMI270 IMU to detect motion
- DA7280 for haptic feedback
- BME688 air quality sensor to calculate air quality index as well as detect odors
- JST/ Qwiic sensor port for connecting external sensors.
- 3 x AA battery pack
- USB C port for programming.
On the front, there is a dial to point at the source of the sound detected by the microphone and the corresponding air quality detected. There is an RGB LED to provide a warning when the local air quality management authority issues an alert.
The Edge Impulse project is available from here. I used publicly available datasets for three different types of sounds, namely:
- Traffic Sounds
- Coffee Machine / Coffee Shop
- Crowded meeting room
I used Edge Impulse's Arduino Library for deploying the model to classify the detected sound.
When the microphone detects a certain type of sound with certain level of confidence, we spin the dial to indicate the source of the sound. Then, the air quality information is uploaded to the cloud.Model Performance
The model definitely needs some improvement. Here is a video where it detects coffee machine sounds and engine noise.Blues Wireless Module
When a particular sound is detected, we retrieve the air quality index and upload it to the cloud. I used the Blues Wireless module to upload data to Notehub, a cloud solution from Blues Wireless.
The AQI trend is available from here.Spare The Air alerts
If you are a resident of the Bay Area, you might be familiar with "Spare the Air" alerts.
I am currently working on implementing a solution to toggle the RGB LED when the local management authority issues such alerts.
I have identified the following items as technical debt for this project.
- Implementing LED behavior for "Spare the Air" alerts
- The PCB design needs to be revised for low power operation
- The code needs to be re-written using the Pico C SDK