0

Raspberry Pi Pico - A mariage of parts to play MP3s
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Raspberry Pi Pico - A mariage of parts to play MP3s

by chipnod2020 on Tue Apr 27, 2021 4:55 pm

Greetings,

In my quest to use a microcontroller to simulate sound and light effects of Star Trek models, I have gotten to the part where I am trying to use a Raspberry Pi Pico to play mp3s. I am proposing to use the following equipment.

Adafruit Mono 2.5W Class D Audio Amplifier - PAM8302
https://www.adafruit.com/product/2130

MicroSD card breakout board+
https://www.adafruit.com/product/254

My question of the collective is that I'm finding a very small amount of resources on how to actually integrate these parts together as well as coding.

I'm not asking for anyone to write this for me (although I would by you tacos). Anyone have any recommendations on where to look for these details? Ultimate goal, press a button and play a mp3 file over the amplifier.

chipnod2020
 
Posts: 29
Joined: Wed Jul 15, 2020 9:59 am

Re: Raspberry Pi Pico - A mariage of parts to play MP3s

by adafruit_support_mike on Tue Apr 27, 2021 8:52 pm

There's no easy path to playing MP3s with the RP2040 itself.

CircuitPython has code to play MP3s, but needs either a DAC pin or an I2S interface. The RP2040 doesn't have either. You'd probably need something like a Music Maker to handle the audio generation:

https://www.adafruit.com/product/3436

For a single-board solution, we recommend the ItsyBitsy M4:

https://www.adafruit.com/product/3800

It has a fast processor, a 12-bit DAC, and runs CircuitPython. This tutorial shows how to play MP3s with the M4 Feather, but the process for the ItsyBitsy will be pretty much the same:

https://learn.adafruit.com/mp3-circuitpython-lars

adafruit_support_mike
 
Posts: 62799
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi Pico - A mariage of parts to play MP3s

by chipnod2020 on Tue Apr 27, 2021 10:49 pm

I saw that card and thought it would work. However there are 7 connections to make which I'd s lot for a small system.

Are all 7 required for simple playback?

chipnod2020
 
Posts: 29
Joined: Wed Jul 15, 2020 9:59 am

Re: Raspberry Pi Pico - A mariage of parts to play MP3s

by adafruit_support_mike on Sat May 01, 2021 12:29 am

chipnod2020 wrote:Are all 7 required for simple playback?

Yep. Three of them are common to all SPI connectons (MOSI, MISO, SCK), two of them are needed to select the device the microcontroller talks to (MP3CS and SDCS), one tells the VS1053 whether the microcontroller is sending a command or raw data (XDCS), and the VS1053 uses the last one to tell the microcontroller it needs more data (DREQ).

adafruit_support_mike
 
Posts: 62799
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.


cron