Micro-controllers versus PLCs: Which one belongs in your plant?

Cover Story: Single-board computers and micro-controllers offer opportunities for automation applications, but they may not be the best option for critical production applications.


Figure 1: There are dozens of micro-controller developer board designs (Arduino, BeagleBone, Raspberry Pi, and others) available from a variety of manufacturers. Courtesy: AutomationDirectThe variety of micro-controllers emerging has been growing rapidly, with no signs of abating. These devices offer many capabilities, along with whole ecosystems of accessories that are also cost-effective (see Figure 1). Consequently, interest in these products has moved from automation clubs and basement robot builders, to the point where some are considering their use in manufacturing.

When an engineer is looking at solving a small industrial automation challenge, the traditional approach has been to use a programmable logic controller (PLC) (Figure 2), but some engineers now may consider a micro-controller; however, certain factors need to be considered before a decision is made.

For the purpose of this discussion, some generalizations will be made due to the number of possible open-source board-level products resulting from the do-it-yourself electronics industry (the maker world). Micro-controllers, field programmable gate array (FPGA) boards and single-board computers have varying capabilities and limits. However, for purposes of this discussion, we'll lump them together under the heading of micro-controllers.

Similarly, the characteristic attributions of PLCs and other industrial controllers do not apply to every model and manufacturer, although there is a high degree of consistency across the range of companies within this space. 

Industrial automation example

An engineer may be considering a small automated task involving two or three sensors, an actuator for the output, and a reporting function to the larger control system. It will require a basic program to make it operate.

This is simple for many small PLCs, with prices starting at a few hundred dollars, but there are factors that should be considered first. A small open-source board-level micro-controller might be tempting to try at a fraction of the cost.

The first obstacle the engineer is likely to hit is the input/output (I/O) compatibility: does the prospective micro-controller offer the required I/Os? It isn't difficult to find a micro-controller with the correct number of discrete and analog I/Os, but they may not be the right type.

Some are relatively easy to convert, such as a 4-20 mA current loop to a 0-5 V voltage loop. Others are more difficult to convert to anything, such as an analog output using pulse-width modulation (PWM), common for micro-controllers. Some signal converters are available as standard products, but they add to the overall cost. An engineer insisting on a full do-it-yourself experience may try to create the converter internally, but such an undertaking can be complex and require extensive development time.

On the other hand, PLCs are designed to work with industrial sensors, and therefore offer a wide range of I/O choices, so there should be little or no need for external conversion. The ability to wire directly to a PLC or I/O module will be easier since it is designed for this purpose. A PLC also will ensure a high degree of protection for the devices and circuits by building in isolation for relevant I/O points. An end user may be able to do the same, but this requires additional knowledge and increases complexity.

Figure 2: PLCs, like this AutomationDirect BRX, have been the workhorse in industrial automation applications for decades. Courtesy: AutomationDirectThere's also the matter of mounting and housing a micro-controller, since it likely will be a naked board with pins for connections (Figure 3). The end user also must supply power and create terminals to attach external devices. These are manageable tasks, but take time.

These physical matching and mounting challenges may seem to be major elements of the discussion, but they only scratch the surface of the differences between the two major platform groups, with other less visible considerations being more important.

The OS supporting the application

Micro-controllers are bare-bones devices, and that includes the operating system. After all, a single-board computer selling for $40 is not going to have much in the way of built-in software routines, so the user is left to code everything except the most basic capabilities. This isn't necessarily a problem since most micro-controllers use common programming environments such as Linux and C and are typically used for relatively simple applications.

Similarly, writing an application for a PLC also may be simple, but much happens below the surface that is not visible to the programmer or user. PLCs have many housekeeping functions watching the program and associated equipment.

Figure 3: Most micro-controllers only provide pin type connectors as shown on the bottom right of this board, and thus require the addition of basic terminal strips for I/O connections. Courtesy: AutomationDirectSoftware watchdogs keep an eye on the program to make sure it is executing as it should. For example, say there is a problem with a for/next loop, and the program gets stuck. If it's stuck, it can't carry out its function, which could cause a harmful and potentially dangerous situation. The software watchdog times each scan of the program. If a given scan is not completed in the allowable time, the dog will bark, fault the PLC and put it into a safe mode while alerting the operator.

Hardware watchdogs keep an eye on the devices connected to the PLC, particularly I/O modules or individual devices such as switches, sensors, and actuators. The PLC always is exchanging handshakes with the devices, and counts each scan of the program as it operates. If the scan count for any individual device begins to lag, the PLC will assume something is wrong with the device or wiring. Depending on the level of sophistication and the program set up, it may fault and go into a safe mode, or it may continue to operate while informing operators of the problem.

