📜 ⬆️ ⬇️

IoT in the vending business: intelligent vending

Today we will tell about how the intellectual vending machine was created. First, using the Intel IoT Developer Kit and the Grove IoT Commercial Developer Kit, we built a prototype, which, after successful tests, was transformed into a solution suitable for practical use. In particular, Intel’s Internet of Things Gateway, industrial-grade sensors, Intel IoT Gateway Software Suite, Intel System Studio, and Microsoft Azure cloud services are used in the finished machine. The resulting hardware and software system is able to track the availability of goods in the machine, keep a sales log, remind you of the need to maintain the machine. The gateway collects information from the temperature sensor, from stepper motors that drive spirals for dispensing goods, and from the application responsible for the sale. Data can be analyzed at the gateway and transferred to the cloud for accumulation and further research.



Here you can find the project code. This material contains details on the technical details of assembling an intelligent vending machine, which we will talk about here.

The possibilities that the Internet of things opens up are in equipping the devices we use every day with the intellectual functions of the devices. This, in the end, allows to improve their performance, and if we are talking about a business built on such devices, to increase its efficiency.
')
Here, for example, vending machines that accept coins or banknotes and give the buyer a variety of goods - from a cup of coffee to electronic devices in standard packages. The range of purchases that can be made in this way is extremely wide, and continues to grow. These machines can be found literally everywhere. They work around the clock, buyers willingly use them. As a result, automata are able to generate a significant stream of income, which attracts retailers of the most diverse directions.

The machine does not require the constant presence of a cashier; it can be installed where a regular retail outlet is very difficult to place, say, in the depths of an office building, in a library, or two steps from a busy intersection. However, automatic machines need regular maintenance. Usually it consists in replenishing the stock of products sold or in scheduled maintenance, but sometimes emergency situations occur when the device cannot work normally and needs urgent adjustment or repair.

If the vending machine functions autonomously, a situation requiring urgent intervention can be identified either by customer requests that have encountered a problem and decided to call support service, or at the next scheduled maintenance of the fleet of devices. This alone means potential losses for machine owners. If the owners receive complete and timely information about the state of the devices, this will lead to an increase in the efficiency of their business. Such information will help to optimize the maintenance schemes of the machines, minimize downtime as a result of minor faults or normal situations when a product or ingredient has run out in the machine.

We believe that the introduction of Internet of things technology in the vending business will benefit both sellers and buyers. Therefore, Intel organized a project aimed at creating an intelligent vending machine and exploring the possibilities offered by its use.

Here is the finished device created by the project.

Intelligent Vending Machine

The ideological inspirer of this development was the document on the solutions of Intel and ADLINK Technologies, which allow you to streamline the management of vending machines and analysis of the data that can be collected from them, based on the concepts of the Internet of things.

In this material, we will describe in detail the progress of work, talk about the step-by-step method of development, divided into phases, and then consider each of the phases as applied to our project.

We offer everyone to use the methodology, the implementation of which will be discussed here, in the work on their own IoT-projects aimed at automating trade. Our story will allow you to follow every step that the Intel engineering team went through from the idea to the working model. We believe that the main value of our research lies precisely in the fact that the same approach can be applied to a wide range of developments in the field of IoT.

Methodology


We have already written about the methodology of work on IoT-projects, which provides for the division of the path from the idea to the finished product into six phases. Recall the main content of each of them:

  1. Search for a problem, empty niche or potential opportunity in the market.
  2. Designing a model to test the capabilities of the product to solve the task assigned to it.
  3. Construction, testing and refinement of the physical layout, the prototype of the product
  4. Creating a stable beta version of a product using components suitable for mass production.
  5. Evaluation of product features, expansion of its functionality, testing.
  6. Finalization and optimization of the product, the transition to the production stage.

In this case, the first three phases are considered initial, and the last three are considered final.
This methodology is good versatility. This allows you to apply it to any IoT project. We now tell you how the work was done on an intelligent vending machine.

Phase 1: Determine project potential


While traditional vending machines generate good returns, they are depressingly inefficient. So, each machine needs regular maintenance, most often it is needed to replenish stocks of products. Usually this task is solved by planning the routes that vehicles with service personnel and products for automata ply.

In order to understand the initial inefficiency of such an approach, let us present a very realistic situation on the route, one of whose destinations is a multi-storey office building. The car stops in front of the building and the employee has to decide what to do next. The first scenario of his actions - an attempt to guess what is needed for the machines, say, on the 15th and 20th floors. He takes everything he deems necessary, rises to the machine guns ... But the guess is very likely to be wrong, so the employee will have to visit the machine guns at least twice, although he may be lucky enough to keep within one time. The second scenario implies two visits to the machines without any options being limited to one. First, the employee rises to the devices, makes a list of goods, the stock of which must be replenished, then returns to the car, takes everything he needs, and again goes to the vending machines. And what if one of the machines is faulty? It would be nice to know about this even before entering the route.

