Many of us are easily enchanted by retro gear being given a new lease of life; think, for example, of the miniature Sega Genesis and Super Nintendo consoles recently released to a market of nostalgic gamers. Now, even an old vending machine has been resurrected with new tech.

Powering that tech is a Raspberry Pi — yes, that trusty minicomputer. Furthermore, the story of how the Pi — and a few other components — were used to revitalise the machine is engrossing, and could inspire you to pursue a similar project.

How a broken vending machine was made functional again 

In a recent thread on the discussion site Reddit, user OfficialFlance recollected coming across a vintage vending machine beset by a burnt-out motherboard and bad lights. The machine’s motors were the only parts of it that, at this point, still worked.

In any case, OfficialFlance admits to having “tore out everything” so that new, Pi-powered innards could be inserted into the enclosure, of which a photo can be seen on the Reddit thread.

Exactly what new components were used?

Tom’s Hardware claims that a Raspberry Pi 4 Model B was used for the project. You could easily source this Pi model yourself; The Pi Hut even stocks a Raspberry Pi 4 Model B Starter Kit for helping people to get quickly up to speed with their own Pi projects.

Though the Pi acts as the machine’s main controller, also included is an Arduino Mega microcontroller, as this is necessary for driving the large number of motors.

For dispensing snacks, users of the vending machine can pay using cash — or, to be more specific, dollar bills. The bill acceptor is connected via a USB-based serial connection. The task of rebuilding the vending machine’s insides actually required a full rewire.

OfficialFlance has acknowledged the need for a Java API in order for the machine to be capable of taking debit and credit card payments. However, this Reddit-based maker and developer has also reported having so far failed to find a suitable Java API for this purpose.

Where could the project go from here?

It is intended that, at some point, the machine’s screen will be used for displaying advertisements as well as digital buttons. At the time of writing, OfficialFlance has not used the original Reddit thread to post any source code for this vending machine resurrection.

However, it looks likely that more components will be added, potentially opening up new and impressive functionality. OfficialFlance has indicated hoping to gift the machine to a church, and reported building more vending machines.

PC Gamer’s Senior Hardware Editor Jacob Ridley has enthused that the Reddit member’s work here proves “that the tiny Pi computer is a mighty tool in the right hands, despite its diminutive size.” Indeed, you could have already reached that conclusion yourself.

If you are interested in using a Raspberry Pi to revive an old vending machine or a similarly old piece of tech, you could have a good look at the original project thread on Reddit.