About Services Tools Blog Contact us

Live Spectrum on an LED Matrix

A Raspberry Pi Pico listens to sound and shows six frequency bands as columns on a 5 by 5 Pimoroni colour LED grid, with no computer attached.

  • Audio Analysis
  • Cross-sector
  • Hardware
  • Bespoke
  • Local/private
  • 2025

The problem

A desk toy or badge needs a sound display that reacts at once. Sending the audio to a computer first adds a cable and a delay. It also adds one more part that can fail.

What it does

The Pico reads the sound input using a built-in hardware channel, so listening carries on while the display updates. It reduces the sound to six band levels, and each level lights one column of the grid from green through amber to red. The script exists and prints a message when it starts.

Outcomes

  • The sound display runs on the Pico alone, with no host computer.
  • Each of six columns shows its band level at a glance.
  • The grid keeps updating while the Pico is still listening.

Simplified mockup

Interactive preview with sample data. Nothing is sent to a server.

Matrix

Sample ready
BassLowMidHighAir

000000

Six-band hex from the sweep. The matrix draws the first five. Brilliance stays on the bars.

tone-sweep.mp3 · 50 Hz to 16 kHz · 24 s

Green at the foot of a column, amber in the middle, red at the top. Level scales the file into the analyser.

Six bands

Bass50–200 Hz0
Low-mid200–800 Hz0
Mid800–2.5k Hz0
High-mid2.5k–5k Hz0
Presence5k–10k Hz0
Brilliance10k–20k Hz0

Brilliance is the sixth character. It is not given a column on the 5 by 5 matrix. Bars stay at zero until the sweep plays.

Hex log

Device log

The three earlier lines are a sample log. Capture copies the hex the sweep is drawing.

TimeSix bandsShape
22:00:523a5c08Mixed room
22:01:06c84010Low hit
22:01:18246831Quiet speech

On the device

Converter
16 kHz
Capture
DMA
Bands
6
Matrix
5×5
Analogue input

Sampling the onboard microphone. The host computer is not in the loop.

How it works

  1. Set up the sound input and the hardware channel for a steady stream of samples.
  2. Reduce the sound to six band levels.
  3. Map each band to a column on the 5 by 5 grid.
  4. Colour each column by level, from green through amber to red.
  5. Refresh the grid and repeat.

Pipeline

flowchart LR
  Adc[Analogue input] --> Dma[Sample buffer]
  Dma --> Fft[Band levels]
  Fft --> Cols[Matrix columns]
  Cols --> Colour[Level colours]
  Colour --> Led[LED refresh]

Sample output

Synthesised tone sweep from 50 Hz to 16 kHz. The matrix follows this file.