As a result, no matter how an employee enters, even if he only needs to replenish stocks of goods, there is an irrational use of time, which ultimately means unnecessary costs for companies owning vending machines.

Moreover, companies are forced to find a balance between too frequent rounds of automata (which increases labor costs) and too rare (which reduces revenues, forcing the automata in which the goods ended up to stand idle). In fact, everything looks even worse, as the company is, to some extent, dependent on conscious (or angry) buyers, who inform it that the machine is not working or that the product has run out.

Project initiators at Intel found out that smart vending machines are quite suitable as a base for a project that demonstrates the potential of IoT and the methodology we mentioned above. The initial group identified a set of knowledge and skills that would most likely be needed during the course of the work. Among them were project management, programming, designing cloud architectures, developing and maintaining documentation. Based on this list of required skills, the core group formed a team that mainly included Intel employees. The work involved and third-party specialists, whose knowledge complemented those that were already members of the team.

The first task that the full team had to solve was to assess the potential of the project, identifying which, in turn, helps design the prototype of the device.

Having solved this problem, the team found out that the most important thing in this project is the ability of the vending machine to track product availability and its own state, transferring the collected data to the cloud storage using the Internet of Things gateway.

One of the parts of the developed software and hardware solution is based on the use of cloud services. They were planned to be used for storing and analyzing data, for organizing the functions of administering automata and for solving other problems. The most important goal of this approach was to create a scalable solution that allows you to aggregate data from an arbitrarily large fleet of vending machines, and, based on the analysis of this data, optimize business processes. The main value of the cloud approach is analytics. In addition to information on the actual state of affairs, this also means the possibility of fairly accurate forecasting, which makes it possible to optimize supply chains and increase the efficiency of the personnel serving the machines.

Phase 2: Designing a model to test the concept


In order for the project experience to be as useful as possible to the developer community, it was decided to use easily accessible components and technologies to create the model. So, the set of materials was limited to the Grove IoT Commercial Developer Kit and the Intel IoT Developer Kit. In terms of software technology, the choice fell on those that are widely used, are available free of charge, or are inexpensive. Special attention was paid to the use of free, open source software wherever it is justified.

In order to speed up the development phase of the prototype and reduce its complexity, the team decided to build a local part of the prototype in the form of a bench model, which consists of a computing platform and sensors, without including components related to the vending machine. Work on the machine itself was postponed to the later stages of the project.

â–ŤSelect hardware for prototype


For the prototype was selected computer small form factor Intel NUC Kit DE3815TYKHE. It plays the role of an IoT gateway.

Intel NUC has a decent level of performance that meets the needs of the project. In addition, this computer is one of the most recent platforms from Intel, aimed at the Internet of things, which makes it a candidate for use in today's and future IoT-systems. The device is based on the Intel Atom E3815 processor, equipped with a passive cooling system, has 4 GB of internal memory and supports the connection of SATA-drives. Intel NUC contains a wide range of I / O ports, it is designed as a compact device, the performance and capabilities of which are comparable to desktop PCs.

Computer Intel NUC Kit DE3815TYKHE

In order to simplify the process of interaction with sensors, the team decided to use the capabilities of the Arduino ecosystem and use the Arduino 101 board, as shown in the figure below.


Arduino 101 board

Thanks to the Arduino 101, NUC can be linked to Arduino expansion boards. In addition, the Arduino platform perfectly matches the team’s desire for free open source software. It should be noted that at the current stage of work far from all possibilities of the hardware are used. Among them is a Bluetooth adapter built into the Arduino 101. According to the developers, this wireless technology may well be used in future versions of the project.

Here are the characteristics of the computer and the board.
Characteristic
Intel NUC Kit DE3815TYKHE
Arduino 101
Processor / microcontroller
Intel Atom E3815 processor (512 KB cache, 1.46 GHz)
Intel Curie Compute Module, 32 MHz
Memory
8 GB DDR3L-1066 SODIMM (maximum)
196 KB of flash memory
24 Kb SRAM
Network Capabilities / I / O Ports
10/100/1000 Mbps integrated network adapter
14 digital and 6 analog outputs
Dimensions
190 mm x 116 mm x 40 mm
68.6 mm x 53.4 mm
Specification
Full specification
Full specification

