Tech Talks

Your shop floor data terminal: capture and use operating data efficiently with the Raspberry Pi

Find out how the Raspberry Pi, a versatile single-board computer, is transforming Industry 4.0. This blog post shows you how to use the Raspberry Pi to build your own terminal for capturing operating data — from choosing the right model through to software development, with practical tips for making your factory fit for the future.

02.04.2024

·

6 min read

Close-up of a Raspberry Pi single-board computer with microchip and circuit tracks.
Key takeaways
  • A Raspberry Pi is a low-cost mini computer that captures operating data right at the machine.
  • With Peakboard it becomes a full shop-floor data terminal – without expensive special hardware.
  • What matters: the right Pi model, a suitable operating system and the data connection.
  • This digitalises even small lines cost-effectively.

Efficient data capture in factories: how the Raspberry Pi meets the challenges of Industry 4.0

As industry continues to digitalise, people's responsibilities are changing too. Yesterday's factory worker will probably face completely new and more demanding tasks in Industry 4.0. To live up to that role, it is crucial that employees receive the right information so they can carry out their tasks independently and on their own responsibility. For relevant information to reach the right person in the right place at the right time, it helps to capture the required data in production and then prepare it directly on site.

There are various ways to prepare your factory for these new requirements. The most expensive but also the cleanest solution would be to replace all the old machines with new ones already equipped with native interfaces for data capture. As that is not an option in most cases, retrofitting options for the existing machinery are usually sought instead. Mini computers such as the Raspberry Pi are ideal for this.

Raspberry Pi — the mini computer with maxi potential

The Raspberry Pi is a single-board computer originally intended for learning and tinkering. Thanks to its versatility and simplicity it is now also used in many industrial environments. Its popularity has produced a substantial community with a very large knowledge base. Whether your question concerns general difficulties or detailed build instructions, that community will help. Prefabricated solutions are also available commercially. Even so, implementing a project with the Raspberry Pi requires a certain basic technical understanding, plus the time and willingness to get into the subject in detail. But how exactly do you build your own terminal for operating data capture with the Raspi — as the Raspberry Pi is affectionately known?

Before you start

To carry out your Raspberry Pi project in a structured way, you should answer a few questions first:

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

Which data, and what to do with it?

First think about what the source of the data is and what the destination is. A wide range of data sources is conceivable for a data terminal, including sensors or microcontrollers such as an Arduino. Put generally, anything that supplies interesting data is a source. There does not even have to be a direct industrial or company-related connection: processing general data on weather, traffic or world events, as used for digital signage systems, can be just as useful.
Besides storing data, the goals can also include follow-up projects that build on the data terminal. One example would be an IoT dashboard implemented with a second mini computer that visualises the data from the terminal. Warnings via industrial signal lights or loudspeakers can also help to make the best possible use of the captured operating data. In our case the answer lies in the problem itself. As an example, we want to read data from barcodes and persist it in a database. The barcode is therefore the source and the database the destination.

Which Raspberry Pi is right for me?

You will find all the variants of the Raspberry Pi at www.raspberrypi.org. But which is the right one for this application? How do we arrive at a solution that is as inexpensive as possible and still works? Start by narrowing the product selection down by function.
For the data in our example we need a way to read a barcode. Since no Raspberry Pi supports that natively, an additional device is required. The simplest option for barcodes is a USB barcode scanner; such devices are easy to find online. For our Raspberry Pi that means we definitely need a USB port. To reach our database on the network, a network connection is required as well. Under those conditions the Raspberry Pi 1 to 4 all qualify. Which one to buy then depends on factors such as computing power, size, power consumption and price, and on how you weight them.

Which operating system is the right one?

Before the project itself can be built on the Raspberry Pi, a suitable operating system has to be chosen. In principle, all the common operating systems can be installed on Raspberry Pi hardware. For a dedicated application on a computer that is not especially powerful — which applies here — a lightweight variant is the better choice.
On the Windows side, “Windows IoT Core” is available. Among Linux-based systems the choice is considerably wider. Raspberry Pi OS — the dedicated operating system of the Raspberry Pi Foundation — is one option. Alternatives are stripped-down versions of well-known distributions such as “Ubuntu Core”, or distributions that are lightweight by default, such as “Arch Linux”.
Neither “Windows IoT Core” nor most Linux distributions charge licence fees.
Other important factors in the decision are the surrounding infrastructure and your existing knowledge of the various programming languages and operating systems.
If the application running on it is later to be based on Python, a Linux distribution is the right choice. If C# is to be used, Windows IoT Core is.

Where does the software to process the data come from?

Many different applications already exist for the Raspberry Pi. Programs for managing email or an MQTT broker, for instance, can be installed and configured without much effort. If specific tasks are to be handled, however, specifically adapted programs are needed too, which makes working with a programming language unavoidable.
In the barcode and database example, the application has to accept data from the connected barcode reader and write it to the database. To do that, incoming text input has to be processed. A connection to the target database is also required so the incoming information can be stored correctly.
Exactly what developing and programming such an application looks like is beyond the scope of this post. The effort depends heavily on how easy the application should be to adapt if the required data or its format changes.
If you have no previous experience with programming languages, visual programming can help. It is worth taking a look at Node-RED or Google Blockly.

Conclusion

The Raspberry Pi is a versatile single-board computer that can also be used to build a shop floor data terminal. Because that calls for very specific data processing, though, no off-the-shelf software solution will be available in most cases. Efficient implementation therefore means writing the required software yourself — which takes time and prior knowledge, or more time and the will to learn something new.
Proprietary solutions offer alternative approaches that either take over the development of a data terminal entirely or at least simplify it considerably. At Peakboard we provide an approach that lets you decide the balance between your own effort and external costs.
Our goal is to offer a platform with which end users can implement their own projects without prior knowledge in an acceptable amount of time, and adapt them later. Alternatively, we also deliver complete implementations based on our own platform. The best thing to do is download our software, the Peakboard Designer, and see for yourself. Enjoy building it!

Frequently asked questions about capturing operating data with the Raspberry Pi

What is a shop-floor data terminal?

A shop-floor data terminal captures operating data right at the machine or workstation – such as piece counts, run times or faults.

Why use a Raspberry Pi for capturing operating data?

The Raspberry Pi is cheap, compact and flexible. With Peakboard it becomes a full data terminal, without the need for expensive special hardware.

What do I need to get started?

The right Raspberry Pi model, a suitable operating system and a connection to your data sources. The Peakboard software handles the rest.

Share this article:
Portrait of Tobi, smiling team member in the office.
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.

Snow-covered mountain with orange markings along the summit.
Black and white image of snow-covered mountains in a valley.
White clouds running in horizontal lines against a black background.
White clouds running in horizontal lines against a black background.