PLC or microcontroller: what actually decides it
An Arduino can switch a relay for a fraction of the price, and the reasons to buy a PLC anyway are mostly not technical.
By the LADX engineering team
Short answer
Use a PLC when the thing has to run for twenty years, be maintained by somebody who did not build it, and survive an industrial electrical environment. Use a microcontroller when cost dominates, volume is high, or the application is genuinely simple and disposable. The deciding factors are usually lifecycle and maintainability rather than capability.
The technical comparison favours the microcontroller on almost every axis, which is why the question keeps coming up and why the answer is usually still 'PLC'.
What you are actually buying
- Twenty years of availability. The controller specified today will still be purchasable in fifteen years, or there is a documented migration.
- Environmental tolerance. Temperature, vibration, electrical noise from a VFD two metres away.
- Isolated I/O. Rated for the voltages and the abuse of a real machine.
- Maintainability by others. A technician who has never seen this machine can open the program and follow it.
That last one is worth more than the rest combined and is invisible in a specification comparison.
When the microcontroller wins
High volume, where unit cost dominates. Genuinely simple and disposable. A one-off test rig. Anything where the person maintaining it will be the person who built it.
The honest test: if this thing breaks at 2 a.m. and you are on holiday, can somebody else fix it? That question decides more of these than performance ever does.
Sources and further reading
- PLCs compared with other control systems (Wikipedia)en.wikipedia.org
- Microcontroller (Wikipedia)en.wikipedia.org
Common questions
- Why are PLCs so expensive compared to an Arduino?
- You are buying environmental tolerance, a twenty-year supply commitment, isolated I/O rated for industrial voltages, certification, and the ability to hire somebody who can maintain it. The processor is the cheapest part of a PLC and it is not what the price is for.
- Can I use a Raspberry Pi as a PLC?
- For non-critical applications, yes, especially with OpenPLC or a CODESYS runtime. The gaps are environmental tolerance, the lack of isolated industrial I/O without extra hardware, SD card reliability, and the absence of anyone else who can maintain it when you are unavailable.
Keep reading
- Fundamentals
What a PLC is, for people arriving from software
An industrial computer with an unusual execution model, and the constraints that explain every design decision in it.
- Fundamentals
How a virtual PLC works: inside one scan
The mechanism of a software PLC, from the input image to the watchdog: the scan clock, catch-up in a throttled browser tab, tasks, RETAIN, warm and cold restart, and fault codes, with the real numbers from the LADV runtime.
- Fundamentals
PLC tasks and the watchdog: cyclic, event and continuous, and what a fault does
How PLC tasks start (cyclic, event, continuous), how one CPU shares its time between them, and what a watchdog fault is, with a two-task program and the LADV behaviour as a worked example.