Skip to content
Mohammad Haseeb edited this page Feb 2, 2019 · 3 revisions

Overview

Vendiverse is an open-source Vending Machine Controller project. It is customizable to be used in all vending purposes such as snack vending and beverage vending machines. Despite its powerful functionalities, it can be build using parts that can be easily found on electronic hobbies stores such as SparkFun. Vendiverse utilizes Orange PI Zero as the CPU and SoC and Atmega AVRs for peripheral control. Total cost of Vendiverse VMC does not exceed 30 USD.

If you are interested in making a board, you can go to** Making a Vendiverse VMC Board**. If you have made or obtained a board, you can go to **Programming a Vendiverse Board **to start.

Vendiverse provides both open-source harware and software required to build a fully functional vending machine from scratch. Functionalities are listed below but not limited to these:

  • High performance, Quad Core 1 GHz CPU

  • 256 MB of RAM to meet all software requirements and support embedded Linux environment

  • Python based VMC Application that can be customized for all needs

  • SQL Database for easy reporting and customization

  • On-board 10/100 LAN and Wi-Fi interfaces to allow remote control, update and telemetry

  • MDB compatible payment device interface for coin changer, bill acceptor and cashless payment

  • 4 lines LCD multiple character display support

  • AV Output for any size TFT and Full-HD H.264 hardware decoder for video playback

  • Matrix keypad support

  • Multiplexed tray controller that can drive up to 1000 vending motors

  • Product sensor support

  • Up to 4 slave machine support

  • 10 General Purpose IO Port for all kind of sensors

  • 2 temperature sensor support to control temperature of lower and upper trays

  • On-board temperature controller relays for cooler compressor and fan

  • USB port for Flash Drive to collect data or update firmware

  • USB port for barcode reader or receipt printers

  • USB port for surveillance camera (Up to 3 cameras)

  • OTA (Over the Air) Update

  • Remote stock and cashbox control

  • RBG Led Driver for colorful lighting

  • PWM Led Controller for dimming and energy saving

  • MiFare Contactless Card Support

  • NFC Mobile Payment Support

Elivend_explained

Figura 1A

Architecture

Below you can find hardware architecture of Vendiverse.

Vendiverse Architecture

Figure 1A

Vendiverse Hardware

Vendiverse hardware consists of two compulsory board and numerous optional devices.

Compulsory hardware is:

  • VMC Board

  • Tray Board

  • Character LCD Display (4x20)

  • Keypad

  • One or more payment device

  • Power Source (Minimum 24V, Maximum 35V)

Optional hardware is:

  • Product Drop Sensor

  • TFT LCD Screen with AV Input (NTSC or PAL)

  • USB or IP Camera

  • Cooler (Compressor and/or fans)

VMC Board

VMC Board is the heart of all vending functionalities (Image 1A). VMC Board contains necessary electronic modules for operation. These are:

  • Central CPU Module - System-on-chip Micro PC Module with Linux OS where VMC Software resides.

  • Power Module - Regulates input voltage and / or converts to appropriate levels.

  • Real-Time Clock Module - DS1307 based RTC clock to store and keep date and time during power downs.

  • MDB Module - Controls MDB Payment devices and acts as interface between Central CPU and MDB Payment devices.

  • Environment Module - A S.M.A.R.T (Self monitoring and acting) module that controls environment, lighting and cooler.

  • IO Module - Gathers input from peripherals such as keypad or switch sensors and send to Central CPU and vice versa.

Table of Vendiverse AVRs

Module AVR Interface OPZ Port Address
Environment Module Atmega8 I2C TWI-1 0x11
IO Module Atmega8 I2C TWI-1 0x10
MDB Module Atmega328 UART UART-1 None
Tray Module Atmega8 I2C TWI-1 0x20-0xFF

Tray Board

Tray Board is stand-alone board that controls vending motors. Each tray requires a Tray Board. Tray Boards are connected to VMC Board in series and uses a multiplexed interface to communicate to VMC Board. Every tray board can control up to 16 vending motors and up to 128 trays can be connected to a VMC Board. This enables VMC Board to be used on all sizes and varieties of vending machines.

Elivend_tray_controller

Image 1B

Product Drop Sensor

