Speak up friend and this RPi box will reveal your precious treasures

Durin’s box, designed and built by John Pender at Hackaday, is a prime example of the ultimate nostalgia a Raspberry Pi project can invoke. Built around a Pi Zero, it uses solenoids, capacitive switches, RGB LEDs, a microphone and a voice recognition solution to remind us of the moonlit magic of dwarves and how forgetful wizards can be.

Designed and assembled from scratch, the box was a gift for Pender’s son. And there’s a little more to opening it up than just speaking the elven word for friend.

First you must turn it on by touching the two points marked by stars, below which are two capacitive switches. This sends power to the Raspberry Pi, which in turn lights up the inscription with RGB as if it had been touched by moonlight, and the microphone waits for the riddle to be answered.

By speaking the word “Mellon”, the inner treasures will be revealed. Well, you have to lift the lid of the box yourself, but the two solenoids at the bottom of the lids retract to allow you to do that. They return to their original position very quickly, which means you’d have to wait quite a while for the thing to boot up again only to crash it if you don’t put the lid back in time, but I like to imagine that dwarves tend to have similar issues with their ports as well.

The trick to getting it to recognize the password was to use PocketSphinx, a non-cloud-based voice recognition tool that needs no pre-training. Since it was a gift, I think the son might have suspected something if his father invented a recording device like, “Hey son, can you say Elvish as a friend again, please? A little louder.”

It doesn’t look like you can put a dragon hoard under the lid, but maybe something a little more…precious. However, in the words of Thorin Oakenshield: “If more of us valued food, joy and music above hoarding gold, it would be a happier world.” So maybe it could be a secret box of snacks?

The danger, of course, would be forgetting the password and having your Lembas bread pile spoiled. Let’s face it, even if you already knew all the spells in all the languages ​​of Elves, Men and Orcs, this could still happen.

If this happens, the thing fails, or the battery dies, there’s a failsafe to get those solenoids moving. Simply shaking the capacitive switches with a little voltage will cause them to shift.

Hats off to Pender for his ultimate skill and for making one of my childhood dreams come true. Keep hacking.

Leave a Comment