Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Z axis always tries to home outside of bed. #3237

Closed
SpaceCadet-Code opened this issue Mar 25, 2016 · 14 comments
Closed

Z axis always tries to home outside of bed. #3237

SpaceCadet-Code opened this issue Mar 25, 2016 · 14 comments

Comments

@SpaceCadet-Code
Copy link

Hey, I have a prusa i3 with ramps 1.4 and the z axis always tries to home outside of the bed when using a G28 command but if you home each axis separate, it says not in safe position.

@jbrazio
Copy link
Contributor

jbrazio commented Mar 25, 2016

Are you using the latest RC ?
Have you enabled SAFE Z HOMING ?
Are your restrictions to SAFE Z HOMING correctly defined ?

@AnHardt
Copy link
Contributor

AnHardt commented Mar 25, 2016

Do you have one of these:

#define DISABLE_X true
#define DISABLE_Y true

?

@AnHardt
Copy link
Contributor

AnHardt commented Mar 25, 2016

Do you have configured a probe, but not AUTO_BED_LEVELING_FEATURE?

If yes

@@ -565,10 +565,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
     #define ABL_PROBE_PT_2_Y 20
     #define ABL_PROBE_PT_3_X 170
     #define ABL_PROBE_PT_3_Y 20

   #endif // AUTO_BED_LEVELING_GRID
+#endif // AUTO_BED_LEVELING_FEATURE

   // Z Probe to nozzle (X,Y) offset, relative to (0, 0).
   // X and Y offsets must be integers.
   //
   // In the following example the X and Y offsets are both positive:
@@ -629,12 +630,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
     #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
     #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).

   #endif

-#endif // AUTO_BED_LEVELING_FEATURE
-

 // @section homing

 // The position of the homing switches
 //#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used

could be a quick fix.

@SpaceCadet-Code
Copy link
Author

// This determines the communication speed of the printer
// :[2400,9600,19200,38400,57600,115200,250000]
#define BAUDRATE 115200

// The following define selects which electronics board you have.
// Please choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
  #define MOTHERBOARD BOARD_RAMPS_14_EFB //#define MOTHERBOARD BOARD_RAMPS_13_EFB
#endif

// This defines the number of extruders
// :[1,2,3,4]
#define EXTRUDERS 1

// coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors

#if DISABLED(ENDSTOPPULLUPS)
  // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
  //#define ENDSTOPPULLUP_XMAX
  //#define ENDSTOPPULLUP_YMAX
  //#define ENDSTOPPULLUP_ZMAX
  //#define ENDSTOPPULLUP_XMIN
  //#define ENDSTOPPULLUP_YMIN
  //#define ENDSTOPPULLUP_ZMIN
  //#define ENDSTOPPULLUP_ZMIN_PROBE
#endif

// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
//#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS

// If you want to enable the Z probe pin, but disable its use, uncomment the line below.
// This only affects a Z probe endstop if you have separate Z min endstop as well and have
// activated Z_MIN_PROBE_ENDSTOP below. If you are using the Z Min endstop on your Z probe,
// this has no effect.
//#define DISABLE_Z_MIN_PROBE_ENDSTOP

// Travel limits after homing (units are in mm)
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS 220
#define Y_MAX_POS 220
#define Z_MAX_POS 230

#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line)
#define DEBUG_LEVELING_FEATURE
#define Z_MIN_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.

#if ENABLED(AUTO_BED_LEVELING_FEATURE)

  #define AUTO_BED_LEVELING_GRID

  #if ENABLED(AUTO_BED_LEVELING_GRID)

    #define LEFT_PROBE_BED_POSITION 20
    #define RIGHT_PROBE_BED_POSITION 160
    #define FRONT_PROBE_BED_POSITION 20
    #define BACK_PROBE_BED_POSITION 160

    #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this.

    // Set the number of grid points per dimension.
    // You probably don't need more than 3 (squared=9).
    #define AUTO_BED_LEVELING_GRID_POINTS 3

  #else  // !AUTO_BED_LEVELING_GRID

      // Arbitrary points to probe.
      // A simple cross-product is used to estimate the plane of the bed.
      #define ABL_PROBE_PT_1_X 20
      #define ABL_PROBE_PT_1_Y 160
      #define ABL_PROBE_PT_2_X 20
      #define ABL_PROBE_PT_2_Y 10
      #define ABL_PROBE_PT_3_X 180
      #define ABL_PROBE_PT_3_Y 10

  #endif // AUTO_BED_LEVELING_GRID

  // Offsets to the Z probe relative to the nozzle tip.
  // X and Y offsets must be integers.
  #define X_PROBE_OFFSET_FROM_EXTRUDER -21     //-25 Z probe to nozzle X offset: -left  +right
  #define Y_PROBE_OFFSET_FROM_EXTRUDER -43     //-29 Z probe to nozzle Y offset: -front +behind
  #define Z_PROBE_OFFSET_FROM_EXTRUDER -0.5  //-12.35  Z probe to nozzle Z offset: -below (always!)

  #define Z_RAISE_BEFORE_HOMING 10       // (in mm) Raise Z axis before homing (G28) for Z probe clearance.
                                        // Be sure you have this distance over your Z_MAX_POS in case.

  #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min.

  #define Z_RAISE_BEFORE_PROBING 15   // How much the Z axis will be raised before traveling to the first probing point.
  #define Z_RAISE_BETWEEN_PROBINGS 5  // How much the Z axis will be raised when traveling from between next probing points.
  #define Z_RAISE_AFTER_PROBING 15    // How much the Z axis will be raised after the last probing point.

