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.

11/01/2017


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 (see Figure 1) offer many capabilities, along with whole ecosystems of accessories that are also cost-effective. 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 >>

The Top Plant program honors outstanding manufacturing facilities in North America. View the 2015 Top Plant.
The Product of the Year program recognizes products newly released in the manufacturing industries.
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.
Pipe fabrication and IIoT; 2017 Product of the Year finalists
The future of electrical safety; Four keys to RPM success; Picking the right weld fume option
A new approach to the Skills Gap; Community colleges may hold the key for manufacturing; 2017 Engineering Leaders Under 40
Control room technology innovation; Practical approaches to corrosion protection; Pipeline regulator revises quality programs
The cloud, mobility, and remote operations; SCADA and contextual mobility; Custom UPS empowering a secure pipeline
Infrastructure for natural gas expansion; Artificial lift methods; Disruptive technology and fugitive gas emissions
Power system design for high-performance buildings; mitigating arc flash hazards
VFDs improving motion control applications; Powering automation and IIoT wirelessly; Connecting the dots
Natural gas engines; New applications for fuel cells; Large engines become more efficient; Extending boiler life

Annual Salary Survey

Before the calendar turned, 2016 already had the makings of a pivotal year for manufacturing, and for the world.

There were the big events for the year, including the United States as Partner Country at Hannover Messe in April and the 2016 International Manufacturing Technology Show in Chicago in September. There's also the matter of the U.S. presidential elections in November, which promise to shape policy in manufacturing for years to come.

But the year started with global economic turmoil, as a slowdown in Chinese manufacturing triggered a worldwide stock hiccup that sent values plummeting. The continued plunge in world oil prices has resulted in a slowdown in exploration and, by extension, the manufacture of exploration equipment.

Read more: 2015 Salary Survey

Maintenance and reliability tips and best practices from the maintenance and reliability coaches at Allied Reliability Group.
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 Society for Maintenance and Reliability Professionals an organization devoted...
Join this ongoing discussion of machine guarding topics, including solutions assessments, regulatory compliance, gap analysis...
IMS Research, recently acquired by IHS Inc., is a leading independent supplier of market research and consultancy to the global electronics industry.
Maintenance is not optional in manufacturing. It’s a profit center, driving productivity and uptime while reducing overall repair costs.
The Lachance on CMMS blog is about current maintenance topics. Blogger Paul Lachance is president and chief technology officer for Smartware Group.
The maintenance journey has been a long, slow trek for most manufacturers and has gone from preventive maintenance to predictive maintenance.
This digital report explains how plant engineers and subject matter experts (SME) need support for time series data and its many challenges.
This digital report will explore several aspects of how IIoT will transform manufacturing in the coming years.
Maintenance Manager; California Oils Corp.
Associate, Electrical Engineering; Wood Harbinger
Control Systems Engineer; Robert Bosch Corp.
This course focuses on climate analysis, appropriateness of cooling system selection, and combining cooling systems.
This course will help identify and reveal electrical hazards and identify the solutions to implementing and maintaining a safe work environment.
This course explains how maintaining power and communication systems through emergency power-generation systems is critical.
click me