Skip to content

Commit

Permalink
✨ BIQU MicroProbe (MarlinFirmware#26527)
Browse files Browse the repository at this point in the history
  • Loading branch information
thisiskeithb authored Jan 21, 2024
1 parent 80cd89d commit 204de72
Show file tree
Hide file tree
Showing 43 changed files with 327 additions and 12 deletions.
11 changes: 11 additions & 0 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1446,6 +1446,17 @@
//#define BD_SENSOR_PROBE_NO_STOP // Probe bed without stopping at each probe point
#endif

/**
* BIQU MicroProbe
*
* A lightweight, solenoid-driven probe.
* For information about this sensor https://github.com/bigtreetech/MicroProbe
*
* Also requires: PROBE_ENABLE_DISABLE
*/
//#define BIQU_MICROPROBE_V1 // Triggers HIGH
//#define BIQU_MICROPROBE_V2 // Triggers LOW

// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

Expand Down
2 changes: 2 additions & 0 deletions Marlin/src/core/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ void safe_delay(millis_t ms) {
TERN_(Z_PROBE_ALLEN_KEY, "Z_PROBE_ALLEN_KEY")
TERN_(SOLENOID_PROBE, "SOLENOID_PROBE")
TERN_(MAGLEV4, "MAGLEV4")
TERN_(BIQU_MICROPROBE_V1, "BIQU_MICROPROBE_V1")
TERN_(BIQU_MICROPROBE_V2, "BIQU_MICROPROBE_V2")
IF_DISABLED(PROBE_SELECTED, "NONE")
);

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@
/**
* Set flags for any form of bed probe
*/
#if ANY(TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, HAS_Z_SERVO_PROBE, SOLENOID_PROBE, Z_PROBE_SLED, RACK_AND_PINION_PROBE, SENSORLESS_PROBING, MAGLEV4, MAG_MOUNTED_PROBE)
#if ANY(TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, HAS_Z_SERVO_PROBE, SOLENOID_PROBE, Z_PROBE_SLED, RACK_AND_PINION_PROBE, SENSORLESS_PROBING, MAGLEV4, MAG_MOUNTED_PROBE, BIQU_MICROPROBE_V1, BIQU_MICROPROBE_V2)
#define HAS_STOWABLE_PROBE 1
#endif
#if ANY(HAS_STOWABLE_PROBE, FIX_MOUNTED_PROBE, BD_SENSOR, NOZZLE_AS_PROBE)
Expand Down
51 changes: 49 additions & 2 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -1206,8 +1206,8 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i
*/
#if 1 < 0 \
+ (DISABLED(BLTOUCH) && HAS_Z_SERVO_PROBE) \
+ COUNT_ENABLED(PROBE_MANUALLY, BLTOUCH, BD_SENSOR, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, TOUCH_MI_PROBE, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, RACK_AND_PINION_PROBE, SENSORLESS_PROBING, MAGLEV4, MAG_MOUNTED_PROBE)
#error "Please enable only one probe option: PROBE_MANUALLY, SENSORLESS_PROBING, BLTOUCH, BD_SENSOR, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, TOUCH_MI_PROBE, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, MAGLEV4, MAG_MOUNTED_PROBE or Z Servo."
+ COUNT_ENABLED(PROBE_MANUALLY, BLTOUCH, BD_SENSOR, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, TOUCH_MI_PROBE, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, RACK_AND_PINION_PROBE, SENSORLESS_PROBING, MAGLEV4, MAG_MOUNTED_PROBE, BIQU_MICROPROBE_V1, BIQU_MICROPROBE_V2)
#error "Please enable only one probe option: PROBE_MANUALLY, SENSORLESS_PROBING, BLTOUCH, BD_SENSOR, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, TOUCH_MI_PROBE, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, MAGLEV4, MAG_MOUNTED_PROBE, BIQU_MICROPROBE_V1, BIQU_MICROPROBE_V2, or Z Servo."
#endif

#if HAS_BED_PROBE
Expand Down Expand Up @@ -1375,6 +1375,53 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i
#endif
#endif

/**
* BIQU MicroProbe requirements
*/
#if ANY(BIQU_MICROPROBE_V1, BIQU_MICROPROBE_V2)
#if DISABLED(PROBE_ENABLE_DISABLE)
#error "BIQU MicroProbe requires PROBE_ENABLE_DISABLE."
#elif !PIN_EXISTS(PROBE_ENABLE)
#error "BIQU MicroProbe requires a PROBE_ENABLE_PIN."
#endif

#if ENABLED(BIQU_MICROPROBE_V1)
#if ENABLED(INVERTED_PROBE_STATE)
#if Z_MIN_PROBE_ENDSTOP_HIT_STATE != LOW
#error "BIQU_MICROPROBE_V1 requires Z_MIN_PROBE_ENDSTOP_HIT_STATE LOW."
#endif
#elif Z_MIN_PROBE_ENDSTOP_HIT_STATE != HIGH
#error "BIQU_MICROPROBE_V1 requires Z_MIN_PROBE_ENDSTOP_HIT_STATE HIGH."
#endif
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
#if ENABLED(INVERTED_PROBE_STATE)
#if Z_MIN_ENDSTOP_HIT_STATE != LOW
#error "BIQU_MICROPROBE_V1 requires Z_MIN_ENDSTOP_HIT_STATE LOW."
#endif
#elif Z_MIN_ENDSTOP_HIT_STATE != HIGH
#error "BIQU_MICROPROBE_V1 requires Z_MIN_ENDSTOP_HIT_STATE HIGH."
#endif
#endif
#elif ENABLED(BIQU_MICROPROBE_V2)
#if ENABLED(INVERTED_PROBE_STATE)
#if Z_MIN_PROBE_ENDSTOP_HIT_STATE != HIGH
#error "BIQU_MICROPROBE_V2 requires Z_MIN_PROBE_ENDSTOP_HIT_STATE HIGH."
#endif
#elif Z_MIN_PROBE_ENDSTOP_HIT_STATE != LOW
#error "BIQU_MICROPROBE_V2 requires Z_MIN_PROBE_ENDSTOP_HIT_STATE LOW."
#endif
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
#if ENABLED(INVERTED_PROBE_STATE)
#if Z_MIN_ENDSTOP_HIT_STATE != HIGH
#error "BIQU_MICROPROBE_V2 requires Z_MIN_ENDSTOP_HIT_STATE HIGH."
#endif
#elif Z_MIN_ENDSTOP_HIT_STATE != LOW
#error "BIQU_MICROPROBE_V2 requires Z_MIN_ENDSTOP_HIT_STATE LOW."
#endif
#endif
#endif
#endif // BIQU_MICROPROBE_V1 || BIQU_MICROPROBE_V2

/**
* Require pin options and pins to be defined
*/
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/pins/esp32/pins_MKS_TINYBEE.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
#define Z_STOP_PIN 22
//#define FIL_RUNOUT_PIN 35

//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif

//
// Enable I2S stepper stream
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@
#define Z_MIN_PROBE_PIN P1_24
#endif

//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif

//
// Filament Runout Sensor
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@
#define Z_MIN_PROBE_PIN P0_10
#endif

//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif

//
// Filament Runout Sensor
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/pins/lpc1768/pins_MKS_SBASE.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@
#define Z_MIN_PROBE_PIN P4_28 // Connector J8
#endif

//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif

//
// Steppers
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@
#define Z_MIN_PROBE_PIN P1_24
#endif

//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif

//
// Steppers
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@
#define Z_MIN_PROBE_PIN P1_22
#endif

//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif

//
// Filament Runout Sensor
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@
#define Z_MIN_PROBE_PIN P1_24
#endif

//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif

//
// Filament Runout Sensor
//
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/ramps/pins_K8400.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
//
#define FAN0_PIN 8

#if ANY(BLTOUCH, TOUCH_MI_PROBE)
#if ANY(BLTOUCH, TOUCH_MI_PROBE, BIQU_MICROPROBE_V1, BIQU_MICROPROBE_V2)
#define INVERTED_PROBE_STATE
#endif

Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@
//
#define Z_MIN_PROBE_PIN PC14 // PROBE

//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif

//
// Filament Runout Sensor
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@
//
#define Z_MIN_PROBE_PIN PC14 // PROBE

//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif

//
// Filament Runout Sensor
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@
#define Z_MIN_PROBE_PIN PC14 // BLTouch IN
#endif

//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif

//
// Filament Runout Sensor
//
Expand Down
5 changes: 5 additions & 0 deletions Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,16 @@
#define Y_STOP_PIN PC5
#define Z_STOP_PIN PC15

//
// Probe
//
#if ENABLED(BLTOUCH)
#define SERVO0_PIN PC14 // BLTouch OUT PIN
#elif ENABLED(PROBE_ACTIVATION_SWITCH)
#define PROBE_TARE_PIN PC14
#define PROBE_ACTIVATION_SWITCH_PIN PB2
#elif ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN PC14
#endif

//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/pins/stm32f1/pins_CREALITY_V4.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@
#define Z_MIN_PROBE_PIN PB1 // BLTouch IN
#endif

//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif

//
// Filament Runout Sensor
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@
#define Z_MIN_PROBE_PIN PA5 // BLTouch IN
#endif

//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif

//
// Filament Runout Sensor
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/pins/stm32f1/pins_CREALITY_V521.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@
#define Z_MIN_PROBE_PIN PD12 // BLTouch IN
#endif

//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif

//
// Filament Runout Sensor
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@
#define Z_MIN_PIN PA4
#define Z_MAX_PIN PF7

//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif

//
// Steppers
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@
#define Z_MIN_PIN PA11
#define Z_MAX_PIN PC4

//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif

//
// Steppers
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@
#define Z_MIN_PROBE_PIN PB1
#endif

//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif

//
// Steppers
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@
#define Z_MIN_PIN PC6
#define Z_MAX_PIN PB1

//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif

//
// Steppers
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@
#define FIL_RUNOUT_PIN PA4 // MT_DET
#endif

//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif

//
// Steppers
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@
#define Z_MIN_PIN PA11
#define Z_MAX_PIN PC4

//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif

//
// Steppers
//
Expand Down
Loading

0 comments on commit 204de72

Please sign in to comment.