PID controller article - Banner
7 minutes

Industrial IoT: Benefits and Example Implementation of PID Controllers with BLE

Full-scale industrial automation can be costly and isn’t always necessary. Instead, you can automate separate processes like temperature control and humidity monitoring. 

One way to do this is by using proportional–integral–derivative (PID) controllers — the most common and efficient feedback-based control technology out there. 

Pid controller 1 - Article - Lemberg Solutions

in. If you also want to collect data about that environment, you need to install data loggers. And they make process automation a lot more expensive than it has to be. 

We’ve found that a simple Bluetooth Low Energy (BLE) integration can overcome this obstacle. Essentially, it can:

  • provide easier installation and configuration through a mobile app
  • offer a simple way to collect and analyze data from the controlled environment.

If you like that sound, read on to explore the idea of BLE-enabled PID controllers. 

First, we’ll take a general look at what PID controllers are and how they work. Then, we’ll explore the difficulties of using a default PID controller example — and compare using default PID controllers to using PID controllers with BLE. 

Finally, we’ll offer an example PID controller implementation for temperature control via BLE. We have built both a controller prototype and a mobile app to go with it.

What is a PID controller in the control system, and how PID controller works 

A PID controller is a device that controls an environment or process based on feedback about said environment/process. The diagram below describes the general principle behind a PID controller. 

Pid controller - Article - Lemberg Solutions

Definitions of components and processes in the diagram: 

  • The setpoint is the desired state for the environment/process. 
  • The PID controller is a device that decides whether the environment/process is staying at the setpoint. 
  • The controller output is a response from the PID controller, showing how much the environment/process deviates from the setpoint.
  • The process is whatever corrective action can return the environment/process to the setpoint.
  • The process variable represents the result of continuous monitoring of the environment/process.

When using a PID temperature controller, you first define a setpoint. For instance, say you want the room to stay at 25 degrees Celsius. In this case, 25 degrees Celsius will be your setpoint. Using process feedback from a temperature sensor, the PID controller will continuously monitor the environment to ensure it stays as close to the setpoint as possible. In our case, it will keep the room at 25 degrees. 

What makes PID controllers different from simple thermostats is their ability to maintain the environment/process at the setpoint. Instead of turning the heating on and off, a PID controller will gradually increase and decrease the temperature to keep it at the necessary level. 

It’s a simple and elegant solution to a common problem. But it does come with caveats. 

PID controller - Article - CTA - Lemberg Solutions

How to use PID controllers: potential difficulties

A considerable drawback to using PID controllers is their inconvenient design. A typical PID controller uses a seven-segment display for settings and is configured with mechanical buttons. This design makes PID controllers uninformative and uncomfortable to set up and use. 

And because PID controllers are usually installed in remote locations in industrial environments, this design leads to a lot of unnecessary struggle. But while design inconvenience is something you can deal with, the fact that most PID controllers don’t record processed data might not be. 

Factories often need to know why something has gone wrong instead of just knowing it has. A basic PID controller doesn’t record the data it processes. All it does is maintain the environment at setpoint. 

To also record data, factories must install data loggers. These devices record and sometimes visualize data about controlled processes. They also tend to be on the expensive side. 

Pid controller - Article - Lemberg Solutions

When you combine the prices of PID controllers and data loggers, you’ll see that the costs go way higher than you might have anticipated. 

Pid controller - Article - Lemberg Solutions

Design inconvenience and cost are not always an issue. For instance, you might need only one PID controller without recording data. But why bear the difficulties if you can avoid them with a simple and secure BLE integration

The benefits of using BLE-enabled PID controllers

BLE is a standard for wireless communication that allows you to interact with a PID controller from a distance. Combine it with a dedicated mobile application, and you get a comprehensive system that: 

  • enables quick PID controller setup and configuration through an intuitive mobile app
  • reduces the costs associated with using PID controllers by combining them with data loggers
  • displays data from the controller on a smartphone. 

These claims are not empty. We’ve built a prototype of a BLE-enabled PID temperature controller to illustrate the potential of this upgrade and generally show the benefits of a PID controller. 

