mirror of https://github.com/Desuuuu/klipper.git
docs: Improve filament width sensor documentation (#5058)
Add Filament Width Sensor to G-Codes.md Remove Redundant Filament Width Sensor Entries Remove Duplicate Status Reference In Hall Filament Width Sensor Fix Indentation For Filament Width Sensors Signed-off-by: Yifei Ding<yifeiding@protonmail.com>
This commit is contained in:
parent
634ae08df6
commit
98af5dffe6
|
@ -841,3 +841,30 @@ Palette prints work by embedding special OCodes (Omega Codes)
|
||||||
in the GCode file:
|
in the GCode file:
|
||||||
- `O1`...`O32`: These codes are read from the GCode stream and processed
|
- `O1`...`O32`: These codes are read from the GCode stream and processed
|
||||||
by this module and passed to the Palette 2 device.
|
by this module and passed to the Palette 2 device.
|
||||||
|
|
||||||
|
### Filament Width Sensor Commands
|
||||||
|
|
||||||
|
The following command is available when the
|
||||||
|
[tsl1401cl filament width sensor config section](Config_Reference.md#tsl1401cl_filament_width_sensor)
|
||||||
|
or [hall filament width sensor config section](Config_Reference.md#hall_filament_width_sensor)
|
||||||
|
is enabled (also see [TSLl401CL Filament Width Sensor](TSL1401CL_Filament_Width_Sensor.md)
|
||||||
|
and [Hall Filament Width Sensor](Hall_Filament_Width_Sensor.md)):
|
||||||
|
|
||||||
|
- `QUERY_FILAMENT_WIDTH` - Return the current measured filament width
|
||||||
|
- `RESET_FILAMENT_WIDTH_SENSOR` - Clear all sensor readings. Helpful after
|
||||||
|
filament change
|
||||||
|
- `DISABLE_FILAMENT_WIDTH_SENSOR` - Turn off the filament width sensor and
|
||||||
|
stop using it for flow control
|
||||||
|
- `ENABLE_FILAMENT_WIDTH_SENSOR` - Turn on the filament width sensor and
|
||||||
|
start using it for flow control
|
||||||
|
|
||||||
|
### Hall Filament Width Sensor Commands
|
||||||
|
|
||||||
|
The following command is available when the
|
||||||
|
[hall filament width sensor config section](Config_Reference.md#hall_filament_width_sensor)
|
||||||
|
is enabled:
|
||||||
|
|
||||||
|
- `QUERY_RAW_FILAMENT_WIDTH` - Return the current ADC channel readings and
|
||||||
|
RAW sensor value for calibration points
|
||||||
|
- `ENABLE_FILAMENT_WIDTH_LOG` - Turn on diameter logging
|
||||||
|
- `DISABLE_FILAMENT_WIDTH_LOG` - Turn off diameter logging
|
||||||
|
|
|
@ -1,100 +1,26 @@
|
||||||
# Hall filament width sensor
|
# Hall filament width sensor
|
||||||
|
|
||||||
This document describes Filament Width Sensor host module. Hardware used for developing this host module is based on Two Hall liniar sensors (ss49e for example). Sensors in the body are located opposite sides. Principle of operation : two hall sensors work in differential mode, temperature drift same for sensor. Special temperature compensation not needed. You can find designs at [Thingiverse](https://www.thingiverse.com/thing:4138933)
|
This document describes Filament Width Sensor host module. Hardware used for
|
||||||
|
developing this host module is based on two Hall linear sensors (ss49e for
|
||||||
|
example). Sensors in the body are located opposite sides. Principle of operation:
|
||||||
|
two hall sensors work in differential mode, temperature drift same for sensor.
|
||||||
|
Special temperature compensation not needed.
|
||||||
|
|
||||||
|
You can find designs at [Thingiverse](https://www.thingiverse.com/thing:4138933),
|
||||||
|
an assembly video is also available on [Youtube](https://www.youtube.com/watch?v=TDO9tME8vp4)
|
||||||
|
|
||||||
|
To use Hall filament width sensor, read
|
||||||
|
[Config Reference](Config_Reference.md#hall_filament_width_sensor) and
|
||||||
|
[G-Code documentation](G-Codes.md#Hall_Filament_Width_Sensor_Commands).
|
||||||
|
|
||||||
[Hall based filament width sensor assembly video](https://www.youtube.com/watch?v=TDO9tME8vp4)
|
|
||||||
|
|
||||||
## How does it work?
|
## How does it work?
|
||||||
|
|
||||||
Sensor generates two analog output based on calculated filament width. Sum of output voltage always equals to detected filament width . Host module monitors voltage changes and adjusts extrusion multiplier. I use aux2 connector on ramps-like board analog11 and analog12 pins. You can use different pins and differenr boards
|
Sensor generates two analog output based on calculated filament width. Sum of
|
||||||
|
output voltage always equals to detected filament width. Host module monitors
|
||||||
## Configuration
|
voltage changes and adjusts extrusion multiplier. I use aux2 connector on
|
||||||
|
ramps-like board analog11 and analog12 pins. You can use different pins and
|
||||||
```
|
differenr boards.
|
||||||
[hall_filament_width_sensor]
|
|
||||||
|
|
||||||
adc1: analog11
|
|
||||||
adc2: analog12
|
|
||||||
# adc1 and adc2 channels select own pins Analog input pins on 3d printer board
|
|
||||||
# Sensor power supply can be 3.3v or 5v
|
|
||||||
|
|
||||||
Cal_dia1: 1.50 # Reference diameter point 1 (mm)
|
|
||||||
Cal_dia2: 2.00 # Reference diameter point 2 (mm)
|
|
||||||
|
|
||||||
# The measurement principle provides for two-point calibration
|
|
||||||
# In calibration process you must use rods of known diameter
|
|
||||||
# I use drill rods as the base diameter.
|
|
||||||
# nominal filament diameter must be between Cal_dia1 and Cal_dia2
|
|
||||||
# Your size may differ from the indicated ones, for example 2.05
|
|
||||||
|
|
||||||
Raw_dia1:10630 # Raw sensor value for reference point 1
|
|
||||||
Raw_dia2:8300 # Raw sensor value for reference point 2
|
|
||||||
|
|
||||||
# Raw value of sensor in units
|
|
||||||
# can be readed by command QUERY_RAW_FILAMENT_WIDTH
|
|
||||||
|
|
||||||
default_nominal_filament_diameter: 1.75 # This parameter is in millimeters (mm)
|
|
||||||
|
|
||||||
max_difference: 0.15
|
|
||||||
# Maximum allowed filament diameter difference in millimeters (mm)
|
|
||||||
# If difference between nominal filament diameter and sensor output is more
|
|
||||||
# than +- max_difference, extrusion multiplier set back to %100
|
|
||||||
|
|
||||||
measurement_delay: 70
|
|
||||||
# The distance from sensor to the melting chamber/hot-end in millimeters (mm).
|
|
||||||
# The filament between the sensor and the hot-end will be treated as the default_nominal_filament_diameter.
|
|
||||||
# Host module works with FIFO logic. It keeps each sensor value and position in
|
|
||||||
# an array and POP them back in correct position.
|
|
||||||
|
|
||||||
#enable:False
|
|
||||||
# Sensor enabled or disabled after power on. Disabled by default
|
|
||||||
|
|
||||||
# measurement_interval:10
|
|
||||||
# Sensor readings done with 10 mm intervals by default. If necessary you are free to change this setting
|
|
||||||
|
|
||||||
#logging: False
|
|
||||||
# Out diameter to terminal and klipper.log
|
|
||||||
# can be turn on|of by command
|
|
||||||
|
|
||||||
#Virtual filament_switch_sensor suppurt. Create sensor named hall_filament_width_sensor.
|
|
||||||
#
|
|
||||||
#min_diameter:1.0
|
|
||||||
#Minimal diameter for trigger virtual filament_switch_sensor.
|
|
||||||
#use_current_dia_while_delay: False
|
|
||||||
# Use the current diameter instead of the nominal diamenter while the measurement delay has not run through.
|
|
||||||
#
|
|
||||||
#Values from filament_switch_sensor. See the "filament_switch_sensor" section for information on these parameters.
|
|
||||||
#
|
|
||||||
#pause_on_runout: True
|
|
||||||
#runout_gcode:
|
|
||||||
#insert_gcode:
|
|
||||||
#event_delay: 3.0
|
|
||||||
#pause_delay: 0.5
|
|
||||||
```
|
|
||||||
|
|
||||||
## G-Code Commands
|
|
||||||
|
|
||||||
**QUERY_FILAMENT_WIDTH** - Return the current measured filament width as result
|
|
||||||
|
|
||||||
**RESET_FILAMENT_WIDTH_SENSOR** - Clear all sensor readings. Can be used after filament change.
|
|
||||||
|
|
||||||
**DISABLE_FILAMENT_WIDTH_SENSOR** - Turn off the filament width sensor and stop using it to do flow control
|
|
||||||
|
|
||||||
**ENABLE_FILAMENT_WIDTH_SENSOR** - Turn on the filament width sensor and start using it to do flow control
|
|
||||||
|
|
||||||
**QUERY_RAW_FILAMENT_WIDTH** Return the current ADC channel values and RAW sensor value for calibration points
|
|
||||||
|
|
||||||
**ENABLE_FILAMENT_WIDTH_LOG** - Turn on diameter logging
|
|
||||||
|
|
||||||
**DISABLE_FILAMENT_WIDTH_LOG** - Turn off diameter logging
|
|
||||||
|
|
||||||
## Menu variables
|
|
||||||
|
|
||||||
**hall_filament_width_sensor.Diameter** current measured filament width in mm
|
|
||||||
|
|
||||||
**hall_filament_width_sensor.Raw** current raw measured filament width in units
|
|
||||||
|
|
||||||
**hall_filament_width_sensor.is_active** Sensor on or off
|
|
||||||
|
|
||||||
## Template for menu variables
|
## Template for menu variables
|
||||||
|
|
||||||
|
@ -114,7 +40,8 @@ index: 1
|
||||||
|
|
||||||
## Calibration procedure
|
## Calibration procedure
|
||||||
|
|
||||||
To get raw sensor value you can use menu item or **QUERY_RAW_FILAMENT_WIDTH** command in terminal
|
To get raw sensor value you can use menu item or **QUERY_RAW_FILAMENT_WIDTH**
|
||||||
|
command in terminal.
|
||||||
|
|
||||||
1. Insert first calibration rod (1.5 mm size) get first raw sensor value
|
1. Insert first calibration rod (1.5 mm size) get first raw sensor value
|
||||||
|
|
||||||
|
@ -126,12 +53,15 @@ To get raw sensor value you can use menu item or **QUERY_RAW_FILAMENT_WIDTH** co
|
||||||
|
|
||||||
By default, the sensor is disabled at power-on.
|
By default, the sensor is disabled at power-on.
|
||||||
|
|
||||||
To enable the sensor, issue **ENABLE_FILAMENT_WIDTH_SENSOR** command or set the `enable` parameter to `true.`
|
To enable the sensor, issue **ENABLE_FILAMENT_WIDTH_SENSOR** command or
|
||||||
|
set the `enable` parameter to `true.`
|
||||||
|
|
||||||
## Logging
|
## Logging
|
||||||
|
|
||||||
By default, diameter logging is disabled at power-on.
|
By default, diameter logging is disabled at power-on.
|
||||||
|
|
||||||
Issue **ENABLE_FILAMENT_WIDTH_LOG** command to start logging and issue **DISABLE_FILAMENT_WIDTH_LOG** command to stop logging. To enable logging at power-on, set the `logging` parameter to `true`.
|
Issue **ENABLE_FILAMENT_WIDTH_LOG** command to start logging and issue
|
||||||
|
**DISABLE_FILAMENT_WIDTH_LOG** command to stop logging. To enable logging
|
||||||
|
at power-on, set the `logging` parameter to `true`.
|
||||||
|
|
||||||
Filament diameter is logged on every measurement interval (10 mm by default).
|
Filament diameter is logged on every measurement interval (10 mm by default).
|
||||||
|
|
|
@ -138,7 +138,8 @@ The following information is available in the
|
||||||
[hall_filament_width_sensor](Config_Reference.md#hall_filament_width_sensor)
|
[hall_filament_width_sensor](Config_Reference.md#hall_filament_width_sensor)
|
||||||
object:
|
object:
|
||||||
- `is_active`: Returns True if the sensor is currently active.
|
- `is_active`: Returns True if the sensor is currently active.
|
||||||
- `Diameter`, `Raw`: The last read values from the sensor.
|
- `Diameter`: The last reading from the sensor in mm.
|
||||||
|
- `Raw`: The last raw ADC reading from the sensor.
|
||||||
|
|
||||||
## heater
|
## heater
|
||||||
|
|
||||||
|
|
|
@ -1,36 +1,22 @@
|
||||||
# TSL1401CL filament width sensor
|
# TSL1401CL filament width sensor
|
||||||
|
|
||||||
This document describes Filament Width Sensor host module. Hardware used for developing this host module is based on TSL1401CL linear sensor array but it can work with any sensor array that has analog output. You can find designs at [thingiverse.com](https://www.thingiverse.com/search?q=filament%20width%20sensor)
|
This document describes Filament Width Sensor host module. Hardware used
|
||||||
|
for developing this host module is based on TSL1401CL linear sensor array
|
||||||
|
but it can work with any sensor array that has analog output. You can find
|
||||||
|
designs at [Thingiverse](https://www.thingiverse.com/search?q=filament%20width%20sensor).
|
||||||
|
|
||||||
|
To use a sensor array as a filament width sensor, read
|
||||||
|
[Config Reference](Config_Reference.md#tsl1401cl_filament_width_sensor) and
|
||||||
|
[G-Code documentation](G-Codes.md#Filament_Width_Sensor_Commands).
|
||||||
|
|
||||||
## How does it work?
|
## How does it work?
|
||||||
|
|
||||||
Sensor generates analog output based on calculated filament width. Output voltage always equals to detected filament width (Ex. 1.65v, 1.70v, 3.0v). Host module monitors voltage changes and adjusts extrusion multiplier.
|
Sensor generates analog output based on calculated filament width. Output
|
||||||
|
voltage always equals to detected filament width (Ex. 1.65v, 1.70v, 3.0v).
|
||||||
|
Host module monitors voltage changes and adjusts extrusion multiplier.
|
||||||
|
|
||||||
## Configuration
|
## Note:
|
||||||
|
|
||||||
[tsl1401cl_filament_width_sensor]
|
Sensor readings done with 10 mm intervals by default. If necessary you are
|
||||||
pin: analog5
|
free to change this setting by editing ***MEASUREMENT_INTERVAL_MM*** parameter
|
||||||
# Analog input pin for sensor output on Ramps board
|
in **filament_width_sensor.py** file.
|
||||||
|
|
||||||
default_nominal_filament_diameter: 1.75
|
|
||||||
# This parameter is in millimeters (mm)
|
|
||||||
|
|
||||||
max_difference: 0.2
|
|
||||||
# Maximum allowed filament diameter difference in millimeters (mm)
|
|
||||||
# If difference between nominal filament diameter and sensor output is more
|
|
||||||
# than +- max_difference, extrusion multiplier set back to %100
|
|
||||||
|
|
||||||
measurement_delay 100
|
|
||||||
# The distance from sensor to the melting chamber/hot-end in millimeters (mm).
|
|
||||||
# The filament between the sensor and the hot-end will be treated as the default_nominal_filament_diameter.
|
|
||||||
# Host module works with FIFO logic. It keeps each sensor value and position in
|
|
||||||
# an array and POP them back in correct position.
|
|
||||||
|
|
||||||
Sensor readings done with 10 mm intervals by default. If necessary you are free to change this setting by editing ***MEASUREMENT_INTERVAL_MM*** parameter in **filament_width_sensor.py** file.
|
|
||||||
|
|
||||||
## Commands
|
|
||||||
|
|
||||||
**QUERY_FILAMENT_WIDTH** - Return the current measured filament width as result
|
|
||||||
**RESET_FILAMENT_WIDTH_SENSOR** – Clear all sensor readings. Can be used after filament change.
|
|
||||||
**DISABLE_FILAMENT_WIDTH_SENSOR** – Turn off the filament width sensor and stop using it to do flow control
|
|
||||||
**ENABLE_FILAMENT_WIDTH_SENSOR** - Turn on the filament width sensor and start using it to do flow control
|
|
||||||
|
|
Loading…
Reference in New Issue