Skip to content

Commit

Permalink
added support for rack & pinion Z probe (Z_RACK_PINION)
Browse files Browse the repository at this point in the history
Added support for compiling with Z_RACK_PINION for machines like Wilson2
which have a Z probe mounted to a pinion that is deployed by the
movement of the X axis.
Changed the auto bedleveling default limits to be based on the bed size
instead of absolute values (configuration.h).
  • Loading branch information
mjrice committed Feb 12, 2017
1 parent abae096 commit b84d3c9
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Marlin/Conditionals_LCD.h
Expand Up @@ -370,8 +370,8 @@
/**
* Set a flag for any enabled probe
*/
#define PROBE_SELECTED (ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED))

#define PROBE_SELECTED (ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED) || ENABLED(Z_RACK_PINION))
/**
* Clear probe pin settings when no probe is selected
*/
Expand Down
23 changes: 20 additions & 3 deletions Marlin/Configuration.h
Expand Up @@ -562,6 +562,18 @@
//#define Z_PROBE_SLED
//#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.

// Enable if you have the Rack & Pinion style bed probe (i.e. Wilson II)
//#define Z_RACK_PINION

#ifdef Z_RACK_PINION
#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
#define Z_CLEARANCE_DEPLOY_PROBE 10
#define X_PROBE_OFFSET_FROM_EXTRUDER 0 // Probe on: -left +right
#define Y_PROBE_OFFSET_FROM_EXTRUDER 45 // Probe on: -front +behind
#define Z_PROBE_OFFSET_FROM_EXTRUDER -11 // -below (always!)
#define Z_SAFE_HOMING // home with probe in middle of bed not on the edge
#endif

// Z Probe to nozzle (X,Y) offset, relative to (0, 0).
// X and Y offsets must be integers.
//
Expand Down Expand Up @@ -725,6 +737,10 @@
#define Y_MAX_POS 200
#define Z_MAX_POS 200

#ifdef Z_RACK_PINION
#define X_MIN_POS 10
#endif

/**
* Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament.
Expand Down Expand Up @@ -812,9 +828,9 @@

// Set the boundaries for probing (where the probe can reach).
#define LEFT_PROBE_BED_POSITION 15
#define RIGHT_PROBE_BED_POSITION 170
#define FRONT_PROBE_BED_POSITION 20
#define BACK_PROBE_BED_POSITION 170
#define RIGHT_PROBE_BED_POSITION (X_MAX_POS-30)
#define FRONT_PROBE_BED_POSITION (20+Y_PROBE_OFFSET_FROM_EXTRUDER)
#define BACK_PROBE_BED_POSITION (Y_MAX_POS-30)

// The Z probe minimum outer margin (to validate G29 parameters).
#define MIN_PROBE_EDGE 10
Expand Down Expand Up @@ -891,6 +907,7 @@
#define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60)


//=============================================================================
//============================= Additional Features ===========================
//=============================================================================
Expand Down
4 changes: 4 additions & 0 deletions Marlin/Marlin_main.cpp
Expand Up @@ -2050,6 +2050,10 @@ static void clean_up_after_endstop_or_probe_move() {

deploy ? run_deploy_moves_script() : run_stow_moves_script();

#elif ENABLED(Z_RACK_PINION)

do_blocking_move_to_x(deploy? 0:X_MAX_POS);

#endif

#ifdef _TRIGGERED_WHEN_STOWED_TEST
Expand Down
11 changes: 8 additions & 3 deletions Marlin/SanityCheck.h
Expand Up @@ -429,8 +429,13 @@
#else
#define COUNT_PROBE_6 COUNT_PROBE_5
#endif
#if COUNT_PROBE_6 > 1
#error "Please enable only one probe: FIX_MOUNTED_PROBE, Z Servo, BLTOUCH, Z_PROBE_ALLEN_KEY, or Z_PROBE_SLED."
#if ENABLED(Z_RACK_PINION)
#define COUNT_PROBE_7 INCREMENT(COUNT_PROBE_6)
#else
#define COUNT_PROBE_7 COUNT_PROBE_6
#endif
#if COUNT_PROBE_7 > 1
#error "Please enable only one probe: FIX_MOUNTED_PROBE, Z Servo, BLTOUCH, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z_RACK_PINION."
#endif

/**
Expand Down Expand Up @@ -491,7 +496,7 @@
* Require some kind of probe for bed leveling and probe testing
*/
#if HAS_ABL
#error "Auto Bed Leveling requires a probe! Define a Z Servo, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or FIX_MOUNTED_PROBE."
#error "Auto Bed Leveling requires a probe! Define a Z Servo, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, FIX_MOUNTED_PROBE, or Z_RACK_PINION."
#elif ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
#error "Z_MIN_PROBE_REPEATABILITY_TEST requires a probe! Define a Z Servo, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or FIX_MOUNTED_PROBE."
#endif
Expand Down

0 comments on commit b84d3c9

Please sign in to comment.