Third party cookies may be stored when visiting this site. Please see the cookie information.

PenguinTutor YouTube Channel

Raspberry Pi Pico Christmas Reindeer MP3 player

I've now incorporated my Raspberry Pi Pico web based MP3 player into my Decopatch Christmas Reindeer. This is using a new Raspberry Pi Pico 2W microcontroller. The Pico 2W uses a DFPlayer mini MP3 player using a MicroPython library I created for a Raspberry Pi Pico. The web interface allows you to control the MP3 Player with your phone or computer.

Christmas Rudolph Reindeer with Raspberry Pi Pico 2W and DFRobot DFPlayerMini MP3 player with Micro SD Card

The video below shows this in action and gives a quick explanation of the technology behind this project.

Wiring diagram

I've used a 74HC06 hex buffer (7406). This is similar to the 7404 hex inverter, but the 7406 has an open-collector output. This means that the output can be used to switch the output as though it was just a standard transistor switch. This is used to switch the cathode (negative end) of the LEDs towards ground. There are also some current limiting resistors used to limit the current through the LEDs.

The 74HC06 is less common these days, so I would now typically used a darlington transisor or a ULN2803A darlington driver IC instead. See my Pico quiz game for an example of the ULN2803A darling driver in use. I had already wired the reindeer lights up to the 74HC06 several years ago and so I continued to use that in this project.

The diagram below shows how the Raspberry Pi Pico, the DFPlayerMini and the 74HC06 hex buffer are all wired together across two breadboards. The standard 1/2+ breadboard is used for the Pico and the MP3 player and a mini breadboard has the 7406 and the current limiting resistors.

Reindeer MP3 circuit, with breadboards holding a Raspberry Pi Pico, DFPlayerMini mp3 player and 7406 hex inverting buffer

MicroPython source code

The code is written in MicroPython. To run all the different things at the same time involves multithreading using asyncio. Technically that is uasyncio which is a minimalistic scheduling library for MicroPython. This allows the web server to wait for and handle web requests, the LED lights to flash and regular checks on whether the DFPlayer Mini is actually playing a track.

You can download the source code from the link below.

You will also need the rest of the library files and the url handler code from the Raspberry Pi Pico 2W MP3 player project.

Other Christmas projects

Here are some of my other Christmas projects you may like to see:

Previous Pico 2W web MP3 player
Pico 2W web MP3 player
Next ESP32 Capacitive Touch
ESP32 Capacitive Touch