//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
                                                                            // Useful to retract a deployable Z probe.

  //#define Z_PROBE_SLED // Turn on if you have a Z probe mounted on a sled like those designed by Charles Bell.
  //#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.


  //If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing,
  //it is highly recommended you let this Z_SAFE_HOMING enabled!!!

  #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with Z probe outside the bed area.
                          // When defined, it will:
                          // - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
                          // - If stepper drivers timeout, it will need X and Y homing again before Z homing.
                          // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28).
                          // - Block Z homing only when the Z probe is outside bed area.

  #if ENABLED(Z_SAFE_HOMING)

   #define Z_SAFE_HOMING_X_POINT (X_MAX_POS/2)  // #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
   #define Z_SAFE_HOMING_Y_POINT (Y_MAX_POS/2)  //#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).

  #endif

  //#define Z_MIN_PROBE_ENDSTOP

#endif // AUTO_BED_LEVELING_FEATURE

// The position of the homing switches
//#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
//#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)

// Manual homing switch locations:
// For deltabots this means top and center of the Cartesian print volume.
//#if ENABLED(MANUAL_HOME_POSITIONS)
  #define MANUAL_X_HOME_POS 0
  #define MANUAL_Y_HOME_POS 0
  #define MANUAL_Z_HOME_POS 0
  //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
//#endif

#endif //CONFIGURATION_H

@SpaceCadet-Code
Copy link
Author

I used the Marlin-1.0.2-1 version and it works correctly so there is some difference between them that is causing issues.

@Blue-Marlin
Copy link
Contributor

//#define STRING_VERSION "1.0.2"

That's not a configuration what can run with a recent RC.
There are huge differences. It's like driving with a 30 years old map.

@SpaceCadet-Code
Copy link
Author

Sorry posted my config working with 1.0.2. Reposted newer config.

@thinkyhead
Copy link
Member

It's hard to glean much from the settings alone. But there is more available to help debug the issue.

  • Download the latest RCBugFix code.
  • Enable the DEBUG_LEVELING_FEATURE option in your config. This provides detailed output during leveling (and some homing).
  • Before you do any leveling, use the command M111 S32 to enable the extra debug output.

Test leveling, being careful not to hurt your machine. Collect the output from the console log in Pronterface (or other favorite host software) and paste it in a message here so we can see what the machine "thinks" is going on.

@thinkyhead
Copy link
Member

Reposted newer config.

I took the liberty to edit it down to just the relevant options. The only oddity I can see is that you aren't setting MANUAL_HOME_POSITIONS but still setting MANUAL_[XYZ]_HOME_POS. To be on the safe side use the intended method instead:

#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
//#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)

#if ENABLED(MANUAL_HOME_POSITIONS)
  #define MANUAL_X_HOME_POS 0
  #define MANUAL_Y_HOME_POS 0
  #define MANUAL_Z_HOME_POS 0
  //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
#endif

Or maybe you really want this:

//#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used

One other thing that could be affecting it is, you have no max endstops – so you need to enable:

#define DISABLE_MAX_ENDSTOPS

…or there may be unusual issues related to movement before homing is completed.

@SpaceCadet-Code
Copy link
Author

Commenting this out works. Now to get the bed dimmensions right. Always something. Thanks for the help.
#define DISABLE_MAX_ENDSTOPS

@SpaceCadet-Code
Copy link
Author

Un-commenting that is

@Roxy-3D
Copy link
Member

Roxy-3D commented Mar 26, 2016

One other thing that could be affecting it is, you have no max endstops – so you need to enable:

#define DISABLE_MAX_ENDSTOPS

@thinkyhead I'm confused on this. It never used to be important to enable the DISABLE_MAX_ENDSTOPS. Did something change where this needs to be set 'correctly' now? This just disables the X & Y Max_Pin. (And also the pull up resistors in the AVR chip)

@thinkyhead
Copy link
Member

@Roxy-3DPrintBoard Actually, this is one of those issues that has always popped up. We see it more often around new releases because that's when people mess with their configurations, and they always forget to enable this setting when they have no max endstops. The default configuration file sets neither DISABLE_MIN_ENDSTOPS nor DISABLE_MAX_ENDSTOPS, the reasoning being that min and max endstops are both quite common, so the default is not presumptuous. It probably makes the most sense to enable DISABLE_MAX_ENDSTOPS by default, since the default config is otherwise targeted to a cartesian with min endstops (plus, a wrong setting in that case would be more obvious).

All that said, #3065 eliminates these settings completely and I think its approach should be adopted to replace the old system. (In that PR SanityCheck.h informs users of the new situation.)

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants