The filament detector module allows you to add automated hardware to your machine to check that the filament is advancing correctly.
This is done by adding an encoder, that rotates as the filament advances, and sends pulses to the Smoothieboard.
The Smoothieboard then compares those pulses against the current theoretical position of the extruder.
If a difference is detected, the filament is not advancing correctly, which means that there is a problem with the pushing of the filament.
| Option | Example value | Explanation |
|---|---|---|
filament_detector.enable |
true |
This module is activated only if this is set to true |
filament_detector.encoder_pin |
This is the pin the encoder is connected to. Must be an interrupt pin | |
filament_detector.bulge_pin |
OPTIONAL This is the pin the bulge switch is connected to. If this switch is triggered (by a bulge in the filament) and the filament is moving, this will trigger an alarm | |
filament_detector.seconds_per_check |
2 |
How many seconds between filament position checks, must be long enough for several pulses to be detected, but not too long |
filament_detector.pulses_per_mm |
0.5 |
The number of pulses the encoder produces for every millimeter of filament movement |
| Option | Example value | Explanation |
|---|---|---|
filament_detector.enable |
true |
This module is activated only if this is set to true |
filament_detector.encoder_pin |
This is the pin the encoder is connected to. Must be an interrupt pin | |
filament_detector.bulge_pin |
OPTIONAL This is the pin the bulge switch is connected to. If this switch is triggered (by a bulge in the filament) and the filament is moving, this will trigger an alarm | |
filament_detector.seconds_per_check |
2 |
How many seconds between filament position checks, must be long enough for several pulses to be detected, but not too long |
filament_detector.pulses_per_mm |
0.5 |
The number of pulses the encoder produces for every millimeter of filament movement |
Example V2 config:
[filament_detector]
enable = true
encoder_pin = 2.11
bulge_pin = 1.31
seconds_per_check = 2
pulses_per_mm = 0.5
Disable the detector with
Set the
You can set the steps per mm temporarily with
Enable the detector with
If the detector mis-triggers too often reduce the
The encoder_pin must be connected to an interrupt-capable pin on your board. The specific pins that support interrupts vary by board model and variant.
For Smoothieboard V1, most GPIO pins support interrupts. Common interrupt-capable pins include
For Smoothieboard V2, interrupt-capable pins vary by board variant (Prime/Mini). Refer to your specific board’s pinout documentation to identify which pins support interrupts:
The hardware for this is usually made of an R/C car wheel encoder like this Wheel Encoder Kit for Robot Car.
A 3mm bolt goes through it and the filament runs over the shaft and turns the encoder wheel.
The module counts the encoder pulses and compares it to how far the filament has moved, if there are no pulses then it triggers the suspend.
This is better than a simple switch as it only triggers if the filament was actually extruded, and only triggers if no pulses were detected.
It will not trigger if there was no extrusion.
Typical encoder wheels used for filament detection have the following specifications:
For the common R/C car encoder kit mentioned above, a 20-slot wheel is standard. The pulses_per_mm setting must be calibrated for your specific setup as described in the Calibration section, as it depends on the effective diameter where the filament contacts the encoder wheel.
Reference model on Thingiverse: Filament Tracking System
Alternative card/model on Cults3D: Filament Tracking System