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
-
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.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs