Unlock Industrial Prototyping: Your Guide to Connecting Industrial Sensors to Raspberry Pi

The type of sensors you’ll need to connect to your Pi will depend on the particular job your prototype is designed to perform. In manufacturing, the most common processes are concerned with monitoring and control

author avatar

21 Oct, 2024. 3 min read

Photo by Vishnu Mohanan on Unsplash

Photo by Vishnu Mohanan on Unsplash

This article was first published on

www.brainboxes.com

Sensors and actuators are essential elements of industrial systems, instrumental to any application that requires automated control. Sensors measure changes in the environment while actuators control physical changes, with both devices serving as mediator 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 innovative low-cost board a popular and valuable choice for engineering prototypes. However, Pi’s GPIO pins are designed for driving low current devices such as LEDs, so is it possible to connect to the I/O necessary for industrial environments?

The type of sensors you’ll need to connect to your Pi will depend on the particular job your prototype is designed to perform. In manufacturing, the most common processes are concerned with monitoring and control:

  • Temperature: Both contact and contactless sensors can be used to measure temperature.
  • Photoelectric: Ideal for counting specific objects using light or lasers.
  • Button and Switches: Simple human inputs used to control the functioning of a system.
  • Dial: Simple human input providing analogue/continuous control of a signal over a range of values.
  • Pressure: Useful for detecting blockages, and signalling when a system needs servicing.
  • Vibration: Often the first sign of a problem, sensors that detect changes in vibration are great for predictive maintenance.
  • RFID: Used to track and/or locate devices, personnel, and/or equipment.
  • Inductive: The typical automation sensor, alerting to the presence of metal.
  • Power Consumption: Key to understanding energy usage, also a useful signal for predictive maintenance

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 straight up to a Raspberry Pi, in long- term industrial projects the incompatibility of the currents will almost certainly cause problems.

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

Connecting a sensor to Raspberry Pi directly often means stripping the sensors 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’s possible to extend the processor’s source/ sink current capabilities, and prevent excessive power dissipation in the chip.

Breadboards and the Factory Floor

Photo by Vishnu Mohanan on Unsplash

Breadboards are solderless circuit boards that can house the most complex circuits, making them an invaluable option for prototyping. The impermanence afforded by the boards allows you to build and test multiple circuits without the need to constantly solder rewired connections. In this way, breadboards are great for testing new parts, integrated circuits and for troubleshooting.

Some circuits will require a considerable amount of space, another feature of breadboards that makes them useful tools in industrial prototyping is the ability to extend the surface size by connecting multiples together.

While breadboards can go a long way in adapting Raspberry Pi for industrial applications, certain considerations may be prohibitive to deploying such a prototype directly to a factory environment. The completed set-up is undeniably still a prototype; the connections, whilst providing industrial I/O options, are not optimised for the rigours of the factory floor. 

Industrialised Pi

Powered by Raspberry Pi, Brainboxes BB-400 is a smart industrial controller that allows prototypes to be deployed straight into industrial environments. 

Rather than adding protection to the GPIO using a breadboard and external circuitry, the built in circuitry of the BB-400 allows 12V and 24V sensors to be directly connected to the IO lines without the need to add additional components to step down the voltages.

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, allowing 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 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 you eliminate the need to count down a row of tiny header pins!

The BB-400 has 8 onboard digital I/O and multiple connectivity options: RS232/422/485 Serial port,

Bluetooth, Wi-Fi and Dual Ethernet, making it usable straight out of the box without the need for any add-on units. Packaged in an industrial DIN rail enclosure, the BB-400 is the perfect solution for deploying a Raspberry Pi prototype straight onto the factory floor.

Download the Prototyping with Pi E-book here.