Welcome! Log In Create A New Profile


Z axis Home and First print layer confusion

Posted by IMPARTIT 
Z axis Home and First print layer confusion
February 17, 2021 08:04AM
After the burnout of the original Eaglemoss Mother and Daughter boards I determined to rebuild the Vector 3 printer using:
Raspberry Pi, Arduino Mega 2560 and Marlin 2.x firmware. But I am stuck with Z Axis issues.....

Many thanks in advance for your helpful responses .

I was always puzzled Z_HOME_DIR 1 and Marlin telling me I needed to set the MAX_SOFTWARE_ENDSTOP_Z when the Vector 3’s Z microswitch is in the MIN position !!!

Then a light bulb moment – IT BECOMES THE MAX END STOP WHEN IT’S 1 DUH!! Don’t forget to change the end stop connection on the RAMPS board from MIN to MAX as well

Now everyhing homes beautifully (i.e. X, Y and Z 0) and

M119 duly returns;


SENDING:M501 shows:
echo:Hardcoded Default Settings Loaded
echo: G21 ; Units in mm (mm)
echo: M149 C ; Units in Celsius
echo:; Filament settings: Disabled
echo: M200 S0 D1.75
echo:; Steps per unit:
echo: M92 X66.67 Y66.67 Z2560.00 E500.00
echo:; Maximum feedrates (units/s):
echo: M203 X300.00 Y300.00 Z5.00 E10000.00
echo:; Maximum Acceleration (units/s2):
echo: M201 X3000.00 Y3000.00 Z100.00 E10000.00
echo:; Acceleration (units/s2): P R T
echo: M204 P3000.00 R3000.00 T3000.00
echo:; Advanced: B S T J
echo: M205 B20000.00 S0.00 T0.00 J0.01
echo:; Home offset:
echo: M206 X0.00 Y0.00 Z0.00
echo:; Mesh Bed Leveling:
echo: M420 S0
echo:; Material heatup parameters:
echo: M145 S0 H180 F0
echo: M145 S1 H240 F0
echo:; PID settings:
echo: M301 P22.20 I1.08 D114.00

