Futurising a retro vending machine

At Bright Signals we were recently commissioned by a client to create a prototype vending machine, incorporating touchscreen product selection and NFC-based payment tokens.

The starting point for the machine was to be a late 90s-era Vendo vending machine which had seen better days. The machine had served over 15,000 cans over its career, but its heavy-duty vending mechanism was still in great shape.

Thanks to a clever series of shafts, pivots and swing-arms, the machine can vend four can positions per column (left and right side, both front and back) from a single AC motor.

The electronics side of things was a bigger challenge. The machine still had its main circuit board, but was missing the sub-board that would accept coins or place the machine into free vend, so there was no way to test if it worked fully.

As the goal of the project was to accept NFC tokens as payment, I decided to completely ditch the electronics and replace them with a Raspberry Pi and some relays.

First step was to understand the mechanism: The machine has five vending columns, each of which is designed to store and vend cans or bottles in a zig-zag pattern left, right, left, right, etc. For bottles, the machine would simply alternate left and right, but for cans the machine could double its capacity by storing cans two-deep; serving left front, left back, right front, right back, etc.

Whether a column is in can or bottle mode is determined by a movable ‘blanking disc’ on the motor wheel: with the disc open, the motor wheel has four stop positions, but with it closed it has only two. A microswitch detects when the wheel hits a stop position, with a second microswitch detecting when the column is empty.

I wired the ten microswitches to the Pi’s GPIO, with another five pins being dedicated to a set of relays to control the motors. The motors themselves required 24V AC, which was a bit of a concern until I found that the main PSU within the vending machine had a dedicated 24VAC output.

The Raspberry Pi and relays were housed in a weatherproof electrical box. Most of the wiring was reused from the original loom.

With everything wired up, I wrote a Python script to switch the motor on whenever requested by the front-end, and off again when the relevant microswitch flipped open. A simple bit of inventory control allowed the script to automatically move on to the next column with the same product when one was empty.

Fortunately, it all worked pretty well first time, allowing me to hand the touchscreen build over to my colleague, Jack, while I took a quick family break.

Jack did wonder with the front end (as he always does), so all that was left was for me to hook up the NFC reader and build a new plywood door to house the touchscreen and replace the ageing tube-lit acrylic front.

With the (usual) tight deadline, I worked through the night to complete and paint the machine before it went off for vinyl wrapping the next morning.

I’m really pleased with the end result — the machine looks great and works really well. Best of all, it fits in perfectly next to the off-the-shelf NFC draught beer vending machine they already have.

5 thoughts on “Futurising a retro vending machine

  1. Awesome build! I’ve been looking into a business idea using a Raspberry Pi to retrofit old vending machines like you’ve done here. How did you integrate cashless payment? I’m trying to figure out how to accept credit cards, but not sure if Raspberry Pi can do the handoff to a CC terminal, then receive the payment-complete signal back, while being PCI compliant. Did you have to deal with any of that? Or was this not accepting real money? Thanks!

    Like

    1. Hi!
      The machine I build used pre-paid NFC cards for payment, so didn’t need to worry about working with real credit cards or PCI compliance.

      However, if you want to take card/contactless payments on old vending machines then there are off-the-shelf card readers that upgrade old coin/note systems to take cards. Seems fairly plug-and-play… https://www.parlevelsystems.com/parlevel-pay-plus/

      If you had a more complex requirement – like you were trying to upgrade a 1950s mechanical vending machine to accept cards, then one of the above terminals outputting its signal to an Arduino would work, and would be compliant. From the Arduino you’d then be able to control whatever servo/motors you need to push the original mechanism.

      Hope that helps. Drop me a line with more details if you need help.

      Like

      1. Thanks Grant! Really appreciate it! I’m still building out the concept, but I might take you up on more help in the future 😉

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.