A Raspberry Pi is surprisingly handy if you want to build your own vending machine

Raspberry Pi 4 runs Windows 11
(Image credit: The Raspberry Pi Foundation)

A Raspberry Pi might be the key to running your very own vending machine, and what dyed in the wool PC gamer wouldn't want an entire vending machine in their house? Okay, well perhaps some don't, but this is another great use of the compact computer.

User OfficalFlance on Reddit posted their vending machine conversion to the site after they managed to get the broken machine up and running again (good spot, Tom's Hardware). Essentially, they took an old, burned out vending machine and gave it a Pi-powered makeover to get it dispensing sweet treats once again.

"Basically I found an old vending machine that had a burnt out motherboard, bad lights, and the only thing working in them were motors, and tore out everything to be a part of the Pi-family," they say in the post.

The modder says they bought the old machine for $200, and replaced its ruined innards with a Raspberry Pi 4, which is a $35–$75 part. An Arduino Mega microcontroller is being used to control all the motors, which is a sub $50 part. You really don't want your snacks to get stuck in those blasted coils because of a dodgy controller.

Your next machine

(Image credit: Future)

Best gaming PC: The top pre-built machines from the pros
Best gaming laptop: Perfect notebooks for mobile gaming

So that's a cheap build overall, though rebuilding of the vending machine's insides doesn't sound like an altogether simple one, actually requiring a full rewire.

Currently the vending machine only accepts cash, but the modder is hoping to make it work with credit card readers at some point in the future. The difficulty being with sourcing a decent Java API, which they haven't managed to do just yet.

OfficalFlance hopes for the vending machine to find a new use inside a church, though they say they are building more. Once again proving that the tiny Pi computer is a mighty tool in the right hands, despite its diminutive size.

TOPICS
Jacob Ridley
Managing Editor, Hardware

Jacob earned his first byline writing for his own tech blog. From there, he graduated to professionally breaking things as hardware writer at PCGamesN, and would go on to run the team as hardware editor. He joined PC Gamer's top staff as senior hardware editor before becoming managing editor of the hardware team, and you'll now find him reporting on the latest developments in the technology and gaming industries and testing the newest PC components.