News / Digital fabrication

A Raspberry Pi takes over a desktop mill in a CNC timing test

Vilnius Tech researchers replaced a desktop mill’s PC controller with a Raspberry Pi and measured how reliably it kept time.

A milling bit cuts lettering into an acrylic test piece on a small Proxxon mill.
A benchtop Proxxon mill retrofitted with stepper motors cuts a “Hello World” test piece in acrylic in this 2008 archival photograph. Proportionally enlarged for publication. Andy Dingley / Wikimedia Commons · Creative Commons Attribution-ShareAlike 3.0 Unported

A smaller controller for an existing mill

In a conference abstract published online on December 1, three Vilnius Tech researchers described replacing the PC that controlled a desktop CNC mill with a Raspberry Pi. The board ran a real-time Linux kernel called PREEMPT-RT. The team measured how closely two recurring software tasks kept to their schedules, one set to run every 25 microseconds and the other every millisecond.

That timing matters when software sends pulses to stepper motor drivers. Each pulse tells a driver to move the motor one increment. A controller can have plenty of computing power and still deliver uneven pulses if other work interrupts it. Those delays can limit how fast the machine moves along a programmed path.

[1] [2]

What the timing test can tell a workshop

The researchers report timing variation in the microsecond range. The peak values in the abstract differ from those shown in its example chart, so the exact worst-case delay is unclear. The brief leaves two practical questions open: how the Pi compares with the old PC and how accurately the converted mill cuts a part.

LinuxCNC already offers system images for the Raspberry Pi 4 and 5. Its documentation calls for testing the controller under load because the longest delays may appear only occasionally. For a workshop considering a similar retrofit, the study gives an example of a compact controller on an existing mill and shows which timing measurements matter when the computer generates the motor pulses.

[1] [2] [3]

Sources

  1. Vilnius Tech researchers’ abstract on replacing a PC-based CNC mill controller with a Raspberry Pi
  2. LinuxCNC documentation on latency testing
  3. LinuxCNC downloads for Raspberry Pi 4 and 5
Explore digital fabrication on SureVero