xblax / flashforge_ad5m_klipper_mod

Unoffical mod for Flashforge Adventurer 5M (Pro) 3D printers to run Moonraker, custom Klipper, Mainsail & Fluidd
GNU General Public License v3.0
109 stars 10 forks source link

Adding klipper KAMP #186

Open 3DEngelen opened 1 month ago

3DEngelen commented 1 month ago

Would it be possible to add KAMP bed levelling?

Avpman2 commented 1 month ago

+1

KaruroChori commented 1 month ago

Adding it in the basic distribution would be possible:

To be totally honest I do not see the value in it and I am not sure it should be part of a "neutral" distribution. Aside from the basic fact that calibrating the bed for this printer has been pretty much a "do it once" thing for me. At the very worst you might want few profiles to account for the different bed temperatures, and recall them via GCODE. @xblax also seems to share the same position reading here.

Have you tried to install it yourself and verified it works?

3DEngelen commented 1 month ago

I was able to get KAMP installed and operational.

Just followed the install method and needed to adapt the print_start macro.

If helpfull i can add my configuration of it.

Avpman2 commented 1 month ago

yes, please on the configuration info.

3DEngelen commented 1 month ago

So install as described here : https://github.com/kyleisah/Klipper-Adaptive-Meshing-Purging And change the configs as exampled in the attachment. KAMP_ADM5.zip

The printer start G-code is:

M117 START_PRINT BED_TEMP={first_layer_bed_temperature[0]} EXTRUDER_TEMP={first_layer_temperature[0]} FORCE_LEVELING=true

Also make sure to enable Label objects in the slicer (in orca it is in the Others tab of the print settings)

@consp edit: changed url so it redirects to the actual url instead of 'url'

Avpman2 commented 1 month ago

Thanks! Looking forward to getting it set up.

consp commented 1 month ago

Bit late to the party but it looks macro only, should be no issue I guess. Would be quite easy to add (or for someone to add as a pull request) since it's only a change to printer_config/* files.

3DEngelen commented 1 month ago

I did some more testing, and it seems that the location off the purge line is not correct when using KAMP. My guess is that is due to the fact that the adventurer 5M uses the center of the bed as 0...

consp commented 1 month ago

My guess would be it does not allow negative numbers since if it assumes a zero/zero corner origin and does some >0 filtering somewhere. Bit shame as it should not matter that much if you do the calculations correctly with respect to a normal cartesian coordinate system. Maybe ask the author about it.

thhdragon commented 1 month ago

i think its these 2 lines right here.

{% set purge_x_origin = ([purge_x_min - purge_margin, 0] | max) %}                                  # Add margin to x min, compare to 0, and choose the larger

{% set purge_y_origin = ([purge_y_min - purge_margin, 0] | max) %}                                  # Add margin to y min, compare to 0, and choose the larger

havent had a chance to test it but this would change the purge origin to 0 anytime its got negative coordinates which for us means the left and front of the bed. my guess is that it could work fine if you change 0 to something like -110

tr0tt3rs commented 1 month ago

I feel like it’s more worthwhile to modify the AD5M config and set it up like most normal printers (with the 0,0 being in a corner rather than the center). Is there any good reason for setting 0,0 in the middle?

KaruroChori commented 1 month ago

What do you mean like normal printers? All my printers are set with 0,0 in the middle. For deltas it is the only reasonable way to set the origin, and for the other types there is no reason not to :/.

Also, this would force us to re-slice every single file.

thhdragon commented 1 month ago

probing 0,0 in the center is a delta thing i think. ive never used a bedslinger or a corexy that hasnt had 0,0 at the bottom left corner. square beds are usually bottom left corner

tr0tt3rs commented 1 month ago

Interesting! I’ve only ever had voron printers before this and I always set up 0,0 at the corner of the build plate. Never knew about the differences for delta printers.

thhdragon commented 1 month ago

https://www.klipper3d.org/Bed_Mesh.html#basic-configuration i think its all round beds not just specifically deltas. i mean its definitely weird, but it doesnt not work. lol just add it to the list of weird design choices they made

consp commented 1 month ago

my guess is that it could work fine if you change 0 to something like -110

Looks like this is an out-of-bounds filter, iirc you can get those bounds somewhere in klipper and maybe use those instead of 0.

Looks like some combination of https://www.klipper3d.org/Status_Reference.html?h=axis_maximum#toolhead and https://www.klipper3d.org/Status_Reference.html?h=axis_maximum#gcode_move might get the min/max values needed.

Maybe the homing origin will give you -110,-110 (just a guess).

xblax commented 1 month ago

At the very worst you might want few profiles to account for the different bed temperatures, and recall them via GCODE. @xblax also seems to share the same position reading here.

Yep, I think it's not really useful due to the reasons already mentioned in that discussion.

I was also thinking about changing the origin, but decided to not do it to stay somewhat compatible with the stock printer profile.

If we think about pre-sliced G-Code supposed to run a different printers, it would also make sense to have the origin in the center of the bed. Anyway, it doesn't make much sense to change it now, as it would break all existing G-Codes and printer profiles for the AD5M.

i0n1zeD commented 3 weeks ago

So install as described here : https://github.com/kyleisah/Klipper-Adaptive-Meshing-Purging And change the configs as exampled in the attachment. KAMP_ADM5.zip

The printer start G-code is:

M117 START_PRINT BED_TEMP={first_layer_bed_temperature[0]} EXTRUDER_TEMP={first_layer_temperature[0]} FORCE_LEVELING=true

Also make sure to enable Label objects in the slicer (in orca it is in the Others tab of the print settings)

@consp edit: changed url so it redirects to the actual url instead of 'url'

I tried your settings but ran into a problem. Just before BED_MESH_CALIBRATE starts, it does not execute LOAD_CELL_TARE because the macro is overridden. And as a result, we have a not very good first layer!

thhdragon commented 1 week ago

So install as described here : https://github.com/kyleisah/Klipper-Adaptive-Meshing-Purging And change the configs as exampled in the attachment. KAMP_ADM5.zip The printer start G-code is: M117 START_PRINT BED_TEMP={first_layer_bed_temperature[0]} EXTRUDER_TEMP={first_layer_temperature[0]} FORCE_LEVELING=true Also make sure to enable Label objects in the slicer (in orca it is in the Others tab of the print settings) @consp edit: changed url so it redirects to the actual url instead of 'url'

I tried your settings but ran into a problem. Just before BED_MESH_CALIBRATE starts, it does not execute LOAD_CELL_TARE because the macro is overridden. And as a result, we have a not very good first layer!

try these. not necessary to use force_leveling=true because i made it default true. just changes for the adaptive mesh not the purge line kamp_ad5m.zip