Feature proposal: Closed‑loop predictive Z control and strain feedback for mesh correction on K2 Plus #134
BinaryBlitz1
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Full disclosure this was created and drafted with the assistance of AI but a lot of actual leg work and research has gone into this. So please don't dismiss this out of hand. I believe this will solve an existing problem that is widely reported and if done, however you decide, would secure the K2 as a flagship among flagships.
Credit as well to Jacobean on Discord for corrections and research help
This is something that is already in some high end commercial products and hasn't really been widely seen in the consumer or prosumer space. If you were first to implement this feature in this market segment, you'd have the crown no one could take away even if your competitors start rapidly adopting it as well. Creality and others get to keep the manufacturing cost low with rolled steel beds and users get stellar full bed prints. Everyone wins.
The K2 Plus has all the hardware needed to do real time, closed loop bed compensation without any aftermarket modifications. The limiting factor is purely firmware.
Concept
Instead of treating Z as a slow, secondary axis that only applies a static mesh from preprint probing, the firmware can promote Z to a full predictive, closed loop axis—actively managed during printing.
Core Mechanism
Baseline Mesh:
Before printing, a normal high resolution bed mesh is taken. This is the starting point.
Strain Gauge Feedback:
During printing, the existing toolhead strain gauge is sampled continuously. Any unexpected increase in nozzle force or extrusion pressure means the nozzle is closer than predicted at that location.
Live Mesh Evolution:
Each detected deviation updates a dynamic mesh in real time. By the time the first few paths are laid down, the system has an accurate, continuously corrected height map that reflects the surface as it actually is, not just how it was during probing.
Predictive Z Motion Planning:
Using this mesh, the motion planner looks ahead along the toolpath. If, 20 mm ahead, Z needs to move +0.08 mm, it starts moving early so that Z is already where it needs to be by the time the nozzle gets there. This is exactly the same principle as input shaping, but applied to the Z axis.
Mass Aware Z Input Shaping:
The firmware models the inertia of the bed based on its mass and resonance. As a print grows heavier, that model updates.
o For Z changes, the firmware uses the bed. Bed motion is planned with shaped accelerations that keep it from overshooting or ringing, even when large corrections are needed.
Dynamic Speed Throttling:
If the upcoming Z change is too aggressive for the bed/nozzle to reach at the current XY speed, the planner automatically slows the print through that section and speeds back up once the surface flattens out again.
Why This Works
• Closed loop feedback: Strain data ensures the printer reacts if the surface changes after probing, eliminating the dependence on heat soak.
• Predictive motion: Input shaping and pre planned motion means Z corrections are always ready before the nozzle arrives at that point.
Benefits
• First layers that “just work” even on warped stock beds.
• Far less need to preheat the bed for an hour to stabilize warp before probing.
• A printer that adapts to long term bed drift and even slight frame distortions automatically.
• No new hardware—this is all achievable on a stock K2 Plus with a firmware update.
Why It’s Possible
The K2 Plus already has:
• Dual independent Z motors,
• A strain gauged toolhead,
• Klipper running on a capable host.
Do stock steppers “know” bed mass?
Stock K2 Plus motors are step servo motors using FOC (Field Oriented Control).
• These are not simple open loop steppers.
• They use encoders and current feedback to actively correct for missed steps.
• They don’t directly “weigh” the bed, but they do measure position error and motor load in real time.
So while they can’t measure mass the way a scale would, they provide much more data about how the axis is responding under load than a basic stepper.
Can mass be inferred?
Yes – and with step servo motors it’s even easier:
Acceleration response:
o If the bed is heavier (e.g., as a large print grows), the motor controller sees that it needs slightly more torque to achieve the same acceleration.
o Unlike open loop systems, the K2’s FOC controller knows this and corrects for it.
Motor current and encoder feedback:
o The closed loop driver already tracks the difference between commanded position and actual position.
o This data can be used to estimate load and adjust Z shaping automatically.
Simpler approach – just model it:
o Even without using feedback data, the firmware can assume the base bed mass is known and then increase the modeled inertia gradually based on extrusion volume.
o A conservative safety margin ensures it never commands Z moves faster than the system can handle.
This means the K2 Plus already has hardware that could support adaptive, mass aware motion planning; the firmware just doesn’t make use of it yet.
This is exactly how input shaping works today: it assumes a certain moving mass and resonance and uses that to plan acceleration without “feeling” it. Bottom line, the K2 can’t measure bed mass with its stock hardware, but it doesn’t need to. You can model the mass and let firmware plan Z shaping conservatively, just like input shaping is done on XY axes.
There is no physical barrier. The only missing piece is the motion planning code to use the hardware to its full potential.
TL;DR:
The K2 Plus already has all the hardware to completely fix warped bed issues in real time: dual Z motors, a strain gauged toolhead, and a powerful controller. With smarter firmware that uses live strain feedback, predictive motion planning, and mass aware Z input shaping, the printer could correct the bed dynamically during printing, remove the need for long heat soaks, and produce perfect first layers on even badly warped beds—all with no new parts, just code.
Beta Was this translation helpful? Give feedback.
All reactions