The development of a vending machine not only puts special demands on a company, but also on developers. For example, the various hardware components must be integrated and combined and then the whole thing needs to be brought to life with appropriate software. The combination of GNU/Linux and QT helps the staff of the embedded system specialists Garz & Fricke from Hamburg to accomplish this.
At the very beginning, cigarette vending machines were a haptic and acoustic experience. At a late-night hour, you inserted a coin that ran through the checking technology with a metallic clatter. Then the click that released the column. Finally, you could pull out the metal tray and remove the box of the beloved, addictive substance. Later, everything went faster and less eventfully: money in, push a button, and the pack landed with a clattering noise in the output tray. Today, cigarettes and other vending machines are once again a bit of a shopping experience – thanks to large screens with touch controls.
Whoever goes to a vending machine in the corner of a bar finds a modern device with a large screen that also likes to be touched, even has to be touched. There are no longer any other mechanical inputs.
Thanks to touchscreens, the operation can be structured flexibly while guiding users. Small videos show them what to do next. Modern technology turns the purchase into a positive experience.
The touch displays provide additional benefits, such as further display options. Machine operators can adapt the content on the screen individually and flexibly. For example, when new machines are not used at the moment, they can display advertising for the latest film or messages – so-called "Digital Signage" -and consequently provide welcome additional revenue. However, the prerequisite for this and for improved prompting is that advertisements run fast and smoothly, without jerks. Garz & Fricke goes the proverbial extra mile here.
The Hamburg-based company conceived the project of the vending machines with a touch-sensitive screen instead of mechanical buttons and keys at its own accord, while at the same time consulting closely with potential customers. Already before the start of the project, developers had to keep in mind the machine’s exterior design.
It would have been easy to cut out a rectangle in the metal door. However, they decided to produce the entire front of glass. This made it a challenging project, which required the entire know-how of the company.
It would have been easy to cut out a rectangle in the metal door. However, they decided to produce the entire front of glass, with an integrated human machine interface (HMI) – sensor technology, touch logic, and control computer. This made it a challenging project, which required the entire know-how of the company. A majority of the hardware components were developed and manufactured in-house, as was the complete software.
The touch display must meet specific requirements. It must record each input sensitively and yet be robust enough to resist potential vandals. Merely installing a thick glass pane does not suffice, as "thick pane" and "accurate operation" are not exactly peas in a pod. Glass of greater thickness breaks down the light. This parallax makes it harder for users to select the various screen controls. This results in decreased sensitivity. You can read how touchscreens become sensitive and robust in the article „Tough performer“ in the E&E 9-16 Int.
Special attention needs to be given not only to the display technology, but also to the software behind it. At Garz & Fricke, the developers decided in favour of the GNU/Linux Yocto "building blocks" in combination with the graphic framework Qt. There were more reasons for choosing Linux than its use without licensing costs, but this was certainly a convincing argument. Even more important for the developers: hardware support is extremely good today.
Yocto is not a standalone Linux system, or “Distribution”, but rather an ecosystem that developers can use.
The participants in the Yocto project created a development environment, with the help of which especially developers can build customised embedded Linux systems in the area of embedded systems and the Internet of Things.
Previously they had to fall back on existing distributions, which were often not flexible enough to be adapted to their own requirements, or put together a full system themselves and compile it. A useful solution has been available with Yocto for a few years now, which was also able to accelerate development at Garz & Fricke. The Hamburg-based developers primarily define Yocto by its standardised architecture and high adaptability. Useful hardware support templates, as well as templates for the integration of complex libraries for application support, are managed in formulas. This results in a configuration that contains all of the information necessary to reliably reproduce the Linux image version at any time.
The developers then employ the Qt Framework on this basis – Qt is one of the participants in the Yocto Project –, thus creating the actual application for the vending machines. Since Qt5, QML-based (and in part even HTML-based) programming is possible, which makes programming easier. The interfaces can be described intuitively with declarative QML programming. Scaling is supported, which makes development more flexible, as it is no longer required that every element must already be set to the precise pixel from the outset. In addition, graphics and videos are very well supported, which makes embedding in the graphical user interface (GUI) much easier.
Although the learning curve was steep, it was not insurmountable. Among other things because you see results quickly as a developer, says Mr Kutzera. The GUI developer also enjoyed that he was almost never in contact with the actual operating system. Nevertheless, in-house expertise was required from time to time, with suboptimal performance for example, which affected the videos. The challenge here was to adapt the software perfectly to the inserted single core CPU and memory. This went so far with the vending machines that the specialists at Garz & Fricke analysed the efficacy of the video codec used and then adapted the timings of the memory accordingly, so that the code then ran optimised.
Originally, two displays were to be used, and even though there was already a working prototype, this decision was overturned for various reasons, reverting back to a one-display model.
However, this did not mean that software development had to start from scratch again. It was possible to realise the conceptual change to one screen in a jiffy. Most of the work involved changes to specific output graphics.
The ready-to-use user interface, HMI, can be employed flexibly. It can be installed not only in newer type machines, but also update older machines to the current state-of-the-art without having to replace the entire mechanics. The system also communicates via the RS232 serial port. Furthermore, the controller can be connected to previous machines. In the first step, only the conventional keys and buttons are eliminated. The old controller is maintained and then communicates with the modern HMI. Later, the individual components can be included in the HMI step by step, and are mapped there.
Of course, the new HMI also offers modern interfaces such as Ethernet, USB, Wi-Fi, Bluetooth, or wireless 4G, in addition to RS232 and MDB. This creates new communication opportunities, but also new points of attack. An attacker could try to exploit security gaps and consequently compromise the machines or the entire network of vending machines in the worst case. Updating the software components is a major challenge, because coordinating and timing updates during on-going operation is often difficult. Garz & Fricke, which have already implemented the networking of more than 40,000 machines, counter this difficulty with specially protected networks. In doing this, the transmission path is secured via a VPN tunnel (virtual private network), which ensures that communication is exclusively possible between the machines and the data centre.
Small circuit boards – great effect: The vending/IoT platform by Garz & Fricke, with 4G modem, not only brings new machines online, but also updates old machines to state-of-the-art technology with its MDB interface.