Raspberry PLC 21: Raspberry Pi PLC with 13 inputs, 8 outputs and dual Ethernet
The Raspberry PLC 21 is an industrial PLC from Industrial Shields built around a Raspberry Pi. It has 21 I/O (13 inputs, 6 of them analog, and 8 outputs, 3 of them analog or PWM), two Ethernet ports, two RS-485 ports, Wi-Fi and Bluetooth LE, plus a UPS that shuts Linux down safely on power loss. It runs Debian 64-bit, so you program it in Python, Node-RED, C/C++ or any Linux tool. It fits edge controllers, data gateways and machines that need more computing than a classic PLC.
You are viewing the FLEX version: choose RAM and add one expansion board.
See CORE Standard configuration, ready to shipDocuments
Datasheets
Certificates
Brochures
Technical specifications
| Computer | Raspberry Pi 4, Broadcom BCM2711 quad core 64-bit, 1.8 GHz |
|---|---|
| RAM | CORE: 4 GB. FLEX: 2, 4 or 8 GB |
| Operating system | Debian Bookworm 64-bit, preinstalled |
| Inputs | 13: 6 analog/digital (0-10 V, 12-bit) and 7 digital optoisolated, 5 to 24 Vdc, 2 with interrupt |
| Outputs | 8: 3 analog/digital/PWM (0-10 V, 12-bit) and 5 digital optoisolated, 5 to 24 Vdc |
| Ethernet | 1 x Gigabit and 1 x 10/100, RJ45 |
| Serial and buses | 2 x RS-485 half duplex with 120 Ω termination, TTL serial, I2C, SPI |
| Wireless and USB | Wi-Fi, Bluetooth LE, 2 x USB 2.0, 2 x USB 3.0 |
| Reliability | UPS with supercapacitors for safe shutdown, DS3231 real-time clock with battery, external heatsink |
| Power supply | 12 to 24 Vdc with polarity protection |
| Environment | 0 to 50 °C operating, 10 to 90 % humidity without condensation |
| Mounting and protection | DIN rail TS35, IP20, inside a cabinet |
| Expansion | CORE: none. FLEX: one board, CAN, LoRa (EU, US or Asia band), 4G (LTE-M/NB-IoT or LTE Cat 4) or M-Bus master |
Projects built with the Raspberry PLC 21
Field-tested examples with code from the PLC Solution Library.
- CANopen control of a LOVATO VLB3 drive (FLEX with CAN)See the example
- Solar tracker algorithm with PyEphemSee the example
- TCP socket between Python and Node-REDSee the example
- Wi-Fi access point triggered by a buttonSee the example
Try it in a live simulator
The Raspberry PLC 21 is one of the controllers in this simulated system.
A 12.5 MWp single-axis tracker plant in 3D: clouds, wind, hail, tracker faults and grid limits.
Open the simulatorBefore you choose the Raspberry PLC 21
How much RAM does it have?
The CORE version has 4 GB of RAM. The FLEX version lets you choose 2, 4 or 8 GB.
How do I program it?
It ships with Debian 64-bit. Connect by SSH to 10.10.10.20 (eth0) and use Python, Node-RED, C/C++ or shell scripts. Industrial Shields libraries give direct access to the inputs and outputs.
Does it have relay outputs?
No. Its 8 outputs are 5 optoisolated digital outputs and 3 analog/PWM outputs. If you need relays, look at the Raspberry PLC models with relay outputs, such as the 19R, 38R or 57R.
What happens on a power failure?
The built-in UPS keeps the Raspberry Pi running long enough to shut Linux down cleanly, so the SD card and your data are not corrupted. The real-time clock keeps the time with its own battery.
Can it do CAN, LoRa or 4G?
Not in the CORE version. The FLEX version adds one expansion board: CAN, LoRa, 4G (LTE-M/NB-IoT or LTE Cat 4) or M-Bus master.