Example of PID controller enabled with BLE

The first step for any project should be to identify the scope. Here’s what we aimed to accomplish with our BLE-enabled PID controller prototype:

  • Establish setpoints
  • Measure the temperature
  • Control the temperature and keep it as close to the setpoint as possible
  • Take corrective action if the temperature doesn’t match the setpoint
  • Log measured data
  • Communicate with a smartphone via BLE to: configure the device; display the temperature and controller output; check the logged temperature and controller output

The diagram below shows how the proposed system would work. 

Pid controller - Article - Lemberg Solutions

To develop the prototype, we used the Nordic Semiconductor nRF52 DK development kit and the following hardware:

The prototype we will build will work similarly to the one described earlier. It will read temperature sensor data and look for deviations between the measured temperature and the setpoint. If there is a deviation, the PID controller will regulate the heating element to maintain the temperature as close to the setpoint as possible. 

Our PID controller will log all measured data with timestamps, which will allow tracing back any temperature changes if necessary. These logs will be available in the dedicated mobile application.

The device can be configured directly from the device (using buttons) or from a dedicated mobile app (through the BLE connection). 

Below, you can see how the prototype looks from above. 

Pid controller - Article - Lemberg Solutions

Example BLE-enabled PID controller: Mobile application

The mobile application we propose to go with the use of a PID controller is simple. It has a total of three screens: the main screen, the settings screen, and the data logger screen. 

On the main screen, you see the data you would typically want to monitor at all times:

  • Process value (in our case, the current temperature measurement)
  • Setpoint value
  • Controller output

The main screen allows you to switch the PID controller between manual and automatic modes. You can go to the settings or data logger screens from here.

Pid controller - Article - Lemberg Solutions

The settings screen will allow you to configure the PID controller remotely. You can then save, upload, and apply the new settings. 

Finally, the data logger page will allow you to track any changes in temperature over time. The mobile app can visualize and update the logged temperature measurements in a graph in real-time. 

This screen will also provide the ability to navigate through the logged data and save it to a file.

PID controller - Article - Lemberg Solutions

Example BLE-enabled PID controller: Testing and results

We tested it in real life to ensure that our BLE-enabled wireless PID controller prototype works as intended. Below, you can see how successful the prototype was at keeping the environment temperature at 70 degrees Celsius.

PID controller - Article - Lemberg Solutions

The outstanding results: We achieved high control accuracy with a regulation speed of 55 seconds and a maximum dynamic deviation of 18 degrees Сelsius. 

Summary

PID controllers are the most common and efficient method for feedback-based environment control. But they come with two caveats:

  1. Due to their design, PID controllers can be highly uncomfortable to configure and use.
  2. PID controllers don’t log the measured data. To do that, you must install a costly data logger, significantly increasing the cost of using a PID controller. 

Our idea was to avoid both issues by enabling a PID controller with BLE. To test this idea, we built a BLE-enabled PID controller prototype and designed a dedicated mobile application to go with it. 

As a result, we improved the PID controller user experience and decreased the cost of using a PID controller by combining it with a data logger. 

Have an industrial IoT project in mind? Let’s talk!

This project came directly from the Lemberg IoT lab.so much that they often make their own projects and test ideas. And you can benefit from their skills and ambitions. 

If you have an IoT project in mind, just get in touch with Slavic Voitovych, our Business Developer. Slavic is always happy to discuss potential projects and talk about our IoT expertise at Lemberg Solutions. 

PID controller - Article - CTA - Lemberg Solutions

FAQ

  • What does a PID controller do?

PID controller ensures stable operation of the industrial IoT control system and keeps the conditioning like temperature, pressure, and flow rate on an acceptable level. It also can adjust the required conditions to provide uninterrupted and stable system performance.

  • What are the advantages of a PID controller?

Among the primary advantages of a PID controller is the precise maintenance of control system conditions, automating the conditions` measurement and management, and optimizing the industrial processes, ensuring their smooth operation. 

Article Contents: