PLC vs Microcontroller for Machine Control

Open pump control cabinet with wired circuit boards, motor protection switches and terminal blocks.
Table of Contents

Imagine a factory replacing the controls on a drainage pump. Two float switches set the levels at which the pump starts and stops. The plant electrician needs to see which switch is active and adjust the start delay when conditions change. Now imagine an equipment maker putting the same pump into a compact machine. Every unit has the same wiring, space behind the display is tight, and the manufacturer supplies replacement boards.

For the factory retrofit, a programmable logic controller (PLC) is a good starting point, especially if the maintenance team already uses its programming tools. For the equipment maker, a custom board built around a microcontroller (MCU) deserves a cost estimate. The two pumps can run identical logic. What changes the PLC vs microcontroller decision is who will build the electronics, how many times that design will be used, and who will answer the first service call.

What Does a PLC Include That a Microcontroller Board Needs?

A microcontroller puts a processor, memory and peripherals such as timers and input pins on a chip. A PLC packages a controller with field terminals, a runtime for the control program and tools for inspecting its operation. The distinction is easy to see in the Arduino Opta. Inside this DIN-rail micro PLC is an STM32H747XI microcontroller. Around it, Arduino provides eight analog/digital inputs, four relay outputs and terminals for field wiring. The same unit supports both ladder logic and Arduino sketches.

Arduino Opta WiFi front panel labeled with its input terminals, relay outputs, status LEDs and communications ports.
On the Opta, a technician can identify a field input or relay output by its terminal marking. Arduino Opta user manual.

Buying those features as a package saves design work. It also sets limits worth checking before the panel is built. C-Lin’s compact CZA1, for example, has a fixed input/output count, while its CZD1 series accepts expansion modules. If next year’s pump station might gain a second pump and a flow switch, count the spare channels on the actual model. On a custom board, the equivalent decision is whether to fit spare connectors and input circuits on every unit or redesign the board when the requirement arrives.

From a 24V Level Switch to a Pump Start Command

Suppose the drainage tank has a high float to start the pump and a low float to stop it. When the rising water closes the high float switch, the controller’s input receives 24V. In automatic mode, the controller waits for the signal to stay active through a short start delay, then requests a start from the motor starter. Once running, it holds that request as the water falls past the high float and releases it at the low float. That separation keeps small waves around the high float from repeatedly cycling the pump.

With a PLC, the engineer selects an input rated for the field signal and an output compatible with the starter’s control circuit. With a custom board, the designer must also provide the circuit that turns the field voltage into a valid logic level at the MCU pin, decide what protection the field input needs, and provide an output driver suited to the load. In both designs the starter switches motor power. The controller only issues the command.

Now suppose the operator calls and says, “The tank is full and the pump is quiet.” Four observations narrow the fault considerably.

What the technician seesWhat it tells them
Water is above the high float, but the high-level input reads off.The program is reading the high-level input as inactive. The float, the field circuit and the input assignment are the first places to investigate.
The input reads on, but the start command stays off.Look at the selected mode, elapsed delay and any condition that inhibits a start. A stopped pump may be exactly what the program requested.
The start command is on, but the starter’s auxiliary contact reports open.The controller has issued the command. The output path, the starter and its feedback circuit can explain the missing confirmation.
The starter reports closed, but the tank level keeps rising.The contact confirms the starter position. Flow or a level trend is needed to establish whether the pump is moving enough water to keep up with inflow.

A PLC technician with the project file and access to the programming software can usually watch the input, timer and command while the machine runs. A custom board can make the same diagnosis possible from the pump’s own display. A message such as “Start requested · waiting for starter feedback” lets a service technician distinguish two of the states above without a laptop. The board designer has to bring the feedback signal onto the board and give it a name the technician will recognize.

Arduino PLC IDE Watch window showing an input value of 2.021, output 1 true, and outputs 2 through 8 false.
An input value and eight output commands in Arduino’s Opta expansion demonstration. This cropped screenshot shows the values in the running program. Equipment feedback comes from a separate signal.

King County’s operations manual for Sunset Pump Station gives a field example. Its operator display shows the wet-well level, pump status and alarms together. An operator can see a rising level alongside the state of each pump. A small pump package can use the same idea on a much simpler display. Sunset Pump Station Operations Manual, section 1.5.

Two Sunset Pump Station screens showing wet-well level and four pump speeds above a history of alarms and acknowledgment times.
The overview pairs the wet-well level with the speed of each pump. The alarm history records when each alarm occurred and when an operator acknowledged it.

What Will the First Pump System and the Next One Cost?

Price the first working system on each path. The PLC estimate includes controller selection, panel integration, programming, commissioning and a restorable copy of the project. The custom estimate includes the board design, prototypes, firmware, electrical testing and a way to test each production board. Give both estimates the same requirements, including field diagnostics and what a replacement unit must remember about the machine.

Then price one more delivered unit on each path. Include assembly, testing and the expected cost of field support over the same service period. For an illustrative calculation, suppose the custom design costs an extra $18,000 upfront and saves $60 per delivered unit after those recurring costs. The two estimates meet at 300 units. If the realistic order is 100 units, the custom option still costs $12,000 more over that run. An existing board design or a stocked PLC spare can change the calculation substantially.

For the one-off pump station, ask the plant electrician to describe how a spare PLC would get its program and site settings back after a failure. For the equipment maker, ask service to demonstrate how it would identify a failed float and restore a replacement board to the correct revision and settings. If those jobs are straightforward, the factory has a controller it can maintain and the manufacturer has a design it can afford to repeat.