Touch-MI probe by hotends.fr (#14101)
A simple Z probe using a magnet to deploy a probe. See https://youtu.be/E7Ik9PbKPl0 for the sensor description...
This commit is contained in:
		
				
					committed by
					
						 Scott Lahteine
						Scott Lahteine
					
				
			
			
				
	
			
			
			
						parent
						
							26de051e92
						
					
				
				
					commit
					f2cfa408b7
				
			| @@ -829,6 +829,22 @@ | ||||
|  */ | ||||
| //#define BLTOUCH | ||||
|  | ||||
| /** | ||||
|  * Touch-MI Probe by hotends.fr | ||||
|  * | ||||
|  * This probe is deployed and activated by moving the X-axis to a magnet at the edge of the bed. | ||||
|  * By default, the magnet is assumed to be on the left and activated by a home. If the magnet is | ||||
|  * on the right, enable and set TOUCH_MI_DEPLOY_XPOS to the deploy position. | ||||
|  * | ||||
|  * Also requires: BABYSTEPPING, BABYSTEP_ZPROBE_OFFSET, Z_SAFE_HOMING, | ||||
|  *                MIN_PROBE_EDGE, and a minimum Z_HOMING_HEIGHT of 10. | ||||
|  */ | ||||
| //#define TOUCH_MI_PROBE | ||||
| #if ENABLED(TOUCH_MI_PROBE) | ||||
|   #define TOUCH_MI_RETRACT_Z 0.5                  // Height at which the probe retracts | ||||
|   //#define TOUCH_MI_DEPLOY_XPOS (X_MAX_BED + 2)  // For a magnet on the right side of the bed | ||||
| #endif | ||||
|  | ||||
| // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) | ||||
| //#define SOLENOID_PROBE | ||||
|  | ||||
|   | ||||
| @@ -66,6 +66,8 @@ void safe_delay(millis_t ms) { | ||||
|         "BLTOUCH" | ||||
|       #elif HAS_Z_SERVO_PROBE | ||||
|         "SERVO PROBE" | ||||
|       #elif ENABLED(TOUCH_MI_PROBE) | ||||
|         "TOUCH_MI_PROBE" | ||||
|       #elif ENABLED(Z_PROBE_SLED) | ||||
|         "Z_PROBE_SLED" | ||||
|       #elif ENABLED(Z_PROBE_ALLEN_KEY) | ||||
|   | ||||
| @@ -502,7 +502,7 @@ | ||||
| /** | ||||
|  * Set flags for enabled probes | ||||
|  */ | ||||
| #define HAS_BED_PROBE (HAS_Z_SERVO_PROBE || ANY(FIX_MOUNTED_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, SOLENOID_PROBE, SENSORLESS_PROBING, RACK_AND_PINION_PROBE)) | ||||
| #define HAS_BED_PROBE (HAS_Z_SERVO_PROBE || ANY(FIX_MOUNTED_PROBE, TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, SOLENOID_PROBE, SENSORLESS_PROBING, RACK_AND_PINION_PROBE)) | ||||
| #define PROBE_SELECTED (HAS_BED_PROBE || EITHER(PROBE_MANUALLY, MESH_BED_LEVELING)) | ||||
|  | ||||
| #if HAS_BED_PROBE | ||||
|   | ||||
| @@ -985,11 +985,12 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS | ||||
|   + ENABLED(FIX_MOUNTED_PROBE) \ | ||||
|   + (HAS_Z_SERVO_PROBE && DISABLED(BLTOUCH)) \ | ||||
|   + ENABLED(BLTOUCH) \ | ||||
|   + ENABLED(TOUCH_MI_PROBE) \ | ||||
|   + ENABLED(SOLENOID_PROBE) \ | ||||
|   + ENABLED(Z_PROBE_ALLEN_KEY) \ | ||||
|   + ENABLED(Z_PROBE_SLED) \ | ||||
|   + ENABLED(RACK_AND_PINION_PROBE) | ||||
|   #error "Please enable only one probe option: PROBE_MANUALLY, FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo." | ||||
|   #error "Please enable only one probe option: PROBE_MANUALLY, FIX_MOUNTED_PROBE, BLTOUCH, TOUCH_MI_PROBE, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo." | ||||
| #endif | ||||
|  | ||||
| #if HAS_BED_PROBE | ||||
| @@ -1046,6 +1047,25 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS | ||||
|     #error "RACK_AND_PINION_PROBE requires Z_PROBE_DEPLOY_X and Z_PROBE_RETRACT_X." | ||||
|   #endif | ||||
|  | ||||
|   /** | ||||
|    * Touch-MI probe requirements | ||||
|    */ | ||||
|   #if ENABLED(TOUCH_MI_PROBE) | ||||
|     #if ENABLED(Z_SAFE_HOMING) | ||||
|       #error "TOUCH_MI_PROBE requires Z_SAFE_HOMING." | ||||
|     #elif ENABLED(TOUCH_MI_RETRACT_Z) | ||||
|       #error "TOUCH_MI_PROBE requires TOUCH_MI_RETRACT_Z." | ||||
|     #elif defined(Z_AFTER_PROBING) | ||||
|       #error "TOUCH_MI_PROBE requires Z_AFTER_PROBING to be disabled." | ||||
|     #elif Z_HOMING_HEIGHT < 10 | ||||
|       #error "TOUCH_MI_PROBE requires Z_HOMING_HEIGHT >= 10." | ||||
|     #elif Z_MIN_PROBE_ENDSTOP_INVERTING | ||||
|       #error "TOUCH_MI_PROBE requires Z_MIN_PROBE_ENDSTOP_INVERTING to be set to false." | ||||
|     #elif DISABLED(BABYSTEP_ZPROBE_OFFSET) | ||||
|       #error "TOUCH_MI_PROBE requires BABYSTEPPING with BABYSTEP_ZPROBE_OFFSET." | ||||
|     #endif | ||||
|   #endif | ||||
|  | ||||
|   /** | ||||
|    * Require pin options and pins to be defined | ||||
|    */ | ||||
|   | ||||
| @@ -103,6 +103,26 @@ float zprobe_zoffset; // Initialized by settings.load() | ||||
|     #endif | ||||
|   } | ||||
|  | ||||
| #elif ENABLED(TOUCH_MI_PROBE) | ||||
|  | ||||
|   // Move to the magnet to unlock the probe | ||||
|   void run_deploy_moves_script() { | ||||
|     #ifndef TOUCH_MI_DEPLOY_XPOS | ||||
|       #define TOUCH_MI_DEPLOY_XPOS 0 | ||||
|     #elif X_HOME_DIR > 0 && TOUCH_MI_DEPLOY_XPOS > X_MAX_BED | ||||
|       TemporaryGlobalEndstopsState unlock_x(false); | ||||
|     #endif | ||||
|     do_blocking_move_to_x(TOUCH_MI_DEPLOY_XPOS); | ||||
|   } | ||||
|  | ||||
|   // Move down to the bed to stow the probe | ||||
|   void run_stow_moves_script() { | ||||
|     const float old_pos[] = { current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] }; | ||||
|     endstops.enable_z_probe(false); | ||||
|     do_blocking_move_to_z(TOUCH_MI_RETRACT_Z, MMM_TO_MMS(HOMING_FEEDRATE_Z)); | ||||
|     do_blocking_move_to(old_pos, MMM_TO_MMS(HOMING_FEEDRATE_Z)); | ||||
|   } | ||||
|  | ||||
| #elif ENABLED(Z_PROBE_ALLEN_KEY) | ||||
|  | ||||
|   void run_deploy_moves_script() { | ||||
| @@ -366,7 +386,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { | ||||
|       if (deploy) bltouch.deploy(); else bltouch.stow(); | ||||
|     #endif | ||||
|  | ||||
|   #elif ENABLED(Z_PROBE_ALLEN_KEY) | ||||
|   #elif EITHER(TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY) | ||||
|  | ||||
|     deploy ? run_deploy_moves_script() : run_stow_moves_script(); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user