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?
Raspberry Pi GPIO
CWBudde [CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0)]
Hukseflux Thermal Sensors B.V.
[CC BY 4.0 (https://creativecommons.org/licenses/by/4.0)]
What are industrial sensors?
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, for example:
- 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; it alerts 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 up straight to a Raspberry Pi, in long-term projects the incompatibility of the currents will almost certainly cause problems.
Though there are significant advantages to using internet-ready actuators, there are still some obstacles that must be overcome, as mentioned above. Furthermore, the process of redesigning pneumatic actuators to have Ethernet ports for internet connection changes actuators’ dimensions — meaning they may no longer meet industry standards set by the NFPA. Also, the individuals who operate the machinery may not necessarily understand how the technology involved in connected manufacturing works, hindering their ability to maintain and utilize the equipment properly. However, various initiatives are being developed to address these issues, with ongoing research and development underway to produce wireless-connected actuators. Some manufacturers are using sensors to gather data to avoid altering the design of the actuators themselves. Also, producers of internet-ready actuators are working to make these products user-friendly, and they’re striving to provide adequate training for the individuals who will ultimately use them on a day-to-day basis.
Pneumatic Rack & Pinion Actuators
[[Z22 [CC BY-SA (https://creativecommons.org/licenses/by-sa/3.0)]]
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 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 is possible to extend the processor’s source/sink current capabilities, prevent excessive power dissipation in the chip, and prevent data corruption.
Breadboards are solderless circuit boards that can house even 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.
Complex breadboard circuitry
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.
Breadboards and the factory floor.
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. The Pi requires 5.1V – not suitable for factory environments which run on 12 or 24V, and if power is lost unexpectedly the SD card can corrupt, potentially losing weeks, months, or even years’ worth of data
[CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0)]
The ‘Industrial’ Pi Solution
Connect, Configure, Control
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.
The biggest challenge to monitoring sensors and actuators comes with the Pi’s operating system. While it is more than capable of handling the edge processing and data visualisation, as it is a full operating system it has to multi-task, and therefore isn’t dedicated to real-time I/O. Instead, the BB-400 gives the job of real-time I/O to a dedicated on-board Arduino, making it twice as smart. Out of the box, the firmware is designed to monitor and control the I/O lines through the Arduino. This is also open-source, allowing for countless modifications.
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 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!
Brainboxes BB-400 with Removable Terminal Blocks
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. Bundled with Node-RED software, the BB-400 has made prototyping and deploying to industry faster, and easier than ever!
Find out more here: http://www.brainboxes.com/industrial-edge-controller