Skip to the content
2 layers154.7 × 125.7 mmLed matrix, the printed circuit board in 3D

Graphics driver & hardware design for a custom-built display that shows streamed music artwork.

Size
154.7 × 125.7 mm
Copper layers
2
Thickness
1.6 mm
Parts
160
Nets
141
Pads
644
Tracks, vias
716, 15
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
1 Aug 2026
Updated
22 Oct 2026

Overview

Led matrix is an open-source printed circuit board by farazaleboyeh, from the farazaleboyeh/led-matrix repository on GitHub. It is a 2-layer board of 154.7 × 125.7 mm with 160 parts on 141 nets, routed with 716 tracks and 15 vias.

It is built around the 74HC595. Its parts include 100 diodes, 10 transistors, 5 ICs and 3 connectors. It belongs with the lEDs and displays boards and the ESP32 boards of this library.

Main components

1

README

README.md

Custom-Built Music Display

Goal

The purpose of this project has been to extend my skills as a hardware engineer, specifically in regards to the development of embedded systems. Thus, I challenged myself to build a complete system from scratch that encompasses the entire development lifecycle. From schematic design and PCB layout in KiCad, to writing the C++ firmware for Wi-Fi networking, memory management, & custom LED multiplexing.

Overview

Repository includes the firmwmare used to show the artwork of a currently streaming song from Spotify onto a custom-built 10x10 display, as well as all primary KiCad project files used to design the system itself. Some examples images of the display in its most recent state are available below.

Example Image 1
Example 1, raw LEDs exposed.
Example Image 2
Example 2, raw LEDs exposed.
Example Image 3
Example 3, makeshift diffuser overlayed.
Example Image 4
Example 4, makeshift diffuser overlayed.

The system works by first calling Spotify's APIs to fetch all data regarding the user's playing music. From the given information, a link to the album art is then used to store all JPEG data (as a stream of bytes) to an internal buffer. The TJpg Decoder library is used to decode the buffer as RGB565 data (locally), which perpetually reaches out to a separate callback function, which converts again to RGB888 and also writes to the display's back framebuffer. When the front and back framebuffers are swapped, a continuously firing interrupt displays the artwork by streaming the bitplanes (sequentially by time slice and physical row), to the display's shift registers.

Hardware

Comprehensive Component List

  • 100 RGB LEDs, multiplexed
  • 10 100Ω, 10 150Ω, 10 220Ω, & 10 1kΩ resistors
  • 5 (74HC595) shift registers, daisy-chained.
  • 10 PNP BJTs
  • An ESP32-S3, development board
  • A USB-C breakout board

Core Physical Functionality

The display is driven by an ESP32 microcontroller, which is responsible for streaming color data to the chained shift registers, among other tasks. Transistors are present along all rows which act as high-side power switches between the main power rail and the shared anodes, so that the (output-limited) shift registers are not solely responsible for driving entire rows themselves. 1kΩ current-limiting resistors are present along rows to protect the shift registers and LEDs from overheating & overcurrent, with per-color resistors along each column to finely tune color output (100Ω for red columns, 150Ω, green, & 220Ω blue). Images of the schematic, PCB design, & soldered board are all shown below for reference.

Image of KiCad Schematic
Schematic diagram, designed in KiCad.

Image of KiCad PCB Layout
PCB layout, designed in KiCad.

Image of Soldered PCB
Soldered PCB, note that the breakout is still missing the screws and washers necessary for securing it to the board but is otherwise complete.

Firmware

Core Logical Functionality

Image of UML Sequence Diagram
UML sequence diagram, complete program flow.

API Access

The basis of the project lies in interfacing with Spotify's APIs to receieve user data regarding their currently playing music. Every time the program begins running, and after a successful Wi-Fi connection is established, one of the first tasks to run is the retrieval of a new Access Token from Spotify's servers. As per the Spotify's requirements, Access Tokens are inherently ephemeral, expiring automatically every 3600 seconds (1 hour) regardless of scope. Thus, a function runs every 55 minutes to renew the Activation Token automatically, ensuring the display can be used for extended periods of time.

There is not currently, however, any avenue for renewing the Refresh Tokens automatically at the time of writing. Given they expire every 4 months, an implementation for such was not listed as high-enough priority but is in the works.

Interrupt-Driven Binary Code Modulation (BCM)

Instead of standard PWM, which would demand an unsustainable 2,550 SPI updates per frame (10 rows x 255 steps) and cause severe CPU starvation, the driver implements Binary Code Modulation via the microcontroller's hardware timer. By shifting only 8 exponentially weighted bitplanes per row (5µs, 10µs, 20µs, etc.), BCM slashes bus traffic by 97% to just 80 updates per frame, reconstructing full 8-bit color depth through visual persistence while leaving the CPU free for WiFi and JPEG decoding.

