Skip to main content
Version: FILS English

Music Player

A device that plays, stops and skips music.

info

Author: Dragan Delia-Alexa
GitHub Project Link: https://github.com/UPB-PMRust-Students/project-ddeliaffelia

Description

Simple, compact music player built using a Raspberry Pi Pico W, programmed in Rust. It will allow users to play, pause, and skip songs stored on an SD card through a speaker, whose volume can be controlled using a potentiometer. The LCD display is meant to show the playing song's title.

Motivation

I tried to find a project idea that fits my interests and that I could enjoy working on. I have been passionate about music since I was little, and I can still recall the day my parents bought me a music player just like my brother's. Besides, I find it quite fun to work on a hardware project like this one.

Architecture

Raspberry Pi Pico 2W:

  • the centre of the project, controls all the other components
  • connections: SPI - SD card module, ADC - potentiometer, PWM - buttons, amplifier, I2C - LCD

LCD:

  • displays the name of the song
  • connections: I2C - microcontroller

Amplifier:

  • increases the quality and strength of the sound
  • connections: through wires - speaker, PWM - microcontroller

Speaker:

  • emmits the music
  • connections: through wires - amplifier

Potentiometer:

  • increases or decreases the volume
  • connections: ADC - microcontroller

SD card module:

  • supplements storage space for the songs that will be played
  • connections: SPI - microcontroller

schematic.webp

Log

Week 5 - 11 May

Week 12 - 18 May

Week 19 - 25 May

Hardware

In this project, the core piece is a Raspberry Pi Pico 2W that gets its digital audio play-back from an SD card inserted in a module, interfaced via SPI protocol, and outputs it through a speaker, powered by a PAM8403D amplifier. A 1602 LCD displays via I2C protocol the currently playing song's title. The emmitted sound's volume is controlled by a manually adjustable variable resistor (potentiometer). There are also three buttons connected to the microcontroller's GPIO pins meant to play, pause and navigate through the songs.

Schematics

KiCAD.webp

Bill of Materials

DeviceUsagePrice
Raspberry Pi Pico WThe microcontroller35 RON
Breadboard kitBreadboard, resistors, cables, buttons71 RON
LCD DisplayDisplays song16 RON
AmplifierBoosts audio4 RON
SpeakerPlays audio4 RON
PotentiometerChanges the volume2 RON
SD Card ModuleReads SD card with songs6 RON

Software

LibraryDescriptionUsage
embassy-rpEmbassy HAL for Raspberry Pi RP2040Used for running Rust on Raspberry Pi
embassy-executorasync/await executorUsed for asynchronous programming
defmtHighly efficient logging frameworkUsed for debugging
cortex-mLow-level access to Cortex-M processorsUsed for accesing Cortex-M processor
lcd-lcm1602-i2cDriver for LCD1602Used to control the display
  1. Project Radio fm