OpenPLC Soft-PLC on Raspberry Pi
This lab introduces industrial automation and control systems by transforming a Raspberry Pi single-board computer into a software-defined programmable logic controller (soft-PLC) using the OpenPLC Runtime. Students configure the Linux-based automation runtime, interface physical hardware using general-purpose input/output (GPIO) lines and serial peripherals, and develop automation routines using standard industrial programming formats like ladder logic. Through setup and testing, students explore key industrial communications including Modbus, EtherNet/IP, and EtherCAT, monitor control loops via an embedded web console, and learn how modern soft-PLC platforms integrate operational technology with embedded computing architectures.
Uploaded by demo on 2026-09-03 · ready · Electronics · Original source ↗
Files: OpenPLC_v3_README.md · ethernetip_readme.md · install.sh · requirements.txt
Readiness checks
-
complete 2026-09-03 01:17 🛡 Cybersecurity: Do not place on an open network · 2 findings 12 searches · 0 pages · $0.19view · PDF
Latest report — 2026-09-03 01:17
Readiness: OpenPLC Soft-PLC on Raspberry Pi
Verdict: Ready · 2026-09-03 · est. parts cost $47–$113 Cybersecurity — software & network: Do not place on an open network
This cold check establishes the sourcing baseline and unit pricing for future drift measurement. Sourcing for all hardware bill of materials components is unblocked: the core Raspberry Pi single-board computers, official 5 V / 3 A power supplies, and optional USB CDC-ACM microcontroller peripherals are active, available at normal market pricing, and in deep stock across authorized distributors.
Action required
None — all checked parts are sourceable.
Cybersecurity — software & network
Do not place on an open network — OpenPLC Runtime v3 is an end-of-life platform running a network-facing web interface with a high-severity vulnerability pinned against updates.
| Component | Version | How known | Support status |
|---|---|---|---|
| OpenPLC Runtime version 3 | not determined | unpinned (git clone command in installation instructions has no tag or commit) | — |
| OpenPLC Editor | not determined | not determined | — |
| Linux Mint | 21 | inferred (Docker setup documentation in snapshot) | supported until 2027-04-30 |
| Raspberry Pi OS | not determined | not determined | — |
| Flask | 1.0.2 | inferred (requirements.txt stated in snapshot) | — |
| Flask-Login | 0.4.1 | inferred (requirements.txt stated in snapshot) | — |
| pyserial | 3.4 | inferred (requirements.txt stated in snapshot) | — |
| pymodbus | 2.2.0 | inferred (requirements.txt stated in snapshot) | — |
| background_installer.sh | not determined | not determined | — |
| EtherNet/IP and EtherCAT subsystems | not determined | not determined | — |
| Component | Finding | Severity | Fix available? |
|---|---|---|---|
| Flask | Flask 1.0.2 fails to set the Vary: Cookie header, allowing cached responses to leak session cookies to unauthorized users. — GHSA-M2QF-HXJV-5GPQ, CVE-2023-30861, GHSA-68RP-WP8R-4726, CVE-2026-27205 | high | No — project pins ==1.0.2 |
| OpenPLC Runtime version 3 | OpenPLC Runtime version 3 has reached end of life and is no longer maintained upstream. | posture | No — requires platform migration |
What this means for your lab
Anyone on the same local network can connect to the OpenPLC web management interface and industrial protocol ports. Because the underlying web server software has unfixable session security flaws and the entire OpenPLC Runtime v3 project is officially discontinued by its authors, these services cannot be safely updated in place. Furthermore, default login credentials and background build tools were not documented in the project files. Keep this device completely disconnected from shared campus networks, run it strictly on an isolated private lab network or standalone switch, and raise the setup with campus IT before use.
Not checked
- OpenPLC Runtime version 3: Vendor git repository is at end of life and has no package ecosystem database.
- OpenPLC Editor: Version not stated and no package ecosystem database.
- background_installer.sh: File missing from upload; background toolchain dependencies are unpinned and could not be determined.
- EtherNet/IP and EtherCAT subsystems: Implementation source and versions not stated.
- Raspberry Pi OS and other host distributions: Versions not stated and unpinned in setup scripts.
Parts
| Part | Spec/Package | Status | Stock | Price | Source |
|---|---|---|---|---|---|
| Host Single-Board Computer | Raspberry Pi 4 Model B 4GB (SC0194(9)), 40-pin GPIO, 5 V DC, 3.3 V LVTTL | Active | 12,270 | $100.00 | DigiKey |
| DC Power Supply for Host Platform | Raspberry Pi 15.3W USB-C Power Supply (SC0218), 5.1 V DC, 3 A output | Active | 4,499 | $6.75 | Newark |
| Serial Communication Peripheral (Optional) | Raspberry Pi Pico RP2040 (SC0915), USB CDC-ACM serial emulation | Active | 43,665 | $4.59 | DigiKey |
Substitutes
| For part | Substitute | Differences | Verified | Judgment |
|---|---|---|---|---|
| Raspberry Pi 3 Model B+ (SC0073) | Raspberry Pi 4 Model B 4GB (SC0194(9)) | Dimensions: 85.00 mm x 56.00 mm vs 85.09 mm x 55.88 mm; power input uses USB-C (≥ 3.0 A recommended) instead of micro-USB (≥ 2.5 A); compute/memory of 1.5 GHz 4-core with 4 GB RAM exceeds 1.4 GHz with 1 GB RAM; shares identical 40-pin GPIO pinout and 3.3 V LVTTL logic rail. | verified: package form factor and dimensions (DigiKey parametrics: 85.00 mm x 56.00 mm vs 85.09 mm x 55.88 mm), 40-pin GPIO layout and 3.3 V logic levels (snapshot platform specification), 5 V DC supply voltage rail; noted difference: USB-C connector replaces micro-USB connector. | Acceptable superior replacement. |
Instructors should verify any substitute against its datasheet before ordering.
Other dependencies
- Upstream OpenPLC Runtime v3 Git Repository (
https://github.com/thiagoralves/OpenPLC_v3.git): not checked. - Upstream OpenPLC Runtime v4 Git Repository (
https://github.com/autonomy-logic/openplc-runtime): not checked. - OpenPLC Editor Documentation & Download Portal (
https://openplcproject.com/docs/installing-openplc-editor/): not checked. - Docker CE Ubuntu Installation Documentation (
https://docs.docker.com/install/linux/docker-ce/ubuntu/): not checked. - Docker Compose Linux Mint 21 Installation Guide (
https://computingforgeeks.com/install-docker-docker-compose-on-linux-mint/): not checked. - Fabrication / Custom PCBs: None required. All hardware consists of commercial off-the-shelf single-board computers and peripheral modules.
Watch list
- Raspberry Pi 3 Model B+ (SC0073): Marked "Not For New Designs" by the manufacturer with zero stock at Mouser and a 16-week lead time, although DigiKey retains remaining stock. Labs should deploy Raspberry Pi 4 Model B (SC0194(9)) or newer hardware.
- Raspberry Pi 15.3W USB-C Power Supply (SC0218): Out of stock at DigiKey with a 30-week factory lead time, though currently well-stocked at Newark and Mouser. Monitor distributor stock before ordering.
Snapshot What the lab depended on when it was uploaded — the baseline the readiness checks research against.
This lab builds a soft-PLC (programmable logic controller) automation platform based on OpenPLC Runtime version 3 deployed onto a host single-board computer or general Linux machine, primarily targeting the Raspberry Pi. The system provides an industrial automation runtime environment capable of ladder logic execution, Modbus communications, and industrial Ethernet protocols (EtherNet/IP and EtherCAT), alongside an embedded web management console. The primary electrical rails are governed by the host computer: nominal 5 V DC power input rail (typically 5 V, ≥ 2.5 A via USB), with 3.3 V LVTTL logic levels on the host GPIO expansion pins and 5 V VBUS power across external USB peripheral interfaces.
Bill of Materials
No custom circuit boards, Gerber files, schematics, or component layout files are present in the lab repository. The hardware requirements are derived entirely from documentation specifying target deployment platforms and hardware interface options.
Host Single-Board Computer
- Identity: Raspberry Pi single-board computer; specific revision or generation is not specified, documented only as platform target "rpi".
- Quantity: 1
- Footprint/package: Standard Raspberry Pi single-board computer form factor with 40-pin GPIO header.
- Electrical constraints: Supply voltage 5 V DC nominal via micro-USB or USB-C; GPIO logic rail is 3.3 V LVTTL.
- Substitution latitude: The installer explicitly supports alternate platforms via platform flags (Debian-based Linux, Fedora, OpenSUSE, Alpine, Windows over Cygwin, or Docker container). Any standard Raspberry Pi (e.g., Raspberry Pi 3 Model B+, Raspberry Pi 4 Model B) capable of running a supported Linux distribution is physically and electrically compatible.
- Control: Not a student-operated mechanical control.
- Sourcing plan: retail shopping search: Raspberry Pi single board computer
DC Power Supply for Host Platform
- Identity: AC-to-DC external wall power supply for Raspberry Pi (connector type micro-USB or USB-C depending on host SBC model; spec-only from host requirements).
- Quantity: 1
- Footprint/package: External wall-mount AC adapter with captive cable.
- Electrical constraints: Input 100 to 240 V AC; output 5 V DC regulated, output current ≥ 2.5 A (≥ 3.0 A recommended for Raspberry Pi 4).
- Substitution latitude: Any regulated 5 V DC power supply matching the host board's connector and current requirement.
- Control: Not a student-operated mechanical control.
- Sourcing plan: retail shopping search: 5V 3A Raspberry Pi power supply
Serial Communication Peripheral (Optional)
- Identity: External USB-to-serial or microcontroller interface board, referenced in Docker documentation only as device path "/dev/ttyACM0".
- Quantity: 1 (optional/application-dependent)
- Footprint/package: USB module or development board.
- Electrical constraints: 5 V nominal USB bus voltage.
- Substitution latitude: Any USB device supporting CDC-ACM or USB-to-UART serial communications under Linux.
- Control: Not a student-operated mechanical control.
- Sourcing plan: retail shopping search: USB CDC-ACM microcontroller development board
Software and network dependencies
The software environment consists of an operating system distribution, the OpenPLC Runtime v3 software suite, Python runtime dependencies for the web console and serial/Modbus communication, and external programming editor tools.
OpenPLC Runtime version 3
- Name: OpenPLC Runtime version 3
- Source repository: https://github.com/thiagoralves/OpenPLC_v3.git (Upstream documentation explicitly notes that this project has reached End of Life and is superseded by OpenPLC Runtime v4 at https://github.com/autonomy-logic/openplc-runtime)
- Version: version 3
- Where version came from: stated in documentation
- Version pinning: Unpinned in installation instructions; the clone command instructs git clone https://github.com/thiagoralves/OpenPLC_v3.git without specifying a tag, branch, or commit SHA.
- Check plan: not checkable: vendor git repository at end of life (EOL) and superseded by v4
OpenPLC Editor
- Name: OpenPLC Editor
- Source repository: https://openplcproject.com/docs/installing-openplc-editor/
- Version: not stated
- Where version came from: not stated
- Version pinning: Unpinned; external GUI application downloaded separately.
- Check plan: not checkable: version not stated and no package ecosystem database
Host Operating System / Container Environment
- Name: Raspberry Pi OS / Linux / Docker container. Specific distributions mentioned in documentation include Debian-based, Fedora-based, OpenSUSE, Alpine Linux, Ubuntu, and Linux Mint 21 (for Docker setup).
- Version: Linux Mint 21 is stated in documentation for Docker setup; versions for other distributions (Debian, Fedora, OpenSUSE, Alpine, Raspberry Pi OS) are not stated.
- Where version came from: stated in documentation
- Version pinning: Unpinned. The setup scripts rely on distro package managers without pinning OS versions.
- Check plan: support-status lookup: Linux Mint 21
Python package Flask
- Name: Flask
- Source: Python Package Index (PyPI)
- Version: 1.0.2
- Where version came from: pinned in requirements.txt
- Version pinning: Strictly pinned via exact equality (==1.0.2).
- Manifest location: requirements.txt line 1
- Check plan: vulnerability lookup: Flask / PyPI / 1.0.2
Python package Flask-Login
- Name: Flask-Login
- Source: Python Package Index (PyPI)
- Version: 0.4.1
- Where version came from: pinned in requirements.txt
- Version pinning: Strictly pinned via exact equality (==0.4.1).
- Manifest location: requirements.txt line 2
- Check plan: vulnerability lookup: Flask-Login / PyPI / 0.4.1
Python package pyserial
- Name: pyserial
- Source: Python Package Index (PyPI)
- Version: 3.4
- Where version came from: pinned in requirements.txt
- Version pinning: Strictly pinned via exact equality (==3.4).
- Manifest location: requirements.txt line 3
- Check plan: vulnerability lookup: pyserial / PyPI / 3.4
Python package pymodbus
- Name: pymodbus
- Source: Python Package Index (PyPI)
- Version: 2.2.0
- Where version came from: pinned in requirements.txt
- Version pinning: Strictly pinned via exact equality (==2.2.0).
- Manifest location: requirements.txt line 4
- Check plan: vulnerability lookup: pymodbus / PyPI / 2.2.0
Installation and Background Toolchain Scripts
- Name: background_installer.sh
- Source: Local script invoked by install.sh (command: ./background_installer.sh $1 $2 2>&1 | tee install_log.txt)
- Version: not stated
- Where version came from: not stated
- Version pinning: Missing file. The script background_installer.sh is referenced in install.sh line 2 but is absent from the provided workspace files. System packages and C/C++ compiler toolchains (such as matiec, bison, flex, or wiringpi) installed by this background script are unpinned and not inspectable.
- Check plan: not checkable: file missing from upload
Industrial Ethernet Stubs (EtherNet/IP and EtherCAT)
- Name: EtherNet/IP and EtherCAT subsystems
- Source: Local files referenced as ethernetip_readme.md and utils/ethercat_src
- Version: not stated
- Where version came from: not stated
- Version pinning: Unpinned.
- Check plan: not checkable: implementation source and versions not stated
Network exposure:
- Interfaces: Connects over local Ethernet/IP network or container virtual bridge.
- Listening ports: The web server listens on TCP port 8080, explicitly mapped in the Docker run command (docker run -it --rm --privileged -p 8080:8080 openplc:v3 in OpenPLC_v3_README.md). Modbus TCP (standard port 502) and EtherNet/IP (standard port 44818 / 2222) capabilities are referenced, but specific port bindings are not explicitly declared in the provided files.
- Default credentials: Not stated in the sources.
- Remote management / SSH instructions: Not stated in the sources.
Downloads and External URLs
- https://github.com/thiagoralves/OpenPLC_v3.git: Upstream repository for OpenPLC Runtime v3. Note: Upstream README states this project has reached End of Life and is superseded by OpenPLC Runtime v4.
- https://github.com/autonomy-logic/openplc-runtime: Official replacement repository for OpenPLC Runtime v4.
- https://openplcproject.com/docs/installing-openplc-editor/: Documentation and download portal for the OpenPLC programming editor.
- https://docs.docker.com/install/linux/docker-ce/ubuntu/: Reference URL for installing Docker CE on Ubuntu.
- https://computingforgeeks.com/install-docker-docker-compose-on-linux-mint/: Reference URL for installing Docker and Docker Compose on Linux Mint 21.
Fabrication & Physical Specifications
No custom printed circuit boards are included in this project. There are no Gerber files, CAD layouts, layer count parameters, or mechanical board dimensions to fabricate. All hardware implementations rely on commercially available off-the-shelf single-board computers (Raspberry Pi) and commodity peripheral hardware.