Make a cute candy vending machine that only dispenses treats when you knock the secret rhythm on its front panel.
One of the best things about exhibiting at Maker Faire is giving attendees a challenge. For the 2010 Maker Faire Bay Area, I decided to combine a past project of mine, a door lock that opens only when you give a secret knock, with a standard crowd pleaser: candy.
The result was this Secret-Knock Gumball Machine, which tempted and tested the crowds at Maker Faire to guess the right rhythm and receive a treat. Since the knock was not terribly secret (I happily handed out hints), it distributed hundreds of gumballs over the event’s two days.
The “secret” knock defaults to the famous “Shave and a Haircut” rhythm, but you can program custom knocks by simply pressing a button and knocking a new pattern. The machine only listens for the rhythm, not the tempo, so the correct knock will dispense a treat whether you perform it fast or slow.
Inside the machine, a piezo sensor picks up sounds from the front knock panel, while an Arduino microcontroller recognizes the target pattern and controls a servo-driven gumball-dispensing wheel. You can build the Secret-Knock Gumball Machine with its inner workings visible or hidden, depending on whether you want to show off the mechanism or keep it a mystery.
In MAKE Volume 25, page 95 the part number listed for the clear plastic globe from 1000bulbs.com was incorrect and should have read #3202-08020.
Steve Hoefer is a creative swashbuckler, freelance writer and inventor. He regularly contributes projects to the pages of MAKE and his inventions have appeared internationally on TV, radio, and print. He lives on his family farm in Iowa.
Send us feedback on our site design, bugs, story ideas, maker community events and any other share-worthy thoughts.
We can't guarantee a response to each submission, but we promise to think about every one.
Stay inspired with the Make: newsletter
Make: and Maker Faire are registered trademarks of Maker Media, Inc. | Privacy
Copyright © 2004-2016 Maker Media, Inc. All rights reserved
you are now signed up to the Make: newsletter.
Thanks for signing up.
Your FREE PDF is on its way. Please check your email. You will also be receiving the weekly Make: Newsletter to keep you inspired with new projects and more product reviews.