Solid Z-End Stop – Adjust in Software

by doctek, published

Solid Z-End Stop – Adjust in Software by doctek Nov 4, 2012
0 Share
Download All Files

Thing Apps Enabled

Order This Printed View All Apps



Liked By

View All

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.

Print Thing Tag

Thing Statistics

3539Views 560Downloads Found in 3D Printer Parts


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.


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!

More from 3D Printer Parts

view more

All Apps

3D Print your file with 3D Hubs, the world’s largest online marketplace for 3D printing services.

App Info Launch App

Auto-magically prepare your 3D models for 3D printing. A cloud based 3D models Preparing and Healing solution for 3D Printing, MakePrintable provides features for model repairing, wall thickness...

App Info Launch App

Kiri:Moto is an integrated cloud-based slicer and tool-path generator for 3D Printing, CAM / CNC and Laser cutting. *** 3D printing mode provides model slicing and GCode output using built-in...

App Info Launch App
KiriMoto Thing App

With 3D Slash, you can edit 3d models like a stonecutter. A unique interface: as fun as a building game! The perfect tool for non-designers and children to create in 3D.

App Info Launch App

Print through a distributed network of 3D printing enthusiasts from across the US, at a fraction of the cost of the competitors. We want to change the world for the better through technology, an...

App Info Launch App

Quickly Scale, Mirror or Cut your 3D Models

App Info Launch App

3D Print a wide range of designs with Treatstock. Easy to use tools to get the perfect result. The global 3D printing network that connects you with high-quality and fast working print services nea...

App Info Launch App