Skip to content

Commit

Permalink
BLTouch Fixes & EStep Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
houseofbugs committed Oct 9, 2023
1 parent 47fbf34 commit db12cca
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 11 deletions.
13 changes: 10 additions & 3 deletions Board_Configs/TH3D_EZBoardLite/Firmware/Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,19 @@
// EXTRUDER SETTINGS -------------------------------
// Use to set custom esteps and/or reverse your E Motor direction if you are installing an extruder that needs the direction reversed.
// If you reversed the wiring on your E motor already (like the Bondtech Guide says to do) then you do not need to reverse it in the firmware here.

//
// Example EStep Values For Common Extuders:
// TH3D Aluminum Extruder --- 95 ESteps
// LGX/LGX Lite/NG Extruder - 400 ESteps
// TH3D Tough Extruder V2 --- 407 ESteps
// TH3D Tough Extruder V1 --- 410 ESteps
// Bondtech BMG Extruder ---- 415 ESteps
// Creality Sprite Extruder - 425 ESteps
// LDO Orbiter/Sherpa Mini -- 690 ESteps
//
// If you want to change the Esteps for your printer you can uncomment the below line and set CUSTOM_ESTEPS_VALUE to what you want - USE WHOLE NUMBERS ONLY
// This option sets the esteps from the CUSTOM_ESTEPS_VALUE line below.
// If you need to reverse the e motor direction also enabled the REVERSE_E_MOTOR_DIRECTION option.
// Example EStep Values: TH3D Aluminum Extruder - 95 ESteps, TH3D Tough Extruder - 410 ESteps, BMG Extruder - 415 ESteps
// When installing a Tough Extruder or E3D Titan or Bondtech that is Geared you likely need to enable the REVERSE_E_MOTOR_DIRECTION option
//#define CUSTOM_ESTEPS
#define CUSTOM_ESTEPS_VALUE 410
//#define REVERSE_E_MOTOR_DIRECTION
Expand Down
13 changes: 10 additions & 3 deletions Board_Configs/TH3D_EZBoardV2/Firmware/Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,19 @@
// EXTRUDER SETTINGS -------------------------------
// Use to set custom esteps and/or reverse your E Motor direction if you are installing an extruder that needs the direction reversed.
// If you reversed the wiring on your E motor already (like the Bondtech Guide says to do) then you do not need to reverse it in the firmware here.

//
// Example EStep Values For Common Extuders:
// TH3D Aluminum Extruder --- 95 ESteps
// LGX/LGX Lite/NG Extruder - 400 ESteps
// TH3D Tough Extruder V2 --- 407 ESteps
// TH3D Tough Extruder V1 --- 410 ESteps
// Bondtech BMG Extruder ---- 415 ESteps
// Creality Sprite Extruder - 425 ESteps
// LDO Orbiter/Sherpa Mini -- 690 ESteps
//
// If you want to change the Esteps for your printer you can uncomment the below line and set CUSTOM_ESTEPS_VALUE to what you want - USE WHOLE NUMBERS ONLY
// This option sets the esteps from the CUSTOM_ESTEPS_VALUE line below.
// If you need to reverse the e motor direction also enabled the REVERSE_E_MOTOR_DIRECTION option.
// Example EStep Values: TH3D Aluminum Extruder - 95 ESteps, TH3D Tough Extruder - 410 ESteps, BMG Extruder - 415 ESteps
// When installing a Tough Extruder or E3D Titan or Bondtech that is Geared you likely need to enable the REVERSE_E_MOTOR_DIRECTION option
//#define CUSTOM_ESTEPS
#define CUSTOM_ESTEPS_VALUE 410
//#define REVERSE_E_MOTOR_DIRECTION
Expand Down
6 changes: 4 additions & 2 deletions Firmware/Marlin/Configuration_backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,9 @@
#define Z_PROBE_OFFSET_RANGE_MAX 1

#define Z_MIN_PROBE_REPEATABILITY_TEST
#define Z_AFTER_HOMING 5
#if NONE(BLTOUCH)
#define Z_AFTER_HOMING 5
#endif
#define Z_PROBE_LOW_POINT -10

#if NONE(BLTOUCH)
Expand Down Expand Up @@ -561,7 +563,7 @@
#endif

#if ENABLED(BLTOUCH)
#define Z_CLEARANCE_DEPLOY_PROBE 8
#define Z_CLEARANCE_DEPLOY_PROBE 5
#define Z_CLEARANCE_BETWEEN_PROBES 5
#define Z_CLEARANCE_MULTI_PROBE 5
#define Z_PROBE_FEEDRATE_SLOW (Z_PROBE_FEEDRATE_FAST / 2)
Expand Down
11 changes: 8 additions & 3 deletions Firmware/Marlin/src/feature/bltouch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,14 @@ bool BLTouch::od_5v_mode; // Initialized by settings.load, 0 = Open Drai
#include "../core/debug_out.h"

bool BLTouch::command(const BLTCommand cmd, const millis_t &ms) {
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("BLTouch Command :", cmd);
servo[Z_PROBE_SERVO_NR].move(cmd);
safe_delay(_MAX(ms, (uint32_t)BLTOUCH_DELAY)); // BLTOUCH_DELAY is also the *minimum* delay
const BLTCommand current = servo[Z_PROBE_SERVO_NR].read();
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("BLTouch from ", current, " to ", cmd);
// If the new command is the same, skip it (and the delay).
// The previous write should've already delayed to detect the alarm.
if (cmd != current) {
servo[Z_PROBE_SERVO_NR].move(cmd);
safe_delay(_MAX(ms, (uint32_t)BLTOUCH_DELAY)); // BLTOUCH_DELAY is also the *minimum* delay
}
return triggered();
}

Expand Down

0 comments on commit db12cca

Please sign in to comment.