Page 3
Rev. 3: 14-01-2025 RASPBERRY PLC FAMILY User Guide Revised, January 2025...
Page 4
Rev. 3: 14-01-2025 Preface This User Guide has been implemented by Boot & Work, S.L. working under the name Industrial Shields. Purpose of the manual The information contained in this manual can be used as a reference to operate and get a better understanding of the technical data of the signal modules, power supply modules and interface modules.
Page 5
Before using this product, it is the responsibility of the user to read the product’s User Guide and all accompanying documentation. ● Industrial Shields PLCs must be powered between 12Vdc and 24Vdc. If a higher voltage is supplied to the equipment it can suffer irreversible damage. ●...
Page 6
Rev. 3: 14-01-2025 Table of Contents 1 General Description RASPBERRY PLC FAMILY Product............8 1.1 Reference Table.........................8 1.2 Zones Table........................9 1.3 Measures Table......................... 9 1.4 Zone - Nomenclature...................... 10 1.5 Zone Distribution......................10 1.6 Zone Features........................11 1.7 Mechanical dimension....................12 1.8 General Features......................
Page 7
Rev. 3: 14-01-2025 9 Switch Configuration......................34 9.1 Analog / Digital Zone.......................34 9.2 Relay Zone........................34 10 I/O RASPBERRY PLC 3.3V pins..................35 10.1 Serial – RX/TX........................ 35 10.2 SPI0 – MISO/MOSI/SCK....................35 10.3 GPIO8..........................36 11 Digital inputs threshold detection..................37 12 Pinout time response.......................38 12.1 Inputs..........................
Page 8
Rev. 3: 14-01-2025 18.1 Build a Lite/Desktop Raspberry PLC Image from a Raspberry Pi OS 64-bit version..58 19 Revision Table........................59...
Page 9
Rev. 3: 14-01-2025 General Description RASPBERRY PLC FAMILY Product 1.1 Reference Table The "XX" in the reference number indicates key specifications: ● First Character: Expansion module on Slot 1. ● Second Character: Expansion module on Slot 2.
Page 11
Rev. 3: 14-01-2025 1.4 Zone - Nomenclature The nomenclature shown in this point will be used in the whole User Guide, so it is important to understand it, as the different parts of the PLCs are referenced. The nomenclature to differentiate the zones is based on Alphanumeric values, being 0 the internal communication shield and A, B or C the I/Os or Relay shield.
Page 12
Rev. 3: 14-01-2025 This is the possible zones scheme, whether the zone is Analog/Digital or Relay depends on your device, you can consult it on the Zones Table. The distribution of the different features that provide the Raspberry PLC Family are described below. 1.6 Zone Features Shield Zone Characteristics...
Page 13
Rev. 3: 14-01-2025 1.7 Mechanical dimension These are the possible mechanical dimensions, you can consult the specific measures for your device on the measures table.
Page 14
Rev. 3: 14-01-2025 1.8 General Features CONNECTABLE PLC RASPBERRY 24 VCC MODEL TYPE Controller General Specifications Information Fuse Protection (2.5A) Polarity Input Voltage 12 to 24 Vdc protection I max. 1.5 A Size Consult the Measure Table section Clock Speed 1.5 GHz Flash Memory SRAM...
Page 15
Rev. 3: 14-01-2025 5 to 24 Vdc I min: 2 to 12 mA I max: 300 mA Digital Isolated Input Galvanic Isolation Max read time: 430 us (24Vcc) Rated Voltage: 24 Vdc 5 to 24 Vdc I min: 2 to 12 mA * Interrupt isolated Galvanic Isolation Input HS...
Page 16
Rev. 3: 14-01-2025 1.9 Power consumption of the Raspberry PLC Family PLCs Current Current Power Current Power Model resting active active stress Power (W) resting (W) (mA) (mA) (mA) Ethernet 3.84 7.488 3.936 6.96 3.768 4.44 7.68 3.84 8.112 19R+ 3.72 6.24 9.48...
Page 17
Rev. 3: 14-01-2025 Technical Specifications: 2.1 General Specifications: Item RASPBERRY PLC Power supply DC power supply 12 to 24 Vdc voltage Operating DC power supply 11.4 to 25.4 Vdc voltage range Power DC power supply 30 W max. consumption Power supply 24 Vdc voltage External...
Page 18
Rev. 3: 14-01-2025 2.3 Symbology Table that includes all the symbology used in the serigraph of the RASPBERRY PLC FAMILY: Standard No. / Standard Reference Symbol Symbol Meaning Standard Title No. / Symbol Title IEC 60417 / Indicates that the equipment is Graphical symbols 5031 / Direct suitable for direct current only;...
Page 19
INDUSTRIAL SHIELDS representative. Ensure that the rating and performance characteristics of the Raspberry PLC are sufficient for the systems, machines, and equipment, and be sure to provide the systems, machines, and equipment double safety mechanisms.
Page 20
Rev. 3: 14-01-2025 How to connect PLC to power supply ● Raspberry PI Family PLCs are 12-24Vdc supplied. IMPORTANT: The polarity IS NOT REVERSIBLE! ● Make sure that the live and GND connector of the power supply match the PLC. ●...
Page 21
Rev. 3: 14-01-2025 How to access to the Raspberry PLC 5.1 Raspberry PLC access To facilitate the connection to the Raspberry PLC, our company has set a default IP. For the first time of use, an Ethernet connection between the Raspberry PLC and a PC will be necessary. The Raspberry is given with the local IP address 10.10.10.20/24*(eth0) and 10.10.11.20/24*(eth1), the default user is pi and the password is raspberry.
Page 22
Rev. 3: 14-01-2025 ping 10.10.10.20 If the ping works successfully means that our connection is ready. If not, you can check section 6 again or read our blog about changing the local IP. In order o the Raspberry PLC using SSH (Secure Shell), run the command shown below: ssh pi@10.10.10.20 The connection will start, but first the password provided before will be required.
Page 23
Rev. 3: 14-01-2025 ● mkdir: use this command to create a new directory. ● rm: is used to delete directories and the contents within them. ● touch: allows you to create a blank new file. In order to logout and close the connection, just type “exit” in the Raspberry terminal. 5.1.2 Windows For Windows users, we recommend using the open-source terminal emulator PuTTy SSH client.
Page 24
Rev. 3: 14-01-2025 When you start the connection, the terminal window will be opened. Enter your username pi and press Enter, then enter your password raspberry. If the username and password are correct, the SSH session will be started. When an SSH connection is made for the first time, the server delivers the server's public key to the SSH client.
Page 25
Rev. 3: 14-01-2025 How to change the IP To access the Raspberry PLC, the PLC must be on the same local network as the computer which we are working with. For changing the IP we must have connected our PC to an Ethernet connection.
Page 26
Rev. 3: 14-01-2025 Then we must click on the Ethernet connection and a window about the state of it will be shown, where we can check all the details of the Ethernet connection. For changing the IP, click on the Properties button. Then search for Internet Protocol Version 4 (TCP/IPv4) and click again on the Properties button.
Page 27
Rev. 3: 14-01-2025 How to transfer files from the PC to the Raspberry PLC Sometimes it is necessary to transfer files from our computer to the Raspberry PLC. The best way to do it is using the Secure Copy Protocol (SCP), a protocol that allows the secure transfer of files between a local host and a remote host based on the Secure Shell Protocol (SSH).
Page 28
Rev. 3: 14-01-2025 7.2 Linux Linux systems have the SCP protocol included on them by default. In order to work with them it is only necessary to select a source and the destination. The command syntax is the following: scp <source> <destination> To copy a file from our personal computer to the home directory of the Raspberry Pi PLC, do the following: scp /path/file pi@10.10.10.20:/home/pi...
Page 30
Rev. 3: 14-01-2025 8.2 0 Zone connection (Communications) Base (common unit) 0 Zone Raspberry Function Connector 3.3V Power Supply Power Supply PREL A PREL B INT31/GPIO4 GPIO3 GPIO2 GPIO14 SerialTTL GPIO15 SerialTTL RS485(2) RS485(2) OUT 2 5V digital/PWM out IN 2 5V digital/PWM in RS485(1) RS485(1)
Page 32
Rev. 3: 14-01-2025 8.3 Analog/Digital Zone connection (I/Os) Zone Function nect IX.12 Analog / Digital In IX.11 Analog / Digital In IX.10 Analog / Digital In IX.9 Analog / Digital In IX.8 Analog / Digital In IX.7 Analog / Digital In (-)IX.6 GND I0.6 IX.6/INT...
Page 33
Rev. 3: 14-01-2025 8.4 Relay Zone connection (I/Os) Zone Function Conn ector RX.8 Relay Out RX.7 Relay Out RX.6 Relay Out RX.5 Relay Out RX.4 Relay Out AX.2 Analog Out AX.1 Analog Out AX.0 Analog Out QX.2 Digital/PWM Out QX.1 Digital/PWM Out QX.0 Digital/PWM Out...
Page 34
Rev. 3: 14-01-2025 8.5 Interrupt equivalence table See the Reference Table in order to know the specific device details. ZONE ANALOG/DIGITAL RELAY RASPBERRY PIN GPIO13 GPIO12 GPIO27 GPIO5 GPIO26 GPIO4 *NOTE: It have to be taken into account that you can use the one linked to GPIO12 (I0.6/I0.1) or the OPTO_IN_1, and you can use the one linked to GPIO5 (I1.6/1.1) or the OPTO_IN_2.
Page 35
Rev. 3: 14-01-2025 9 Switch Configuration 9.1 Analog / Digital Zone ZONE A ZONE B ZONE C SWITCH SWITCH SWITCH Q0.7 Q0.7 A0.7 Q1.7 Q1.7 A1.7 Q2.7 Q2.7 A2.7 Q0.6 Q0.6 A0.6 Q1.6 Q1.6 A1.6 Q2.6 Q2.6 A2.6 Q0.5 Q0.5 A0.5 Q1.5 Q1.5...
Page 36
Rev. 3: 14-01-2025 10 I/O RASPBERRY PLC 3.3V pins The RASPBERRY PLC FAMILY has some of the Raspberry PI 4 board pins available. These pins can be programmed according to Raspberry features such as I/O’s operating at 3.3V or any additional features present in the pins (for example I2C communication in pins SCL and SDA).
Page 37
Rev. 3: 14-01-2025 10.3 GPIO8 GPIO8 is a Raspberry PI 4 GPIO pin that can be set as an input or output. It does not have any default function, so it can be configured without any restrictions. The pin is powered at 3.3 volts;...
Page 38
Rev. 3: 14-01-2025 11 Digital inputs threshold detection The Raspberry PLC inputs have a minimum voltage threshold to reliably detect the signal when used as digital input. The threshold value is different depending on the input type: Input type Threshold voltage (V) Digital input Analog input...
Page 39
Rev. 3: 14-01-2025 12 Pinout time response 12.1 Inputs C language: Input type Sampling frequency - Average Sampling frequency - Highest read time Digital Interrupt 943.40 kHz (1.06 µs) 9.39 kHz (106.46 µs) Digital Opto-isolated 2.34 kHz(427.84 µs) 710.01 Hz (1409.05 µs) Digital Non Opto-isolated 1.63 kHz (615.29 µs) 524.66 Hz (1905.69 µs)
Page 41
Rev. 3: 14-01-2025 13.1.1 Analog/Digital Devices Analog I/Os Analog Inputs PLC Pinout Chip ADDR Chip INDEX Zone A I0.7 0x08 I0.8 0x08 I0.9 0x0A I0.10 0x08 I0.11 0x0A I0.12 0x08 Zone B I1.7 0x08 I1.8 0x08 I1.9 0x0A I1.10 0x0A I1.11 0x08 I1.12...
Page 42
Rev. 3: 14-01-2025 13.1.2 Analog/Digital Devices Digital I/Os Digital Inputs Digital Outputs PLC Pinout Chip ADDR Chip INDEX GPIO PLC Pinout Chip ADDR Chip INDEX Zone A Zone A I0.0 0x20 Q0.0 0x40 I0.1 0x20 Q0.1 0x40 I0.2 0x20 Q0.2 0x40 I0.3 0x20...
Page 43
Rev. 3: 14-01-2025 13.1.3 Relay Devices Analog I/Os Analog Inputs Analog Outputs PLC Pinout Chip ADDR Chip INDEX PLC Pinout Chip ADDR Chip INDEX Zone A Zone A I0.2 0x08 A0.0 0x40 I0.3 0x08 A0.1 0x40 I0.4 0x0A A0.2 0x40 I0.5 0x08 Zone B...
Page 44
Rev. 3: 14-01-2025 13.1.5 Relay Digital Outputs PLC Pinout Chip ADDR Chip INDEX Zone A R0.1 0x20 R0.2 0x20 R0.3 0x20 R0.4 0x20 R0.5 0x40 R0.6 0x40 R0.7 0x40 R0.8 0x40 Zone B R1.1 0x20 R1.2 0x21 R1.3 0x20 R1.4 0x21 R1.5 0x40...
Page 46
Rev. 3: 14-01-2025 15 Software: Input & Output control The IO’s of the PLC can be managed through 3 different programming languages which are installed by default but, if not or in case of installing a fresh image, they can also be installed without any issue.
Page 47
Rev. 3: 14-01-2025 16 A & B Zone Features: Communications & RTC & uSD 16.1 RS-485 Raspberry PLC is provided with two RS-485 channel communications. Both are half-duplex and are controlled via the SPI0 bus. Both RS-485 ports can be configured with the following commands: ●...
Page 48
Rev. 3: 14-01-2025 16.2 I2C The I2C protocol is meant to work in a pull-up configuration. A pull-up configuration means that when the pin is at rest (nothing connected to it) it always reads a HIGH value. In this case it reads 5V when nothing is connected.
Page 49
Rev. 3: 14-01-2025 In case that you are interested in adding another interface or changing these two ip addresses, go to the directory where the interfaces are, with the following command: cd /etc/network/interfaces.d/ There you will be able to see and edit each interface configuration. Finally, in order to check the Ethernet connection of a specific interface, connect the cable of the Ethernet, and send 4 packets doing a ping to an ip address from the DNS server provided by Google (8.8.8.8) with the following instruction:...
Page 50
Rev. 3: 14-01-2025 16.7 BLE Raspberry PLC has BLE wireless communication by default. It uses the 5.0 BLE version. Connecting the Raspberry Pi bluetooth to Android bluetooth is possible following the next instructions: Pairing mode on your Raspberry Pi PLC: Type the following instruction: sudo bluetoothctl At the “[bluetooth]#”...
Page 51
Rev. 3: 14-01-2025 16.8 RTC Raspberry PLC RTC Module is based on the DS3231 Chip. This chip works with the I2C protocol communication, so it is required to have enabled the I2C protocol. It is powered by a button battery (CR1216 or CR1220). There are two types of date-time clocks in a Linux system: The Hardware Clock: This clock is an independent hardware device, with its own power domain (battery, capacitor, etc), that operates when the machine is powered off, or even...
Page 52
Rev. 3: 14-01-2025 16.10 UPSberry All Raspberry PLC Family devices include the UPSberry. It is a Plug & Play UPS Smart Shield that provides 5 seconds of electricity in front of a power supply cut off. This extra time of electricity ensures that the Raspberry follows a correct Shut Down process, avoiding any SD corruption issue.
Page 53
Rev. 3: 14-01-2025 17 Additional family features: Expansion Boards You can customise up to two additional communication expansions on your Raspberry PLC and prepare your custom-made project: 17.1 LTE Cat 1 The LTE Cat 1 expansion board uses the SARA-R412M module, which has the following features: ●...
Page 54
Rev. 3: 14-01-2025 If your SARA-R412M module is installed in the slot 2, you’ll need to make adjustments to the setup-sara.sh file. You’d need to replace all occurrences of ttySC0 with ttySC1 and EXP1_RST with EXP1_RST_2. The script asks for APN credentials and RAT (Radio Access Technology): LTE Cat M1 (4G), NB-IoT (Narrow Band) or GPRS/eGPRS.
Page 55
Rev. 3: 14-01-2025 17.2 LTE Cat 4 The LTE Cat 4 expansion board uses the LARA-L6 module, which has the following features: ● Model: LARA-L6 ● Type: LTE Cat 4 (FDD/TDD) ● Key Features: Multi-band LTE (FDD: 700 to 2600 MHz; TDD: 2300 to 2600 MHz), Maximum output power 23 dBm, downlink speeds up to 150 Mbps, uplink speeds up to 50 Mbps, GNSS support (GPS/GLONASS), IPv4/IPv6, dual-stack ●...
Page 56
Rev. 3: 14-01-2025 ping 8.8.8.8 -c4 -I ppp0 4. If there are issues with the interface, check that the pppd and check-ppp0 services are active: systemctl status pppd.service systemctl status check-ppp0.service 5. If no successful responses are received, manually run the script created by the setup process with: python3 /usr/local/bin/network-setup.py 17.3 CAN...
Page 57
Rev. 3: 14-01-2025 dtparam=spi=on <---- Mandatory gpio=8=pd dtoverlay=spi0-1cs,cs0_pin=7 dtoverlay=w5500,cs=0,int_pin=6 dtparam=i2c_arm=on dtoverlay=i2c-rtc,ds3231 dtoverlay=sc16is752-spi1-rpiplc-v4,xtal=14745600 <---- Mandatory enable_uart=1 <---- Mandatory Otherwise, replace the previous configuration for this one and reset the PLC. 3. Set the reset pin to high to enable the LoRa module depending on the slot used. ○...
Page 58
Rev. 3: 14-01-2025 For instance, here are some useful commands: ○ mac pause: Pause the LoRaWAN stack functionality and allow transceiver ○ radio rx 0: Listen for data. ○ radio tx ABC: Send a message (ABC). ○ radio set freq [FREQUENCY]: Set the frequency of the radio transceiver. You can also find further documentation on LoRa commands by following this link.
Page 59
Rev. 3: 14-01-2025 18 Build a Raspberry PLC Image 18.1 Build a Lite/Desktop Raspberry PLC Image from a Raspberry Pi OS 64-bit version The Raspberry PLC family of products incorporates as standard a microSD card preloaded with Raspberry Pi OS Lite, a lightweight operating system without a graphical interface, designed for enhanced CPU performance.
Page 60
25/09/2024 Added section 3.4 (“Isolation Precautions”) Corrections on section 1.1 (“Reference Table”) and 14/01/2025 section 2.1 (“General Specifications”) About Industrial Shields: Direction: Camí del Grau, 25 Zip/Postal Code: 08272 City: Sant Fruitós de Bages (Barcelona) Country: Spain Telephone: (+34) 938 760 191 / (+34) 635 693 611 support@industrialshields.com...
Need help?
Do you have a question about the RASPBERRY PLC Series and is the answer not in the manual?
Questions and answers