Your BDE terminal: Efficiently record and use operating data with the Raspberry Pi

Efficient data collection in factories: How the Raspberry Pi overcomes the challenges of Industry 4.0

As industry continues to digitize, people's responsibilities are also changing. Yesterday's factory worker will probably be confronted with completely new and more demanding tasks in Industry 4.0. In order to fulfill this role, it is crucial that employees receive the right information to carry out their tasks independently and independently. To ensure that relevant information reaches the right person in the right place at the right time, it is helpful to record the required data in production and then process it accordingly directly on site.

To ensure that your factory is prepared for these new requirements, there are various approaches. The most expensive but also the cleanest solution would probably be to replace all old machines with new ones that are already equipped with native interfaces for data collection. However, as this is not an option in most cases, retrofitting options for existing machinery are often sought. Mini-computers, such as the Raspberry Pi, are ideal for this purpose.

Raspberry Pi — the mini computer with maxi potential

The Raspberry Pi is a single-board computer that was originally used for learning and crafting purposes. However, due to its versatility and simplicity, it is now also used in many industrial environments. Thanks to its great popularity, a veritable community with a very large knowledge base has been formed. If you have any questions about Raspberry Pi, whether about general difficulties or detailed crafting instructions, this community will help. Alternatively, prefabricated solutions are also available commercially. Nevertheless, implementing a project with Raspberry Pi requires a certain basic technical understanding, as well as time and will to deal with the subject matter in detail. But how exactly do I build my own terminal for operating data collection with the Raspi — as the Raspberry Pi is also affectionately known?

Before you start:

So that you can implement your project in a structured way with Raspberry Pi, you should first answer a few questions:

  • What is the source of the data and what is the destination?
  • Which model of Raspberry Pi should be used?
  • Are sensors or other hardware required in addition?
  • Which operating system should be used?
  • Where does the software to process my data come from?

What data and what to do with it?

First, think about what the source of the data is and what the destination is. A variety of data sources would be possible for a BDE terminal, including sensors or microcontrollers such as a arduino. In general terms, everything that provides interesting data is a source. There also doesn't have to be a direct industrial or company-related connection here. For example, it can also be useful to process generally valid data on weather, traffic or world events, as used for digital signage systems.
In addition to data storage, goals can also include further projects based on the BDE terminal. One example would be an IoT dashboard, which could be implemented with another mini computer and visualizes the data from the BDE terminal. Warnings via industrial traffic lights or loudspeakers could also be useful to make the best possible use of the recorded operating data. In our case, the answer to this question lies in the problem definition. As an example, we want to read data from bar codes and persist it in a database. As a source, I would therefore have the barcode and the destination of the data the database.

Which Raspberry Pi is right for me?

Under www.raspberrypi.org You can find all variants of the Raspberry Pi. But which is the right one for this application? How do we find a solution that is as inexpensive as possible but works? First, the product selection should be limited based on their function.
For the desired data in our example, we need a way to read a barcode. Since there is no Raspberry Pi that supports this natively, an additional device is required here. The simplest option for barcodes here would be a USB-enabled barcode scanner. Such devices can be found very quickly on the Internet through a simple search. For our Raspberry Pi, this in turn means that we absolutely need a USB port. To access our database, which is on the network, a network connection is also required. Under these conditions, Raspberry Pis 1-4 are suitable. Which of these exactly should be purchased depends in turn on various factors such as computing power, size, power consumption and price as well as their weighting.

Which operating system is the right one?

Before the actual project can be implemented on Raspberry Pi, it is necessary to select a suitable operating system. Basically, all common operating systems can be installed on Raspberry computer hardware. However, a “lightweight” variant should be chosen for a dedicated application on a computer that is not too powerful — which applies here.
For example, “Windows IoT Core” is available as a Windows-based system. With Linux-based systems, the selection is significantly larger. For example, Raspberry Pi OS — the dedicated operating system of the Raspberry Pi Foundation — can be selected. Alternatives would be stripped-down versions of well-known distributions such as “Ubuntu Core” or lightweight variants such as “Arch Linux” as standard.
There are no license fees for “Windows IoT Core” as well as for most Linux distributions.
Other important factors for choosing the right operating system include, on the one hand, the surrounding infrastructure and, on the other hand, previous knowledge of the various programming languages and the use of operating systems.
If the application running on it is later to be based on Python, the right choice is a Linux distribution. If, on the other hand, C# is to be used, Windows IoT Core is the right choice.

Where does the software to process the data come from?

There are already many different applications for the Raspberry Pi. For example, programs for managing emails or an MQTT broker can be installed and configured without much effort. However, if specific tasks are to be completed, then specifically adapted programs are also required, making the use of a programming language essential.
In the example with the barcode and the database, the application must receive data from the connected barcode reader and write it to the database. To do this, incoming text inputs must be able to be processed. A connection to the desired database is also required in order to be able to store the incoming information correctly.
What exactly the development and programming of such an application looks like is not discussed in more detail here. The effort depends heavily on how easy the application should be to adapt if the desired data or its format changes.
If you haven't had any previous experience with programming languages, visual programming can be helpful. This can be done by taking a look at Node-Red or Google Blockly worthwhile.

Conclusion.

The Raspberry Pi is a versatile single-board computer that can also be used to create a BDE terminal. However, since this requires very specific processing of data, there will be no ready-made software solution available in most cases. For efficient implementation, it is therefore necessary to implement the required software yourself. However, this requires time and previous knowledge or more time and the will to learn new things.
Proprietary solutions offer alternative approaches, which either completely take over the development of a BDE terminal or at least significantly simplify it. At Peakboard, we provide an approach that allows you to determine the relationship between your own effort and external costs yourself.
We have set ourselves the goal of offering a platform with which end users can implement their own projects without prior knowledge within an acceptable period of time and also adapt them later. Alternatively, we also offer complete implementations based on our own platform. It's best to download our software, the Peakboard Designer, down and see for yourself. Have fun implementing it!

Share this article:
Author: Tobias Nieß

Tobi ist seit 2019 Mitglied des Dev Teams bei Peakboard und konzentriert sich hauptsächlich auf maschinennahe Daten und Protokolle wie SPS-Anbindungen, OPC UA und MQTT. Außerdem glänzt er mit der Fähigkeit, komplexe technische Themen verständlich zu erklären.