Hello everyone, this is my first time posting here. I apologize if this isn’t too relevant to Klipper’s overall project goals, but I’m extremely curious about your perspective on whether I should proceed.
I’m aware of the Mechaduino project and have glanced over some of the codebase and discussion posts. I am curious as to why closed-loop/servo control was not merged into the mainline Klipper. Is it a general latency issue, a conflict with the Klippers planner? I’m curious because I’m working on a project in opto-mechanics at a university that intends to create an open-source means of controlling optics equipment in a closed-loop fashion.
For context, I’ve already created a control board consisting of an RP2350, two TMC2209s and a pair of AS5147Us that actuate a kinematic mirror mount: Mirror mount - Wikipedia . It ran a simple PID loop that updated at roughly 100Hz, but earlier versions of my code were also able to run the PID loop just fine for getting satisfactory positioning accuracy at 10Hz, it was just a little slow to achieve the final position, along with a tad bit of overshotting, which is less than ideal when trying to characterize the system’s motion.
My supervisor has highlighted that for this project to be generally successful, it should be easy to replicate. So over the past couple of weeks, I’ve restarted board and firmware development to adopt a Klipper-style approach, where all boards that work with Klipper may work with this project. I know that Klipper’s motion planner is generally incompatible with closed-loop control, but given the very low polling rate relative to the fast-paced requirements of 3D printers, I’ve started work on two approaches. The first one is just a simple Python script that interfaces with Klipper to apply outer-loop corrections to a stepper motor’s position, which I think could achieve the same results as my custom board. The second one is just to complete the work Kevin O Connor started on the Mechaduino project regarding the closed-loop system, but I admittedly haven’t looked into it too deeply.
I’m curious if anyone was able to get this feedback control working in Klipper. Any feedback would be greatly appreciated since I have little experience in Klipper development.
All the best,
-Andrew
