Helping to demystify industrial
digitalisation in UK manufacturing

How to connect a Raspberry Pi to industrial sensors

21 January, 2020

Sensors and actuators are essential elements of industrial systems, instrumental to any application that requires automated control, or real-time monitoring. Sensors measure changes in the environment, while actuators control physical changes. Both devices serve as mediators between the physical environment and the electronic system where they are embedded.

Raspberry Pi provides general purpose header pins that can be connected to sensors, making the low-cost board a popular choice for engineering prototypes. Pi’s GPIO pins are designed for driving low current devices such as LEDs however, so is it possible to connect to the I/Os necessary for industrial environments?

Industrial sensors typically require 12-24V power and signal changes using the same voltage. Raspberry Pi’s GPIO input circuitry can be driven to either 3.3V (high) or 0V (low). This means that whilst a 12V water flow sensor might initially work hooked up straight to a Raspberry Pi, in long-term projects the incompatibility of the currents will almost certainly cause problems.

Does this mean your Pi can’t be connected to industrial sensors beyond a prototype?

Connecting a sensor to Raspberry Pi directly often means stripping the wiring and soldering the cable to the correct GPIO pin. The 12 or 24V of an industrial sensor will then be driven straight to the Pi with nothing in the way to protect Pi internal circuitry including the processor. By adding extra circuitry as a buffer between the input pin and the Pi, it is possible to extend the processor’s source/sink current capabilities, prevent excessive power dissipation in the chip, and prevent data corruption.The ‘Industrial’ Pi Solution

Brainboxes BB-400 is a smart industrial controller that is based around an Arduino, and a Raspberry Pi compute module 3+ and allows prototypes to be deployed straight into industrial environments. Rather than adding protection to the GPIO using a breadboard and external circuitry, with the BB-400, sensors and actuators are not wired directly to the Pi, rather, electronics between the input pin and the chip do the work, preventing industrial voltages damaging and corrupting the Pi. This concern is mitigated by the BB-400’s ‘super capacitors’, or ‘Uninterruptible Power Supply’ (UPS), making sure the Pi shuts down cleanly every time, preventing corruption of the disc.

Never Lose a Configuration with Removable Terminal Blocks

Using a screwdriver to connect sensors’ wires/cables into the embedded terminal blocks means that the circuitry doesn’t require soldering to create strong and secure connections, and allows multiple reconfigurations. As the terminal blocks can be unplugged, it’s easy to take the module out without affecting any of the pre-wired terminals.

As a single misplaced component leg can cause the whole circuit to malfunction or even As a single misplaced component leg can cause the whole circuit to malfunction or even cease to function at all, another useful feature of the terminal blocks is their numbering. It’s a lot easier to decipher the correct connection when the need to count down a row of tiny header pins and judge by eye has been eliminated!

The BB-400 has 8 digital I/O connections, making it usable straight out of the box without the need for any add-on units, although there are a variety available if you do find you need more inputs and outputs. As it is packaged in a DIN rail enclosure, it’s the perfect solution for deploying a Raspberry Pi prototype straight onto the factory floor.

Find out more here:


All Events Submit event


What is the most significant hurdle you will have to overcome to implement IIoT technology?
Current Results