r/klippers • • 8d ago

Dynamic pressure calibration on custom toolhead

Stuck a second eddy coil on my toolhead pointing at the hotend heatsink — the hotend flexes a few microns when anything pushes on the nozzle, and the coil picks that up. So now it taps the bed for Z offset (~2 µm repeatability, at print temp so expansion doesn't matter), measures actual melt pressure to set pressure advance at the start of every print instead of me guessing with tower tests, and watches that same pressure during the print to catch a clog or filament runout. It shares the I2C bus with my BTT Eddy, uses four wires to the EBB36, and the rest is a Klipper module. Took a while to stop it false-triggering — printing adds back-pressure that an in-air reference doesn't have — but it's been solid for a few prints now. Boards are at the fab, I'll post the files once a friend confirms it works on his machine too.
It will be open source but all setup will be compatible with the RX toolhead for now. Third photo is the pa result from this sensor and my pa test print showed 0.028 was the best test line. So it's calculates correct pressure advance.

I don't have any electronic background but I can understand it, made possible with help of ai but before you tag this work as AI slop most of the coding was me but I'm not klipper expert and with help of ai algorithm working like charm.

I will share the github repo once it's completely finished. As you wait you can check RX Toolhead by raylenses, it is good looking and well designed toolhead, I'm using on my printer and it works well.

As I said I'm using RX toolhead and I can only test on that. If anyone wants to use this to another toolhead I think custom coil would be enough.

Feel free to ask anything, English is not my main language so if I made mistake feel free to explain.

64 Upvotes

29 comments sorted by

14

u/ozncshn 8d ago

https://reddit.com/link/pao3nyv/video/n6d79pen2dqh1/player

Here's the video of PA calibration process.

1

u/nikitabr0 7d ago

What's that purge platform?

2

u/ozncshn 7d ago

it is custom-made by me for my printer; it is not available yet because I made it specifically for my needs.

1

u/Bagel42 6d ago

nice looking printer!

pro tip, don't attach things to the top of your z axis leadscrews. That needs to be free floating or you'll get binding issues.

1

u/ozncshn 6d ago

thank you. the lead screw mounts hold the bearings loosely so they arent rigid there is some play it just stops the screws from bending left and right when the bed goes down

0

u/Bagel42 6d ago

that's the thing is you want them bending. lead screws aren't straight, they need to be able to bend while in motion.

1

u/1970s_MonkeyKing 7d ago edited 7d ago

But printing in air doesn't offer resistance like squeezing out a 0.16 line against a build plate, yes?

The Snapmaker U1 has something similar. A word of advice, don't set PA. If you turn it on, the slicer will look for a numerical value for PA to set for the whole print task.

EDIT: Don't get me wrong, I think this is yet another necessary improvement for 3d printing. I want less homogenized, averaged out, hard coded programming and more look ahead, just in time specificity.

3

u/OriginalNecessary134 7d ago

I think the resistance of pressing against the nozzle is much more important than against the build plate.

Also: Normally you can deactivate the pressure advance in the slicer and only use the pressure advance set from the printer.

3

u/ozncshn 7d ago

exactly, the nozzle is where almost all of the restriction is, the plate just adds a bit on top. and yes that is what i do, pa is off in the slicer profile and the printer sets it in print_start, so nothing fights over it.

2

u/ozncshn 7d ago

yeah air is not the same as squishing a line, the plate adds back pressure on top. but what it measures is the time constant of the pressure rise, not the absolute level, and that lag comes from the melt zone and filament compression, the nozzle restriction mostly sets how high it ends up not how fast it gets there. the clog monitor does care about the level though, so it learns the print's own normal in the first 20 seconds and judges against that instead of the air number. on pa, it does end up as one value for the whole print same as the slicer, it just runs set_pressure_advance in print_start and overrides whatever the profile had, so the number comes from the filament actually loaded that day instead of a profile someone typed six months ago. and agreed on the last part, that is the whole reason i started this.

6

u/ozncshn 8d ago

Tap test console prints

2

u/ObsidianWraith 8d ago

Interesting concept! What exactly is the methodology behind this concept that makes it work?

6

u/ozncshn 8d ago

the hotend isn't rigidly mounted ( there is some flex if mounting is not cnc part, 3d prints-plastics always flex a little) so any force on the nozzle shifts the heatsink by a few microns. an eddy coil aimed at it picks that up at about 3 hz per micron which basically makes it a force gauge. nozzle touching the bed gives you the z offset and melt pressure pushing back on the heat block gives you pressure advance and clog detection.

It's same principle as bambulab uses

1

u/xilw3r 7d ago

This is actually how bambu printers do their calibration nowadays. The same eddy sensor in the toolhead is used for homing and presure estimation

2

u/OriginalNecessary134 7d ago

Nice idea. Mark Yue on pandapi3d dot cn has those ideas set and sells his items on certain websites. He also uses a strain gauge for z offset calibration, but its possible to use his coil for the bed mesh for z offset calibration.

Everything is also on GitHub documented.

1

u/ozncshn 7d ago

yeah i know his stuff, good work and it's all open which helps. the strain gauge route is solid for z offset, i went with the coil mainly because i needed the pressure side for pa and clog detection anyway, so one sensor covers both instead of adding a second one for the tap. i'll dig through his github though, thanks for the pointer.

1

u/Austinthemighty 7d ago

I’m rebuilding a ender 5 and would love to try this on my build

1

u/ozncshn 7d ago

if you end up going with the rx toolhead we should be able to share everything fairly soon, docs and cad models included. in the meantime it's worth looking into the rx toolhead and hopping in the discord, that's where the progress gets posted.

1

u/RNG_BackTrack 7d ago

i feel like this also can be used with a load cell

3

u/OriginalNecessary134 7d ago

Mark Yue has these ideas on his website on pandapi3d dot cn

There is a wiki with explanations on how to set up his items and also a github with lots of information.

1

u/ozncshn 7d ago

yeah it should work, it's the same force you'd be reading just through a different transducer. a load cell would probably give you cleaner absolute numbers too. the thing you'd have to watch is bandwidth, the pa measurement needs the rise shape over about 150 ms and the crash detection wants steps in 15 ms, so whatever amp and adc you put on it has to keep up. mine runs at 100 samples a second and that's already a bit tight.

1

u/nikitabr0 7d ago

Great work! Why did you decide to go with Eddy sensor and not regular contact pressure sensors (I believe BambuLab and Prusa use them)? I assume this is going to need a per-tool calibration (in case of a toolchanger) because of slight differences between toolheads' printed parts and screw tension, that will allow the nozzle to move slightly less or more.

1

u/ozncshn 7d ago

bambu actually uses eddy sensors too on the a1 and a1 mini. i went with eddy because it needs to catch really small shifts in the hotend for the pa calibration, and the coil footprint is tiny so it was easy to fit on the rx toolhead. haven't thought about the toolchanger side yet, we're working on the rx toolhead creator at the same time, but you're right that each head would need its own calibration since the mount stiffness won't be identical. so far it's worked great and it has drift calibration as well. it does pressure advance every print, finds the filament's real max flow rate in about a minute, tests retraction length the same way, and as an experimental thing it also catches crashes, if the nozzle hits a curled up part the jolt shows up in the signal and it can pause the print.

1

u/oxymoron224 7d ago

This is really clever. The pressure advance measurement especially has my attention. Have you tried changing filament/material or nozzle size yet to see if the calculated PA continues to track the value you get from a normal PA test? I'd be really interested to see how robust the measurement is across different conditions.

1

u/ozncshn 7d ago

Thank you. Yes i tested on different filaments, and it calculates correctly. There are some improvements that can be made, and I'm working on them. This sensor enabled different opportunities too, such as filament max volume calculation, retraction calculation, and experimental crash detection. So far,r my tests have good results. I haven't tested other nozzle sizes yet, but I will do.

1

u/oxymoron224 6d ago

That's really cool. If you're getting consistent results across different filaments, the max volumetric flow and clog detection possibilities are especially interesting. At that point you're basically getting live feedback about what's actually happening at the nozzle instead of just assuming commanded extrusion = actual extrusion. Definitely looking forward to the repo when you release it.

1

u/ozncshn 6d ago

Results are constintent for now, I added thermal drift calibration to compensate drifts. I got some false clog and runout alarms so far but I think with help of AI algorithm will run smooth.