Skip to main content
Version: FILS English

OxiNMP

A visualiser of your voice and a game where you can also use your voice as a controller

info

Author: Khalghamouz Ali-Nicolas
GitHub Project Link: https://github.com/UPB-PMRust-Students/fils-project-2026-K-Nicolas-10

Description

My project's purpose is to use my voice to control different stuff. My first Idea was a waveform analyzer, but then as I procrastinated (like everyone, on short-form content) I came across another one of those type of filter-game videos( the one with flappy birds controlled by your voice), so.... another state to my loop was added: FlappyApp!

Motivation

Choosing this project was because of a mix of my interest in mathematics, signals and wanting to learn DMA (used for audio input/output and SPI, leaving the processor more power to render the states of the display) more in-depth.

Architecture

  • INMP441 Module: It sends clean digital audio arryas straight to the STM32 via I2S
  • STM32U545REQ: Provides the User Button, computing power, and a (quite helpful for my waveform analyzer) FPU for my project.
  • SPI TFT LCD Display: Chose an SPI screen over a I2C screen because it handles video better than I2C. I2C is too slow for smooth video.

Architecture Diagram

Log

The 3 Week Sprint (week 12,13,14)

Disclaimer: This project was partailly changed as you probably saw (previously, a DSP and sound visualiser) because of my AMAZING soldering skills and AMAZING electronics knowledge (I burnt my first DAC and couldn't get the 2nd one to work properly...) I suspected many things, including low impedance headphones, but none of my fixes quite worked and reached a good conclusion. So I did what an engineer would and found another way to use the components I already had in Week 2

Week I

This week was a week of just learning stuff, understanding and, well headaches with the clock tree diagram from the official stm datasheet... I needed to understand the MSIS and Master Clock and PLL math so I can run my board at 160Mhz for the purpose of running the Screen at a smoother 20Mhz. I configured the PLL by the end of the week, set up the Mic and read a lot about buffers (ring buffers, DMA)

Week II

Week 2 I thought about my project (this was the week where I realised I couldn't possibly get my DAC work and I tried a lot of DMA fixes and everything I could find online...) After pivoting to this Visualiser and Game Idea I mapped out a state machine and how the display would work and the game logic for optimizing SPI so It doesn't run at 2 frames per second. I thought about how the pipes of the game would appear/dissapear so I don't update the display at every game event(moving forward, pipes appearing on-screen, dying, etc)

Week III

Final week(this was a packed week): Added DC Cut Off filter. Layered out my files and directories to be easy to access and read. Soldered everything together on a perfboard again and actually got better audio. Added game logic and Visualiser logic (optimized for the SPI display). Final polishes and good luck to me!

Hardware

Microcontroller: STM32U545RE Nucleo (Core logic + User Button)

Input: INMP441 I2S Microphone (Captures audio)

Display: SPI TFT LCD (Shows States: Menu -> Flappy -> Visualiser)

First Iteration (MVP):

hardware_phase_one

My amazing Soldering Skills(failed attempt):

hardware_phase_two

My final iteration of this project's hardware

I used a star point for 3V3 and GND. I tried keeping wires as short as possible (4-10cm) because of the SPI and I2S connection as these can be really skewed from the electromagnetic fields generated by the current (wires act as antennas). I could have also soldered a capacitor between 3V3 and GND but didn't have any at my disposal and the electrical noise was quite manageable, so I was satisfied.

hardware_phase_three

hardware_phase_three

hardware_phase_three

Schematics

KiCad Schematic

Bill of Materials

DeviceUsagePrice
STM32 Nucleo-U545REThe microcontrollerBorrowed
INMP441 I2S MicrophoneCaptures ambient audio digitally via I2S, bypassing analog ADC noise.21 RON
ILI9341 3.2" TFT LCD TouchscreenDisplays UI, audio visualizations, and status information; touch input via SPI.84 RON
Starting Electronics KitContains Miscellaneous components like resistors,breadboard,etc51 RON

Software

LibraryDescriptionUsage
embassy-stm32Hardware Abstraction Layer (HAL) for STM32 microcontrollersAsync Embassy framework for STM32 peripherals
embassy-executorLightweight no_std async executorTask scheduling and execution on embedded systems
embassy-syncSynchronization primitives for EmbassySignals, channels, and mutexes between async tasks
embassy-timeTimekeeping and timer utilitiesDelays, timeouts, and periodic timers
embassy-futuresFuture extensions and utilitiesCombining and managing async futures
embassy-embedded-halBridge between Embassy and embedded-hal traitsCompatibility with standard embedded-hal drivers
embedded-graphics2D graphics library for embedded systemsDrawing primitives, text, and shapes on displays
mipidsiDisplay driver framework for MIPI DSI/SPI displaysDriving the ILI9341 screen
heaplessStack-allocated data structuresStrings and Vecs without dynamic memory allocation
defmt & defmt-rttEfficient deferred formatting frameworkLogging over RTT during development
cortex-m & cortex-m-rtLow-level Cortex-M hardware access and startup runtimeCore ARM peripheral access and boot initialization
panic-probePanic handler for defmt and probe-runPrinting panic messages and exiting cleanly
static_cellSafe lock-free static variable initializationInitializing DMA buffers and drivers as statics
embedded-hal-busUtilities for sharing SPI/I2C busesSafely sharing buses among multiple devices
cortex-m-semihostingSemihosting support for Cortex-MDebug I/O via the debug probe connection
  1. The best channel ever
  2. The I2S implementation that made me understand
  3. Embassy-rs Official Book
  4. STM32 NUCLEO-U545RE Board Documentation
  5. INMP441 I2S Digital Microphone Official Datasheet
  6. Adafruit UDA1334A I2S DAC Guide
  7. embedded-graphics Rust Crate Documentation
  8. mipidsi Rust Crate Documentation
  9. STM32U5 Series Reference Manual