A Tweeting Vending Machine

VendingTweets

[Sigurd] manage to obtain an old vending machine from his dorm. The only problem was that the micocontroller on the main board was broken. He and his friend decided they could most likely get the machine back into working order, but they also knew they could probably give it a few upgrades.

This system uses two Arduino Pro Minis and an Electric Imp to cram in all of the new features. One Arduino is connected to the machine’s original main board. The Arduino interfaces with some of the shift registers, relays, and voltage regulators. This microcontroller also lights up the buttons on the machine as long as that particular beverage is not empty. It controls the seven segment LED display, as well as reading the coin validator.

The team had to reverse engineer the original coin validator in order to figure out how the machine detected and counted the coins. Once they figured out how to read the state of the coins, they also built a custom driver board to drive the solenoids.

A second Arduino is used to read NFC and RFID cards using a Mifare RC522 reader. The system uses its own credit system, so a user can be issued a card with a certain amount of pre-paid credit. It will then deduct credit appropriately once a beverage is vended. The two Arduinos communicate via Serial.

The team also wanted this machine to have the ability to communicate with the outside world. In this case, that meant sending cheeky tweets. They originally used a Raspberry Pi for this, but found that the SD card kept getting corrupted. They eventually switched to an Electric Imp, which worked well. The Arduino sends a status update to the Imp every minute. If the status changes, for example if a beverage was dispensed, then the Imp will send a tweet to let the world know. It will also send a tweet to the maintenance person if there is a jam or if a particular slot becomes empty.

12 thoughts on “A Tweeting Vending Machine

  1. Nice! I would like to suggest 3 upgrades though. 1) New front plexi plate, something custom. 2) Don’t tweet just that a drink has been dispensed, but also which type of drink. 3) Fill up one of the drink slots with beer and only dispense it to people with special RFID cards, yum!

  2. I usually think dimly of Internet of Things because it’s adding cost, complexity and security issues without making up for it in usefulness, but there are reasons why a connected vending machine might be very useful.

    1. Very true… a connected vending machine could automatically request restocking, and give an accurate count of what needs restocked, and what doesn’t… No more sending out 40 cases of everything, just to restock the one can of Diet Fresca that Bob drinks every other week…

      Additionally, though it may take some additional verification, flagging failed vends would be quite helpful.

  3. So it “lights up the buttons on the machine as long as that particular beverage is not empty.” And tells “the maintenance person if there is a jam or if a particular slot becomes empty.”
    This needs to happen everywhere, right now!

  4. It should also display the temperature of the beverage areas or slots. so I dont pick one that is warm because they just filled it 10 minutes ago.

    The vending machines here at work need over two hours for the pop to get down to below room temperature after they fill it.

    1. Since it’s an old vending machine, the cooling system is from before anyone was concerned about power usage. It is able to cool a full load of beverages in about 30-60 minutes, and as only one or two rows are empty when it’s filled, getting warm beverages is usually not an issue – would be a nice feature though!

      It also has the feature of always keeping 2-3 cold ones in stock, as the switch for detecting if slots are empty is placed some distance from the bottom.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

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