Citizen Science Badge
About the project
This badge enables automated data collection using a microphone to collect data, and upload it using a cellular module.
Project info
Difficulty: Moderate
Platforms: Bosch, Raspberry Pi, Edge Impulse, JLCPCB, Blues Wireless
Estimated time: 1 hour
License: MIT license (MIT)
Items used in this project
Hardware components
Software apps and online services
Story
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.
Front and Back sides of the badge
Front and Back sides of the badge
MotivationThe 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).
Image Source: airnow.gov
Image Source: airnow.gov
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 DescriptionThe image below shows the major components of the badge. They are as follows:
Components of the Badge
Components of the Badge
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.
Front side of the badge
Front side of the badge
Edge Impulse projectThe 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 PerformanceThe model definitely needs some improvement. Here is a video where it detects coffee machine sounds and engine noise.
Proof of conceptBlues Wireless ModuleWhen 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.
I followed the tutorial from Blues Wireless to route data from Notehub to Thingspeak.
Snapshot of Air Quality Index (AQI)
Snapshot of Air Quality Index (AQI)
The AQI trend is available from here.
Spare The Air alertsIf 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.
Spare the Air alert
Spare the Air alert
Next StepsI 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
Leave your feedback...