Building A Halloween Vending Computer That Talks

A photo of the vending machine sitting on an electronics workbench

Our hacker from [Appalachian Forge Works] wrote in to let us know about their vending machine build: a Halloween vending computer that talks.

He starts by demonstrating the vending process: a backlit vend button is pressed, an animation plays on the screen as a synthetic voice speaks through attached speakers, the vending mechanism rotates until a successful vend is detected with a photoelectric sensor (a photoresistor and an LED) or a timeout of 10 seconds is reached (the timeout is particularly important for cases when the stock of prizes is fully depleted).

For a successful vend the prize will roll out a vending tube and through some ramps, visible via a perspex side panel, into the receptacle, as the spooky voice announces the vend. It’s the photoelectric sensor which triggers the mask to speak.

The vending mechanism is a wheel that spins, the bouncy balls caught in a hole on the wheel, then fall through a vending tube. The cache of prizes are stored in a clear container attached to the top, which is secured with a keyed lock attached to the 3D printed lid. After unlocking the lid can be removed for restocking.

The whole device is built into an old PC case tower. The back panels have been replaced and sealed. The computer in the box is an ASUS CN60 Chromebox running Ubuntu Linux. The power button is obscured on the back of the case to avoid accidental pressing. The monitor is bolted on to the side panel with a perspex screen and connected to the Chromebox via VGA. Inside there are two power supplies, an Arduino Uno microcontroller, and an audio amplifier attached to a pair of speakers.

A 12V DC motor controls the vending prize wheel which feeds a prize into the vending tube. The vending tube has an LED on one side and a photoresistor on the other side that detects the vend. The software, running on Linux, is Python code using the Pygame library.

If you’re interested in vending machines you might also be interested in this one: This Vending Machine Is For The Birds.

Thanks to [Adam] for writing in about this one.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.