Smart Vending is a field in the IoT space which has us very excited here at Emutex. The idea of bringing intelligence and connectivity through retrofitting legacy vending machines is a perfect fit for many of the goals of IoT.

 

Specifically for Emutex, it is an excellent application vertical for the ubiworx™ IoT software framework running on the UP board.

Smart vending brings new ways to add efficiency to existing operations through data acquisition and analysis to better manage stock levels, route planning, scheduling maintenance visits and so on. But also smart vending is transformative for the industry in how technology can add completely new dimensions such as image analysis of product dispensed and user behaviour analysis. The possibilities are many to say the least.

 

Project Goals

The ultimate goal of this project is to create a vending kit that can be sold and fitted to legacy vending machines to bring them into the 21st century in a cost effective way. We have short, medium and long term goals in this regard. Firstly, prove the concept by acquiring a legacy snack machine and introducing new technology while maintaining the existing functionality and adding cloud connectivity. Then, add modern interfaces such as NFC cashless payments and touch screen LCD panels. And finally look at introducing cutting-edge image recognition and other features.

To start, we are going to focus on reproducing existing functionally. In our vending machine, an Automatic Products AP113, the control board dates from the early 1990s. It even pre-dates MDB which is the current de facto standard interface for vending machines! So we knew interfacing to this particular machine was going to be a challenge that definitely would prove the concept of legacy machine retrofitting.

Of course replacing the existing control board (see Fig.2) and functionality is only the tip of the iceberg. Once we control the machine, we can then bring the machine into the world of IoT. Using ubiworx™ logic to create local control but also data acquisition and cloud connectivity allows us to connect to cloud based vending applications and other ERP systems to monitor stock levels, remotely change pricing, and many other enhanced features. Since control is now seamlessly connected to the cloud, dispensing product can now also be initiated by the cloud. This allows cashless operation of course, but allows customers to vend products from their smart devices through the cloud. They can check if their favourite snack is in stock without leaving their desk or check for special offers at multiple machines before embarking on a snack run.

Using a device as capable as the UP board to do the local control also allows the addition of a multimedia experience. Video and audio can enhance the user experience. As well as choosing product from a colour touch screen display, users can query details about their product such as calorie counts or fat or sugar content.

Connection of a HD camera to the UP board is also a possible future enhancement. Image recognition opens up many transformational use cases. Machine vendors could use product recognition to ensure operators only stock approved products and that product prices are sold in the correct RRP range. Motion sensing and depth perception can be used to guess the gender of the client or how long is spent choosing a product before a selection is made. These new data points can be acquired and brought to the cloud to allow big data analysis of customer demographics to improve product marketing. The possibilities really are endless.

 

Hardware Setup

We used an Intel vending machine board to do motor control (see Fig.1), coin mechanism interfacing and keypad input and connected this to an UP board to provide local control, intelligence, cloud connectivity and local display. The combination of these two boards forms a cost-effective replacement for the existing control PCB in the machine.

Since we opted to completely replace the existing control PCB, the lack of MDB is not a hindrance. Luckily controlling DC motors is not something that has changed in quite a while so we can still do that. As you can see in the picture on the left, we are creating a custom wiring harness to fit the existing motor control header of the AP113.

The motors are arranged in a matrix of 8 rows and 10 columns. To operate a motor we simply apply 24VDC to the row and ground the column of the motor we wish to turn. The motors are very simple DC motors and do not have limit switches or position encoders or other mechanisms to know when a complete revolution has been completed. But they do typically have a small break or extra resistance at a certain point in their rotation that we can detect by monitoring the motor current. Since we only activate one motor at a time, a single current monitor is sufficient for all the motors.

The Keypad is a simple device with just two wires. Each key has a different resistance, 3K, 6K and so on.

The coin counting mechanism (see Fig.3) uses “Protocol-A” or “executive” which is also supported by the Intel solution. Coin counting and dispensing change is done using protocol-A. The Intel board and API provides a straightforward method to control this from ubiworx™.

Cloud connectivity is a must for any IoT project so we are using a 3G HAT for UP for now. We are of course very mindful that the metal enclosure of the vending machine could form a very effective Faraday cage and that also these machines are often placed in basements or remote locations with poor cellular connectivity. As 3G is not always the best option, we have plans to give support for other communication protocols like Lora, Sigfox or even Wi-Fi, that will also be included as options for the kit.

 

Fig.1

The Intel™ Vending Machine Board used to replace the old one.

vending machine board 3

Fig.2

The existing control board mounted on the AP113

vending control board 2

Fig.3

The Coin-Counting block supported by the Intel™ board

vending coin

 

Software

A key goal of this project for us is to demonstrate some key advantages of using ubiworx™. Ubiworx™ is very modular and extensible, and you can add on support for any sensor you want. So in this case, it is quite straightforward to add new data streams for motor control, coin counting and keypad input. We are also adding custom logic blocks for coin value accumulation and product price lookup. The web UI allows dynamic creation and tuning of logic rules to be executed b y the gateway without ever having to physically access the gateway. The software is ubiworx™ 0.9.1, which is publicly available.

 

Status so far and next steps

We have successfully replaced a legacy control board from a vending machine and reproduced all of the legacy functions using modern hardware and software. Now we are defining the vending kit for the top 10 most popular vending machines. Stay tuned for more updates as we make more progress. In the meantime, there is a video here of products being dispensed through the cloud.

 

Go To Top