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.
![Learn More](https://www.linux-magazine.com/var/linux_magazin/storage/images/media/linux-magazine-eng-us/images/misc/learn-more/834592-1-eng-US/Learn-More_medium.png)
News
-
NVIDIA Released Driver for Upcoming NVIDIA 560 GPU for Linux
Not only has NVIDIA released the driver for its upcoming CPU series, it's the first release that defaults to using open-source GPU kernel modules.
-
OpenMandriva Lx 24.07 Released
If you’re into rolling release Linux distributions, OpenMandriva ROME has a new snapshot with a new kernel.
-
Kernel 6.10 Available for General Usage
Linus Torvalds has released the 6.10 kernel and it includes significant performance increases for Intel Core hybrid systems and more.
-
TUXEDO Computers Releases InfinityBook Pro 14 Gen9 Laptop
Sporting either AMD or Intel CPUs, the TUXEDO InfinityBook Pro 14 is an extremely compact, lightweight, sturdy powerhouse.
-
Google Extends Support for Linux Kernels Used for Android
Because the LTS Linux kernel releases are so important to Android, Google has decided to extend the support period beyond that offered by the kernel development team.
-
Linux Mint 22 Stable Delayed
If you're anxious about getting your hands on the stable release of Linux Mint 22, it looks as if you're going to have to wait a bit longer.
-
Nitrux 3.5.1 Available for Install
The latest version of the immutable, systemd-free distribution includes an updated kernel and NVIDIA driver.
-
Debian 12.6 Released with Plenty of Bug Fixes and Updates
The sixth update to Debian "Bookworm" is all about security mitigations and making adjustments for some "serious problems."
-
Canonical Offers 12-Year LTS for Open Source Docker Images
Canonical is expanding its LTS offering to reach beyond the DEB packages with a new distro-less Docker image.
-
Plasma Desktop 6.1 Released with Several Enhancements
If you're a fan of Plasma Desktop, you should be excited about this new point release.