Configuring Z height

After homing, the machine knows it is at X position 0, Y position 0, and Z maximum position.

Because of this, it will read the configuration option gamma_max and set the current Z position to that value.

So after homing, the Z position is set to gamma_max.

This means that if your hotend is 300mm above your bed after homing, and you set gamma_max to 300, after homing, you can just tell the machine to go to Z position 0, and it will go to the bed's height.

To find the right value for gamma_max do one of the following :

Finding gamma_max manually

First home the machine

G28

Then set the current Z position to 0

G92 Z0

Then move the head to the bed, using G0 Z(position) or Pronterface or the web interface.

Once the head is exactly at the bed, issue this command

M114

This will return the position of all axes. The current position of the Z axis is your gamma_max value.

Simply edit the configuration file to set this value, and reset the board.

Alternatively you can use the M665 Z(distance) command to set the value in the config override system, and M500 to save that value to the SD card.

The gamma_max value in the configuration file is ignored if M665 is set and saved.

Next time you home, the machine will know how high above the bed it is.

Simplified manual adjustment method

First home the machine

G28

Then move to the point the machine currently thinks is Z 0

G0 Z0

Then move the head to the bed by jogging, using Pronterface's arrows, the panel or the web interface.

Finally issue the M306 Z0 command which will use the current Z position as a homing offset.

Then save to the SD card with M500.

Next time you home, the machine will know how high above the bed it is.

Finding gamma_max with a probe

If you have some sort of probe attached to your head ( or bellow your bed ), which triggers when the hotend gets close to the bed, then you can use this to find your gamma_max value without manually jogging.

Now there are two different cases here :

  • Either when the probe is triggered, the hotend is exactly at bed level
  • Or, when the probe is triggered, the hotend is above the bed by a given distance, which we will call the z probe offset.

First home the machine

G28

Then ask the probe to go find the bed

G30

This will report the distance travelled by the probe.

Your gamma_max value is that reported distance, plus the z probe offset ( distance between the probe triggering point, and the bed ).

Simply edit the configuration file to set this value, and reset the board.

Alternatively you can use the M665 Z(distance) command to set the value in the config override system, and M500 to save that value to the SD card.

The gamma_max value in the configuration file is ignored if M665 is set and saved.

Next time you home, the machine will know how high above the bed it is.

Automatically finding the bed with a probe

Smoothie allows you to save both the Z height, and the delta calibration data, to the SD card.

This means you do not need to probe every time you start the machine, you only need to do it once, and save the values, which will then stay valid as long as your machine's geometry doesn't change.

This means you can have a removable probe that you only connect and attach to the head at the rare occasions when you need it.

However, if for whatever reason you have a fixed ( or retractable ) probe on your head ( or sensors bellow your bed ), then you might want to automatically probe at the beginning of each print.

To do so, simply change your slicing program's "beginning of file" G-code sequence, and replace

G28

with :

G28
G30 Znnn

When nnn is the distance between your probe's triggering point, and the bed.

The G30 Znnn command moves the head until the probe triggers, then sets the current Z height to nnn

So for example if your probe triggers when the hotend is 5mm above the bed, do G30 Z5, and if your probe triggers exactly when the hotend touches the bed, do G30 Z0.