Auto Bed Leveling for LR3

It was suggested that I make a new thread for this if anyone wants to jump in. So far I have determined that the main reason it does not work is due to the Z_HOME_DIR being positive instead of negative. I flipped it to negative and it will probe as expected. When it doesn’t work it probes the same spot over and over again with the error message:

Board Im using: SKR PRO V1.2

Error: Probing Failed measured_z:0.0000
Next line: Current coordinates

So there is some logical difference to the firmware even though the probe functions in testing.

When #define Z_HOME_DIR 1 ABL fails
When #define Z_HOME_DIR -1 ABL works

If anyone has any thoughts please weigh in. I have also opened a bug report with Marlin since it seems like a bug.

1 Like

What is the probe you are using?

Same error regardless of Touch plate or BLTOUCH

1 Like

Tried some odd changes to see what behavior happens.

Set Z_HOME_DIR -1
INVERT_Z_DIR true

It probes towards the Z endstops and then preforms the ABL when I manually trigger the probe.

The correct idea, but wrong direction.

Interesting, I’ll be following your thread. I was planning on experimenting in few months as I want to cut a curved piece repeatedly, so probing would make it easy.

Could you maybe tell what you’ve done exactly so far?

What changes did you make to the hardware setup? Only replaced regular probe with BL Touch?

What changes did you make to the firmware? Only the above code?

Those are the only changes that yielded results even though they are unusable results.
Im reviewing the code for differences in logic now to see where the disconnect is. It has to be some logic related to the Z+ or Z-.

I made a bug report with Marlin as this is an issue with the stock firmware that doesnt normally come up due to the nature of 3D printers homing to 0 instead of to Max. Though I dont fault the homing itself just the direction variable at least for now.

@Ryan @jeffeb3

A bit of an update for anyone that is interested. I looked over Marlins code and it seems like the issue is coming down to what it considers trusted vs not trusted.

This can be confirmed by setting the Z_MAX_POS to 0 and the Z_MIN_POS to a negative number. G29 works, but G38.2 probes up towards the endstops.

I am working with them to possibly set the axis’s as trusted when issuing a G92 command so the max can be 200 and the G38.2 Z0 command will probe to the work piece. When we set the offset for a touch plate it will set the axis to trusted and allow ABL/UBL.

If anyone here knows C++ better than me we could do some tests while I wait.

The files in Marlin should be Motion.cpp and G92.cpp Search for trusted in Motion.cpp and you will see the logic. Essentially we should be able to just do // Clear test bits that are trusted and copy the G92 file after the ‘current_position[i] = v;’ lines.

1 Like

Confirmed trust issue by setting Z_MAX_POS in firmware to 0 then doing G92 Z200 after homing. This confirms the only difference is the trust aspect. I will keep following up with the Marlin team, but if anyone was holding off working on it for conformation that is indeed the issue. motion.h is the correct location not the .cpp file.

The reason we still need to update for the trust issue is because doing G38.2 Z0 wants to go to the Z endstop since it thinks thats the home position. Once solved we can use the touch plate for G29 with some assistance, but I am already in the process to make a probe solution for this. BLTouch is nice, but will 100% be a headache for most people. Probe will allow offset to be 0, 0, 0 and also allow ABL/UBL to keep everything easy. Video for fun.

1 Like

I like it. What mesh size are you using?

UBL should be using the whole 4x8 work area with 100 points. I could use more but that should be accurate enough for me

In your video it looks like the bltouch pin could break anytime, perhaps hitting some debree.

Have you looked at protecting the pin? Or using another probe?

I recently found the EZABL™ Pro, however, I haven’t tried it yet.

That looks a lot easier than my version with the microswitch, albeit 19€ more expensive. :smiley:

Got it working with no help from the Marlin devs lol. Only make these changes if you understand what they are doing. This is not the final solution, but it does get G29 and G38.2 working as expected. If you do not want to wait for a bug fix from Marlin this will get you moving for now.

#define MANUAL_Z_HOME_POS 0
#define Z_CLEARANCE_DEPLOY_PROBE 0 (only set because of the odd behavior of setting the manual Z home and it defaulting to 10 after homing)

After powering on:
Home (check axis’s are trusted with G28 O to confirm trust (this rehomes if an axis is not trusted and can be used as a check))
G92 Z200 or any other + number
G29 P1 to void the mesh and start probing. Using a touch plate avoids the need to set probe offsets beyond just the thickness.
G29 S0
M500 (save settings)
G38.2 Z0
G92 Z(probe thickness)

Set the mesh for the start of your code
M501
M420 S1
???
Profit.

I will be doing a full test later today.

This gives you a mesh just like on a 3d printer using the bltouch?

Using any probe you prefer yes. So far I have only tested UBL as its more points, but I will be doing a manual 32 probe with ABL in a bit an then doing a test cut to verify its applying properly.

Ok. Exiting!

I think that using a probe (of my choiche) is a good solution.

I hope that you get it working and maybe that you post more videos?

In your previous video, the probe only probes once? On my 3d printers it probes twice per point.

Another fun issue came up. The G29 command is homing then doing the command so the offset is not correct for the mesh. Im going to disable that and try again. I am setting Z with the probe first as well to gain an accurate mesh.

Maybe I misunderstand you but isn’t there a place in the config file where you specify the offset to the probe from the nozzle?

There is, but in this case Im following the probe around with a touch plate instead of the BLTouch. Its not much effort to avoid awkward measurements.

I only recently began to learn how to compile my own marlin firmware.

What Marlin version are you using?