The Simple Way to Retrofit Your Programmable Logic Controllers (PLCs) with IoT
Realize the promise of the IIoT by enabling cheap, reliable, and secure transfer of your machine data to an accessible location.
The industrial IoT (IIoT) is gaining traction as business owners and original equipment manufacturers (OEMs) recognize the operational efficiencies that result from increased access to data. Collecting this data creates a need for connectivity beyond what is offered by traditional programmable logic controllers (PLCs). However, adding wireless connectivity can be complicated and costly, potentially overriding any projected ROI.
This use case will provide a quick introduction to PLCs and discuss the considerations and process for quickly and affordably retrofitting legacy equipment with IoT. We'll explain how you can add wireless connectivity to PLCs and get bidirectional connectivity for data, reconfiguration, and control, from PLC to your chosen cloud, using Blues Wireless IoT System-on-Modules.
Introduction to Programmable Logic Controllers (PLCs)
Programmable Logic Controllers (PLCs) are computation devices that control industrial processes, machines, and automation devices. They were designed to be highly reliable and offer the robustness and ruggedness required for industrial applications. Intended to be used by engineers without developer experience, PLCs are easy to program using ladder logic, though modern devices also use traditional programming languages like BASIC and C.
PLCs have been in use since the 1970s with applications spanning across manufacturing assembly lines, HVAC or facilities control, heavy machinery, and even amusement rides.
Most legacy PLCs were not designed for wireless access, so they require physical access for reconfiguration. It's not that PLC users wouldn’t appreciate wireless capabilities, but most aren’t ready to bear the expense. It can be quite costly to replace a working legacy PLC deployment, incurring downtime and accepting the risk of swapping out hardware. A better solution would be to retrofit existing PLCs with IoT capabilities.
Common Wireless PLC Uses
While the usefulness of IoT-enabled PLCs is an endless field of possibilities, there are common patterns we see in the market such as remote monitoring stations, equipment monitoring, and commercial control systems.
Remote monitoring stations
PLCs are often field deployed, away from connectivity. These PLCs may reside in a pumping station, a storage facility, or in a tank designed to support a remote facility. In all three cases, connecting the PLC to the internet would improve the awareness of remote conditions and allow for remote control. Take, for example, a flood control system based on pumps and actuated sluices. These systems are located where they can provide the most flood control, which isn’t necessarily in the most convenient location for connectivity. Using the cellular network means you get wireless connectivity without having to build out your own connectivity infrastructure.
PLCs can also oversee turning on/off equipment based on conditions. It is important to be able to monitor the status of equipment remotely to ensure proper functionality. By wirelessly enabling a PLC, you can send the status of controlled machinery or equipment directly to your cloud, or even to your cellphone through SMS messaging. If, for example, a generator is supposed to turn on under certain conditions, it would be a good idea to monitor that system to ensure it’s in the proper state based on the conditions. That information could then be sent to a cloud dashboard or application where it can be reported on and audited.
In a commercial context, it is important to control key functionality remotely. In the case of a facility that operates on a variable schedule, there could be economic efficiencies gained by disabling systems when they aren’t needed. By connecting commercial HVAC PLCs wirelessly, facility management can disable or control the HVAC system without a site visit, allowing for just-in-time adjustment.
Considerations When Adding Wireless Capability to PLCs
Digital transformation enables businesses to improve operational efficiency, but this requires connecting devices to modern systems. There are many considerations when it comes to upgrading a system, but PLC users have 3 choices when it comes to digitization:
- Do nothing. Leave PLCs unconnected. This is the cheapest strategy in the short term but doesn’t advance digital strategy. Any adjustments to PLCs must be made in the field. Data available at the PLC level is trapped at the PLC level and can’t easily be made available to information systems.
- Buy new PLCs with wireless capabilities. Some feel like this is their only option, but the risk and expense involved in completely replacing existing PLCs is intimidating, and often unnecessary.
- Retrofit PLCs for IoT connectivity. This strategy allows working PLCs to stay in place and presents less risk, less rework. The cost is less than replacing your PLCs with new ones but varies as this can be done with an off-the-shelf system or by building your own.
When adding wireless capability, it is necessary to create a bi-directional flow of data from the PLC to a cloud application (or database) and back to the PLC. Each communication pathway serves a distinct but essential function:
PLC to Cloud
When a PLC is connected to a cloud application wirelessly, you can query the PLC for tags, then send the tag information to the cloud. Common uses here would be to monitor a system for conditions like storage tank level, anomaly detection, power supply availability, and triggered alarms.
Cloud to PLC
When a cloud application or database is connected to a PLC, you can avoid site visits by controlling the PLC remotely, changing set points, altering variables, and controlling state. Common uses here would be to reconfigure PLCs remotely, or even trigger functionality like opening or closing a valve, actuating a solenoid, or turning on/off an electric system.
Once connectivity is established, you can interact with any parameters that are exposed to the PLC Modbus communication interfaces. There are many modems and modules on the market that can connect your PLC to the IIoT.
Retrofitting Legacy PLCs: Build vs Buy
There are off the shelf products available for retrofitting a legacy PLC with wireless connectivity, but you may find that you want to augment the PLC behavior or custom build a device.
Availability. Supply chain issues make it difficult for many companies to maintain inventory.
Complexity. It's possible to start from scratch and design all the necessary components, but you risk unnecessary and complicated development cycles and added expense.
Total cost of ownership. Some products require bringing your own SIM card, adding to monthly recurring expenditures for connectivity and data.
How to Build a Custom IoT-enabled PLC
Think of PLC connectivity as having two ends: one end is the PLC, and the other end is the control system typically represented as a cloud application or database. In some workloads, like a function to report on PLC state condition, the PLC is a data producer, and the cloud system is the data consumer. In others, like a function to reconfigure a PLC remotely, the cloud system is the data producer, and the PLC is the data consumer.
In either scenario, there are common problems that must be solved:
- How will the PLC communicate with the wireless module?
- Where will the wireless module send data?
- How will the data be routed to your cloud application or database?
- What is the security model used for network transport?
Wi-Fi vs. Cellular Connectivity for Wireless PLCs
When it comes to connectivity, the networking options can feel overwhelming. Every PLC application has its own requirements, so let's review the pros and cons at a high level to see which option is best for your project. The table below provides a quick comparison of connectivity based on the most common project considerations.
Why Choose Wi-Fi
When a secure, managed Wi-Fi network is available, it can be an excellent connectivity option for the following reasons:
- No additional data fees. Wi-Fi is often a better option because there are no cost limitations on the amount of data transferred.
- Supports high bandwidth requirements. For streaming video or sending large amounts of data, Wi-Fi will be able to manage the transfer.
- Connect in areas without cellular. You might have a facility in an area with poor cellular connectivity. In this case Wi-Fi could be your only option.
When Wi-Fi is Not the Right Choice
While Wi-Fi is often the first thought when considering wireless capability for PLCs, Wi-Fi connectivity has several critical drawbacks:
- Wi-Fi networks may not be available. Either the PLC resides outside of a Wi-Fi umbrella, or the owner of the Wi-Fi network won’t let you use it because PLCs are a cybersecurity attack vector and Wi-Fi network operators seek to reduce their attack surface area.
- Wi-Fi requires on-site configuration for each PLC. When deploying a Wi-Fi based PLC, each PLC must be configured on-site, which is time consuming and expensive.
- Wi-Fi presents a security risk. IoT devices connected via Wi-Fi can be vulnerable to hackers if they don’t receive regular software support and system updates to address potential security issues.
Why Choose Cellular
If you need to report on conditions, configure PLCs, or remotely control PLCs, cellular should be evaluated for suitability. Here are the key benefits of cellular connectivity:
- Reduced security risks. Using Cellular allows you to bring your own network to the system, giving you control and oversight over secure connectivity.
- Always-on connectivity. The cellular network is ubiquitous and offers redundant capability, so outages are rare.
- Easy to set up. Cellular connectivity does not require extensive system set-up or ongoing maintenance.
When Cellular is Not the Right Choice
Not all workloads are a great fit for cellular, like if you need to stream video, or send high volumes of data. Here are some reasons cellular networking wouldn’t be the right choice:
- High bandwidth requirements. Some PLCs stream data constantly, sending telemetry or real time data and these workloads are best suited for wired connectivity because of the required bandwidth.
- Cellular dead spot. Cellular will not be an option if your geographic location doesn’t have a cell tower for miles or the physical environment blocks the signal.
There are nuances to be aware of, so it might be helpful to do additional research comparing IoT connectivity options. The better you understand the capabilities and limitations of each connectivity option, the more confident you can be that you're making the right decision for your deployment.
Simply Retrofitting Your Legacy PLC with Cellular IoT
There are other modems and modules on the market that can enable cellular connectivity with a legacy PLC. However, when it comes to easily building a custom solution and finding the lowest total cost of ownership, the best way is to use a Blues Wireless Notecard. Blues Wireless benefits your business with:
- Embedded SIM card with pre-paid data
- Consumption-based pricing for routing and events
- Contract-free, subscription-free service
Cellular PLC Build Instructions with Blues Wireless and Raspberry Pi
Embedded connectivity hardware, the Blues Wireless Notecard, provides instant cellular connectivity, and it is connected to the Raspberry Pi via the development board, a Blues Wireless Notecarrier. The Notecard enables communication with the cloud from the Raspberry Pi over cellular without the need for a SIM card, managing a data plan, or subscription fees to an IoT platform. You can attach additional sensors to this configuration along with your legacy PLC to create a custom solution for your business.
The diagram below shows the architecture for an IoT PLC retrofit with Blues Wireless and Raspberry Pi:
Blues Wireless Notecarrier
The Notecarrier Pi/Raspberry Pi Hat is a drop-in host board for a Raspberry Pi or Pi-compatible Single Board Computer. It also provides antennae for both the GPS and cellular capabilities of the Notecard.
Blues Wireless Notecard
A tiny 35mm x 30mm System-on-a-Module (SOM), the Notecard plugs directly into the Notecarrier to create a cellular connection from PLC to cloud. It provisions itself to a global cellular network without any need for on-site configuration. Data is sent and received by the Notecard securely, using off-the-internet communications over an encrypted channel.
The simple JSON format of the data is ready for integration with cloud applications, and includes time stamp information for the measured values, so you don’t need to maintain a real-time clock on your PLC system if you don’t have one already.
It also enables local processing for features like scheduling PLC data queries, remote data query configurations, arbitrary Modbus queries, and filtering data. You can leverage data filters to save on cellular transmission usage, only sending messages to the cloud when measurement values change rather than sending each measured value.
Blues Wireless Notehub
The Notecard communicates with the Blues Wireless Notehub, a thin cloud layer serving as a software endpoint for communications. Communication is done via JSON API, which is human and machine-readable, and great for cloud applications. Notehub will route your data to any cloud application or database you desire. Notehub also provides device management and device fleet management capabilities so you can control fleets of IoT-connected PLCs simply and easily.
In the case of a PLC-to-cloud data transmission
- The Raspberry Pi queries the PLC for tags, retrieves the tag data, converts it to the JSON format, then sends the JSON-formatted data to Notecard.
- Notecard initiates a cellular connection using the best available cellular tower, then sends the data over a TLS encrypted tunnel to Notehub. Notehub then sends the data over a TLS tunnel to the cloud endpoint of choice. Notehub can optionally transform the data into different data shapes as required.
In the case of a cloud-to-PLC data transmission
- The cloud application sends data to Notehub using a TLS encrypted channel. Notehub then routes the data to the specific PLC or group of PLCs over the cellular network.
- The Notecard hands the data to the Raspberry Pi controller who then communicates with the PLC using Modbus, over serial or TCP interface.
- The PLC receives the data and updates one or more tags as desired.
Taking the Next Step to Retrofit Your PLCs for the IIoT
Retrofitting PLCs with IoT is a cost-effective and sustainable way to customize your legacy industrial equipment and benefit from access to the IIoT. Building a custom solution doesn’t need to be difficult, and Blues Wireless allows a developer to add connectivity and start routing data quickly and simply. It can then be easily modified to meet specific applications and challenges, becoming a powerful new asset for your business.
In some cases, it’s best to start with one of our proof-of-concept applications, then swap out sensors or cloud apps until you get what you want. In others, it would be best to take a different tact entirely.
We can help. Our team of experts will discuss your project idea with you and help you find the shortest path to a proof-of-concept device so you can get your product or device connected to your cloud.
Frequently Asked Questions
By adding a host MCU, you are able to capture any type of information and communicate it to the Notecard using our JSON interface over UART or I2C.
If you have questions about acquisition or compatibility, please Contact Us.
The Notecard is compatible with any microcontroller (MCU) from an 8-bit Arduino to 32-bit ESP32 or STM32 and every major Single Board Computer (SBC) platform. Some popular examples include the Adafruit Huzzah32, STM32 Nucleo, Arduino Nano, ESP32-WROOM, among many others. The Notecard communicates over either I2C or UART, so it acts as a peripheral that you can connect to a product’s existing I2C bus or UART connection.
The Blues Wireless Notecard and its companion Notecarrier-Pi HAT support virtually any Raspberry Pi-compatible single-board computer (SBC) with a 40-pin male header connector. Some examples of compatible SBCs include the balenaFin, Banana Pi, and the ROCK Pi.
Note that due to the power requirements of the Notecard, some Raspberry Pi 2 and 3 models include a current-limiting fuse that will power-cycle the device when the Notecard’s modem is on and transmitting. To avoid these issues, we recommend using Raspberry Pi 4 devices with the Notecard and Notecarrier Pi HAT.
Various Notecard models are available that connect to LTE-M, NB-IoT, and Cat-1 networks. In global regions without these capabilities, coverage is also supported by UMTS/HSPA+ and GSM/GPRS/EDGE wireless standards.
Global coverage is available in 135 countries, with direct support provided by leading providers and carriers. For a full list, please see our documentation article on Notecard’s supported countries.
Yes! Blues Wireless can support your project whether you need 10 devices or 10,000. We also have relationships with device building firms and contract manufacturers to help bring your vision to life.
Please Contact Us.
The Blues Wireless Notecard, combined with the Notecarrier-AF, is the easiest way to add cellular connectivity to your MCU-based IoT project. Blues Wireless provides a Feather Starter Kit that includes a Adafruit ESP32 HUZZAH to get you started as quickly as possible. Alternatively, if you are invested in the Raspberry Pi platform, you can get started with the Raspberry Pi Starter Kit.
No! The Blues Wireless Notecard is a small 30mm x 35mm system on module (SoM) that is able to be embedded in any IoT project on its own via its M.2 edge connector.
However, Blues Wireless provides a variety of Notecarrier host boards for easily adding cellular connectivity to a new or existing IoT solution for prototyping purposes. The Notecarrier also provides antennae for both the GPS and cellular capabilities of the Cellular Notecard (and the cellular antenna is also compatible with the Wi-Fi Notecard).
- Notecard: SoM peripheral with a cellular modem, IMU sensor, GPS modem, with an M.2 edge connector.
- Notecarrier: A prototyping board with cellular/Wi-Fi and GPS antennae, used to breakout the pins on the Notecard’s M.2 connector.
- Notehub: A cloud service, used as a backend to connect with the Notecard. Notehub.io securely receives all data and communications created by the Notecard. In turn, Notehub.io can securely sync encrypted data with the cloud application of your choice using VPN tunnels which eliminates the need for traffic to traverse the public Internet.
We’re making IoT quick and easy.
Start your IoT journey with us!
Subscribe to our newsletter
Expert tips, exciting projects, and IoT insights delivered every month