Skip to content

Commit

Permalink
Adjustments to filament runout sensor.
Browse files Browse the repository at this point in the history
  • Loading branch information
marciot committed Apr 24, 2020
1 parent 3b8264a commit 44cb189
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 16 deletions.
4 changes: 4 additions & 0 deletions Marlin/src/pins/rambo/pins_RAMBO.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@
#define FIL_RUNOUT_PIN 5
#endif

#ifndef FIL_RUNOUT2_PIN
#define FIL_RUNOUT2_PIN 5
#endif

//
// Steppers
//
Expand Down
1 change: 1 addition & 0 deletions config/examples/AlephObjects/build-all-configs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ build_config custom Oliveoil_TAZ6Archim Tilapia_SingleE
build_config custom Oliveoil_TAZ6Archim AchemonSphinx_SmallLayer
build_config custom Oliveoil_TAZ6BLTouch Tilapia_SingleExtruder
build_config accessory Oliveoil_TAZ6BLTouch Yellowfin_DualExtruderV3
build_config accessory Oliveoil_TAZ6BLTouchHallEffect Yellowfin_DualExtruderV3
build_config accessory Oliveoil_TAZ6BLTouch CecropiaSilk_SingleExtruderAeroV2
build_config custom Oliveoil_TAZ6ArchimBLTouch Tilapia_SingleExtruder
build_config custom Oliveoil_TAZ6Archim Angelfish_Aerostruder
Expand Down
17 changes: 8 additions & 9 deletions config/examples/AlephObjects/build-config.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"Juniper_TAZ5ArchimBLTouch",
"Oliveoil_TAZ6",
"Oliveoil_TAZ6Archim",
"Oliveoil_TAZ6BLTouchHallEffect",
"Oliveoil_TAZ6BLTouch",
"Oliveoil_TAZ6ArchimBLTouch",
"Quiver_TAZPro",
Expand Down Expand Up @@ -184,6 +185,9 @@ def ENABLED(str):
MARLIN["SDSUPPORT"] = False
MARLIN["BLTOUCH"] = "BLTouch" in PRINTER
MARLIN["SHOW_CUSTOM_BOOTSCREEN"] = True
if "HallEffect" in PRINTER:
MARLIN["FILAMENT_RUNOUT_SENSOR"] = True
MARLIN["FILAMENT_MOTION_SENSOR"] = True

######################## PRINTER MODEL CHARACTERISTICS ########################

Expand Down Expand Up @@ -312,6 +316,7 @@ def ENABLED(str):
MARLIN["PRINTCOUNTER"] = True
MARLIN["MACHINE_UUID"] = C_STRING("5ee798fb-4062-4d35-8224-5e846ffb45a5")
MARLIN["SDSUPPORT"] = True
MARLIN["FILAMENT_RUNOUT_SENSOR"] = True

if "Juniper_TAZ5Archim" in PRINTER:
IS_TAZ = True
Expand All @@ -330,8 +335,7 @@ def ENABLED(str):
MARLIN["BAUDRATE"] = 250000
MARLIN["MACHINE_UUID"] = C_STRING("c3255c96-4097-4884-8ed0-ded2ff9bae61")
MARLIN["FILAMENT_RUNOUT_SENSOR"] = True
MARLIN["FILAMENT_RUNOUT_ENABLE_DEFAULT"] = False
MARLIN["FILAMENT_MOTION_SENSOR"] = False
MARLIN["SDSUPPORT"] = True

if "Redgum_TAZWorkhorseArchim" in PRINTER:
IS_TAZ = True
Expand All @@ -354,8 +358,6 @@ def ENABLED(str):
MARLIN["MACHINE_UUID"] = C_STRING("fd546ced-5941-44e4-8d17-5d494bfc2ca3")
MARLIN["SDSUPPORT"] = True
MARLIN["FILAMENT_RUNOUT_SENSOR"] = True
MARLIN["FILAMENT_RUNOUT_ENABLE_DEFAULT"] = False
MARLIN["FILAMENT_MOTION_SENSOR"] = False

