Browse Source

Merge pull request #6622 from bgort/silentprobing

Improve BLTOUCH_HEATERS_OFF functionality
pull/1/head
bgort 8 years ago
committed by GitHub
parent
commit
d35e2fda10
  1. 9
      Marlin/Conditionals_post.h
  2. 13
      Marlin/Configuration.h
  3. 4
      Marlin/Marlin.h
  4. 130
      Marlin/Marlin_main.cpp
  5. 13
      Marlin/example_configurations/Cartesio/Configuration.h
  6. 13
      Marlin/example_configurations/Felix/Configuration.h
  7. 13
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  8. 13
      Marlin/example_configurations/FolgerTech-i3-2020/Configuration.h
  9. 13
      Marlin/example_configurations/Hephestos/Configuration.h
  10. 13
      Marlin/example_configurations/Hephestos_2/Configuration.h
  11. 13
      Marlin/example_configurations/K8200/Configuration.h
  12. 13
      Marlin/example_configurations/K8400/Configuration.h
  13. 13
      Marlin/example_configurations/K8400/Dual-head/Configuration.h
  14. 13
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  15. 13
      Marlin/example_configurations/RigidBot/Configuration.h
  16. 13
      Marlin/example_configurations/SCARA/Configuration.h
  17. 13
      Marlin/example_configurations/TAZ4/Configuration.h
  18. 13
      Marlin/example_configurations/TinyBoy2/Configuration.h
  19. 13
      Marlin/example_configurations/WITBOX/Configuration.h
  20. 13
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  21. 13
      Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h
  22. 13
      Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h
  23. 13
      Marlin/example_configurations/delta/generic/Configuration.h
  24. 13
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  25. 13
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  26. 13
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  27. 17
      Marlin/example_configurations/gCreate_gMax1.5+/Configuration.h
  28. 13
      Marlin/example_configurations/makibox/Configuration.h
  29. 13
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  30. 13
      Marlin/example_configurations/wt150/Configuration.h
  31. 64
      Marlin/temperature.cpp
  32. 14
      Marlin/temperature.h

9
Marlin/Conditionals_post.h

@ -645,6 +645,15 @@
#endif
#define WRITE_FAN_N(n, v) WRITE_FAN##n(v)
/**
* Heater & Fan Pausing
*/
#if ENABLED(PROBING_FANS_OFF) && FAN_COUNT == 0
#undef PROBING_FANS_OFF
#endif
#define QUIET_PROBING (ENABLED(PROBING_HEATERS_OFF) || ENABLED(PROBING_FANS_OFF))
/**
* Servos and probes
*/

13
Marlin/Configuration.h

@ -584,14 +584,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

4
Marlin/Marlin.h

@ -362,6 +362,10 @@ int16_t code_value_temp_diff();
#if FAN_COUNT > 0
extern int16_t fanSpeeds[FAN_COUNT];
#if ENABLED(PROBING_FANS_OFF)
extern bool fans_paused;
extern int16_t paused_fanSpeeds[FAN_COUNT];
#endif
#endif
#if ENABLED(BARICUDA)

130
Marlin/Marlin_main.cpp

