A CNC controller board is judged by the surface finish of a part, not by its own measurements. The board can pass every electrical test, report perfect step counts, and still produce a workpiece with visible chatter or a dimensional error that moves as the machine warms up. That is because motion control is a timing problem that the board either preserves or corrupts — and the corruption is usually in the physical layer rather than in the trajectory calculation.
Kilandu assembles CNC controller, motion interface and axis expansion boards as mixed SMT and through-hole builds within our industrial control PCBA operation. This page covers what is specific to machining equipment: differential step and direction outputs over long cables, encoder feedback per axis, the handwheel and probe interfaces, fieldbus physical layers, and the isolation that decides whether a spindle drive's noise reaches the motion loop.
What a CNC controller board has to hold together
A machining centre coordinates several axes, a spindle, tool change logic and measurement, and it does so in real time. The controller board sits between the operator's program and the drives, and its job is to issue motion commands with a timing that does not drift.
| Interface | Typical form | What the board must preserve |
|---|---|---|
| Step and direction | Differential 5 V, RS-422 style | Edge timing, pulse width at the maximum step rate, common-mode rejection |
| Fieldbus motion | EtherCAT, PROFINET, analogue setpoint | Physical layer integrity, cycle jitter, isolation between nodes |
| Encoder feedback | Incremental differential, serial absolute | Edge integrity at the maximum feed rate, cable delay |
| Handwheel | Quadrature, low speed | No missed counts during manual jog, debounce that does not add lag |
| Probe and tool setter | Fast digital input | Latency from the input pin to the captured position |
| Spindle command | Analogue 0 to 10 V, or fieldbus | Isolation and offset stability over temperature |
Step and direction over a long cable is a transmission line problem
Most small and mid-size machines still use step and direction between the controller and the drive, and the cable can run several metres through a cabinet full of switching noise. At a few hundred kilohertz, that cable is a transmission line, and a driver that is correct at the connector can produce double edges at the far end if the termination is wrong.
The usual arrangement is a differential driver at the controller and a differential receiver at the drive, with a termination resistor at the receiver end only. Adding a termination at both ends halves the amplitude and is a common mistake. Adding a termination at the driver instead of the receiver leaves the reflection at the far end where it does the most harm.
- Pulse width at maximum rate — a driver that meets its timing at 100 kHz can fall short at 500 kHz because the output stage's rise time eats a fixed portion of each pulse.
- Common-mode range — the drive and the controller may sit at different ground potentials; a receiver with a narrow common-mode range will register false edges rather than a clean failure.
- Skew between step and direction — direction must be stable before the step edge; a board that changes both at the same instant produces occasional reversed micro-steps that appear as surface marks.
- Cable shield bonding — a shield connected at one end only is correct for low-frequency shielding and wrong for the high-frequency content of fast edges; the bonding arrangement has to be decided, not inherited.
The test that finds it: run the axis at the maximum step rate with the spindle running at full speed and the spindle drive's cable dressed exactly as it will be in the machine. A step train that is clean on a stopped machine and shows jitter with the spindle running is a grounding and termination problem, and no amount of controller tuning fixes it.
Fieldbus physical layers decide the cycle time you can actually achieve
EtherCAT and similar fieldbuses are specified at the protocol level, but the achievable cycle time depends on the physical layer on every node. A board that adds a long stub to the PHY, or that routes the magnetics badly, will work at 4 ms and fail at 1 ms — and the failure appears as a drive that occasionally drops a frame, which the controller reports as a following error.
Four build details carry most of the margin. Keep the differential pair from the PHY to the magnetics short and on a single reference plane. Place the magnetics close to the connector rather than close to the PHY. Keep the PHY's own supply clean and separate from the digital rail, because the PHY's clock recovery is sensitive to supply noise. And keep the second port's pair routed independently from the first, so that a fault on one segment does not disturb the other.
| Item | Common mistake | Field symptom |
|---|---|---|
| PHY to magnetics routing | Long, unmatched pair through vias | Dropped frames at short cycle times |
| Magnetics placement | Far from the connector | Sensitivity to the cable's common-mode noise |
| PHY supply | Shared with switching logic | Link instability under processor load |
| Port isolation | Both ports sharing a pair of vias | One bad segment takes both ports down |
| Connector grounding | Shield floating | EMC failures in the cabinet, not on the bench |
Encoder feedback: the same signal, a different failure
CNC feedback encoders are similar in electrical terms to the ones on a servo drive, but the failure mode is different. On a drive, a lost edge shows up as a torque disturbance; on a machine tool it shows up as a dimensional error in the workpiece, and the operator sees it as a machine that "loses position" on long moves rather than as a fault.
That makes cable delay and termination more important than absolute resolution. A feedback cable that runs the length of a machine adds delay, and a controller that assumes a fixed delay will position short or long depending on the axis. Where the encoder is serial, the protocol usually carries a delay measurement; where it is incremental, the delay is invisible until the machine is measured.
The handwheel and probe interfaces are small and decisive
A handwheel looks trivial: a quadrature encoder, a few hundred hertz at most. It matters because the operator uses it for setup, and a missed count during a jog puts the tool in the wrong place. The usual cause is not the encoder but the input filter — a debounce designed for a mechanical switch will swallow handwheel edges at a fast jog.
The probe interface is the opposite problem: it has to be fast, and its latency directly becomes measurement error. A probe that captures position 200 microseconds after contact, on an axis moving at 5 m per minute, records a position 17 micrometres away from where the tool actually touched. That is often acceptable and sometimes is not, and the difference is decided by whether the capture is done in hardware or in software.
- Handwheel — quadrature decode in hardware, no firmware polling, and an input filter matched to the maximum jog rate rather than to a switch.
- Probe — hardware position capture at the input edge, with the latency stated rather than assumed.
- Tool setter — same capture path as the probe, but usually with a slower approach and a repeatability requirement instead of an absolute one.
- Feed hold and emergency stop — these must not depend on the same filtering or the same processor path as the probe.
Isolation decides what the spindle does to the motion loop
A spindle drive is a large switching source sitting in the same cabinet as the motion electronics. The analogue spindle command — usually 0 to 10 V — is the interface most exposed to it, and an unisolated command path turns spindle noise into speed variation, which becomes chatter in the cut.
The build treatment is an isolated amplifier or a digital isolator plus a DAC on the field side, with the isolation barrier placed as close to the connector as the design allows. Beyond the barrier, the command's reference must come from the spindle drive's own ground, not from the controller's, or the isolation is defeated by a shared return somewhere else in the cabinet.
Assembling a CNC controller board
Controller boards combine fine-pitch processors and memory with dense connector fields — step and direction outputs, encoder inputs, fieldbus ports, analogue I/O — and the connector field is usually through-hole or press-fit. The mix makes the assembly sequence matter: reflow first, then selective solder or press-fit for the connectors, with the connector field's flatness and coplanarity checked because a connector that does not seat fully produces intermittent faults that look like firmware.
Impedance control applies to the fieldbus and encoder pairs, and the stack-up has to be specified for it — see multilayer PCB and PCB fabrication. Our route is reflow for the SMT assembly side and selective solder for the through-hole connector field.
Thermal drift is a machining error, not an electronics fault
A machine tool warms up over the first hour of a shift and grows by tens of micrometres as it does. Some of that growth is mechanical and some of it is in the electronics, and a controller that ignores both produces parts that drift from the morning's first piece to the afternoon's last. The board's contribution is usually the analogue command path and any reference it derives from its own supply.
Two build details reduce the electronic part of the drift. The analogue output's reference should come from a precision reference rather than from the digital rail, because a rail that sags by half a percent moves the spindle speed by the same amount. And the sense resistors in any current-monitoring path should be low temperature coefficient parts, placed where the board's own heat does not reach them.
What the board cannot fix is the mechanical drift, and it is worth saying so plainly. Where a machine needs thermal compensation, the compensation runs in the controller's software using a model of the machine, not in the board's analogue design. Saying that at quotation saves a programme from chasing a board problem that is not one.
What we test on a CNC controller board
- Step and direction at maximum rate — with the production cable length, checking pulse width and skew.
- Encoder loopback per axis — at the maximum feed rate, including the termination check.
- Fieldbus link stability — at the minimum cycle time the machine will use, over a sustained period.
- Handwheel decode under fast jog — count integrity, not just response.
- Probe capture latency — measured, recorded, and compared with the specification.
- Analogue command accuracy — offset and gain over temperature, on the isolated side.
- In-circuit test on the connector field and the power tree.
The measurement methods are described in test methods, the general approach on PCBA testing, and acceptance follows IPC-A-610. The standard itself is published by IPC, now the Global Electronics Association, and its published table of contents lists how each joint and component type is judged. Where a programme needs a documented first-article record, the flow is described under quality assurance.
What we need to quote a CNC controller build
- BOM with alternates, especially for the fieldbus PHY, the differential drivers and the isolated amplifier.
- Gerber, drill and stack-up, with the impedance target for the fieldbus and encoder pairs.
- Axis count and interface type — step and direction, fieldbus, or analogue, and the maximum rate for each.
- Cable lengths in the machine, which determine the termination and the driver's common-mode requirement.
- Connector specification — type, press-fit or soldered, and the seating force.
- Probe and handwheel specification, including the latency budget for the probe.
- Environmental requirement — cabinet temperature, coolant exposure, and whether the board sits near the spindle drive.
The complete input list is on quotation file checklist, and a DFM review runs before quotation on any board with a dense connector field. Volume bands are in MOQ and lead time, and the assembly cost calculator gives an indicative range. Where the controller ships inside an assembled cabinet, the scope is described under box build, and the fully sourced route under turnkey PCBA.
Where this board sits in the machine
The controller issues motion to servo drives, one per axis, and receives operator input from an HMI touch panel. It may report production data to a PLC CPU module or a plant network, and in a machining cell it often coordinates with a robot controller rather than running the whole cell itself. The distinction between a CNC controller and a general motion controller is less about hardware and more about the machining-specific interfaces — probe, tool setter, spindle orientation — which is why those interfaces are the ones that decide the build specification.
Where the machine also handles textile or packaging work, the same motion platform appears under a textile machine control board, and where the machine is a lift, the safety architecture is different enough to warrant its own treatment on the elevator control PCB page.
Questions we are asked before a CNC controller quote
Can you build a board with both differential step outputs and an EtherCAT port?
Yes. The two share a concern — the physical layer — and we ask for the maximum step rate and the minimum cycle time so that the termination and the PHY layout are designed against the real requirement rather than a nominal one.
Do you test at the machine's real cable length?
Where the customer can supply the cable or specify its type and length, yes. Testing at a bench length and shipping is how a board passes in the workshop and fails on the machine.
How do you handle press-fit connectors?
Press-fit is available and is often preferred for dense connector fields because it avoids the thermal load of soldering. The constraint is the press equipment and the flatness of the board, both of which we state at quotation — see component sourcing for how press-fit parts are sourced.
Is conformal coating suitable for a controller board?
Yes, and it is common in machining environments where coolant mist reaches the cabinet. Connectors and any press-fit field have to be masked, and the coating has to be compatible with the connector's sealing.
What quantities do you build?
Prototypes from single digits, production in the thousands. The fixed cost is the test fixture and the axis simulation harness — see MOQ and lead time.
Send the BOM, the stack-up and the axis list.
We will come back with the maximum step rate we can verify, the fieldbus cycle time the physical layer supports, and a quotation that separates the connector field from the logic side.
Start a CNC controller quotation · What to send · Industrial control PCBA