Klipper for CNC: initiatives and projects list

Tell us more about it. :popcorn:

2 Likes

No seriously, we want to know :popcorn:

1 Like

I’ve also been wondering about those pendants, not sure if I’d ever get one though.

Can you use the normal PAUSE function/macro instead of feed hold?
The only issue I can see is pause is not always immediate, it will finish the current move before pausing.
Apart from that, I’ve used pause on my machine a couple times, most recently when I realised it would crash into a clamp and I didn’t want to estop and restart the whole job.

Hy,
This is my first contact with Klipper and I hope this is the right place for the following question: My company has been contracted to develop a test bench. In this test bench, a part is to be picked from a magazine, moved to another location, measured there, “exposed”, measured again and then placed in a third location. Our mechanical concept is very similar to a 3D printer: we have a total of 6 axes with stepper motors and 2 DC (PWM) outputs. 3 of the 6 axes correspond to XY and Z in the 3D printer, the other axes are for moving a gripper and for moving the measuring device. We came across the Manta M8P V2.0 and want to use it to control all the actuators.
Would Klipper be the right software to control the axes? Could the existing 3D printer software be parameterized or adapted to solve our task? We have expertise in both mechanical design and software development and are looking for a good starting point. Would someone from this thread or this forum even be interested in working with us on a freelance basis?
Best regards, Harald

Hey!

The features you’d expect from a pendant are hard to implement in klipper because klipper is not “real time”. Any GCODE you send will be in effect at some future time (e.g. with a 2 second delay), and this is an architectural limitation.

I imagine that proper Jogging would require modifications in the MCU code (i.e. Klipper proper) which I’m not prepared to take on. There are many experienced developers around here who might. Try reaching out through discord.

My fork implements only a few features, but during that work I have come to believe that Klipper is not, and will probably not be, a good CNC firmware replacement. That is, unless someone with more knowledge invests time on it.

I’d probably try LinuxCNC or other multi-axis CNC firmware, unless you really need Klipper for other unavoidable reasons.

I only worked on multi-axis and G38 probing because I needed the hardware agnosticity and multi-MCU sync feature that only Klipper has (for now). I would have used Duet’s firmware / RRF otherwise.

It’s a pity, but this is the current state of Klipper, and I don’t think that it will change soon.

What?

Fork implementing 6-axis: GitHub - naikymen/klipper-for-cnc: Fork of the Klipper 3D-printer firmware, plus features for more general CNC.

Is there really not an “interrupt current command” function ?

I mean, even if it keeps going for 1 second, it’s fine.

Also when you say it’s not “real time” in the MCU, surely there are PID loops running for the heaters. Or if there was a rotation or position sensor in a control loop with the steppers, that would be running ?

I see in endstop.c there are IRQ triggers, what about using the endstop inputs to trip the MCU into stopping the current command and waiting for a new one ?

Would Klipper be the right software to control the axes?
In my opnion, Klipper could be one of the solutions for your system.
We recently developed a destributed control system with Klipper and STM32 controllers concatenated with CAN bus. The following is the system block diagram.


Motion of Magazine
HMI of Magazine implemented with tkinter

1 Like

Hello, I have installed Klipper on my Arduino Mega with a RAMPS board. I was able to get it to do the homing, etc. Up to that point, everything works fine. Now I upload any basic drawing to draw with a pen and it throws an error on all the G-codes. I installed LinuxCNC, uninstalled Klipper, reinstalled it with that CNC version, and I’m still having the same problem. I downloaded a simple example circle with a spiral-type G-code from the internet and it doesn’t interpret that either. If I try the same drawings with my Arduino Uno with GRBL, all the drawings work perfectly. What am I doing wrong? Thanks.

None that I’m aware of.

I meant to say that the klippy host is not real time, because its main job is to queue commands. The MCUs are real time in the usual sense, of course. Sorry about the confusion.

Someone else may be able to chime in here. The discord may be a good place for these questions, or you may open a new forum post as well.

You’d need to share the klipper log file to get an answer.

I’d ask everyone using my modifications to redirect their support requests to the github repository: Issues · naikymen/klipper-for-cnc · GitHub

This thread is already very long, and it was never meant as a support thread for my fork. I will answer support request on GitHub or via PM as I find time.

Thank you all for testing it and providing feedback :slight_smile:

Good 3D prints to everyone! We are developing a project and require an additional axis. This axis can be considered as the one that rotates the nozzle and we want it to be able to turn at the corners, etc. Has anyone done research on this topic before? I would like to hear if anyone has information about how to follow a path on the slicing side.

Hello all.

I’d like to share the humble test setup I got together for my fork. It has been due for some time, and I used it to merge the new probing code from upstream.

You may notice that the Mainsail interface has bar controls for this setup. That hack is available here: Files · hacking · Open Lab Automata / Forks / Firmware / Mainsail · GitLab

Also, I want to point out that Gareth has merged code for probing with “load-cells” to upstream klipper, which is fantastic. I have not tested this yet.

More info on that here: Strain Gauge/Load Cell based Endstops

@Arwiendd I replied to you in the thread you linked to.

Impressive, what are you using for Stepper Drivers and how are you implementing the strain gauge endstops?

That is a question for Gareth :slight_smile: (see link post above). I have not been involved at all in that development.

I’m using 8 of the good old A4988 drivers: 6 for XYZABC, plus 2 for the two home-able extruder axes.

1 Like

@naikymen Hey!
this is an amazing project, and the ONLY hope for me in a stealthchanger fork that allows using TAP.

Would it be possible to make a fork of klipper that ONLY has multiple probes?

1 Like

Discussion over here: [Fork] MultiProbe only fork · Issue #31 · naikymen/klipper-for-cnc · GitHub

@naikymen
Hi, I have just installed you fork to make my weird AeroPress presser device work, which only has one motor - so it is configured with “none” kinematics and only with an extruder. I have set up the endstop pins correctly, but when I tried “HOME_ACTIVE_EXTRUDER” or “HOME_EXTRUDER EXTRUDER=extruder” it says the command doesn’t exist.
How do I go about fixing this?
Have a nice day
Dan

homing extruder error

Hi Dan! Please open an issue in the github repo and post your log file there :slight_smile: I suspect that you are missing a configuration entry.

Best

Hi,
I have opened an issue on your Github repo.

Have a nice day
Dan

Hi,

I’m building an embroidery machine. It is XY and the DC motor of sewing machine. Others did this before and the best one uses teacup firmware back in 2018.

I want to use klipper instead. As said there are two steppers for X and Y. What makes me curious is how to control DC motor of sewing machine. This motor drives the needle. I add a speed sensor to motor shaft. Each 100 ticks is one stitch. The feedrate gets expressed as stitch/min.
It will need PID to control speed. How to handle this sensor feedback? It must be an interrupt imo.

Next issue, XY must only move if needle is above fabric. I add a sensor to detect needle position. So only if sensor triggers (needle up), XY is allowed to move. The sensor might act like an endstop.

So each Z movement must be confirmed by needle sensor. Now XY has a short period to move until needle will be back on fabric.
This means, short XY travel can be done without stopping DC motor.
For larger travels, DC motor must be stopped in upper pos first.

GCode looks like this
G0 X1 Y1
G0 Z1
G0 X1.1 Y1
G0 Z2
G0 X1.1 Y1.1
G0 Z3

Alternatively, G0 for Z varies between Z0 and Z1.

Do you think this is possible at all? I’m not familiar with klipper code but to my understanding MCU firnware is minimalistic and the path calculation is handled by RPi.
Which part of code should I inspect?

BR Patrick