Listening to music on Spotify can certainly be a rewarding experience but it’s the way we interact with our music in the real world that can make a difference. That’s why we’re excited about this coolRaspberry Pi Pico-powered project created by maker and developer Bas. Using our favorite microcontroller, he’s created abarcode scanning systemthat recognizes the barcodes from your favorite CDs and uses the data to queue up the music automatically on Spotify.

As simple as this project idea sounds, it’s actually quite involved and took a bit of engineering to pull off. First, as you might have guessed, you must scan a barcode from the CD you want to listen to. This barcode is parsed using MQTT to a home assistant. The Raspberry Pi has a script that checks for the album through a music database known as Discogs. Once the album has been identified, the song is queued up using the Spotify API and plays in Bas’s living room.

Raspberry Pi

The casing for the project was designed from scratch by Bas just for this project using Fusion 360. It was then 3D Printed but we’re not sure exactly what 3D printer was used to print the final version we see in the blog post. However, we do have a list of thebest 3D printers for 2024if you want to see what’s leading the market. To finish off the design, he included a couple of googly eyes. While much of this project is open source, the 3D printer files haven’t been shared but Bas assures that you can contact him for a copy of the design files.

It doesn’t take too much hardware to recreate this project and Bas was kind enough to share plenty of details about what went into its creation. You’ll need aRaspberry Pi Pico W—the W version is necessary for the network connectivity. It’s connected to a barcode scanning module which is used to read the CD barcodes.

Raspberry Pi

Bas also shared the software he put together for the project. You can explore the source code over at his GitHub page. It includes both the code used toverify the albumusing barcode data as well as the code that runs on the Pico that directs the barcode usingMQTT.

If you want to get a closer look at thisRaspberry Pi projectin greater detail, you can check out the originalblog postshared by Bas.

Raspberry Pi

Get Tom’s Hardware’s best news and in-depth reviews, straight to your inbox.

Ash Hill is a contributing writer for Tom’s Hardware with a wealth of experience in the hobby electronics, 3D printing and PCs. She manages the Pi projects of the month and much of our daily Raspberry Pi reporting while also finding the best coupons and deals on all tech.

Raspberry Pi

Ash Hill