LinuxCNC testing on a 3D printer shows it should handle laser cutting and engraving too

I have LinuxCNC on a Raspberry Pi controlling a $45 3D printer controller board( SKR v1.4 turbo or MKS SBase v1.3 ) and as I learn more about LinuxCNC I find things to test features and capabilities. For example, the Trajectory Planner handles lots of things dealing with acceleration, deceleration, etc and it does so by looking at the next command/move and many others coming up. It is one of the oldest and well tested open source TP’s out there. These videos show what happens when the TP look-ahead is disabled. A good way to show it is with circles having many straight lines. The Arc Blend feature of the TP optimizes motion when it can. I created the file using LightBurn by creating a circle, setting the speed to 200mm/s and then set the feature type to Offset Fill with a 1mm offset per line/circle. The speed with the 50 segment look-ahead buffer shows that this LinuxCNC setup should also work fine on the K40 laser cutter.

Here are 2 videos showing LInuxCNC arc blend buffer testing.
One with a 1 segment arc blend buffer size(arc blend disabled):

and a video showing LInuxCNC with a 50 segment arc blend buffer(arc blend enabled):

4 Likes

FWIW, I already have an MKS Sbase v1.3 running Smoothieware in the K40 and I started testing LinuxCNC/Remora on 2nd MKS Sbase v1.3 board so it already has to jumper wire hack to get the SPI signals all on one connector so it’s a drop-in replacement I’ll be doing soon.

In the video, I have a SKR v1.4 turbo board with TMC2208 stepper drivers. That board is not only smaller than the MKS but the SPI signals are already accessible in the EXP2 connector so making a simple board to use the stock display ribbon cable was pretty easy. I plan to make a PCB layout in KiCAD so others can just order a board, some connectors and be plug-n-play.

Information on Remora and be found here:
https://remora-docs.readthedocs.io/en/latest/intro/intro.html

4 Likes

I made some PCB cable adapter boards in KiCAD for both the MKS Sbase v1.3 board and the SKR v1.4/v1.4 turbo boards.

I uploaded and ordered boards today so not yet validated. “should” be ok since I made them to mimic the boards I made for the SKR board using perf-board and connectors listed in this schematic.

https://dirtypcbs.com/store/designer/details/13122/6524/remora-mks-skr-adapters-zip

2 Likes

When Machinekit forked from LinuxCNC, I thought LinuxCNC was explicitly not going to support non-x86 processors, and figured that Machinekit was going to be where this kind of work would land. What you are doing is making me realize that I don’t understand the relative state of LinuxCNC and Machinekit. Now I know that I don’t understand the LinuxCNC / Machinekit fork at all, so I have no sense why the fork exists or how one would choose which side of the fork to start from. Did you start with long history of using LinuxCNC (so why change to a fork?) or did you evaluate both and choose LinuxCNC here? I’d love to learn more!

1 Like

I will do the best I can explaining but by no means am I more than a LinuxCNC or Machinekit beginner. I’ve only been able to get it running on my machines with the assistance of many of the experts in both camps.

From what I gathered 5 or 6 years ago when I built my Machinekit/CRAMPS delta was that Machinekit forked from LinuxCNC due to developers refusing to move the code to anything but RTAI realtime kernel. A branch of Machinekit was created which supported other realtime kernels(Xenomia and RT_PREMPT) which allowed good performance yet not requiring applications to run as root like LinuxCNC/RTAI required. RTAI was a stale realtime kernel and took lots of extra build steps to create a working system.

One of the side effects of using current/supported realtime kernels and simplier build configurations was that the Machinekit branch/fork could be built for other architectures(Linux is very portable). The BeagleBone Black(BBB) was a great platform for Machinekit because it has builtin realtime micro-controlers which could be put to use for dealing with stepper motor control(hard realtime stuff) while the rest of the computer running on the realtime kernel did trajectory planning, gcode magic etc. It was the goto platform outside of x86 platforms LinuxCNC was tied to because of the RTAI kernel.

The Machinekit devs also made efforts to componentize Machinekit into a kind of client server system with QtQuickVCP GUI capabilities to replace the aging Axis GUI interface. I’m fussy on this but the just of it is the Machinekit devs were doing more outside-the-box development while LinuxCNC devs were doing lots of smaller bugfixing and less adventurous modifications/upgrades.

