A real-time MP3 player system built on FreeRTOS for the LPC4078F microcontroller. This embedded system integrates file system management, multitasking audio decoding, and interactive user control through a matrix keypad and OLED display—demonstrating complete software and hardware co-design.
To access the project source code, please click here.
- Multi-threaded FreeRTOS task design for audio decoding, UI display, and user control
- VS1053 MP3 Decoder integration via SPI and streaming via I2S
- SD card (FAT32) access for audio files using FatFS
- OLED UI (SSD1306) to show current playback status
- Matrix Keypad input for play/pause, track navigation, and volume adjustment
- Clean modular software architecture with separate responsibilities for each layer
- RTOS: FreeRTOS v8.2.0
- Language: C17 (ISO/IEC 9899:2018)
- CPU: LPC4078F (ARM Cortex-M4)
- Build System: SCons v4.1.0
- File System: FatFS with SPI SD card interface
- Key Libraries:
- OLED Display Driver (I2C, SSD1306)
- MP3 Decoder Driver (SPI, VS1053)
- Keypad Matrix Scanning (GPIO)
- SoC Board: SJTwo Board (SJSU Custom Dev Board)
- MP3 Decoder: Adafruit VS1053 Codec v4
- Display: 128×64 OLED using SSD1306
- Input: 4×4 Matrix Keypad
- Audio Output: 3.5mm headphone jack via VS1053 I2S
The system is broken into several independent FreeRTOS tasks:
- MP3 Playback Task: Streams decoded audio via VS1053
- Display Task: Shows current status (track name, progress)
- User Input Task: Scans matrix keypad for playback control
- File Manager Task: Parses SD card and tracks folder contents
All tasks interact via shared queues and semaphores for thread-safe data exchange.
Final prototype includes fully wired system with keypad input, SD-based MP3 loading, and real-time playback.
- Clone the repository:
git clone https://github.com/CMPE146-MP3-PROJECT/FreeRTOS_MP3_Project.git
- Navigate to the project directory:
cd projects/lpc40xx_freertos - Compile using SCons:
scons
- Flash to SJTwo board and connect peripherals (OLED, VS1053, keypad).
- Insert SD card with MP3 files and enjoy playback.
- Zhaoqin Li — Team Lead, System Architecture
- Collaborators: SJSU CMPE146 Spring 2021 Team
This project is released under the MIT License.


