Magic Beef Box

You know when you’re trying to hide beef jerky in a treasure chest, but the lock just isn’t musical enough? And when your old-timey pirate chest is somehow lacking in Zelda references? This utterly practical project was built to address those concerns and more.
The Magic Beef Box is a musical secret treasure chest, sponsored by Jack Links Jerky. To open it, you have to play the right sequence of notes on the octopus. Get it right, and the box opens with fanfare on its own.

 

Read on to see how it works:
 
 

When the deadline’s close, sometimes the breadboard comes to the show

 

Most of the electronics are housed in the bottom box. This includes two speakers, an Arduino Due for the brains, a small trigger circuit, and extra components in case of emergency. The electronics are mounted on a small tray, held in place with magnets for easy assembly.

The lid opening action is powered by two tensions springs on back. When locked, the lid is held in place by a pair of latches. Each latch is opened via a solenoid, connected through a darlington transistor to the Arduino.
 

 

The program is pretty straightforward. First, the Arduino scans the button pins. As each button is pressed, it stores the events in an array. When the array reaches the length of a predefined password, it checks to see if it’s correct. If it isn’t, the chest plays an error sound, flashes the eyes red, and resets the array. If it is, the eyes turn green, the chest plays a fanfare, and triggers the solenoids. The unlock function runs on startup in case the buttons stop working or something.

If you’re curious about the story behind the beef box, read even more on.

 

I was tipped off to a “Snack Hack” campaign I later learned was sponsored by Jack Links Jerky. With almost no time to apply, I filled up the entry form with as many kinds of snack hack ideas as I could come up with. Soda-powered things, chip hats, stuff with explosions – pretty much everything I could think of. I knew this one was going to be weird the moment I found out who was behind it, so I called up a friend of mine – the perfect meat consultant. He’s made his own jerky, his own sausage, and eaten whole chickens. Pro-tip: trusting your partners will make life easier, and they very often come up with smart things you wouldn’t have thought of.

We had a one-day deadline to submit sketches of our ideas. I busted out drawings for three concepts, sent them away, and heard back in a week. Of a hatchet with a beef jerky-hiding compartment, a jerky-shooting dry ice cannon, and a very Makey-Makey-based jerky piano, the agency was far and away most excited about the piano.

Casey and I chatted with the team and agreed to build a custom-built toy piano with 36 jerky keys, so they sent us eight pounds of jerky. Eight pounds of jerky is more than I ever could imagine needing in one place. I had to spend the first week of the build at a trade show for my day job, so work started a week behind. But the day after I got back, the team called again. The piano was good, but unfortunately it just wasn’t thrilling enough for the brand. Could we make it a piano that delivered jerky?

This was not the first food delivery project I faced bringing to the fair, and after dealing with hordes of children whacking a gumball machine demanding free candy, I wanted to make sure this one was absolutely as simple and bomb-proof as possible. A “secret piano treasure box” concept was tossed around and agreed on.

I finally started playing with the brains of the project in earnest while Casey set to work on the enclosure. He lucked out and found a pretty good box and a perfect box while thrifting. We decided the pretty good one could serve to hold all the electronics, while the perfect one would house the jerky. That way there was more room for meat, and less risk of hands mucking up the insides.

We met up every few days throughout the project to look at things together. What this meant for me was that one day I saw two naked boxes looking structurally adequate:
 

Naked boxes with eight pounds of jerky

Naked boxes with eight pounds of jerky

and a couple days later I saw two awesome looking boxes with an unexplained but strangely fitting golden octopus on the front.
 
IMG_3770

Now neither Casey or I am musically inclined, but the octopus happened to have six prominent arms, and that seemed like a good number of notes for a musical guessing game. One trip to the bead shop and the buttons were set.
 
IMG_3775

For the sound effects, we both instantly thought of the “secret solved” noise from Zelda, and saw no reason to use anything else. Shooting for the best balance of sound quality and make-sense-ness, we used the “secret” sound from Twilight Princess and the error sound from Link to the Past.

