Auto leveling Z problem

Hello,

I have a problem that seems to be related to the Z leveling.

Calibration went without any problems, good results.

I start the machine and all 4 sensors are green. I do the XY calibration, works fine.

At the Z leveling I select the auto touch leveling by pressing the left and right button. I notice that the main frame goes up till I hear the Z switch, then it goes down with a lot more speed to the position it was before (I htink).

Immediately I get the question to accept the leveling. But I do not recognize that the main frame went down till it touches.

I checked the source code and it looks like it queries the RMS of the Z motor and recognizes that it is at the bottom when that value increases over 300mA. Not sure, I’m not a real developer …. but work in IT since 25+ years, so can help me a little bit.

If I accept the leveling, I can set the thickness to whatever I want, then select the sample file compassLogo_250 file from the SD card and notice that it shows me the current position in the lower left corner of the rectangle, color is red.

I move the handheld CNC that it comes to the middle and the color changes. I thought I’m ready to start the process now, but when I push the left and right button, it turns back to red and never comes back to the previous color.

QUESTION 1: In the serial console output I get the information that it touched during the auto touch, more debug would be helpful in case I need to increase the 300mA if that is my problem.

QUESTION 2: don’t understand what the SG value is. Maybe one hint ?

QUESTION 3: The log folder on the SD card contains around 60 files at the moment, but nothing readable is in it. What is that for a format ?

My machine is built with the PCBs from Cameron and I ordered the drivers and motors with the links in the part list. config.h from the Github repo is unchanged and the latest firmware is in place. So should be what others use.

Can you please point me into a direction on where to look for ?

Many thanks,

Rainer

I think I could answer part of my question on my own, thanks to Copilot in Visual Studio:

Real-Time Stall Detection Loop
The core detection logic uses a timer interrupt (zStepISR) to drive the Z-axis downward at precise intervals while continuously monitoring the stallGuard result (SG_RESULT()). When the tool contacts the workpiece, the increased mechanical load causes the stallGuard value to drop below the threshold, indicating contact has been made. The 100ms sampling rate provides responsive detection while avoiding false triggers from electrical noise. The system also monitors the handle buttons, allowing the operator to abort the process if needed.

So it looks like it first goes up two times into the z-switch and then should go down to touch the surface. This is definitive not the case. I think I will check the mechanics and add maybe a few lines of code.

Rainer

1 Like

Yes correct! I ended up setting 16microsteps for the z height to return a higher sensitivity with the stall guard. You can also just set the height you want then press the encoder button and will just set the z height from where thr z axis started without using stall guard.

I was able to solve this problem.

The BOM points at Amazon to the TMC2209, a pack of 6, which comes from

BIGTREETECH TMC2209 V1.3 Stepper Motor Driver, 2.8A UART/DIR/Step Mode Ultra-Silent Stepstick Drivers for Octopus V1.1/Octopus Pro/SKR V1.4 Turbo/Manta M4P/M5P/M8P SKR 3 3D Printer Motherboard 4Pcs

but I needed just 3 and switched to the pack of 4, then the vendor changed for the same article to:

KINGPRINT TMC2209 V1.2 Stepper Motor Driver 2.8A Peak Driver, 3D Printer Parts for SKR V1.3 SKR PRO V1.1

and they DO NOT support stall guard for auto homing ! SG_VALUE is always 0

Never seen this at Amazon, and I didn’t notice it, so I had to order the Bigtreetech and they work. Maybe it is related to the fact that I’m logged in at Amazon.de but in the future will have a better look at such things.

1 Like