Klipper with closed loop steppers

Hello everyone,

I entertain the idea of using klipper with closed loop axis control. I did a little research, but I ended up a little confused. In my understanding it should not be a problem to use closed-loop drivers instead of open-loop drivers. I dont see that Klipper would even have to know about that. Is there anything I am missing?

Has anyone implemented a closed-loop setup? I am using NEMA23 steppers on my bigger machine.

During my research I read about salmon skin effects on closedloop setups. Can this be avoided with currently available systems?

Thanks in advance!

See Mechaduino experiment

I think this is mainly a question of the quality of the closed loop system. I am myself considering a similar move, but I would prefer actual servos (JMC has some affordable even in NEMA 17 form factor). Such systems are often used in CNC milling machines which have a higher requirement for the accuracy compared to 3D printers. While milling a metal surface, any unwanted movement will always create visible artefacts, even if it is only 1/100mm. Of course one important point is how much the angular error of the motor translates into a linear error on the axis: A CNC milling machine usually uses ball screws where you need to turn the motor more for the same linear movement compared to belt drives. (My machine is a combined 3D printer and CNC mill, and I have ball screws but with a relative high pitch…)

1 Like

Not having dug too deep into this topic but as far as my understanding goes there are two philosophies:

Mechaduino approach as per above link:

  • Klipper runs on the dedicated stepper MCU board
  • Klipper manages PID, open / closed loop etc.
  • Only roughly developed and not fit for daily use

STEP / DIR approach

  • Toolboard runs own firmware
  • Klipper and toolboard does not know each other nor do they interact
  • Klipper only provides STEP and DIR signals, which are processed by the toolboard
  • Toolboard is responsible for controlling the stepper motor, microstepping etc.

I cannot comment on either as I have no experience with.

1 Like

I’m running MKS S42C for the x and y of a CoreXY. They are defined as A4988 and get the step and dir from the printers mainboard a BTT GTR. Works absolutely fine.

3 Likes

Did you need to short the SLP & RST pins on the stepstick adapter?
Apparently A4988 drivers need to have these two pins shorted, but I’m not entirely sure about the MKS SERVO42C or SERVO42D.

I’ve been told by people smarter than me in both the Armchair Heavy/Engineering and creapunk Discord servers that servos, in Klipper’s current state, are not super reliable due to how Klipper’s clock is implemented and the lack of clock sync between MCUs - apparently this aspect of the firmware is also too pervasive throughout the coding framework, so a simple plugin/PR probably won’t be able to address this.

Apparently, we’re better off running servos on RepRap firmware instead.

To be clear, Klipper will still in-fact work with servos, but we won’t be using them to their fullest potential, and there is a chance for the positional data on the servo pcb to lag behind that of the MCU(s).

Hello @x_jaydn !

Thank you for your input. Due to the age of this thread and the ongoing development, this thread is closed.