What's new
VORON Design

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members!

BTT Smart Filament sensor

FriedPCB

Active member
Printer Model
Voron 2.4
Extruder Type
Galileo
Cooling Type
AB-BN
I'm installing a Smart Filament sensor with a BTT Octopus. Is there a good source of information regarding configuring Klipper and wiring?
 
I used wiring harness that comes with the sensor to connect it to BTT Octopus using pin PG12. Here is my config:

Code:
[filament_motion_sensor filament]
detection_length: 25.0         #The minimum length of filament pulled through the sensor to trigger a state change on the switch_pin.
extruder: extruder             #The name of the extruder section this sensor is associated with.
switch_pin: ^PG12              #The pin on which the switch is connected.
pause_on_runout: True
runout_gcode:
    M117 Filament out
    _RUNOUT_INFO

[gcode_macro _RUNOUT_INFO]
gcode:
  {% if 'filament_motion_sensor filament' in printer.configfile.settings %}
    {% set enable = printer['filament_motion_sensor filament'].enabled %}
    {% set detect = printer['filament_motion_sensor filament'].filament_detected %}
    {action_respond_info("RUNOUT Motion Sensor:
                          Enabled: %s
                          Detect Filament: %s" % (enable|lower,detect|lower))}
  {% endif %}
 
I used wiring harness that comes with the sensor to connect it to BTT Octopus using pin PG12. Here is my config:

Code:
[filament_motion_sensor filament]
detection_length: 25.0         #The minimum length of filament pulled through the sensor to trigger a state change on the switch_pin.
extruder: extruder             #The name of the extruder section this sensor is associated with.
switch_pin: ^PG12              #The pin on which the switch is connected.
pause_on_runout: True
runout_gcode:
    M117 Filament out
    _RUNOUT_INFO

[gcode_macro _RUNOUT_INFO]
gcode:
  {% if 'filament_motion_sensor filament' in printer.configfile.settings %}
    {% set enable = printer['filament_motion_sensor filament'].enabled %}
    {% set detect = printer['filament_motion_sensor filament'].filament_detected %}
    {action_respond_info("RUNOUT Motion Sensor:
                          Enabled: %s
                          Detect Filament: %s" % (enable|lower,detect|lower))}
  {% endif %}
Cool. Thanks.
 
I used wiring harness that comes with the sensor to connect it to BTT Octopus using pin PG12. Here is my config:

Code:
[filament_motion_sensor filament]
detection_length: 25.0         #The minimum length of filament pulled through the sensor to trigger a state change on the switch_pin.
extruder: extruder             #The name of the extruder section this sensor is associated with.
switch_pin: ^PG12              #The pin on which the switch is connected.
pause_on_runout: True
runout_gcode:
    M117 Filament out
    _RUNOUT_INFO

[gcode_macro _RUNOUT_INFO]
gcode:
  {% if 'filament_motion_sensor filament' in printer.configfile.settings %}
    {% set enable = printer['filament_motion_sensor filament'].enabled %}
    {% set detect = printer['filament_motion_sensor filament'].filament_detected %}
    {action_respond_info("RUNOUT Motion Sensor:
                          Enabled: %s
                          Detect Filament: %s" % (enable|lower,detect|lower))}
  {% endif %}
Is your 25.0 detection length a number from experience with the sensor? The reason for asking, if I am not mistaken, BTT suggest 7mm. I normally end up at about 10mm to avoid error triggers.
 
I ended up using 15 mm for my printer after discovering that lower values caused false triggers...

Seems like it is something that one has to tune for one's own printer.
 
I've been looking at the Klipper code for the motion sensor and it seems that the way it works is:
  1. The filament sensor toggle the switch_pin every so often. I don't know how often that is since I am not sure that BTT document it. On every toggle, Klipper updates the filament trigger point to be the current extruder position + the detection distance. Extruder position seems to mean "the amount of filament (in mm) that the extruder has pushed so far".
  2. Every 0.25 seconds, Klipper checks the current extruder position and if it's less than the trigger point, it consider is a "filament present". Otherwise, it triggers "filament runout" event.
So, it seems that the detection length tuning will be a function of the extrusion rate of the printer. If the printer can print more than the detection length in a quarter of a second, the sensor will cause a false negative. 25mm detection length is 100mm/s. That seems pretty high but may be I still not fully understanding how the filament sensor code wors.
 
Somebody knows how to connect the BTT SFS 2.0 to the octopus?
It has 2 sensors but i can not find to which ports it have to connect.
 
I have connected the connectors to PG12 and PG13, and added the following code to the printer.cfg

Code:
#####################################################################
#   BTT Smart Filament Sensor 2.0
#####################################################################

[filament_switch_sensor switch_sensor]
switch_pin: ^PG12
pause_on_runout: False
runout_gcode:
  PAUSE # [pause_resume] is required in printer.cfg
  M117 Filament switch runout
insert_gcode:
  M117 Filament switch inserted

[filament_motion_sensor filament_sensor]
switch_pin: ^PG13
detection_length: 5
extruder: extruder
pause_on_runout: False
event_delay: 3.0
pause_delay: 1.0 #0.5
runout_gcode:
  M117 Runout Detected!
runout_gcode:
  PAUSE # [pause_resume] is required in printer.cfg
  M117 Filament encoder runout
insert_gcode:
  M117 Filament encoder inserted

I designed a simple mount and mounted the sensor to the back of the printer
sfs.jpg

only have to find a good solution to hide the cable
 
@Dutchronnie

I'm interesting by your month for SFS 2.0 !! Can i have your STL ??

For the cable, mine is passing inside the groove of the frame, and secure it with cap !!

fils.jpg

Have a good day !!
 
Top