Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add filament runout sensor support.
  • Loading branch information
arunoda committed Feb 3, 2018
1 parent d712a0e commit 63e7709
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Marlin/Configuration.h
Expand Up @@ -824,9 +824,9 @@
* For other boards you may need to define FIL_RUNOUT_PIN.
* By default the firmware assumes HIGH = has filament, LOW = ran out
*/
//#define FILAMENT_RUNOUT_SENSOR
#define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_INVERTING true // set to true to invert the logic of the sensor.

This comment has been minimized.

Copy link
@arunoda

arunoda Feb 3, 2018

Author Owner

Since I'm using an endstop, we need to do this.

#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
#define FILAMENT_RUNOUT_SCRIPT "M600"
#endif
Expand Down Expand Up @@ -1164,11 +1164,11 @@
* P1 Raise the nozzle always to Z-park height.
* P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS.
*/
//#define NOZZLE_PARK_FEATURE
#define NOZZLE_PARK_FEATURE

This comment has been minimized.

Copy link
@arunoda

arunoda Feb 3, 2018

Author Owner

This is a requirement for ADVANCED_PAUSE_FEATURE. After the print is paused, it'll go to this place. So, we can change the filament and clean it if needed.


#if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z }
#define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
#define NOZZLE_PARK_POINT { 40, 20, 20 }

This comment has been minimized.

Copy link
@arunoda

arunoda Feb 3, 2018

Author Owner

This is the position, I'd like to see as the parking place.

This comment has been minimized.

Copy link
@arunoda

arunoda Feb 3, 2018

Author Owner

Z change it from the current z position.

#define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#endif
Expand Down
4 changes: 2 additions & 2 deletions Marlin/Configuration_adv.h
Expand Up @@ -876,13 +876,13 @@
* Requires NOZZLE_PARK_FEATURE.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/
//#define ADVANCED_PAUSE_FEATURE
#define ADVANCED_PAUSE_FEATURE

This comment has been minimized.

Copy link
@arunoda

arunoda Feb 3, 2018

Author Owner

This is a requirement for filament runout sensor.
This defined M600 script.

It will pause the print and move the nozzle to the parking position.
It'll show a message on the LCD screen.
It'll retract the filament out from the extruder.
Once we add the filament back, we can click the nob and start extruding filament in the parking place.

Then we can clean the nozzle manually and resume the print via the LCD menu item.

#if ENABLED(ADVANCED_PAUSE_FEATURE)
#define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
#define FILAMENT_CHANGE_UNLOAD_LENGTH 0 // Unload filament length from hotend in mm

This comment has been minimized.

Copy link
@arunoda

arunoda Feb 3, 2018

Author Owner

Since I'm using an endstop, unloading will break the endstop. So, I turn this feature off.

// Longer length for bowden printers to unload filament from whole bowden tube,
// shorter length for printers without bowden to unload filament from extruder only,
// 0 to disable unloading for manual unloading
Expand Down
2 changes: 1 addition & 1 deletion Marlin/pins_RAMPS.h
Expand Up @@ -252,7 +252,7 @@
#endif

// define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector
#define FIL_RUNOUT_PIN 4
#define FIL_RUNOUT_PIN 19

This comment has been minimized.

Copy link
@arunoda

arunoda Feb 3, 2018

Author Owner

In my board, I couldn't find out the servo 4 pin. So, it's easy for me to use the Z-MAX port (which is 19) which I don't use.


#ifndef PS_ON_PIN
#define PS_ON_PIN 12
Expand Down

0 comments on commit 63e7709

Please sign in to comment.