Raspberry Pi Pico audio player
A stand-alone audio player can be created using a Raspberry Pi Pico, featuring decent audio quality, MicroPython programming, and the ability to play 8k WAV files from an SD card.
Read original articleThe article discusses the creation of a stand-alone audio player using the Raspberry Pi Pico, highlighting its decent audio quality suitable for casual listening. The project utilizes MicroPython for programming and requires components such as a Raspberry Pi Pico or Pico W, buttons, resistors, capacitors, an SD card module, an OLED display, and speakers. The audio player is designed to play 8k WAV files stored on an SD card, with a user interface displayed on the OLED screen. The setup includes three buttons for navigating through the music tracks and playing selected songs. The author provides links to previous articles detailing the hardware setup, software requirements, and code necessary for the project. Additionally, the article suggests potential expansions for the audio player, such as adding a reset button, automatic song playback, or integrating other functionalities like a thermometer or clock. The author encourages readers to share their experiences with the project.
- The Raspberry Pi Pico can be used to create a stand-alone audio player with decent sound quality.
- The project requires basic electronic components and programming in MicroPython.
- The audio player is limited to playing 8k WAV files from an SD card.
- The author provides detailed instructions and code for building the player.
- Potential expansions for the project include adding more features like a reset button or additional functionalities.
Related
Pico-ASHA: USB audio to ASHA adapter
Pico-ASHA implements the ASHA protocol on Raspberry Pi Pico W, streaming audio to Oticon More hearing aids. It is under development, with precompiled builds available for testing via GitHub.
One-chip sound player – Dmitry.GR
The project develops a single-chip audio player using the PIC12F1840 microcontroller, featuring a custom SD card driver, PWM audio output, and support for uncompressed WAV files with future enhancements planned.
You can run Linux on the RISC-V cores of the Raspberry Pi Pico 2's RP2350
A developer has run Linux on the Raspberry Pi Pico 2's RP2350 microcontroller, facing memory limitations and bugs, particularly with UART, but it shows potential for future enhancements.
Inky Frame 7.3″ is a 7-color ePaper display powered by a Raspberry Pi Pico 2 W
The Inky Frame 7.3" is a low-power ePaper display with a 7-color E Ink screen, powered by Raspberry Pi Pico 2 W, priced at $94.50, suitable for various applications.
Lego Retro Radio #10334 – play your own music using a Raspberry Pi
A project allows users to integrate a Raspberry Pi into the Lego Retro Radio set for custom music playback, involving design modifications and Python code for controlling music through the tuning knob.
To handle decoding and the overhead of moving bits around, it uses a dual-buffer DMA approach. It reads data from an SD card, running the decoding routine on the main CPU. The decoded samples are written into one of two buffers. While one buffer is being written to, the other is read via DMA and sent to the PWM buffer (more on PWM audio here: https://x.com/beala/status/1826147833168408738). Because DMA is used, data transfer can occur in parallel with decoding, without involving the main processor. When the bits have all been written to the PWM buffer, an interrupt triggers a buffer swap, and the process repeats.
I'm leaving out many details. Tuning the pwm speed to achieve correct playback speed was quite an adventure. And when I needed to increase the clock speed to play higher sample rates, this caused I/O errors with the SD card that I never managed to solve. Although I learned a lot from this process, I ultimately opted to use an MP3 module in my final build: https://store-usa.arduino.cc/products/dfplayer-a-mini-mp3-pl...
This is probably routine for an experienced embedded engineer, but it was quite a learning experience for me!
I have a Rust crate for outputting I2S data, or retrieving it from something like a mic or ADC. You can hook it up to DMA and make your audio go brrrr
Maybe it's my fault for not making it to page 1357 (!) of the datasheet, where the issue is described as "RP2350-E9".
https://datasheets.raspberrypi.com/rp2350/rp2350-datasheet.p...
It has thre DIP switches that set the mode, you can use them to set the playback modes, one of which is serial control, meaning you can easily beef this up using a microcontroller.
Great that the author chose one and finished (and published) the project instead of stopping at that annoying junction :)
Not to talk down anyone’s hobby project, but that kinda limits the appeal for most other people I would think?
So here are my results up until now:
- The best device I found is a LicheeRV Nano[1] - also used in NanoKVM.
- It has enough CPU+RAM to support more complex formats like FLAC while still being very small.
- It has a full featured MIPI 31-pin / 6-pin touch display port, although I could not find any available display smaller than 7" to order without hassle (there is an unavailable official 3" though[4]).
- It also has USB-C, where it should be possible to use one of these external USB-C to audiojack adapters with mic support.
- Some of these adapters should support headset control buttons out of the box (via kernel usbsound) - on my notebook this works flawlessly.
- There also is a full featured configurable buildroot[2], so, less work to get started with an optimized build.
- Combining a TP4057 battery charger and a battery gauge (MAX17043) you should be able to support a 1200mah battery, read out battery status via I2C and recharge within a < 3" 3D printed case.
- All you would have to do is create a custom buildroot and a nice user interface via LVGL, they already have a music player sample on there samples listing[3]. Unfortunately this is where the workload is huge ;)
1: https://wiki.sipeed.com/hardware/en/lichee/RV_Nano/1_intro.h...
2: https://github.com/sipeed/LicheeRV-Nano-Build
3: https://github.com/lvgl/lv_demos/tree/master/src/lv_demo_mus...
Related
Pico-ASHA: USB audio to ASHA adapter
Pico-ASHA implements the ASHA protocol on Raspberry Pi Pico W, streaming audio to Oticon More hearing aids. It is under development, with precompiled builds available for testing via GitHub.
One-chip sound player – Dmitry.GR
The project develops a single-chip audio player using the PIC12F1840 microcontroller, featuring a custom SD card driver, PWM audio output, and support for uncompressed WAV files with future enhancements planned.
You can run Linux on the RISC-V cores of the Raspberry Pi Pico 2's RP2350
A developer has run Linux on the Raspberry Pi Pico 2's RP2350 microcontroller, facing memory limitations and bugs, particularly with UART, but it shows potential for future enhancements.
Inky Frame 7.3″ is a 7-color ePaper display powered by a Raspberry Pi Pico 2 W
The Inky Frame 7.3" is a low-power ePaper display with a 7-color E Ink screen, powered by Raspberry Pi Pico 2 W, priced at $94.50, suitable for various applications.
Lego Retro Radio #10334 – play your own music using a Raspberry Pi
A project allows users to integrate a Raspberry Pi into the Lego Retro Radio set for custom music playback, involving design modifications and Python code for controlling music through the tuning knob.