Melzi + Z Probe (Another Auto Level Question)

New repetier user here, coming from Marlin.  I came because of the support for the 5 key ADC panel and the config tool. I had auto level working on my Marlin machine and I want to make sure I have it all set up correctly for repetier.

From my understanding its not good practice to use the z probe as a z end stop but seeing as I have a Melzi board i don't have any other ports. With marlin It would check for home in the middle then do the grid to check for auto level.

What do I need to do in Repeteir to have the same functionality?


  • If you are ok to do some soldering, there is a way to have 5 free GPIO pins on that printer. I just modded my printer and created a pull request to include that feature into the software (it uses shift register to drive LCD pins, so only 2 pins are necessary for the LCD instead of 6, you need 74LS164 and 74LS08 to add in between Melzi and LCD as an interface convertor).

    Back to the topic, I am right now playing with the autoleveling too and have some issues. I am going to reuse Z-min as a Z-max, but right now I keep it as is. Still having issue with initial Z after power on. It seems that Repetier firmware does not move Z up automatically before probing, so my servo-activated Z-probe hits the bed. One way to solve it is to use Z-probe start script to up the Z a bit, but doesn't the firmware do this on its own?... Guess no. Should it? Don't know, but if knows that Z-probe is below the hotend, why not?

    Ideally, I would like to use the same pin for Z-min and Z-probe (both normally closed in series, and any hit will cut the circuit and go high, this logic ensures a protection from broken circuit). I expect that I can home to Z-min (assuming that Z-probe is inactive, say, high on the servo lever). But when I activate the Z-probing, I expect that firmware will go home (ok, with G28 in start script), then go up for some distance (so Z-probe can be activated), then activate it and use the same circuit as a Z-min to probe (since Z-probe will activate earlier in my case, it is below the hotend tip when active). After it probed, it will be deactivated (moved up by servo), and then normal Z-min is active again. I think that is what you also want.

    Not sure if that scenario is possible with the current firmware.

  • Update: I have mechanical Z-probe working now. It uses one GPIO for probe, another one GPIO for servo control.

    From my recent experience, it makes no real sense to have both Z-min and Z-probe in such config. I wasted some time trying to understand why it ignores my changes to Z-probe height, and finally found that Z-min endstop blocks it. So the best way was to disable Z-min (or maybe move it to Z-max later) and use Z-probe only.

    For your case the scenario should be as follows: when printer is powered on, it assumes that Z position is AT LEAST 0, so it is safe to do X/Y homing and then Z-probing for auto leveling. After initial G32 printer knows the zero level and uses software endstop to emulate it when necessary. So you should G32 at least once after power on or save measurements to EEPROM permanently. And never move Z below physical zero point when printer is off.

    Now I have all working as it should. For Z-probing I use startup script which homes X/Y (G28), then moves Z to +10 (relative move), then goes to Z-probing using 3 points. Also start/end scripts activate servo to lower the probe, and to move it up and disable servo PWM pulses in the end. Auto leveling works, I see Z changes during printing if the bed was not ideally level. Probably, I will keep mechanical Z-probe and do not install the inductive once because mechanical probe measures the distance to the coating over glass, not to a metal bed under the glass that can be distorted.
  • Hello, Sorry for not replying, I do not get notifictions when replied to, so didn't think to check.

    I wish I had the expertise to code this in, I feel like its so basic atleast for induction. I have an aluminum board with blue tape on top.

    To me it would be, Home X + Y,, then move x, + y so probe is at exact center. Lower Z until probe signals, have a manual Z GAP adjustment which states the amount of distance between nozzle and bed when Z probe opens.  Then proceed to a 9 point calibration. Am I not correct in assuming the middle of the board won't change? The Marlin FW does exactly this, I am not sure if thats a "chinese" code or if its in the original. I do have the source code if required.

    Another idea would be to probe each 4 corners and then tell the user to rase or lower each corner manually (via LCD commands) (The cube Pro does this)
  • Yes, no notifications from this forum.

    There is nothing better than own experience. I have now working Z-probe with servo. I confirm that there is no sense to have Z-min with Z-probe, so the pin can be reused or converted to Z-max. Also I found that I MUST have correct Z-probing starting/ending scripts to be safe and have it working. For instance, my script includes moving the Z position up to the probe height first, then move the servo lever down, and then start probing. Otherwise the firmware for some reason does NOT think that if I have the Z-probe below the hotend tip when activated, printer must have Z above it, and do not probe starting from zero point (and crash the bed/tip).

    Maybe I missed something, but at least it works now.

    As for the probe pattern, the firmware supports 3 methods (3 point, 4 point and grid), all are explained here:

Sign In or Register to comment.