I believe this was all happening roughly 10 years ago. At one point, the person who helped me later in getting Machinekit setup on my delta and who developed the CRAMPS cape for the BBB, Charles Steinkuehler, created a branch of LinuxCNC which compiled with RTAI, Xenomai and RT_PREEMT realtime kernals. This allowed LinuxCNC to use more modern Linux kernels and more current Linux distributions. It probably became a bigger issue as more consumers were getting home CNC machines and wanted to use their CNC computers for more than a dedicated CNC control system.

FYI, latency using the RTAI kernel is still king but with advances in CPU designs/speeds and FPGA offboard stepgen controllers like Mesa and now Remora, that super low latency on the application side isn’t so critical.

I think it might have been with the rPi3B or rPi3B+ that the Raspberry Pi became a thing for LinuxCNC adventurers since it could remove a large box in the shop and home shops can use all the space they can get. Remora was created by Scott Alford 5 years ago but unfortunately very few found it so he’s been the only one using it. Others have been using the rPi running LinuxCNC with Mesa FPGA boards over ethernet interface. It’s used to take $200-$300 of Mesa cards to work and now I think it’s just under $200. Still not something to throw some spare funds at just to experiment.

Scott used LinuxCNC when he did his development and probably because they were working with rPi while Machinekit devs were not doing anything but x86 and BBB. Scott was building LinuxCNC on the rPi so theoretically he could have been building Machinekit since it was forked to be more cross platform to begin with. I spoke with Charles Steinkuehler about Machinekit / LinuxCNC and Remora and he said there’s nothing stopping it from running on the rPi , that there are improvements to Machinekit which would benefit LinuxCNC but likely not get used and basically that the LCNC forums were more active than Machinekit forums(my observation also).

So I was going to just build LinuxCNC on the rPi as Scott Alford’s documents mentioned when I found a current pre-built image and gave that a try and it worked. LinuxCNC also has support for custome GUI applications via QtVCP and QtpyVCP. From my understanding and a but of playing around, QtVCP is similar to QtQuickVCP in that there’s lots of QtXML configurations and bindings which make the display happen instead of binary compiled code. But QtQuickVCP acts more like a browser app in a client server kind of way. ie you run a QtQuickVCP app on your desktop, phone, tablet and it renders and makes control choices of what ‘browser’ display you want to run. I believe it will continue to run your app even with the client display shutdown. A bit fussy on this but the gest of it is, LinuxCNC and Machinekit have different ways of creating client user interfaces but both are cross platform using Qt development tools. There are many LinuxCNC GUIs to pick from too.

I was fine with using LinuxCNC when I saw how quiet the Machinekit forums had become and how active the LinuxCNC still was.

I will say, what Scott Alford has done with Remora is fantastic and amazing and it’s getting too little recognition. But LinuxCNC is not for everyone as it’s currently setup out of the box. It’s like a Lego Mindstorm kit vs a Barney the Dinosaur Lego kit. Far more powerful and you can do many customized things with it to make it fit your workflow/needs as opposed to specifically built systems with just a few clicks of buttons to get standard output. But I’m the type who picked Slic3r over all the other slicers(I tried most of them) because Slic3r had so much of the configuration options exposed in the UI. I know many who pick other slicers because there are few options.

I currently run my LinuxCNC setup on the Ender3 over VNC and it works great. VNC is already installed on the rPi image of LinuxCNC 2.9 and I already had the VNC viewer on my desktop. Today I will make a hand wired SPI cable adapter board and power up the K40 off LinuxCNC. The cool part is, after the one wire mode to the MKS Sbase 1.3 board, I can switch back and forth between Smoothieware and Remora by just moving firmware.bin/config.txt files on the uSD card.

I’m also looking forward to adding closed loop stepper motor control to the systems to see how fast they can go and still not miss a beat using little $15 magnetic encoders. The boards mount on the back of the stepper motors and the magnet gets glued to the flat motor shaft. Like the as5047 based boards: AS5047P 14-Bit Rotary Position Sensor - ams | Mouser

2 Likes