Skip to main content

Music Player

This project is a compact music player built with a Raspberry Pi Pico W, using Rust for development. It retrieves songs from a microSD card and outputs them to a speaker.

info

Author: Popescu Mihai-Cristian
GitHub Project Link: https://github.com/UPB-FILS-MA/project-mihaio3

Description

This project showcases a portable music player crafted using a Raspberry Pi Pico W and Rust programming language. It incorporates an SPI-connected microSD module to access songs, delivering crisp audio via a speaker coupled with an amplifier. Music is emitted through PWM modulation, ensuring quality sound reproduction. The user interface is streamlined with push buttons for fundamental functions like song navigation and playback control, complemented by a potentiometer for seamless volume adjustment. An I2C LCD screen provides song title display. Additionally, a series of PWM-controlled LEDs offer a lively visual interpretation of the music's dynamics, synchronizing brightness with the audio output's PWM duty cycle.

Motivation

Constructing a music player using a Raspberry Pi Pico W and Rust presented me with an opportunity to delve into a project tailored to my interests while acquiring essential skills in microcontroller programming and hardware integration. As a music enthusiast, the prospect of merging technology with my passion intrigued me.

Architecture

Architecture

Log

Week 6 - 12 May

Week 7 - 19 May

Week 20 - 26 May

Hardware

Detail in a few words the hardware used.

Bill of Materials

DeviceUsagePrice
Rapspberry Pi Pico WThe microcontroller[35 RON]
1602 LCDLCD Display[16 RON]
AmplifierBoosts audio output[3.99 RON]
ButtonsPlay/Pause and previous/next song[2.16 RON]
Different color ledsVisual representation of the music's intensity[6 RON]
WiresConnects electronic components[13.79 RON]
BreadboardComponent integration[9.98 RON]
PotentiometerAdjust volume[2.36 RON]
SpeakerOutputs the song[4.27 RON]
ResistorsLimits current flow[14.99 RON]
MicroSD Card ModuleReads the song from the microSD[4.39 RON]
CapacitorLow-pass filter(RC)[0.39 RON]

Software

LibraryDescriptionUsage
embedded-sdmmc-rsMicroSD card managementUsed for reading the files from microSD
HD44780-driverLCD display driverUsed for displaying the name of the song playing
  1. How to connect SD Card to Raspberry Pi Pico using SPI
  2. How to use the LCD using I2C
  3. Check and search for dependecies: 1, 2
  4. Example of how to play music using PWM
  5. Audio output circuit example