[youtube http://www.youtube.com/watch?v=8kRTpmswgFk?wmode=opaque]
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.
Downloadable files
- Bonus spray paint stencils (Illustrations by Rob Nance)
- Layout/wiring diagram
- Schematic diagram
- secret_knock_gumball_machine.pde
- servo_reset.zip
- Templates for case
MAKE: Amends
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.
If simply plugging the perf-board into the Arduino switches it off, something is wired incorrectly in the perf-board causing a short. This could be a wire going to the wrong location or a soldered joint bridging a connection that it shouldn’t.
1) First double and tripple check that the wires go to the correct locations.
2) Next carefully check the solder joints. They should use enough solder to cover the copper pad and the wire but not so much it makes a big blob. Make sure they connect what they’re supposed to and ”only” what they’re supposed to. If you find a suspicious solder joint remelt it with your soldering iron. If you have too much solder on a joint use desoldering wick or a solder sucker to remove the extra.
If two connections look like they might be connected when the shouldn’t try remelting one or both joints, or use a sharp knife or a narrow file to remove conductive material between the joints.
The pin to “Reset” shouldn’t be a problem as nothing is supposed to be connected to that pin.
I absolutely love your blog and find almost all of your post’s to be what precisely I’m
looking for. Do you offer guest writers to write content to
suit your needs? I wouldn’t mind publishing a post or
elaborating on a few of the subjects you write regarding here.
Again, awesome weblog!
I’m a music teacher and I use the secret knock gum ball machine to teach my kids how to read new rhythms. This gum ball machine is brilliant for teaching music!
Pingback: Secret Knock Detecting Gumball Machine – Grathio Labs
Pingback: Sin City Welcomes Makers Tomorrow | MAKE
Pingback: The Return of the Secret-Knock Gumball Machine | MAKE
Pingback: Parafuso a menos (mesmo assim, funciona) | O Blog do Zé
Pingback: Maker Camp: Arduino! | Guyedwire
Pingback: Maker Camp: Arduino! | PIVIX
Hello! I am constructing The Gumball Machine for a school project, but there have been some bumps along the way, and I’m stuck. Is there any way I can get in touch with you to discuss about this? There’s a time crunch involved.