Solid Z-End Stop â€“ Adjust in Software
by doctek, published
Tired of fiddling with your Z end stop? Frustrated trying to adjust it to 0.1mm accuracy? Here's a method of making the adjustment in software and never having to mess with mechanical adjustment again.
Liked Byview all
Give a Shout Out
Tired of fiddling with your Z end stop? Frustrated trying to adjust it to 0.1mm accuracy? Here's a method of making the adjustment in software and never having to mess with mechanical adjustment again. (This method is tested using Pronterface, Slic3r, and Marlin firmware. Your printer's bed must be flat and level.)
The design provided for the end stop holder is completely generic. It can be modified as you see fit to add a mount to your printer and a bracket for your end sensor mount. The point is that you join these rigidly and mount the unit on your printer so when the Z axis is homed, you have only a few millimeters (I suggest 1 to 3mm.) between the nozzle tip and your bed. This will be essentially a rigid mount; there will be no mechanical adjustment necessary or possible.
OK, seriously, I don't really expect you to use the silly design I offer and make a new end stop holder, although you certainly can. The point I'm making is that you should mount your end stop as solidly as possible and stop trying to adjust it mechanically. The more solid you can make the mount and the less likely it is to be bumped (and potentially moved), the better!
Here's how to adjust your solid Z axis end stop.
First, you need to know how far it is from the home position to the bed. Home the Z axis, put a thin piece of paper under it, and lower it 0.1mm at a time until there is some drag on the paper when you try to move it. This is the distance to the bed. Record the value.
When you try to do the previous step using the Z axis control in Pronterface, you will find that you can't actually make the Z axis move below the home position. Moves below home (less than zero) are prevented by the Marlin firmware. We will use G-code G92 which allows us to redefine the absolute position of the nozzle. We home the Z axis, enter â€œG92 Z10â€ (without quotes) in the command line of Pronterface, and click Send (or press Enter). The home position for Z is now 10mm above the bed as far as Marlin is concerned and you can lower the nozzle as described. BE CAREFUL! If you inadvertently command Z down by too much, the nozzle will drive into the bed.
As you are making the measurement, it may well occur to you that while the nozzle is close to the bed you might well check the levelness of the bed. And this is a good idea. You may well find that your bed isn't perfectly level. If you can manage to get it level within 0.1mm to 0.2mm over the main print area, you're probably fine.
Now that you've measured the distance from the Z home position to the bed, it's time for the second step. For example, let's say you measured 2.5mm (be sure to use the measurement for your machine). In Pronterface, select Settings/Slicing Settings and go to the Printer Settings tab. Click the Custom G-code line. In the Start G-code box, right after the â€œG28 ; home all axesâ€ line, enter a new line. This line will use the G92 code and the measurement you made, 2.5mm in this example. Enter â€œG92 Z2.5 ; Z offset downwardâ€ (without quotes). Note that anything after the â€œ;â€ is a comment, change it as you like.
That's it! Your Z axis is now adjusted. If you need to change it for any reason, simply change the value you entered. That value will be used whenever you slice a file for printing. Slicing assumes that the bed is at 0.0mm and places all layers relative to that. The G-code command ensures correct placement without any mechanical fiddling.
One further note. If you are hesitant to trust the accuracy of your measurement, or you just want to play a little, put a value less than your measurement in the G92 command. Following our example, you might use â€œG92 Z2.3â€. You should find that your nozzle is just a bit too high. Effectively, you are saying that the bed is 2.3mm below the home position of the Z axis. Now adjust the value downward by 0.1mm or 0.05mm at a time until you are happy with the results. Remember to reslice whenever you make a change in the config file! Also note that the home position of the Z axis does not change. The adjustment only takes place when you print using G-code you've generated with your configuration.
A final caution needs to be given. Recall that I said the home position should be 1mm to 3mm above the bed. Less than 1mm is OK, it's just hard to get with a rigid end stop holder. But if it's more than 3mm there is a potential problem. By default, Marlin firmware only backs up 3mm when seeking the Z axis home position. If the offset from the Z axis home position to the bed is greater than 3mm, then Marlin needs to be modified. This is easily done. In Configuration_adv.h file, find the line â€œ#define Z_HOME_RETRACT_MM 3 â€œ. Change the value to be about two millimeters larger than the distance you measured. Build and reload Marlin and you're good to go.
Say good-bye to fiddling with mechanical adjustments of Z end stops!