Microcontrollers versus PLCs: There’s a Clear Winner for Your Industrial Applications

The world of single-board computers and microcontrollers offers interesting and inexpensive opportunities for automation applications, but can these components be trusted in critical production applications?

The assortment of microcontrollers emerging in the “maker” world has been growing rapidly, with no signs of abating. These devices—including Arduino, BeagleBone, Raspberry Pi and others—offer extraordinary capabilities, along with whole ecosystems of accessories, all at very low costs

Bill Dehner, technical marketing engineer; and Tim Wheeler, technical marketer and training developer at AutomationDirect; wrote an article titled Microcontrollers versus PLCs: Which one belongs in your plant?, which ran in the November 2017 Control Engineering. They discussed how interest in these products has grown, to the point where some are considering using these microcontrollers for industrial automation applications, instead of a PLC. But is this wise?

Microcontrollers versus PLCs: There’s a Clear Winner for Your Industrial Applications

It’s a natural question, but the answer should be approached carefully because there is often more to the decision than may be apparent at first glance. Let’s look below the surface and see factors relevant to the discussion.

With a quick online review, there are about 80 different boards including microcontrollers, FPGA boards and single-board computers, with a wide range of capabilities. In any case, in this blog, they are all clumped together and called microcontrollers.

Likewise, even though PLCs have a wide range of capabilities, this blog considers a PLC a well-rounded and robust controller such as an AutomationDirect BRX.

Microcontrollers versus PLCs: There’s a Clear Winner for Your Industrial Applications

A Hypothetical Case

The article discusses a small automated process requiring two or three sensors and an actuator. The system communicates to a larger control system, and a program needs to be written to operate the process. This is a simple task for any small PLC costing about $200, but it’s tempting to use a much cheaper microcontroller.

A first step is finding the I/O, no problem with a PLC, but maybe an issue for the microcontroller.

“Some (microcontroller outputs) 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 microcontrollers. 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.”

Microcontrollers versus PLCs: There’s a Clear Winner for Your Industrial Applications

PLCs work with just about any industrial sensor, and typically don’t need external conversion as they are made to connect to a wide variety of sensors, actuators and other industrial components via their I/O. The PLC is easy to mount as well, while a microcontroller board with pins and connectors takes a little work.

Application OS Support

Dehner and Wheeler note that the microcontroller is a bare-bones device with a bare-bones 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.”

While the application may be simple, a PLC has lots of built-in capabilities to make things happen behind the scenes, without the user programming needed if a microcontroller is used. PLCs have software watchdogs to keep an eye on the executing program, and hardware watchdogs that monitor I/O modules and devices. These checks happen every scan, with faults or warnings if a problem occurs.

“Theoretically, any of these capabilities could be added to a microcontroller’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.”

PLCs are Industrial Strength

PLCs are designed to withstand the demands of an industrial environment. The hardware is robust, and it’s made and tested to withstand shock and vibration, electrical noise, corrosion and a wide range of temperatures. Not so with microcontrollers.

“Microcontrollers rarely have such extensive testing, and will typically include only the basic requirements for specific markets such as control engineering. This also can be complicated by not knowing the manufacturer of the board. A generic board may not have been tested to the same extent as a branded product even if they seem to be identical.”

Long Life Expectations and Support

Many industrial machines operate for decades, so the controllers must also. Users therefore need long-term support.

“Original equipment manufacturers must take a long-term view of the products they use in their machines, and need to be ready when a customer wants to buy parts for a system installed in the 1990s or even earlier.

Companies making microcontrollers may not share this sense of history. If you need to replace a controller for a project from five years ago, finding the exact parts you need could prove to be a challenge.”

Most PLC suppliers have excellent support capabilities, with some, like AutomationDirect, offering free tech support. However, open-source microcontroller end users often develop their own technical support groups, with answers to your questions often found in discussion groups and forums with needs similar to your own. Or not.

Summing in Up

“Microcontrollers and other types of development boards are fantastic as teaching tools and for experiments. They’re cheap and make the difficult concepts of programming and automation much easier to learn.” If you have the time to invest, they are wonderful tools.

“On the other hand—if the task at hand is keeping manufacturing running effectively, efficiently and safely—PLCs deliver a wide variety of capabilities with reliability that has been tested and used for decades. When a plant must run and products must be manufactured, reliability and safety matter more than anything else.”

Visit https://www.automationdirect.com/PLCs for more information about the PLCs AutomationDirect offers.