Vendiverse also offers a product sensor which will detect drop of product in order to work reliably. Product sensor senses if a vending operation has successfully delivered a product to customer and if not, it will try giving product again by powering up vending motors on selected shelf or it may return the funds added by customer. Also, product sensor can monitor undelivered items on shelves and trigger an "out-of-stock" condition so that the shelf becomes disabled until a refill by operator. A product sensor is an optional module for a vending operation. If not present, vending machine can also work. However, it will be a "blind" operation because VMC will never be able to make sure that product is delivered. If the customer is not refunded after a non-delivery, it will degrade customer satisfaction and also may lead to legal consequences. For a reliable vending operation, it is strictly advised to use a product sensor.

There are a lot of product sensor available on the market. Each has its own mechanism to sense a product delivery. Some are prone to specific conditions, some may have life-time and reliability issues. Also, output may differ. Some may send a pulse, some may be active high or low, some may send an analog signal or some may send digital data with sensed variables over a wide range of protocols. In order to lessen integration problems, Vendiverse offers a unique and reliable product drop sensor which can check one or more data from sensors:

Sensor types used in Vendiverse Product Drop Sensor

Sensor Type Remarks
Infrared Sensor Two arrays of infrared receiver and transmitters are placed on the edges of product delivery container facing each other. If any object passes in between receiver and transmitter, this will trigger a product delivered condition.
Acoustic Sensor In some situations, infrared receiver and transmitters can be affected by the ambient infrared noise. If a microphone is attached on sensor board, acoustic sensor (microphone) will also listen for drop sound to make sure product is delivered.
Pressure Sensor If enabled and placed correctly, a piezoelectric sensor can sense the pressure the drop of a product. It should be placed as an array at the bottom part of delivery container.

Sensors listed above makes sensing quite reliable with an accuracy of 99.998%

Character LCD Display

Vendiverse uses character lcd display as the main informative screen. Software is developed according to 4 lines, 20 characters display. Character LCD Display is connected to Vendiverse VMC Board over reserved I2C port. If your character lcd display do not support I2C, you can use a serial to parallel lcd display converter. Below you can find the link to obtain one:

Parallel to I2C LCD Display Converter on Amazon

Vendiverse LCD

LCD Display with I2C Paralel-Serial Converter

You can use any size Character LCD Display with Vendiverse provided that it works with 5V Vcc.

Keypad

Keypad is used as the main human interaction device on Vendiverse. Although Vendiverse supports voice recognition, it is not mature yet and it should only be used as a secondary input for disabled people that can not use keypad.

Vendiverse has a 8 PIN IO port to use 4x4 keypads. All generic 4x4 keypads use 8 PIN configuration. Some keypads with back light can have 2 additional pins as power source. If you want to use keypad with back light that has 10 pins, please make sure you use Vendiverse v0.2 or above board. Vendiverse v0.1 VMC Board does not have inline 10 PIN keypad port. You may use 8 Pins of the keypad and get the power source additionally from the power source and still use v0.1 board if you prefer.

Keypad

Sample 4x4 Keypad with Back Light

Vendiverse Software

Vendiverse offers open-source software for all modules listed above. Central CPU Module uses Armbian OS (Debian flavored Linux distribution tailored for Orange PI) and VMC Software developed using Python. All other modules use Atmega AVRs and software running on AVRs are developed using C/C++.

Vendiverse Armbian Image

VMC Software can be downloaded seperately or you can download Armbian OS image, extract the bootable image to a Micro-SD card and insert the card into your Orange PI Zero and start using it. SD-Card image contains all configurations, libraries and VMC Software required for Vendiverse and you don't need to install anything if you use Vendiverse Armbian Image.

Vendiverse AVR

There are three Atmega AVRs used on VMC Board. You need to program AVRs with .HEX files that you can get from Downloads page. Also, you may compile C/C++ code using Arduino environment and program AVRs from the source code provided. AVRs used on VMC Board are:

  • Atmega8 (Environment module)

  • Atmega8 (IO Module)

  • Atmega328 (MDB Payment Controller Module)

  • Atmega8 (Tray Module)

Database

Vendiverse uses MySQL or MariaDB to store information related to all Vending purposes. This database has currently 7 tables. Below you can find tables and their purposes:

List of Tables on Database

Table Name Description
product Product information product prices are stored in this table
sale Sales are stored in this table with all necessary information about every single sale
shelf Shelf configurations such as tray number, motor number and which product is on sale on this shelf, capacity and remaining stock are stored on this table
parameter All parameters related to vending operations are stored in this table
_day, _month, _day Used for generating reports and contains static data