February 2012

Secret Knock Gumball Machine

The Secret Knock Gumball Machine is a project I built from the plans and instructions from Steve Hoefer's article in Make magazine (volume 25). Gumballs are dispensed only to those who use the secret knock on the front of the machine. The machines uses an Arduino as the controller and a piezo sensor to detect the knock. The machine can also learn new knocks with a single button press. I used Oak plywoood for my case (except for the acrylic front panel). I cut most of the pieces on my table saw. For some of the smaller pieces I used a jigsaw. After some minor tweaks it's been in continuous operation since the build in early 2011 and has gone through quite a few gumballs! The build went according to the instructions with a few changes. I discovered that there were some gaps that were a little too large on the edges of the main funnel near the wheel and I added an additional wood piece to help ensure that no stray gumballs found their way into the internal box. I also made a turn-and-lock attachment mechanism for the ball so it would lock down onto the wood top of the box. I did this by drilling a small hole on each side of the ball on the lip and threading small screws through them with a nut on the end of the screw. I then superglued the nuts to the ball (and screw) so the head of the screws stuck downwards. I then cut two keyhole like slots on opposite ends of the wood piece. Now the ball could be lowered so the screw heads go through the hole and turned clockwise so that it firmly locks to the base. I also discovered that even the powerful metal-geared servo I used wasn't sufficient to turn the wheel if the ball was completely full of gumballs. So usually I fill it a little less than half full. I also found that using a 2 amp supply helped a lot in getting the servo to turn the wheel under the heavy weight of the gumball load.

This was a very fun project. If I had to do it again, I'd love to do one in all acrylic -- especially if someone has the g-code to do the cuts on my CNC. I tried to dispense some candies too but ultimately the gumballs work the best. I've had the machine at home (which my daughter loves) and at work (where word spread and I had everyone doing the secret knock). I also noticed that initially my very young daughter could repeat the knock if she heard it soon before she was to use it but had difficulty getting it right if she hadn't heard it soon before. But her ability to get the knock right (including various re-programmings of the knock) improved over time. She, of course, was very motivated by the prize ;-) . I got to thinking as she was learning some basic rhythms in her music class that it might make a fun supplement to such a class for young kids. The video below shows the machine in action.