Double Buffering

To prevent screen tearing during WiFi fetches or JPEG decoding: Operations draw to a back framebuffer (draw_buffer), display.swap() unpacks the back buffer into physical bitplanes (bitplanes[10][8][5]), & the ISR (on_timer) exclusively reads from the active bitplanes.

Progress

A list of the main tasks in progress for this project:

  • Upscaling the 8x8 artwork to 10x10
  • Implementing animated song transitions
  • Designing and 3D printing an enlosure and diffuser

A non-exhaustive list of ideas for future iterations of this project:

  • LEDs & all other display hardware sitting on separate PCBs
  • Playback controls (buttons, or other sensors for touchless playback)
  • Transition firmware from Arduino framework to ESP-IDF with FreeRTOS

Parts

160
QtyValueFootprintReferences
100LED_RGBALED_THT:LED_D5.0mm-4_RGB_Wide_PinsD1, D2, D10, D11, D12, D13, D14, D15, D16, D17, D18, D19, D20, D21, D22, D100 +84
40RResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR-C1, R-C2, R-C3, R-C4, R-C5, R-C6, R-C7, R-C8, R-C9, R-C10, R1, R10, R11, R12, R13, R14 +24
9Q_PNP_BCEPackage_TO_SOT_THT:TO-92_Inline_WideQ1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, Q9
574HC595SN74HC595N hi:DIP794W45P254L1969H508Q16U1, U2, U3, U4, U5
2Conn_01x22Connector_PinSocket_2.54mm:PinSocket_1x22_P2.54mm_VerticalJ1, J2
1Conn_01x08Connector_PinSocket_2.54mm:PinSocket_1x08_P2.54mm_VerticalJ3
1Q_PNP_EBCPackage_TO_SOT_THT:TO-92_Inline_WideQ10

The 158 most common of 160 parts.

Similar boards

  • 2 layers45.7 × 31.8 mmLEDx16 board, the printed circuit board in 3D

    LEDx16 board

    tardate/LittleArduinoProjects

    a collection of "Little Electronic & Arduino Projects", most involving electronics or an Arduino in one way or another!

    36 parts803MIT
  • 2 layers228.6 × 100 mmMongus48, the printed circuit board in 3D

    Mongus48

    ChrisChrisLoLo/beyblock20

    The magnetic, modular, 20-key macropad that can join together to form an ortholinear board

    124 parts335GPL-3.0
  • 2 layers245.1 × 160 mm8-Bit CPU 32k, the printed circuit board in 3D

    8-Bit CPU 32k

    slu4coder/Minimal-64x4-Home-Computer

    My DIY TTL home computer with VGA and PS/2 and 4x the processing power of a Commodore C64 or Apple II.

    139 parts326
  • 2 layers100 × 95.1 mmProtoboard-6x4-breakout, the printed circuit board in 3D

    Protoboard-6x4-breakout

    electroniceel/protoboard

    Advanced protoboard layout with 1.27mm pitch for smd parts

    4,745 parts311CC-BY-4.0
  • 4 layers140 × 100 mmDc usv, the printed circuit board in 3D

    Dc usv

    TobleMiner/DC-UPS

    A small DC UPS, designed to keep small appliances like consumer network equipment running during power outages

    351 parts223CERN-OHL-P-2.0
  • 2 layers100.5 × 218.3 mmTraktorino, the printed circuit board in 3D

    Traktorino

    silveirago/traktorino

    The open-source DIY MIDI Controller for DJs.

    96 parts220
  • 2 layers287.8 × 126.7 mmNoName, the printed circuit board in 3D

    NoName

    AlaaSaadAbdo/battoota

    Keyboards

    267 parts188
  • 2 layers100 × 100 mmTommyPROM32-595, the printed circuit board in 3D

    TommyPROM32-595

    TomNisbet/TommyPROM

    Simple Arduino-based EEPROM programmer

    36 parts187

Questions

How big is the Led matrix PCB?

It measures 154.7 × 125.7 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Led matrix use?

160 parts, built around the 74HC595. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Led matrix KiCad files?

From the farazaleboyeh/led-matrix repository on GitHub, at the commit this page was made from: the board is hardware/led-matrix.kicad_pcb and its schematic hardware/led-matrix.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Led matrix design in my own project?

Its repository states no licence, so its author keeps all rights: ask farazaleboyeh before reusing the design.