Sensorless homing and musings on Z-offset

In a perfect example of irony, I have just decided to try sensorless homing - just a few days after finally having got around to releasing my designs for smoothed endstops

The process turned out to be quite simple. I had some spare 2209 stepper drivers as the originals had had their diag pins removed in order to use the endstops. In fact, I had desoldered these rather than cutting them and even retained the pins, so I could also have simply resoldered the pins back into place. But, as I had the spare drivers, it seemed unnecessary. 

Once the new drivers were installed, there were just a couple of changes to the Marlin firmware which I needed to make. 

First was a change to enable the sensorless homing and to set default stall sensitivities. 


The next change was to change the Endstop Inverting to false for the X and Y axes. Effectively, telling Marlin to ignore the endstops.

I compiled a new version of the firmware and then installed it to the printer.

Thereafter, it was necessary to tune the sensitivity. I had started with 100 as show above, but this proved to be too insensitive and I had to be quick on the reset button to avoid a crash. 

I then increased the sensitivty in jumps until I got to a point where it was too sensitive. I then moved back down the range more slowly until I managed to reach a point where they bumped the endstop gently. The BTT TFT35 has a menu option to change this, so it was easy enough to make the changes directly from the screen. Once I had a value which worked (151 for X and 150 for Y, in my case) I was able to save it to EEPROM using

M914 X151 Y150
M500 ; to save

This was a simple enough process, of course, but I was rather surprised at how close the line was between stalling and crashing. I was expecting a range of sensitivities, but it did seem to be pretty close, in my testing. 

For good measure, I updated the firmware as a final step, to reflect the tested setting, just in case the EEPROM values aren't loaded correctly. Keeping the original defaults would have meant a crash in the event of an EEPROM problem. 

Z offset value - how do you do it? 

As I am dismantling and re-assembling the printer quite frequently, I am having to recalculate the Z offset for the BL-Touch. This is the physical difference between what the BL-Touch "sees" as the distance to the bed and how far away the nozzle actually is. Obviously, the sensor has to activate before the nozzle hits the bed, so Marlin needs to know how much before. 

The process is simple enough

M851 Z0 ;Reset the offset
G28; Go Home
G1 Z0; Move the nozzle to Z=0
M211 S0 ; Turn off software endstops

Then use some feeler gauges and slowly move the nozzle down until it just fits. I use a 0.1mm gauge. Once the measurement is known (it will be a negative value) this can be saved back to the EEPROM.

M851 Z<new value> ; Set new offset
M211 S1 ; Switch software endstops back on
M500 ; Save to EEPROM
M501 ; Read EEPROM to check the new value is set

Now, this is where advice I've read elsewhere diverges. There seem to be two distinct pieces of advice on how to record the offset. Most seem to say use the recorded Z value and enter that. Others say to add the thickness of the feeler gauge (or other measurement item - piece of paper perhaps). 

The difference, in essence, is whether to record the point at which the nozzle touches the bed (I would argue this is the true Z=0) or whether to record the point at which the nozzle is likely to be at the start of a print. 

I can see the logic behind both options, but I feel that setting Z=0 at the actual bed is a more meaningful value. It does mean that each print will need to have an offset applied before starting, but this may well be needed for different filament types anyway. Better, in my opinion, to have a true baseline than an arbitrary one. 

Please comment if you disagree (or if you agree, to be egalitarian). 




Comments

Popular posts from this blog

SKR1.4 and TFT 35 - using long file names and print from SKR SD card

Update: delayed but not forgotten