Technical Article

Raspberry Pi Applications in Industrial Automation

September 29, 2022 by Antonio Armenta

Though not a direct replacement for PLCs, Raspberry Pi has the potential to be used in industrial automation applications for prototyping, embedded systems, and as a low-cost process controller.

See our previous article on Raspberry Pi:

Introduction to Raspberry Pi: History, Hardware, and Software


In this article, we will explore some potential applications of Raspberry Pi in control automation projects. Previously, we covered the same topic for the Arduino platform. We established that Arduino is an excellent educational tool, but with a few limitations that often restrict the platform’s ability to replace PLCs in many industrial situations. Something similar can be said of Raspberry Pi. However, with higher processing power and operating system versatility, Raspberry Pi does have a slight edge over Arduino in the race to enter the manufacturing industry.


Raspberry Pi powering beer inventory control system

Figure 1. A beer inventory control system powered by a Raspberry Pi. Image used courtesy of Brewers Journal


Control engineers and technology suppliers have long held the view that Raspberry Pi is unsuitable for industrial use, similar to what has happened with Arduino. This perception is partly due to a large portion of automated industrial processes using PLCs that are critical for business continuity. Therefore, when calculating the cost of an eventual shutdown caused by the process controller, the numbers easily justify the investment in the best PLC technologies. But still, that does not mean there are no possible applications for Raspberry Pi devices in the industry.


Raspberry Pi for Prototyping and Embedded Systems

Like Arduinos, Raspberry Pi computers are excellent tools for building prototypes and proof-of-concept solutions. We are referring to prototypes useful for validating ideas in the industry and not only for people looking to develop new products.

Many businesses have followed this work method before with significant success. For example, let us take a company exploring a project to implement IoT and a cloud-based application for predictive maintenance. Management in this company may hesitate to approve a large, upfront cost to integrate a full-blown predictive maintenance tool that is commercially available, unsure that they will see a return on their investment.


Raspberry Pi as a predictive maintenance tool

Figure 2. Raspberry Pi may be a better option than commercially-available products for companies wanting to invest in a predictive maintenance tool. Image used courtesy of Harrison Broadbent


A pilot test using Raspberry Pi would be an ideal alternative in this situation: Raspberry Pi devices are computers with wireless (and wired) Ethernet communication capability and are low-cost and open-sourced. In other words, they are essentially IoT devices right out of the box.

For large applications, a single-board computer would be well suited to handle larger volumes of data. Furthermore, thanks to a near real-time clock, multi-process capacity, and high-processing speeds, the Raspberry Pi 4 would be a great option for configuring a data acquisition and monitoring gate for an IoT solution.

In addition, adapters help a Raspberry Pi operate in industrial environments, and with appropriate I/O device connection points, can turn them into small PLCs that can withstand vibration and high temperature.


Raspberry PLC

Figure 3. A beer inventory control system powered by a Raspberry Pi. Image used courtesy of Industrial Shields


One significant difference in perception between Arduino and Raspberry Pi is the latter's ability to control a process permanently. In other words, it is expected that the permanent solution will not be Arduino-based for a prototype developed in Arduino. Instead, it may be a PLC or a custom-built Printed Circuit Board

It has historically been the same for Raspberry Pi, but this is quickly changing. Raspberry Pi devices have proven more capable of handling complex automation tasks, blurring the line between themselves and low-cost PLCs. 

However, there is also one more cost that is sometimes not factored into the decision-making process: the cost of installation. As a result, businesses would rather go through the implementation of a new project only once. While this contradicts the objective of a pilot test, at the same time, and specifically for Raspberry Pi, companies realize that the solution can also work using these devices permanently. Therefore, they would rather design the project to be Raspberry Pi-based from the start and plan for only one implementation cycle.


Raspberry Pi and OpenPLC

We have said that Raspberry Pi boards are compatible with operating systems like Linux and Windows. But how can they execute code so they can act as process controllers? If we compare them to Industrial PCs, we can find the answer. Industrial PCs are Windows-based computers built to withstand working in industrial environments and are simultaneously capable of running real-time clocks and process control. They do this by running a program that is called a Virtual PLC.

OpenPLC is the answer for Raspberry Pi. OpenPLC is a platform consisting of open-source PLC that is compliant with the IEC 61131-3 standard. In addition, it supports all the standard PLC programming languages, like ladder logic and structured text

The OpenPLC runtime creates a Virtual PLC that can run on the OS of any computer. So, for example, a Raspberry Pi with Windows 10 IoT OS can run the OpenPLC runtime to control processes, effectively turning it into a PLC from the point of view of software. 


OpenPLC interface

Figure 4. A look at the OpenPLC interface. Image used courtesy of OpenPLC


Raspberry Pi PLC?

Though not a replacement to PLCs, the low-cost, educational, single-board computer platform, Raspberry Pi, looks promising in terms of applications as a process controller.