if "Redgum_TAZWorkhorseArchimTouchUSB" in PRINTER:
IS_TAZ = True
Expand All @@ -379,8 +381,6 @@ def ENABLED(str):
MARLIN["USB_FLASH_DRIVE_SUPPORT"] = True
MARLIN["SDSUPPORT"] = True
MARLIN["FILAMENT_RUNOUT_SENSOR"] = True
MARLIN["FILAMENT_RUNOUT_ENABLE_DEFAULT"] = False
MARLIN["FILAMENT_MOTION_SENSOR"] = False
MARLIN["USE_UHS3_USB"] = False
MARLIN["ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE"] = 1000
# Touch LCD configuration
Expand Down Expand Up @@ -585,8 +585,6 @@ def ENABLED(str):
# and homing button wired together)
BED_WASHERS_PIN = 'SERVO0_PIN'
MARLIN["FILAMENT_RUNOUT_SENSOR"] = True
MARLIN["FILAMENT_RUNOUT_ENABLE_DEFAULT"] = False
MARLIN["FILAMENT_MOTION_SENSOR"] = False
MARLIN["CUSTOM_MACHINE_NAME"] = C_STRING("TAZ 6")
MARLIN["BACKLASH_COMPENSATION"] = True
MARLIN["ENDSTOPS_ALWAYS_ON_DEFAULT"] = True
Expand Down Expand Up @@ -627,7 +625,6 @@ def ENABLED(str):
MARLIN["USB_FLASH_DRIVE_SUPPORT"] = True
MARLIN["SDSUPPORT"] = True
MARLIN["FILAMENT_RUNOUT_SENSOR"] = True
MARLIN["FILAMENT_MOTION_SENSOR"] = False
MARLIN["USE_UHS3_USB"] = False
MARLIN["ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE"] = 1000
MARLIN["EMI_MITIGATION"] = True
Expand Down Expand Up @@ -1748,6 +1745,8 @@ def ENABLED(str):
MARLIN["NUM_RUNOUT_SENSORS"] = MARLIN["EXTRUDERS"]
MARLIN["FILAMENT_RUNOUT_SCRIPT"] = C_STRING("M25\n")
MARLIN["FILAMENT_RUNOUT_DISTANCE_MM"] = 14
if not PRINTER in ["Quiver_TAZPro", "Experimental_BLTouch"]:
MARLIN["FILAMENT_RUNOUT_ENABLE_DEFAULT"] = "false"
MARLIN["ACTION_ON_FILAMENT_RUNOUT"] = C_STRING("pause: filament_runout")
MARLIN["CURA_LE_RUNOUT_HANDLING_WORKAROUND"] = True

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@
* For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
* By default the firmware assumes HIGH=FILAMENT PRESENT.
*/
//#define FILAMENT_RUNOUT_SENSOR
#define FILAMENT_RUNOUT_SENSOR // <-- changed
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
#define FIL_RUNOUT_INVERTING false // Set to true to invert the logic of the sensor.
Expand All @@ -1149,12 +1149,12 @@
// Set one or more commands to execute on filament runout.
// (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
#define FILAMENT_RUNOUT_SCRIPT "M25" // <-- changed

// After a runout is detected, continue printing this length of filament
// before executing the runout script. Useful for a sensor at the end of
// a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.
//#define FILAMENT_RUNOUT_DISTANCE_MM 25
#define FILAMENT_RUNOUT_DISTANCE_MM 14 // <-- changed