BUT WHEN PRINTING build plate raises to just 0.35 above home position (as instructed by slicr3’s code snippet below:

NOT TO A level 0.35 below extruder tip FOR THE FIRST LAYER!!

The gcode works correctly on another Vector 3 printer

MARLIN (ARDUINO)CODE Configuration.h contains the following movement directives

#define INVERT_Z_DIR false

#define Z_HOMING_HEIGHT 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, …
// Be sure to have this much clearance over your Z_MAX_POS to prevent grinding.

#define Z_AFTER_HOMING 0 // (mm) Height to move to after homing Z

// Direction of endstops when homing; 1=MAX, -1=MIN
// :[-1,1]
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR 1

// @section machine

// The size of the print bed
#define X_BED_SIZE 140
#define Y_BED_SIZE 140

// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define Z_MAX_POS 115 (initial value for test puposes) eventual value around 130 after bed levelling)

* Software Endstops
* – Prevent moves outside the set machine bounds.
* – Individual axes can be disabled, if desired.
* – X and Y only apply to Cartesian robots.
* – Use ’M211’ to set software endstops on/off or report current state

// Min software endstops constrain movement within minimum coordinate bounds

// Max software endstops constrain movement within maximum coordinate bounds

#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD

SLICR3 (first part)
; generated by Slic3r 1.3.0 on 2020-12-23 at 10:59:35
; external perimeters extrusion width = 0.44mm (5.63mm^3/s)
; perimeters extrusion width = 0.48mm (7.54mm^3/s)
; infill extrusion width = 0.48mm (10.05mm^3/s)
; solid infill extrusion width = 0.48mm (2.51mm^3/s)
; top infill extrusion width = 0.48mm (1.88mm^3/s)
M107 ; disable fan
;M190 S65 ; set bed temperature and wait for it to be reached
;104 S160 ; set temperature
;M109 S190 ; set temperature and wait for it to be reached
G21 ; set units to millimeters
G90 ; use absolute coordinates
M82 ; use absolute distances for extrusion
;G92 E0 ; reset extrusion distance
;G10 ; retract extruder 0
;G92 E0 ; reset extrusion distance
G1 Z0.350 F350 ; move to next layer (0)
G1 X64.758 Y64.253 F6000.000 ; move to first skirt point
;G11 ; unretract extruder 0
;G92 E0 ; reset extrusion distance
G1 F348

What am I missing here. Your help is much appreciated
Re: Z axis Home and First print layer confusion
February 17, 2021 06:55PM
You seem to have fallen into the same trap as most do when they encounter a bed that moves up.

The Z min position is when there is minimal gap between the bed and the nozzle. It is not when the bed is down.
The Z max position is when there is maximum gap between the bed and the nozzle. It is not when the bed is up

In control software Z+ will increase the distance between the bed and the nozzle,, ie the bed will go down.
Z- will decrease the distance from the bed to the nozzle, ie the bed will go up.

Give in this information, where is the Z endstop at min or max position relative to the nozzle?
and re test direction of Z movement.
Re: Z axis Home and First print layer confusion
February 17, 2021 08:10PM
@impartit :

If you're homing to Z_MAX and using bed leveling, you'are going to want to set the Z_MAX_POS very accurately.

Here is open feature request and check out the link to my recent experiance where the logical print height was larger than the physical one. Sounds like you have the opposite happening.

Re: Z axis Home and First print layer confusion
February 18, 2021 03:06AM
My grateful thanks to you for your replies which served to clarify my "dumbness" on Z-MAX and Z-MIN positions and setting which had indeed confused me previously.

BTW the Z-MAX-ENDSTOP switch is situated at the bottom left of the gantry furthest from the nozzle

I duly set the following:

#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 127.0 (physically measured - exactly the length of a 50 x 36 veroboard)
#define Z_MAX_POS 0

and things looked promising but became totally inconsistent and have decided to order anew:

RAMPS 1.4 Controller + MEGA2560 R3 board + 5pcs Soldered A4988 Stepper Motor Drivers + 5pcs Heat Sinks + 19pcs Jumpers with USB Cable For Arduino RepR from Amazon.

I had lost all confidence in my hardware after 2 weeks of attempting to get this right. At least a couple of burn outs on A4988 stepper drivers. So thoughts of damaged Arduino pull up resistors etc. Expensive lessons to learn here.

Parts should arrive tomorrow so watch this space.
Re: Z axis Home and First print layer confusion
February 18, 2021 03:11AM
you cant set a min larger than a max...

#define Z_MIN_POS 0 (ie at the nozzle)
#define Z_MAX_POS 127.0 (furthermost from the nozzle)

Edited 1 time(s). Last edit at 02/18/2021 03:12AM by Dust.
Re: Z axis Home and First print layer confusion
February 18, 2021 04:21PM
Good board choices!

I'm also likeing the RAMPS based boards due to community support and flexibility. Initially, I'd bought th SMART RAMPS board (a 1.4 based one) for the DUE as I'd had one lying around. Was working great until I'd bricked the DUE. Fortunately, I'd had a MEGA 2560 lying around and switched to that. Only, bugfix-2.0.x does not support that.

Still though, it does now as they'd accepted some bug fixes and SMART RAMPS board works with MEGA 2650 and DUE.

This is a nice board because rather than pull the diode for 24V setup, they have a jumper. With a couple of dupont connectors, this is a great place to plug in a step-down board for those boards that do not support 24V input.

As that board is being sold on AliExpress now, I can confirm that it has the right mosfets to run 3.3V, it has the right 35V caps (you have to change the polyfuses, I put in auto fuses there).

Alll in all, very good. Only thing I'd say is don't get the AZMZ 12864 display because the SD card does not seem to be working with the display right now. (Maybe I'll debug that, we'll see, it is just a code or library issue).

With the TMC2209 drivers ... no need to go 32-bit, I'm not missing the DUE at all (would be cool to have a farm of printers on CAN bus though).
Re: Z axis Home and First print layer confusion
February 18, 2021 04:56PM
The Stepper Motors used on the Eaglemoss Vector 3 printer are Nema 17 specs right ?
Step Angle/Step Angle: 1.8 °
Voltage/Rated Voltage: 12 V
Nominal current/Rated current: 0.4 A/phase1/8th Correct?

So the jumpers on the RAMPS Board should be MS1 and MS2 for the A4988 - Yes?

Therefore #define DEFAULT_AXIS_STEPS_PER_UNIT { 66.67, 66.67, 2560, 500 } should be 1280 NOT 2560- Right!

2560 is how mine is set and I am experiencing erratic axis positioning. Could this be my problem?.

Comments and assurance please.
Sorry, only registered users may post in this forum.

Click here to login