Building my own controller

Hey Terje,

LinuxCNC needs a Real-time operating system because controlling moving machines requires Real-time computing. Unlike told in the outdated LinuxCNC documentation shown below, realtime capability is now to a big part merged into1,2 mainline Linux kernel, however it is usually not activated on most Linux distributions. You need to use a Linux kernel that has CONFIG_PREEMPT_RT enabled when compiled. The Xenomai realtime environment is supported by LinuxCNC, however it will also benefit from a PREEMPT_RT-enabled kernel.

Building LinuxCNC > 2. Supported platforms > 2.1. Realtime

2.1. Realtime

LinuxCNC is a machine tool controller, and it requires a realtime platform to do this job. This version of LinuxCNC supports three realtime platforms

RTAI

From https://www.rtai.org. A Linux kernel with the RTAI patch is available from the Debian archive at http://www.linuxcnc.org. See Getting LinuxCNC for installation instructions.

Xenomai

From https://xenomai.org. You will have to compile or obtain a Xenomai kernel yourself.

Preempt-RT

From https://rt.wiki.kernel.org. A Linux kernel with the Preempt-RT patch is occasionally available from the Debian archive at https://www.debian.org, and from the wayback machine at https://snapshot.debian.org.

Note: Outdated, the new link to the Linux PREEMPT_RT Homepage is here.

You can get a prebuilt realtime-enabled kernel for Raspberry Pi OS as .deb package here:

However on the LinuxCNC Downloads page there exists an SD card image of a

It contains realtime linux kernel 4.19.71-rt24-v7l+ and LinuxCNC 2.8.1.

If you are still decided to try it with a Raspberry Pi, I would try this first as you have everything in one with it. Note that I would only use a Raspberry Pi 4 board, as the Raspberry Pi received a major redesign with version 4. With earlier versions of the Raspberry Pi board, all of the integrated peripherals are internally connected only to the VideoCore, not the CPU, and are therefore very slow.

Anyway I would always keep in mind that the Raspberry Pi is not really a platform for Realtime Computing (it has no HPET), it is usually better to buy a cheap x86 mainboard and some supported hardware like the MESA boards mentioned above. But I know there are success reports with the Raspberry Pi, however I do not know how the machines the people run with it do perform.

Anyway I think many would appreciate it if you report success. If you succeed, you get a CNC Controller with more capabilities than the Onefinity Controller.

However you may also think of upgrading other things later then, depending on the reliability you want to achieve, like replacing open-loop steppers by closed-loop steppers or servos, and at the first place think of the connectors which are the weak spot on the machine, which will benefit from retrofitting strain relief.

And you should also be sure with selecting the right size of your machine. The price difference between Machinist and Woodworker is not that big ($1,398.25 to $1,564.00 USD as of 2022-09-10).

Good luck!

PS: Just for the record: Recategorizing to Controller > Aftermarket Controllers (Advanced Users only)

1 Like