Halloween candy vending machine
Conclusions
I have never known so many things to go wrong as did with this 2019 Halloween project. If you enjoy pratfalls, bad luck, and breakdowns, take a look at the box "Outtakes – What Went Wrong."
Outtakes – What Went Wrong
As early as the planning and construction phase, the Halloween vending machine proved to be a tough cookie. In the first version, the sweets were prone to fall out of the magazine that was designed to deliver them. After a few weeks of trial and error, I abandoned this idea: it proved impossible to even halfway control the number of sweets handed out. Either none came out, or a whole load were handed out.
The arrangement of the LED panels for the eyes and mouth almost drove me crazy. When I was building the machine in the garage, I burned my fingers on the soldering iron – this hadn't happened to me in ages. Hundreds of screws fell during the assembly work and predictably always landed in the most inaccessible corner of the garage.
The first draft of the software was developed for a PiXtend 1.3, but the machine was initially equipped with a PiXtend 2.0. Because it is not possible to simply swap the SD card from one model to another, I had to change the PiXtend board at the last minute. For unknown reasons, I also had problems with the Rasp Pi's on-board sound. I decided to disable it and use an external sound card instead.
The WS2812 LEDs take their voltage from the 5V output of the PiXtend, which works fine as long as you run the LEDs at low intensity. However, if you turn them up to test the animation in sunlight, quite strange things happen with the LEDs. Originally, the machine had waving arms, but during testing they turned out to be a hazard zone for the children's fingers, so I left them out in the final version.
Finally, some problems cropped up with the machine on Halloween. My camera caused problems in the dark, so I don't have any pictures of that year's Halloween invention in action. To make matters worse, a fog machine set up to support the creepy effect finally caused a massive short circuit – and the ignominious end of that year's Halloween display. I've heard of people's hair turning white from fright, but in my case, the project rapidly caused my hair to turn gray.
Because the little visitors always came in groups, it soon became clear that the capacity of the conveyor belt was not up to the task. Stocking up with more chocolate in the dark caused major problems. Have a flashlight ready or – better still – install a light in the machine.
In spite of all the breakdowns, both big and small visitors enjoyed the vending machine. Some were so enthusiastic that they came by several times during the evening. A handful of children and adults with an affinity for technology even took the opportunity to take a detailed look inside the machine. All in all, the Halloween vending machine was great fun for everyone involved. Version 2.0 is already planned for this year.
Infos
- PiXtend: https://www.pixtend.de/downloads/pixtend-v2-downloads-english/
- Video of conveyor belts: https://youtu.be/3GgB42z9lZ8
- LED panel: https://www.aliexpress.com/item/32826934452.html
- SN74HCT125 TTL: https://www.ti.com/product/SN74HCT125
- Library for WS2812: https://github.com/jgarff/rpi_ws281x
- PiXtend download page: https://www.pixtend.de/downloads/
- Code for this article: ftp://ftp.linux-magazine.com/pub/listings/linux-magazine.com/238/
- Movie of eyes and mouth: https://youtu.be/mvK4GS5FCJM @IE
« Previous 1 2 3
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Red Hat Adds New Deployment Option for Enterprise Linux Platforms
Red Hat has re-imagined enterprise Linux for an AI future with Image Mode.
-
OSJH and LPI Release 2024 Open Source Pros Job Survey Results
See what open source professionals look for in a new role.
-
Proton 9.0-1 Released to Improve Gaming with Steam
The latest release of Proton 9 adds several improvements and fixes an issue that has been problematic for Linux users.
-
So Long Neofetch and Thanks for the Info
Today is a day that every Linux user who enjoys bragging about their system(s) will mourn, as Neofetch has come to an end.
-
Ubuntu 24.04 Comes with a “Flaw"
If you're thinking you might want to upgrade from your current Ubuntu release to the latest, there's something you might want to consider before doing so.
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.