Data from devices is verified using a cyclic redundancy check to ensure there are no communication errors. Again, if a problem develops, the PLC can go into a safe mode. All these functions are designed to warn users if the PLC is not functioning as expected, and therefore cannot control the machine or process as desired.

Theoretically, any of these capabilities could be added to a micro-controller's programming, but the user would either have to write the routines from scratch, or find existing software modules to reuse. Naturally, these would have to be tested and verified for the application, which would be a major undertaking, at least the first time around. An engineer writing multiple programs for the same controller could probably reuse proven code blocks, but these capabilities are included with the operating system for virtually any PLC. 

<< First < Previous Page 1 Page 2 Next > Last >>

Top Plant
The Top Plant program honors outstanding manufacturing facilities in North America.
Product of the Year
The Product of the Year program recognizes products newly released in the manufacturing industries.
System Integrator of the Year
Each year, a panel of Control Engineering and Plant Engineering editors and industry expert judges select the System Integrator of the Year Award winners in three categories.
September 2018
2018 Engineering Leaders under 40, Women in Engineering, Six ways to reduce waste in manufacturing, and Four robot implementation challenges.
GAMS preview, 2018 Mid-Year Report, EAM and Safety
June 2018
2018 Lubrication Guide, Motor and maintenance management, Control system migration
August 2018
SCADA standardization, capital expenditures, data-driven drilling and execution
June 2018
Machine learning, produced water benefits, programming cavity pumps
April 2018
ROVs, rigs, and the real time; wellsite valve manifolds; AI on a chip; analytics use for pipelines
Spring 2018
Burners for heat-treating furnaces, CHP, dryers, gas humidification, and more
August 2018
Choosing an automation controller, Lean manufacturing
September 2018
Effective process analytics; Four reasons why LTE networks are not IIoT ready

Annual Salary Survey

After two years of economic concerns, manufacturing leaders once again have homed in on the single biggest issue facing their operations:

It's the workers—or more specifically, the lack of workers.

The 2017 Plant Engineering Salary Survey looks at not just what plant managers make, but what they think. As they look across their plants today, plant managers say they don’t have the operational depth to take on the new technologies and new challenges of global manufacturing.

Read more: 2017 Salary Survey

The Maintenance and Reliability Coach's blog
Maintenance and reliability tips and best practices from the maintenance and reliability coaches at Allied Reliability Group.
One Voice for Manufacturing
The One Voice for Manufacturing blog reports on federal public policy issues impacting the manufacturing sector. One Voice is a joint effort by the National Tooling and Machining...
The Maintenance and Reliability Professionals Blog
The Society for Maintenance and Reliability Professionals an organization devoted...
Machine Safety
Join this ongoing discussion of machine guarding topics, including solutions assessments, regulatory compliance, gap analysis...
Research Analyst Blog
IMS Research, recently acquired by IHS Inc., is a leading independent supplier of market research and consultancy to the global electronics industry.
Marshall on Maintenance
Maintenance is not optional in manufacturing. It’s a profit center, driving productivity and uptime while reducing overall repair costs.
Lachance on CMMS
The Lachance on CMMS blog is about current maintenance topics. Blogger Paul Lachance is president and chief technology officer for Smartware Group.
Material Handling
This digital report explains how everything from conveyors and robots to automatic picking systems and digital orders have evolved to keep pace with the speed of change in the supply chain.
Electrical Safety Update
This digital report explains how plant engineers need to take greater care when it comes to electrical safety incidents on the plant floor.
IIoT: Machines, Equipment, & Asset Management
Articles in this digital report highlight technologies that enable Industrial Internet of Things, IIoT-related products and strategies.
Randy Steele
Maintenance Manager; California Oils Corp.
Matthew J. Woo, PE, RCDD, LEED AP BD+C
Associate, Electrical Engineering; Wood Harbinger
Randy Oliver
Control Systems Engineer; Robert Bosch Corp.
Data Centers: Impacts of Climate and Cooling Technology
This course focuses on climate analysis, appropriateness of cooling system selection, and combining cooling systems.
Safety First: Arc Flash 101
This course will help identify and reveal electrical hazards and identify the solutions to implementing and maintaining a safe work environment.
Critical Power: Hospital Electrical Systems
This course explains how maintaining power and communication systems through emergency power-generation systems is critical.
Design of Safe and Reliable Hydraulic Systems for Subsea Applications
This eGuide explains how the operation of hydraulic systems for subsea applications requires the user to consider additional aspects because of the unique conditions that apply to the setting
click me