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.
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.
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
- Safety
SIL or PL: which one does your machine need?
Two standards, two scales, and one machine. Which one applies, how they map to each other, and why the answer is usually ISO 13849.
- Safety
Categories B, 1, 2, 3 and 4, in plain terms
Five architectures, what a single fault does to each, and the practical wiring that goes with them.
- Safety
Safety relay or safety PLC: how to decide
One is a wiring decision, the other is a programming one. The count of safety functions, not the size of the machine, is what settles it.