Citizen Science Badge

Photo of sai-yamanoor

Made by sai-yamanoor

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: BoschRaspberry PiEdge ImpulseJLCPCBBlues Wireless

Estimated time: 1 hour

License: MIT license (MIT)

Items used in this project

Hardware components

JLCPCB PCB JLCPCB PCB x 1
ICS-41350 ICS-41350 x 1
Bosch BMI270 Bosch BMI270 x 1
Bosch BME688 Bosch BME688 x 1
Raspberry Pi RP2040 Raspberry Pi RP2040 x 1
Blues Wireless Notecard (Cellular) Blues Wireless Notecard (Cellular) x 1

Software apps and online services

Arduino IDE Arduino IDE The code can be compiled in Arduino or the Pico C SDK
Blues Wireless Notehub.io Blues Wireless Notehub.io
Edge Impulse Studio Edge Impulse Studio

Hand tools and fabrication machines

Raspberry Pi Pico C/C++ SDK Raspberry Pi Pico C/C++ SDK x 1

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

Front and Back sides of the badge

Motivation

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).

Image Source: airnow.gov

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 Description

The image below shows the major components of the badge. They are as follows:

Components of the Badge

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

Front side of the badge

Edge Impulse project

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.

Proof of concept

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.

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)

Snapshot of Air Quality Index (AQI)

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.

Spare the Air alert

Spare the Air alert

Spare the Air alert

Next Steps

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

Schematics, diagrams and documents

Pico Badge Schematic

Badge Repo

CAD, enclosures and custom parts

Gerber files

Go to download

Code

Github

Credits

Leave your feedback...