Raspberry Pi makes LEGO minifigures play their own music

We shared Dennis Mellican’s overly effective anti-burglary project last month. Now he’s back with something a whole lot more musical and mini.


Dennis was inspired by other jukebox projects that use Raspberry Pi, NFC readers, and tags to make music play. Particularly this one by Mark Hank, which we shared on the blog last year. The video below shows Dennis’s first attempt at creating an NFC Raspberry Pi music player, similar to Mark’s.

LEGO twist

After some poking around, Dennis realised that the LEGO Dimensions toy pad is a three-in-one NFC reader with its own light show. He hooked it up to a Raspberry Pi and developed a Python application to play music when LEGO Dimension Minifigures are placed on the toy pad. So, if an Elvis minifigure is placed on the reader, you’ll hear Elvis’s music.

LEGO figures dressed as member of the band KISS
Mini KISS rocking out on the NFC reader

The Raspberry Pi is hooked up to the LEGO Dimensions toy pad, with Musicfig (Dennis’s name for his creation) playing tracks via Spotify over Bluetooth. The small screen behind the minifigures is displaying the Musicfig web application which, like the Spotify app, displays the album art for the track that’s currently playing. 

No Spotify or LEGO? No problem!

Daft Punk LEGO minifgures stood on an NFC reader next to a Raspberry Pi and a phone showing Daft Punk playing on Spotify
Daft Punk LOVES Raspberry Pi

Spotify playback is optional, as you can use your own MP3 music file collection instead. You also don’t have to use LEGO Minifigures: most NFC-enabled devices or tags can be used, including Disney Infinity, Nintendo Amiibo, and Skylander toy characters.

Mini figurines in the shape of various kids film charactera
Why not have Elsa sing… what’s that song again? Let it… what was it?

Dennis thought Musicfig could be a great marketable LEGO product for kids and grown-ups alike, and and he submitted it to the LEGO Ideas website. Unfortunately, he had tinkered a little too much (we approve) and it wasn’t accepted, due to rules that don’t allow non-LEGO parts or customisations.

Want to build one?

The LEGO Dimensions toy pad was discontinued in 2017, but Dennis has seen some sets on sale at a few department stores, and even more cheaply on second-hand market sites like Bricklink. We’ve spotted them on eBay and Amazon too. Dennis also advises that the toy pad often sells for less than a dedicated NFC reader.

A Tron mini figure on the reader with the Tron movie soundtrack seen playing on the screen behind it
What’s the best movie soundtrack and why is it Tron?

Watch Dennis’s seven-year-old son Benny show you how it all works, from Elvis through to Prodigy via Daft Punk and Queen.

You can tell which songs Benny likes best because the volume goes to 11

There are some really simple step-by-step instructions for a quick install here, as well as a larger gallery of Musicfig rigs. And Dennis hosts a more detailed walkthrough of the project, plus code examples, here.

You can find all things Dennis-related, including previous Raspberry Pi projects, here.


Jack avatar

One of those annoying “what if” ideas came to mind. Shouldn’t the song selection align with the instruments on stage?

Ashley Whittaker avatar

Acoustic KISS. I like it.

Amy Allison avatar

Ok…Raspberry Pi AND the Lego Movie? Combining two of the most important parts of my life is TOO much!

Ben Shockley avatar

Hi Ashley! Do you have any additional information/photos of the Mini SAM board (green one)? That’s my design and I love seeing it around. Is that one really setup for playing Tron Soundtrack?

Ashley Whittaker avatar

I’ll tell Dennis (the maker) there’s a question for him – he’ll know!

Dennis Mellican avatar

Hi Ben. In that photo, Mini SAM sits snugly on a LEGO base plate on top of a custom NFC tag. It is indeed appropriately setup to play Daft Punk’s The Grid from TRON: Legacy (spotify:track:4Bvxi5oUS3M4DezTfsd5pp). You’ll find the same photo on the musicfig.com site which in turn is from Instragram #musicfig hashtags. I’ll drop a line in the photo description for your awesome design work.
@Ashley: Thanks for the great write up!

RoadRunner avatar

Nice Raspberry Pi project.
Just one thing, the lightshow stops after every track when playing a Spotify album URI link.
But still nice project. Thanks for spending time figuring out how make everything work.

Jenna Sayman avatar

Do you have any additional information/photos of the Mini SAM board (green one)? That’s my design and I love seeing it around. Is that one really setup for playing Tron Soundtrack?


DaftPunkPi avatar

Ok so i just bought the Lego Daft Punk this for this very own occasion xD !

Comments are closed