@ -441,6 +441,10 @@ float soft_endstop_min[XYZ] = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS },
#if FAN_COUNT > 0
int16_t fanSpeeds[FAN_COUNT] = { 0 };
#if ENABLED(PROBING_FANS_OFF)
bool fans_paused = false;
int16_t paused_fanSpeeds[FAN_COUNT] = { 0 };
#endif
#endif
// The active extruder (tool). Set with T<extruder> command.
@ -2041,6 +2045,35 @@ static void clean_up_after_endstop_or_probe_move() {
#endif
#if ENABLED(PROBING_FANS_OFF)
void fans_pause(bool p) {
if (p && fans_paused) { // If called out of order something is wrong
SERIAL_ERROR_START;
SERIAL_ERRORLNPGM("Fans already paused!");
return;
}
if (!p && !fans_paused) {
SERIAL_ERROR_START;
SERIAL_ERRORLNPGM("Fans already unpaused!");
return;
}
if (p) {
for (uint8_t x = 0;x < FAN_COUNT;x++) {
paused_fanSpeeds[x] = fanSpeeds[x];
fanSpeeds[x] = 0;
}
}
else {
for (uint8_t x = 0;x < FAN_COUNT;x++)
fanSpeeds[x] = paused_fanSpeeds[x];
}
fans_paused = p;
}
#endif
#if HAS_BED_PROBE
// TRIGGERED_WHEN_STOWED_TEST can easily be extended to servo probes, ... if needed.
@ -2052,6 +2085,20 @@ static void clean_up_after_endstop_or_probe_move() {
#endif
#endif
#if QUIET_PROBING
void probing_pause(bool pause) {
#if ENABLED(PROBING_HEATERS_OFF)
thermalManager.pause(pause);
#endif
#if ENABLED(PROBING_FANS_OFF)
fans_pause(pause);
#endif
if(pause) safe_delay(25);
}
#endif
#if ENABLED(BLTOUCH)
void bltouch_command(int angle) {
@ -2059,51 +2106,6 @@ static void clean_up_after_endstop_or_probe_move() {
safe_delay(BLTOUCH_DELAY);
}
/**
* BLTouch probes have a Hall effect sensor. The high currents switching
* on and off cause a magnetic field that can affect the repeatability of the
* sensor. So for BLTouch probes, heaters are turned off during the probe,
* then quickly turned back on after the point is sampled.
*/
#if ENABLED(BLTOUCH_HEATERS_OFF)
void set_heaters_for_bltouch(const bool deploy) {
static bool heaters_were_disabled = false;
static millis_t next_emi_protection = 0;
static int16_t temps_at_entry[HOTENDS];
#if HAS_TEMP_BED
static int16_t bed_temp_at_entry;
#endif
// If called out of order or far apart something is seriously wrong
if (deploy == heaters_were_disabled
|| (next_emi_protection && ELAPSED(millis(), next_emi_protection)))
kill(PSTR(MSG_KILLED));
if (deploy) {
next_emi_protection = millis() + 20 * 1000UL;
HOTEND_LOOP() {
temps_at_entry[e] = thermalManager.degTargetHotend(e);
thermalManager.setTargetHotend(0, e);
}
#if HAS_TEMP_BED
bed_temp_at_entry = thermalManager.degTargetBed();
thermalManager.setTargetBed(0);
#endif
}
else {
next_emi_protection = 0;
HOTEND_LOOP() thermalManager.setTargetHotend(temps_at_entry[e], e);
#if HAS_TEMP_BED
thermalManager.setTargetBed(bed_temp_at_entry);
#endif
}
heaters_were_disabled = deploy;
}
#endif // BLTOUCH_HEATERS_OFF
void set_bltouch_deployed(const bool deploy) {
if (deploy && TEST_BLTOUCH()) { // If BL-Touch says it's triggered
bltouch_command(BLTOUCH_RESET); // try to reset it.
@ -2118,9 +2120,6 @@ static void clean_up_after_endstop_or_probe_move() {
stop(); // punt!
}
}
#if ENABLED(BLTOUCH_HEATERS_OFF)
set_heaters_for_bltouch(deploy);
#endif
bltouch_command(deploy ? BLTOUCH_DEPLOY : BLTOUCH_STOW);
@ -2249,9 +2248,17 @@ static void clean_up_after_endstop_or_probe_move() {
set_bltouch_deployed(true);
#endif
#if QUIET_PROBING
probing_pause(true);
#endif
// Move down until probe triggered
do_blocking_move_to_z(LOGICAL_Z_POSITION(z), MMM_TO_MMS(fr_mm_m));
#if QUIET_PROBING
probing_pause(false);
#endif
// Retract BLTouch immediately after a probe
#if ENABLED(BLTOUCH)
set_bltouch_deployed(false);
@ -2809,6 +2816,10 @@ static void do_homing_move(const AxisEnum axis, float distance, float fr_mm_s=0.
if (deploy_bltouch) set_bltouch_deployed(true);
#endif
#if QUIET_PROBING
if (axis == Z_AXIS) probing_pause(true);
#endif
// Tell the planner we're at Z=0
current_position[axis] = 0;
@ -2825,6 +2836,10 @@ static void do_homing_move(const AxisEnum axis, float distance, float fr_mm_s=0.
stepper.synchronize();
#if QUIET_PROBING
if (axis == Z_AXIS) probing_pause(false);
#endif
#if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH)
if (deploy_bltouch) set_bltouch_deployed(false);
#endif
@ -6474,6 +6489,7 @@ inline void gcode_M104() {
if (code_seen('S')) {
const int16_t temp = code_value_temp_abs();
thermalManager.setTargetHotend(temp, target_extruder);
#if ENABLED(DUAL_X_CARRIAGE)
if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && target_extruder == 0)
thermalManager.setTargetHotend(temp ? temp + duplicate_extruder_temp_offset : 0, 1);
@ -6669,6 +6685,7 @@ inline void gcode_M109() {
if (no_wait_for_cooling || code_seen('R')) {
const int16_t temp = code_value_temp_abs();
thermalManager.setTargetHotend(temp, target_extruder);
#if ENABLED(DUAL_X_CARRIAGE)
if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && target_extruder == 0)
thermalManager.setTargetHotend(temp ? temp + duplicate_extruder_temp_offset : 0, 1);
@ -6820,6 +6837,7 @@ inline void gcode_M109() {
const bool no_wait_for_cooling = code_seen('S');
if (no_wait_for_cooling || code_seen('R')) {
thermalManager.setTargetBed(code_value_temp_abs());
#if ENABLED(PRINTJOB_TIMER_AUTOSTART)
if (code_value_temp_abs() > BED_MINTEMP)
print_job_timer.start();
@ -7113,10 +7131,11 @@ inline void gcode_M81() {
thermalManager.disable_all_heaters();
stepper.finish_and_disable();
#if FAN_COUNT > 0
#if FAN_COUNT > 1
for (uint8_t i = 0; i < FAN_COUNT; i++) fanSpeeds[i] = 0;
#else
fanSpeeds[0] = 0;
for (uint8_t i = 0; i < FAN_COUNT; i++) fanSpeeds[i] = 0;
#if ENABLED(PROBING_FANS_OFF)
fans_paused = false;
ZERO(paused_fanSpeeds);
#endif
#endif
safe_delay(1000); // Wait 1 second before switching off
@ -12093,7 +12112,12 @@ void kill(const char* lcd_msg) {
* After a stop the machine may be resumed with M999
*/
void stop() {
thermalManager.disable_all_heaters();
thermalManager.disable_all_heaters(); // 'unpause' taken care of in here
#if ENABLED(PROBING_FANS_OFF)
if (fans_paused) fans_pause(false); // put things back the way they were
#endif
if (IsRunning()) {
Stopped_gcode_LastN = gcode_LastN; // Save last g_code for restart
SERIAL_ERROR_START;

13
Marlin/example_configurations/Cartesio/Configuration.h

@ -582,14 +582,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/Felix/Configuration.h

@ -566,14 +566,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/Felix/DUAL/Configuration.h

@ -566,14 +566,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/FolgerTech-i3-2020/Configuration.h

@ -590,14 +590,23 @@
#define Z_SERVO_ANGLES {40,85} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/Hephestos/Configuration.h

@ -574,14 +574,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/Hephestos_2/Configuration.h

@ -577,14 +577,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/K8200/Configuration.h

@ -612,14 +612,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/K8400/Configuration.h

@ -583,14 +583,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/K8400/Dual-head/Configuration.h

@ -583,14 +583,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h

@ -583,14 +583,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/RigidBot/Configuration.h

@ -582,14 +582,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/SCARA/Configuration.h

@ -598,14 +598,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/TAZ4/Configuration.h

@ -603,14 +603,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/TinyBoy2/Configuration.h

@ -634,14 +634,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/WITBOX/Configuration.h

@ -574,14 +574,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/adafruit/ST7565/Configuration.h

@ -583,14 +583,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h

@ -651,14 +651,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h

@ -658,14 +658,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/delta/generic/Configuration.h

@ -647,14 +647,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/delta/kossel_mini/Configuration.h

@ -642,14 +642,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/delta/kossel_pro/Configuration.h

@ -641,14 +641,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/delta/kossel_xl/Configuration.h

@ -660,14 +660,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

17
Marlin/example_configurations/gCreate_gMax1.5+/Configuration.h

@ -599,11 +599,22 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
#define BLTOUCH
#define BLTOUCH_DELAY 500 // (ms) Enable and increase if needed
#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
#if ENABLED(BLTOUCH)
#define BLTOUCH_DELAY 500 // (ms) Enable and increase if needed
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/makibox/Configuration.h

@ -586,14 +586,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/tvrrug/Round2/Configuration.h

@ -579,14 +579,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

13
Marlin/example_configurations/wt150/Configuration.h

@ -588,14 +588,23 @@
//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
/**
* The BLTouch probe is a Hall effect sensor that emulates a servo.
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // Enable if the probe seems unreliable. Heaters will be disabled for each probe.
#endif
/**
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
* options selected below - will be disabled during probing so as to minimize
* potential EM interference by quieting/silencing the source of the 'noise' (the change
* in current flowing through the wires). This is likely most useful to users of the
* BLTouch probe, but may also help those with inductive or other probe types.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
//#define PROBING_FANS_OFF // Turn fans off when probing
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

64
Marlin/temperature.cpp

@ -204,6 +204,14 @@ uint8_t Temperature::soft_pwm[HOTENDS];
int Temperature::current_raw_filwidth = 0; //Holds measured filament diameter - one extruder only
#endif
#if ENABLED(PROBING_HEATERS_OFF)
bool Temperature::paused;
int16_t Temperature::paused_hotend_temps[HOTENDS];
#if HAS_TEMP_BED
int16_t Temperature::paused_bed_temp;
#endif
#endif
#if HAS_PID_HEATING
void Temperature::PID_autotune(float temp, int hotend, int ncycles, bool set_result/*=false*/) {
@ -1194,6 +1202,14 @@ void Temperature::init() {
#endif
}
#endif //BED_MAXTEMP
#if ENABLED(PROBING_HEATERS_OFF)
paused = false;
ZERO(paused_hotend_temps);
#if HAS_TEMP_BED
paused_bed_temp = 0;
#endif
#endif
}
#if WATCH_HOTENDS
@ -1297,6 +1313,15 @@ void Temperature::disable_all_heaters() {
HOTEND_LOOP() setTargetHotend(0, e);
setTargetBed(0);
// Unpause and reset everything
#if ENABLED(PROBING_HEATERS_OFF)
paused = false;
ZERO(paused_hotend_temps);
#if HAS_TEMP_BED
paused_bed_temp = 0;
#endif
#endif
// If all heaters go down then for sure our print job has stopped
print_job_timer.stop();
@ -1331,6 +1356,45 @@ void Temperature::disable_all_heaters() {
#endif
}
#if ENABLED(PROBING_HEATERS_OFF)
void Temperature::pause(bool p) {
if (p && paused) { // If called out of order something is wrong
SERIAL_ERROR_START;
SERIAL_ERRORLNPGM("Heaters already paused!");
return;
}
if (!p && !paused) {
SERIAL_ERROR_START;
SERIAL_ERRORLNPGM("Heaters already unpaused!");
return;
}
if (p) {
HOTEND_LOOP() {
paused_hotend_temps[e] = degTargetHotend(e);
setTargetHotend(0, e);
}
#if HAS_TEMP_BED
paused_bed_temp = degTargetBed();
setTargetBed(0);
#endif
}
else {
HOTEND_LOOP() setTargetHotend(paused_hotend_temps[e], e);
#if HAS_TEMP_BED
setTargetBed(paused_bed_temp);
#endif
}
paused = p;
}
bool Temperature::ispaused() {
return paused;
}
#endif
#if ENABLED(HEATER_0_USES_MAX6675)
#define MAX6675_HEAT_INTERVAL 250u

14
Marlin/temperature.h

@ -259,6 +259,15 @@ class Temperature {
static int current_raw_filwidth; //Holds measured filament diameter - one extruder only
#endif
#if ENABLED(PROBING_HEATERS_OFF)
static bool paused;
static int16_t paused_hotend_temps[HOTENDS];
#if HAS_TEMP_BED
static int16_t paused_bed_temp;
#endif
#endif
public:
/**
@ -452,6 +461,11 @@ class Temperature {
#endif // BABYSTEPPING
#if ENABLED(PROBING_HEATERS_OFF)
static void pause(bool p);
static bool ispaused();
#endif
private:
static void set_current_temp_raw();

Loading…
Cancel
Save