Sensors and other components required for prototyping were taken from the Grove Starter Kit for Arduino (manufactured by Seeed Studio), which is based on the Grove Starter Kit Plus used in the Grove IoT Commercial Developer Kit. This set of components is inexpensive, its use simplifies the selection of materials for IoT-prototyping.

When selecting sensors and other components, the team was guided by the fact that the system requires the following information about the vending machine:


Details on the components that will allow you to collect this data will be discussed below.

Prototype software


The team considered the Yocto Linux and the Intel IoT Gateway Software Suite as operating systems for the computer playing the prototype gateway role. Yocto Linux fits perfectly with the desire to use free open source software. This OS has a high level of flexibility, allows you to create lightweight assemblies that are focused on the needs of a particular system. Intel IoT Gateway Suite, on the other hand, offers a ready-to-use solution that does not need additional adjustment to the needs of the project. The team found this combination of factors most suitable for prototyping. As a result, the Intel IoT Gateway Software Suite was chosen as the OS for the gateway.

The software part of the project, in addition to the OS, includes the following applications:


Phase number 3. Prototype creation and development


The conceptual prototype was created by a team using the Intel NUC Kit DE3815TYKHE computer, the Arduino 101 and the Grove Starter Kit Plus IoT Edition. It is presented in the figure below. The prototype simulates a vending machine that sells two kinds of goods.


Prototype vending machine

The prototype includes an LCD display that can display 2 lines of 16 characters each. It displays product names and price information. Here there are two product selection buttons, a stepper motor for the purchase system, two LEDs (green and red), indicating the state of the machine. In addition, the prototype includes a temperature sensor and a "fault detection" button. In order not to complicate the prototype, the systems necessary for receiving payments are not included in it. As a result, when the user presses the purchase button, the product is issued to him without any questions.

Here are the components included in the hardware implementation of the prototype.

The main system.


Components from the Grove Starter Kit Plus IoT Edition.

Software prototype implementation


The control application used in the prototype was written in C ++. It also uses a component on Node.js to access the Microsoft Azure cloud service. The cloud is used to exchange data, in particular, event information, with mobile and administrative applications. These events include, for example, temperature status alerts and requests for the issuance of goods. Mobile app for buyers was written in JavaScript and intended for use in a web browser. This approach was chosen in order to avoid the need to rewrite the program for different mobile platforms.

The development was done using the Intel System Studio package and the Eclipse IDE plug-in, which helps to connect to the Intel NUC and create C / C ++ applications.

In addition, during the work, the C / C ++ library Libmraa was used, which allows direct access to I / O to the NUC, as well as Firmata, which allows you to organize programmatic interaction with the Arduino development environment using the capabilities of the Arduino hardware abstraction. The Libmraa library allows for improved programmatic control over I / O facilities at the NUC, simplifying the process of collecting sensor data. UPM provides special function calls that are used to work with sensors.

Phase number 4. Creating a stable beta version


When the prototype showed that the project fully met expectations, the team switched to creating a working version of an intelligent vending machine. In general, the solution consisted of the following main parts.


â–ŤSelection of components for vending machine


At the initial stage of the project completion phase, the components were selected, from which the ready solution will be built.

The prototype was created as a bench model, and at this stage of the project development a real working vending machine will be built. The team considered two options. The first was the self-assembly of the automaton, the second was the purchase of a used automaton and its modification for the needs of the project. As a result, the option of creating your own automaton was chosen in order to make it universal and take into account the features of the project. The figure below shows the machine at an early stage of assembly.


Vending machine assembly

This is a desktop machine designed to sell various small-sized products packed in boxes in blisters and bags. The machine has three springs for the issuance of goods, each of them is configured for goods of different sizes.


The springs are driven by stepper motors, the product falls into the opening tray located at the bottom of the machine. The plexiglass window is provided in the case so that the customer can see what he chooses, and the seats under the screen, and possibly the keyboard.

Powder-coated steel elements are used as the case material, the trays are made of aluminum, the springs are made of steel with a protective coating. The front of the machine opens to place products in it, the back panel is made removable - for installation and maintenance of mechanisms. It is planned that the weight of the machine will be slightly more than 30 kilograms, dimensions - about 60 cm in depth, about 90 cm in height and 75 cm in width.

Some of the key decisions made at this stage of work include the choice of industrial-grade sensors, a gateway built on the basis of Intel components and commercially available, an operating system, a cloud service for storing and analyzing data, and a software application platform for administrators and buyers.

â–ŤSelection of sensors and other components


Here are the components that replace the parts from the Grove Starter Kit used in the prototype in a working vending machine.


â–ŤSelect Gateway


