Heart of the device is the STM32L072CBTx microcontroller. The SPI interface is used to communicate with the SD card. For sending data to LEDs the second SPI is used but in I2S mode. Individual bits of the WS2812 protocol are encoded into SPI bytes (2 bits per one byte). The use of I2S mode allows continuous bitstream transmission – no gaps between bytes. The microcontroller operates on 3.3v but LEDs require +5v. Therefore there is a logic level converter on the output of the second SPI which controls LEDs.

Format of the sequence file is pretty straightforward:

@25
0:RRGGBBRRGGBBRRGGBB
0:RRGGBBRRGGBBRRGGBB

The “@25” means that the sequence should be played at 25Hz. Each line that begins with “0:” defines one “frame” of the sequence to be played. After “:” there must be exactly 6 hex chars per LED which define its color. The sequence is always played in loop.

The
firmware looks for files that end on “.seq” in the root folder of
the SD card. The card must be formatted to FAT32. For file system I/O
the FatFs library is used
(http://elm-chan.org/fsw/ff/00index_e.html).

The current firmware allows to control up to 512 LEDs (haven’t tested that many). It a matter of memory size and processing power to parse the text stream, buffer it and output to LEDs at reasonable frame rate.

Source
code of the firmware is available in SourceCode.zip. Compilation
requires arm-none-eabi toolchain, the makefile is made for Linux. For
lazy ones that do not wish to compile it there are binaries in
Binaries.zip.

The PCB
project was made in KiCad 5.0. See the KicadProject.zip file.

Enjoy :-)