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.
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.
- chipnod2022
- Posts: 30
- Joined: Wed Jul 15, 2020 9:59 am
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Raspberry Pi Pico - A mariage of parts to play MP3s
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
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
- chipnod2022
- Posts: 30
- Joined: Wed Jul 15, 2020 9:59 am
Re: Raspberry Pi Pico - A mariage of parts to play MP3s
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?
Are all 7 required for simple playback?
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Raspberry Pi Pico - A mariage of parts to play MP3s
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).chipnod2020 wrote:Are all 7 required for simple playback?
Please be positive and constructive with your questions and comments.