Halloween candy vending machine


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.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • PiXtend V2

    The PiXtend board extends the Raspberry Pi with many useful interfaces and functions for new target groups.

comments powered by Disqus
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