A Candy Dispenser Perfect for Trick-or-Treaters During a Pandemic

Complete with lights and C64-style sound effects!

Jeremy Cook
3 years agoHalloween Hacks

In order to help make Halloween this year safe yet fun, David Knapp and David Youd created a candy dispenser tube. It features 10 feet of social distancing, along with lighting and sound effects. The device uses a laser sensor to detect when candy has been inserted, at which time an array of lights follows the treat down the enhanced sewer pipe. This is accompanied by various sound effects, which are programmed based on a Commodore 64 code from a 1985 8-bit magazine.

As seen in the video, it looks like a lot of fun, and the droning sounds played on a DFPlayer Mini match up with the advancing lights quite nicely. While it seems there’s only one input sensor, candy speeds are apparently predictable enough that the lighting matches up quite well with treats popping out of the bottom. Besides, treats in-hand would likely silence any critique!

The system is controlled by an ATmega32U4 Pololu AStar board, and the electronics attach on the candy slide via magnets. A laser input detects the candy input with a circuit comprised of a photodetector, transistors, and resistors, as outlined at 0:20 in the video.

Code and sound effects are available on the project’s GitHub page if you need a quick Halloween hack for this weekend!

Jeremy Cook
Engineer, maker of random contraptions, love learning about tech. Write for various publications, including Hackster!
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles