top of page

Raspberry Pi and OpenPLC How To and Use Cases

By Brent Huston, MicroSolved, Inc., (CS)²AI Fellow

December 21, 2023



OpenPLC is an open-source Programmable Logic Controller (PLC) for industrial applications. Installing OpenPLC on a Raspberry Pi can provide a low-cost and compact PLC system that can be used to control and monitor industrial processes. The OpenPLC runtime has a built-in web server, allowing program upload and configuration via a web interface.


 Installation Checklist:


1. Ensure your Raspberry Pi is running a recent version of the Raspbian operating system.

2. Make sure git is installed on your Raspberry Pi. If it's not installed, run the command: `sudo apt-get install git`.

3. Clone the OpenPLC repository using git with the command: `git clone`.

4. Navigate to the cloned directory: `cd OpenPLC_v3`.

5. Run the installation script for Raspberry Pi: `./ rpi`.

6. Reboot your device after the installation is complete.

7. Once rebooted, OpenPLC will start automatically.

8. Access the OpenPLC web server by typing the IP address of your Raspberry Pi at port 8080 in your web browser.

9. Login using the default credentials (username: openplc, password: openplc) and change the default username and password under the Users menu.

10. Under the "Hardware" section, select the appropriate Raspberry Pi driver from the popup menu and save changes.

11. For pin mapping and creating your first project, refer to the official OpenPLC project page.


Use Cases:


Prototype Development and Testing: Raspberry Pi combined with OpenPLC offers a cost-effective platform for developing and testing new Industrial Control System (ICS) protocols and applications. This setup allows researchers and developers to simulate real-world ICS environments and test their prototypes under various scenarios, enhancing the robustness of new technologies before they are deployed in actual industrial settings.


Educational and Training Tool: The Raspberry Pi and OpenPLC can be utilized as an educational tool for training personnel in the fundamentals of ICS. This setup provides a hands-on experience in a controlled environment, allowing trainees to understand the workings of PLC systems and the intricacies of industrial automation without the risk of impacting real-world systems.


Cybersecurity Research and Testing: With the increasing importance of cybersecurity in industrial environments, Raspberry Pi with OpenPLC serves as an excellent platform for cybersecurity research. Researchers can use this setup to simulate ICS environments to study the impact of various cyber threats, develop mitigation strategies, and test the effectiveness of security solutions in a safe and controlled setting.


Remote Monitoring and Control Experiments: Raspberry Pi, when integrated with OpenPLC, can be used for remote monitoring and control experiments. This application is particularly useful for research teams looking to develop and test new methods of remote operation, data acquisition, and process control in industrial systems, offering a practical and scalable approach to innovation in remote ICS management.


Cost-Effective ICS Solution for Small Scale Industries: For small scale industrial setups or start-ups, the combination of Raspberry Pi and OpenPLC provides a cost-effective solution for implementing basic ICS functionalities. This setup allows smaller operations to automate processes and integrate control systems without incurring the high costs associated with traditional ICS infrastructure.


These use cases highlight the potential of OpenPLC on a Raspberry Pi in providing a low-cost and effective platform for ICS security research and education, enabling asset owners and security teams to understand better, secure, and manage their industrial control systems.

310 views0 comments


bottom of page