Skip to main content
Version: FILS English

Noise-Triggered Visual Alert

info

Author: Stergarel Teodora
GitHub Project Link: https://github.com/UPB-PMRust-Students/project-teodora-stergarel

Description

This project is an assistive device targeted towards deaf or hard-of-hearing users. It uses a microphone to detect specific keywords ("Hello”, "Attention”, "Help") and displays them on an OLED screen. Additionally, the system uses the OLED display to alert the user of loud noises detected in the vicinity and an LED strip to monitor the ambient noise level.

Motivation

Many deaf or hard-of-hearing users are unable to detect environmental alerts that hearing people take for granted.
This project aims to provide an accessible, real-time visual alert system that reacts to loud sounds and certain spoken keywords, increasing safety and awareness in everyday environments.

Architecture

  • Keyword Detection Module: reads audio from the MEMS microphone via I2S, processes it to identify key phrases.
  • Noise Monitoring Task: constantly samples ambient noise and detects peaks using RMS/thresholding.
  • Display Task: uses ssd1306 and embedded-graphics to show alerts and keyword matches on OLED.
  • LED Strip Controller: visualizes ambient noise levels in real-time using a WS2812 LED strip.
  • Control Logic: activated via a physical button, and manages task coordination.

Log

Week 5 - 11 May

In the first week, I focused on thoroughly researching the project idea. I explored different options for implementing a visual noise alert system and evaluated the necessary hardware. I compared different microphones, displays, and microcontrollers to ensure compatibility with Rust and the RP2040 platform. After finalizing the hardware design, I placed the component orders and started drafting the documentation. I created the initial project page, describing the purpose, architecture, and goals of the system.

Week 12 - 18 May

This week, the hardware components arrived, and I got the headers to the two Raspberry Pi Pico 2W boards soldered - one designated as the main board and the other as a debugger. I encountered challenges in setting up the debug probe correctly but resolved them by following the probe-rs documentation and ensuring the correct GND/VCC wiring between boards. I proceeded to wire all the components onto the breadboard, carefully verifying connections for the microphone, button, display, and logic level shifter. I also designed and completed a detailed schematic in KiCad, which reflects the real wiring. Finally, I tested each component individually - confirming that the button and OLED display functioned - and determined that the OLED required a level shifter for stable operation.

Week 19 - 25 May

This week, I wrote the embedded Rust logic to read analog values from the DUFAFF microphone using the embassy_rp::adc driver on the main Pico board. I implemented a polling loop that samples the ADC and maps the amplitude to LED color states (green/yellow/red) based on tunable thresholds. For sudden peaks, I trigger an OLED message using the ssd1306 crate over I2C, displaying "loud noise detected". The logic is gated by a push button using an async task with embassy_time::Timer and embassy_sync::signal::Signal for coordination. I am currently working on the implementation of keyword detection ("hello", "attention", "sorry").

Hardware

1: 2:

The project is built around the Raspberry Pi Pico W microcontroller and integrates the following components:

  • INMP441 MEMS Microphone (I2S): Used to detect ambient sounds and recognize keywords like “Hello”, “Attention”, and “Help”.
  • SSD1306 OLED Display (0.96", I2C): Displays alerts and recognized keywords in real time.
  • WS2812 LED Strip: Provides a visual representation of ambient noise intensity.
  • Push Button: Used to activate or reset listening mode.
  • Logic Level Converter: Ensures voltage compatibility between the Pico and the 5V LED strip.
  • Capacitor (1000μF, 25V): Used for LED power stabilization.
  • Wires and Breadboard: For prototyping and connecting components.

Schematics

Below is the schematics of the device:

Project Schematics:

KiCad Schematics:

KiCad Schematics:

Bill of Materials

DeviceUsagePrice
Raspberry Pi Pico WThe microcontroller35 RON
Modul microfon omnidirectionalThe microphone20 RON
Ecran OLEDThe display19 RON
Modul LEDThe LEDs3 RON
[Convertor de nivel logic](https://www.optimusdigital.ro/ro/interfata-convertoare-de-niveluri/12562-convertor-de-nivel-logic-cu-2-canale-33v-5v-ttl.html
)The logic convertor for the microphone3 RON

Software

LibraryDescriptionUsage
ssd1306Display driver for SSD1306 OLED displaysUsed to control the 0.96" I2C OLED screen
embedded-graphics2D graphics library for embedded systemsUsed to render text, symbols and visuals on the display
embassyAsync runtime for embedded RustManages non-blocking tasks for I2S, display, button, etc.
micromathMath functionsUsed to calculate pitch/roll from accelerometer data
embedded-halHardware abstraction layer for microcontrollersBase traits used by drivers like ssd1306 and I2S mic
rp-picoSupport crate for Raspberry Pi PicoProvides HAL and board pin mappings
i2sI2S audio supportReads audio data from the MEMS INMP441 microphone