Here are the main factors, guided by which the team chose the gateway for the vending machine:


As a result, the Dell iSeries Wyse 3290 IoT Gateway was selected for the project. This gateway provides the necessary level of performance for both existing functionality and possible future expansion of the project. Namely, it is equipped with an Intel Celeron N2807 processor (clock speed up to 2.16 GHz, 1 MB of cache memory), 4 GB DDR3 RAM (1600 MHz). The device is equipped with a network card (10/100/1000 BASE-T), Wi-Fi adapter (802.11a / b / g / n / ac) and Bluetooth 4.0 Low Energy module. The gateway has small dimensions (69 mm x 197.5 mm x 117 mm) and weight (2.34 kg).

The Dell iSeries Wyse 3290 IoT Gateway is easy to get, even in large quantities, which is important for a hypothetical situation when a vending machine described here goes to the market.

After the gateway was chosen, it was necessary to determine the OS for it. In the prototype, on the Intel NUC, the Intel IoT Gateway Software Suite was already used. The gateway supports the installation of this OS, it is certified for it, so it was decided to leave the Intel IoT Gateway Software Suite. This solution simplifies the transfer of software developments made at the prototyping stage into a working vending machine. Facilitates this process and the application of the same as in the prototype, the development environment, namely, Intel System Studio and auxiliary libraries.

System Architecture


The system includes the following main software parts:



The scheme of interaction of various program components of the project

Now we will talk about the structure of the gateway software and the cloud solution, and below we consider applications for administrators and customers.

Gateway software


The software with which the gateway is equipped consists of three parts:

  1. A control application written in C ++ using the libmraa and libupm libraries from the IoT Developer Kit. It solves the following tasks:

    - Monitoring the health of the mechanical parts of the machine and logging the results of checks in a local database.
    - Monitoring of temperature fluctuations, in particular, its output from a specified range, both downward and upward. The system responds to unwanted temperature changes by sending notifications to the administrator.
    - Delivery of the goods on command, coming to the machine from the cloud. The cloud, in turn, the corresponding team comes from an application for buyers.

  2. The local database is used to organize the exchange of data between the control application and the database daemon. The local SQLite database uses the $ HOME / Vending_Prototype / events.sqlite3 file , which contains the “events” table, which records information about events that need to be sent to the cloud. The event table is synchronized between the cloud and the gateway.

  3. The database daemon is implemented on Node.js. It synchronizes event records between the local database and the cloud.

â–Ť The implementation of the cloud-based solution based on Azure


The cloud part of the solution is responsible for storing data on the number of goods in the machine. In it, the user application and the automatic machine, information on events is transferred. In the cloud, data analysis and call procedures are performed that ensure the system's response, for example, to an extremely small amount of goods in the machine or to a malfunction. Basically, cloud processing tools provide the following functionality:


Phase number 5. Evaluation of product capabilities and enhanced functionality


The project team, engaged in work on the vending machine, consisted mainly of engineers. They didn’t have enough experience in developing user interfaces. Therefore, to work on the interfaces of applications attracted external resources. The invited specialist participated in the team meetings.

In the course of these discussions, the interface was refined and some additional features were included. For example, in the administrative application, color coding of quantity indicators was applied, and an option was added to select the temperature display format (in degrees Celsius or Fahrenheit). In the app for buyers, they added a purchase confirmation function before performing a transaction, and also made some other minor improvements.

After decisions were made to create a working version of the vending machine, several team members decided to find out how to improve it, what functionality built on an existing base could be added to it in the future.

â–ŤImprove cloud analytics


Microsoft Power BI Power Bi Desktop – -, Microsoft Azure. Power BI , – . , .

â–Ť


, , , , Azure. , , :


6.


. .

â–Ť


, , .




, .

  1. Home , ( ). About , Setup ( – ). Log , , . Alert , .

  2. , , , . - , . , . , . , . , , , , .

  3. . . . , . .

  4. , , . - , , - , .

  5. , , , , , .

â–Ť


. , .




, :

  1. , , . , , . , Buy , . , . , .

  2. . . .

â–Ť


, , .




findings


, , IoT-.

, , . . – . , , . . , , , , , , .

One of the features of our project is the approach to working with cloud services. Namely, cloud computing is often associated with the search for valuable information in big data, with the accumulation and study of huge amounts of information, and with nothing else. In our project, we also deal with data storage and analysis, but cloud services, in addition to traditional functions, acquire the role of a communications hub for system components. We think it is worth pondering over this.

As a result, we would like to note that we are confident that the technologies of the Internet of things can have a significant positive impact on the vending business.

Source: https://habr.com/ru/post/399027/


All Articles