The ocarina notes from Ocarina of Time didn’t fit the box or sound very rich outside the context of the game. So we used kalimba samples by arioke from freesound.org and tweaked a couple in Audacity to match up with the scale on Link’s Ocarina. We added a note that wasn’t in the game, and luckily we weren’t called out on it.

Incidentally, the sequence to open the box is Saira’s Song.

We found a lot of projects out there with Arduino controlled locked boxes, but I don’t think either of us found one that also opened up on its own. We experimented with solenoids and hobby servos, eventually installing a clothespin to grasp a metal hook. To open the clothespin, we installed a push-solenoid behind it. That way the solenoid would only have to be powered while the box was unlocking.
 

Testing the solenoid clasp.

We also had a lot of fun with last-minute latch panicking and code that was refusing to behave. I used an Arduino Due, since we needed audio and one was available. Next time I’d probably try something that doesn’t involve editing the library. (Though if you have to use a Due for an audio project, take a look at this thread).

We thought having claw feet would really help the project stand out, and had more trouble than we expected finding them for sale anywhere. So mostly out of necessity (but also for the fun of it) we 3D printed four claw feet for the base.
 
IMG_3772-2They took up almost the last of my filament, and I was worried that we’d run out right in the middle of filming.

Another odd part of this project (as if it needed more) was that Casey and I were to be filmed working on our build leading up to the Faire. The crew arranged to shoot at my place the Wedesday before MakerFaire which, for those of you who haven’t had a chance to present recently, basically starts on Friday. Wednesday also happened to be the hottest day of the week, so naturally filming was scheduled for noon.

Casey and I met up the morning before the shoot and got all the parts working together for the first time about 20 minutes before the crew arrived. The filming was fun and weird. I got to try not to make an ass of myself on camera, and all of us got to get really sweaty filming in a greenhouse of a studio (most of my work is during the evenings, so it was a novel experience).

If you’re curious what the result of that was:
 

 

We spent Thursday morning putting the “final” touches on the project. By about 2:00pm the box was in a decent enough state for us to show it off. It looked great, had buttons that made noises, and when you pushed the right ones the lid would pop open. The only gripe we had at that point was that it didn’t really “lock”, per se.

See, balancing the latch with the strength of the solenoid we used meant that anyone could pop open the lid without really trying. It looked like a lock box, and acted like one if you didn’t poke it too hard. But neither of us was as proud as we wanted to be without the box really staying locked.

So last minute cramming ensued, sacrifices in eating time were made, and a second latch and solenoid combo was added. Eventually the damn thing worked like we expected. I have no idea if anyone at the fair would’ve noticed if we hadn’t put in the extra effort, and I panicked every time I saw someone try to wrench it open and almost tear the guts out. But it was the box we set out to build. We made it to San Jose Thursday night, in time to fall asleep and cart it to the Faire the next morning.
 
IMG_3788

We put up a tea-stained legend to help guide people through the sequence. The fair was a lesson in psychology – seeing how people had different reactions to the hints we gave them. We had to keep scribbling on the legend to make it just obvious enough, but still leave a little mystery for people to fail occasionally. Always shoot for a deliberate 20%-30% failure rate with these things.

 

The fair was a huge success. It seemed like everyone got a kick out of it. The Zelda fans especially went nuts. Our project held up through the throngs of children, and we drew a great crowd.
 

 

More filming was had, and I got to meet some internet celebrities and show off our work. We met awesome people with weird jerky creations of their own. I made it to the Hack-a-Day meetup and saw people writing code in a crowded bar.

There were only a few times it seemed to act up, and it usually fixed itself pretty quickly. Okay fine, it started bogging down pretty heavily about an hour before closing on Sunday, but by then we’d long since given away the last of the jerky, and we were all too thrilled and tired to care.

Just as we were wrapping up, I was told that Jack Links was keeping the box. Which is how a good project goes out to another home, one that I hope will treat it with love.

It was a fun, weird ride.

Written by Sam