#ifdef FILAMENT_RUNOUT_DISTANCE_MM
// Enable this option to use an encoder disc that toggles the runout pin
Expand Down Expand Up @@ -2270,13 +2270,13 @@
//#define AO_EXP1_DEPRECATED_PINMAP
//#define DISABLE_DUE_SD_MMC
//#define EXTRUDER_FAN_ON_PIN_6
//#define ACTION_ON_FILAMENT_RUNOUT
#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" // <-- changed
//#define ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE
#define END_G29_ON_BACK_LEFT_CORNER // <-- changed
//#define USB_DEVICE_VENDOR_ID
//#define USB_DEVICE_PRODUCT_ID
//#define NO_PAUSE_FOR_REHEAT
//#define CURA_LE_RUNOUT_HANDLING_WORKAROUND
#define CURA_LE_RUNOUT_HANDLING_WORKAROUND // <-- changed
//#define E_MIN_PIN
//#define E_MIN_PIN_INVERTING
//#define E_MAX_POS
Expand All @@ -2287,7 +2287,7 @@
//#define TOUCH_UI_FROZEN_THEME
//#define TOUCH_UI_ROYAL_THEME
//#define SWAP_E0_AND_E1
//#define FILAMENT_RUNOUT_ENABLE_DEFAULT
#define FILAMENT_RUNOUT_ENABLE_DEFAULT false // <-- changed
//#define FIL_RUNOUT_PIN
//#define CONTROLLER_FAN_IGNORE_Z
//#define NO_MOTION_BEFORE_HOMING_WORKAROUND
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
#define ADAPTIVE_FAN_SLOWING
#define ADVANCED_OK
#define ADVANCED_PAUSE_FEATURE
Expand Down Expand Up @@ -31,6 +32,7 @@
#define CONTROLLERFAN_SPEED_ACTIVE 255
#define CONTROLLERFAN_SPEED_IDLE 255
#define CONTROLLER_FAN_PIN FAN2_PIN
#define CURA_LE_RUNOUT_HANDLING_WORKAROUND
#define CUSTOM_MACHINE_NAME "TAZ Workhorse"
#define DEFAULT_ACCELERATION 500
#define DEFAULT_AXIS_STEPS_PER_UNIT {100, 100, 500, 420}
Expand Down Expand Up @@ -69,6 +71,10 @@
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 40
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 5
#define FILAMENT_CHANGE_UNLOAD_LENGTH 80
#define FILAMENT_RUNOUT_DISTANCE_MM 14
#define FILAMENT_RUNOUT_ENABLE_DEFAULT false
#define FILAMENT_RUNOUT_SCRIPT "M25"
#define FILAMENT_RUNOUT_SENSOR
#define FILAMENT_UNLOAD_PURGE_DELAY 0
#define FILAMENT_UNLOAD_PURGE_LENGTH 6
#define FILAMENT_UNLOAD_PURGE_RETRACT 0
Expand Down Expand Up @@ -131,6 +137,7 @@
#define NO_MOTION_BEFORE_HOMING
#define NO_VOLUMETRICS
#define NO_WORKSPACE_OFFSETS
#define NUM_RUNOUT_SENSORS 1
#define NUM_SERVOS 0
#define PARK_HEAD_ON_PAUSE
#define PAUSE_PARK_NOZZLE_TIMEOUT 300
Expand Down
13 changes: 12 additions & 1 deletion docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,17 @@ Patreon supporters will receive firmware or configuration files for modified pri

Source code for building everything will always be available to anyone!

## What pins are used on a RAMBO for extra features?

| Feature | Port | Arduino Pin | Rambo Pin | Description |
|------------------------|-------|-------------|------------|------------------------------|
| FIL_RUNOUT_PIN | PE3 | 5 | X34 Pin 5 | Filament Runout 1 |
| FIL_RUNOUT2_PIN | PE3 | 5 | X34 Pin 5 | Filament Runout 2 |
| SERVO0_PIN | PA0 | 22 | MX1 Pin 3 | Bed Washers or BLTouch Servo |

There is only one available pin for filament runout sensing on the Rambo. Use normally
open microswitches for sensing filament on dual toolheads and wire them in series.

## What pin are used when upgrading a TAZ to an Archim 2.0?

| Feature | Port | Arduino Pin | Archim Pin | Description |
Expand All @@ -89,8 +100,8 @@ Source code for building everything will always be available to anyone!
| - | PB3 | 103 | J20 Pin 7 | Unused |
| FIL_RUNOUT_PIN | PB15 | 66 | J20 Pin 15 | Filament Runout 1 |
| FIL_RUNOUT2_PIN | PB16 | 67 | J20 Pin 16 | Filament Runout 2 |
| SERVO1_PIN | PB13 | 21 | J20 Pin 19 | Unused |
| SERVO0_PIN | PB12 | 20 | J20 Pin 20 | Bed Washers or BLTouch Servo |
| SERVO1_PIN | PB13 | 21 | J20 Pin 19 | Unused |

## How do I compile *Drunken Octopus* from source?

Expand Down

0 comments on commit 44cb189

Please sign in to comment.