Welcome!
...
News
2024 2nQ

What's in a controller?

6min

Remain involved in electronics long enough, and the need for a controller will surface. A controller is employed to monitor an element and then actuate based on pre-defined parameters. Controllers in a more advanced form will employ a PID loop, however, you can bypass this mathematical endeavor by using setpoints and accounting for system and component tolerances.

You can just buy one . . .

While this is true, and at times that off-the-shelf Chinese derivative is so cost-effective it makes no sense to bother, controllers incorporate many elements of technology and are essential to automation. Learning how it does what it does is valuable to get a good grounding in embedded system development.

A key aspect of embedded development is learning how to combine aspects of a system and to learn to structure that code so that they work together as a single system.

Foe example, the "Hellow World" flashing LED can be essential, and if you mature in code experience to base the flashing on the system interrupts and internal timers then you are graduating to being a versatile embedded developer.

What are we controlling?

A controller is a unit that manages the process of measuring a quantity within a defined space to achieve a controlled or desired result. This is a bit vague, but what it means is that you are using a system to monitor an environmental variable, and when action is needed it is taken. The variable? That can be temperature, rate of flow, rate of evaporation, etc.

When applying that to temperature, the controller manages the process in which the change of temperature of a space, or substance, is measured or otherwise detected, and the passage of heat energy into or out of the space or substance is adjusted to achieve a desired temperature.

Temperature it is . . . for now

A common element to monitor is temperature and examples of tasks that may need to be accomplished are:

  • Ensuring the temperature does not go above a specific value or stays below a certain value
  • Ensuring that it stays within a specific range
    • Not going below the specified value
    • Not going above the specified value

In the first instance, this is a single setpoint application, whereas the second instance would have two set points to establish the lower and upper range.

Setpoints are a simple way of controlling temperature however the more intelligent way is to use a PID loop. The reason for PID it enables more accurate measurement and control of a system.

What generally happens is that if for example, your set point is 51'C, you can have an oscillating effect take place if your temperature hovers at 50.5'C. You can overcome this by creating a coded rule that the heating or cooling only switches off once it goes below 50'C. This would implement "on" at 51'C and off at 49'C. However, this means there is a 2'C variance and this may affect your process.

The work of a controller

The role the temperature controller plays in a simple system is to control a heater or other equipment by comparing a sensor signal with a set point and performing calculations according to the deviation between those values.

Those calculations can be used to take action which may be to bring a fan into action, or to switch that heater off. More advanced controllers are tied into reporting systems that capture this activity.

The controller is not a passive module that just monitors the temperature, its value, and that value in relation to the setpoint. Modern-day controllers are advanced pieces of equipment designed to integrate with an ecosystem of devices and reporting to implement automation of systems.

Project Outline

This series will consider the requirements to design and build a temperature controller