<p>It's a great question, but I don't think jam detection is particularly common on hobbyist printers.</p>
<p>I know the Prusa MK3.9/MK4 and XL printers intend to add jam detection using the load cell that's built into the <a href="https://www.prusa3d.com/product/original-prusa-xl-2/#nextruder" rel="nofollow noreferrer">Nextruder</a>, where it can detect the force between the extruder gear and the nozzle. It was promised in their promotional material, but is not implemented yet. (Today it uses the load cell to perform mesh bed levelling.) Jam detection using the load cell would have to be implemented in firmware.</p>
<p>Vector3D build a hotend tester using the same principles, and I feel his video nicely explains how the load cell would detect skipping and jamming: <a href="https://www.youtube.com/watch?v=rrz3bbsnMUI" rel="nofollow noreferrer">The Next Generation of Hot End Testing - YouTube</a>.</p>
<p>I don't have any experience of using rotary encoders on a printer, so I cannot comment on how the data from the encoder is used to alert the user of a potential problem. I would hazard a guess that it's an OctoPrint plugin which require you to use serial printing (so OctoPrint knows how much filament is being extruded/retracted moment to moment). A quick search shows there is at least one such plugin: <a href="https://github.com/gmatocha/Filament-Watch-Octoprint-Plugin" rel="nofollow noreferrer">gmatocha/Filament-Watch-Octoprint-Plugin: Octoprint Plugin that monitors filament extrusion with a rotary encoder</a>, the README lists the required parts and may be a good starting point if you want to build one yourself.</p>

CC BY-SA 4.0
2023-12-27T14:24:46.527Z
Very interesting plugin but the section https://github.com/gmatocha/Filament-Watch-Octoprint-Plugin#using-filament-watch---reliably does raise some valid concerns. Thank you.
Bob Ortiz
CC BY-SA 4.0
2024-05-31T11:49:43.653Z
QIDI Q1 pro has jam detection
FarO
CC BY-SA 4.0
2023-12-27T13:38:12.720Z
2023-12-27T13:38:12.720Z
RobM
<p>I am going down the same rabbit hole now and would summarize filament detection types into four categories: runout, extruder issue, reel jam, and nozzle jam. In fact, that's what BTT advertises for their sensor so nothing controversial here.</p>
<p>The mechanisms used to detect these issues are based on movement or force. Since detecting force itself is not always easy or intuitive, it is also common to convert force into motion. The sensors involved include:</p>
<ol>
<li>Micro-switches that detect physical presence either by the filament or something acting on the filament</li>
<li>Load cells that detect force directly</li>
<li>Optical encoders that toggles a signal proportional to the speed of a roller acting on a filament (just like the scroll wheel of your mouse) They can also be use as a contactless switch similar to a micro-switches usually with the goal of lower resistance on the filament</li>
<li>Hall effect sensors that act as a contactless switch</li>
</ol>
<p>When a filament ends, it is physically not there anymore which is why a micro-switch is an easy solution. But when a filament jams, the effect is a change in tension of the filament that exerts a force on different parts of the extruder path. From the extruder's perspective, when there is a reel jam it has to pull harder, when there is a nozzle jam it has to push harder. If the extruder is damaged, it is not able to push or pull the filament. In all cases, the filament doesn't move at all.</p>
<p>In this <a href="https://3dprinting.stackexchange.com/questions/21755/how-to-distinguish-filament-runout-and-filament-jam-using-a-microswitch-based-fi/23313#23313">answer</a>, the filament sensor tries to detect a reel jam by converting the tension in the filament into a mechanical motion that activates the micro-switch. That design is optimizing both runout and reel jam into a single switch action. Other sensors can be used in place of the micro-switch given enough R&amp;D.</p>
<p>Optical encoders (aka smart runout sensor) use the movement of filament to toggle a signal. Like a heart beat, a beating signal means filament is moving while a still signal is a potential sign of fault. The printer firmware must support this type of input for encoders to function. Optical encoders require the firmware to keep track of when the extruder is commanded to move and check that the encoder feedback matches those moves. If the feedback doesn't match the command and it exceeds some threshold, then the firmware treats it as an error. This &quot;threshold&quot; is what people refer to as tuning a smart runout sensor. For Marlin, the <a href="https://marlinfw.org/docs/configuration/configuration.html#filament-runout-sensor" rel="nofollow noreferrer">FILAMENT_RUNOUT_DISTANCE_MM</a> field sets how much mismatch is tolerated before an error occurs. Note that this is tied to the design of the encoder and it's resolution in tracking filament movement.</p>
<p>One other consideration for sensors is contact vs contactless. Anything that contacts the filament adds resistance that the extruder has to overcome. It might only be a significant issue when building larger systems where the reel is far away and the total resistance from sensor and tubing starts to add up. Contactless is certainly a good idea, but is also more complex to design. For example, optical contactless that directly detects filaments can have issues with transparent material.</p>
<p>In summary, I think optical encoders are currently a good comprehensive solution to filament detection. The main trade-off due to it's resolution is dealing with false positive triggers and potential grinding of the filament that would worsen a fault condition if the detection takes too long. The traditional switch tends to detect immediately a real condition and lets the firmware react faster but detecting multiple types of faults require more complex mechanics.</p>

CC BY-SA 4.0
2024-05-25T19:02:01.507Z
2024-05-27T20:56:35.077Z
2024-05-27T20:56:35.077Z
BrChan
<p>Using the official Creality runout sensor, I encountered a few times that the filament entangled around something and got stuck, the printer continuing for several hours (as it didn't run out), printing mid-air aithout filament. Then I got interested in the types of filament sensors that exist such as a runout and jam sensor as those mentioned below:</p>
<h3>The BTT filament sensor</h3>
<p>It is supposedly able to detect both runout and jamming, which I <strong>assume</strong> uses the concept of a <a href="https://en.wikipedia.org/wiki/Rotary_encoder" rel="nofollow noreferrer">rotary encoder</a>:</p>
<p><a href="https://i.sstatic.net/7x0m8s.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/7x0m8s.png" alt="BTT sensor" /></a></p>
<h3>DIY 'super simple filament jam sensor'</h3>
<p>From <a href="https://www.printables.com/model/58207-super-simple-filament-jam-and-presence-sensor" rel="nofollow noreferrer">printables.com</a>, which I <strong>assume</strong> uses simple physics, although it's unclear how this works exactly.</p>
<p><a href="https://i.sstatic.net/tWwCls.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/tWwCls.png" alt="Super simple filament jam and presence sensor." /></a></p>
<h3>DIY Optical Filament Sensor</h3>
<p>This amazing-looking optical filament sensor from <a href="https://www.thingiverse.com/thing:3400544" rel="nofollow noreferrer">thingiverse.com</a> uses a rotary encoder.</p>
<p><a href="https://i.sstatic.net/SBUFms.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/SBUFms.png" alt="optical filament sensor" /></a></p>
<h3>Question</h3>
<p>I guess that a rotary encoder would be best for this purpose because it can detect actual moving filament and potentially even exactly at which speed it is moving. However, how would it account for filament retraction or paused prints (waiting for filament color change)? Is this usually done in firmware or external control software such as OctoPrint?</p>
<p>I would like to understand: What different types of detection mechanisms for filament jam detection exist, and how do they work exactly? Also, which is considered most reliable and why?</p>

CC BY-SA 4.0
2023-12-26T23:27:34.237Z
This question must be impossible to answer if even with a bounty after a week nobody is even trying.
Bob Ortiz
CC BY-SA 4.0
2024-06-13T14:46:24.350Z
'super simple filament jam sensor' is a bit of a misnomer; it's a tangle sensor. It triggers the switch if there's strong tension between the spool and the extruder. It won't detect nozzle clog preventing filament from advancing.
SF.
<printer-building><filament-jam><filament-sensor><sensors><runout-sensor>
Which detection mechanisms can a filament sensor use?
Bob Ortiz
# Which detection mechanisms can a filament sensor use?

(Asked by: username_0 on 2023-11-06)

Using the official Creality runout sensor, I encountered a few times that the filament entangled around something and got stuck, the printer continuing for several hours (as it didn't run out), printing mid-air aithout filament. Then I got interested in the types of filament sensors that exist such as a runout and jam sensor as those mentioned below:

### The BTT filament sensor

It is supposedly able to detect both runout and jamming, which I **assume** uses the concept of a [rotary encoder](https://en.wikipedia.org/wiki/Rotary_encoder):

[![BTT sensor](https://i.sstatic.net/7x0m8s.png)](https://i.sstatic.net/7x0m8s.png)

### DIY 'super simple filament jam sensor'

From [printables.com](https://www.printables.com/model/58207-super-simple-filament-jam-and-presence-sensor), which I **assume** uses simple physics, although it's unclear how this works exactly.

[![Super simple filament jam and presence sensor.](https://i.sstatic.net/tWwCls.png)](https://i.sstatic.net/tWwCls.png)

### DIY Optical Filament Sensor

This amazing-looking optical filament sensor from [thingiverse.com](https://www.thingiverse.com/thing:3400544) uses a rotary encoder.

[![optical filament sensor](https://i.sstatic.net/SBUFms.png)](https://i.sstatic.net/SBUFms.png)

### Question

I guess that a rotary encoder would be best for this purpose because it can detect actual moving filament and potentially even exactly at which speed it is moving. However, how would it account for filament retraction or paused prints (waiting for filament color change)? Is this usually done in firmware or external control software such as OctoPrint?

I would like to understand: What different types of detection mechanisms for filament jam detection exist, and how do they work exactly? Also, which is considered most reliable and why?

**Tags:** printer-building, filament-jam, filament-sensor, sensors, runout-sensor

> **Comments:**
> **username_0**: This question must be impossible to answer if even with a bounty after a week nobody is even trying.  
> **username_1**: 'super simple filament jam sensor' is a bit of a misnomer; it's a tangle sensor. It triggers the switch if there's strong tension between the spool and the extruder. It won't detect nozzle clog preventing filament from advancing.  

---

## 2 answers

### Answer by username_4 on 2024-05-25. Score: 4 | Accepted answer

I am going down the same rabbit hole now and would summarize filament detection types into four categories: runout, extruder issue, reel jam, and nozzle jam. In fact, that's what BTT advertises for their sensor so nothing controversial here.

The mechanisms used to detect these issues are based on movement or force. Since detecting force itself is not always easy or intuitive, it is also common to convert force into motion. The sensors involved include:

1. Micro-switches that detect physical presence either by the filament or something acting on the filament
2. Load cells that detect force directly
3. Optical encoders that toggles a signal proportional to the speed of a roller acting on a filament (just like the scroll wheel of your mouse) They can also be use as a contactless switch similar to a micro-switches usually with the goal of lower resistance on the filament
4. Hall effect sensors that act as a contactless switch

When a filament ends, it is physically not there anymore which is why a micro-switch is an easy solution. But when a filament jams, the effect is a change in tension of the filament that exerts a force on different parts of the extruder path. From the extruder's perspective, when there is a reel jam it has to pull harder, when there is a nozzle jam it has to push harder. If the extruder is damaged, it is not able to push or pull the filament. In all cases, the filament doesn't move at all.

In this [answer](https://3dprinting.stackexchange.com/questions/21755/how-to-distinguish-filament-runout-and-filament-jam-using-a-microswitch-based-fi/23313#23313), the filament sensor tries to detect a reel jam by converting the tension in the filament into a mechanical motion that activates the micro-switch. That design is optimizing both runout and reel jam into a single switch action. Other sensors can be used in place of the micro-switch given enough R&D.

Optical encoders (aka smart runout sensor) use the movement of filament to toggle a signal. Like a heart beat, a beating signal means filament is moving while a still signal is a potential sign of fault. The printer firmware must support this type of input for encoders to function. Optical encoders require the firmware to keep track of when the extruder is commanded to move and check that the encoder feedback matches those moves. If the feedback doesn't match the command and it exceeds some threshold, then the firmware treats it as an error. This "threshold" is what people refer to as tuning a smart runout sensor. For Marlin, the [FILAMENT\_RUNOUT\_DISTANCE\_MM](https://marlinfw.org/docs/configuration/configuration.html#filament-runout-sensor) field sets how much mismatch is tolerated before an error occurs. Note that this is tied to the design of the encoder and it's resolution in tracking filament movement.

One other consideration for sensors is contact vs contactless. Anything that contacts the filament adds resistance that the extruder has to overcome. It might only be a significant issue when building larger systems where the reel is far away and the total resistance from sensor and tubing starts to add up. Contactless is certainly a good idea, but is also more complex to design. For example, optical contactless that directly detects filaments can have issues with transparent material.

In summary, I think optical encoders are currently a good comprehensive solution to filament detection. The main trade-off due to it's resolution is dealing with false positive triggers and potential grinding of the filament that would worsen a fault condition if the detection takes too long. The traditional switch tends to detect immediately a real condition and lets the firmware react faster but detecting multiple types of faults require more complex mechanics.


---

### Answer by username_2 on 2023-12-27. Score: 3

It's a great question, but I don't think jam detection is particularly common on hobbyist printers.

I know the Prusa MK3.9/MK4 and XL printers intend to add jam detection using the load cell that's built into the [Nextruder](https://www.prusa3d.com/product/original-prusa-xl-2/#nextruder), where it can detect the force between the extruder gear and the nozzle. It was promised in their promotional material, but is not implemented yet. (Today it uses the load cell to perform mesh bed levelling.) Jam detection using the load cell would have to be implemented in firmware.

Vector3D build a hotend tester using the same principles, and I feel his video nicely explains how the load cell would detect skipping and jamming: [The Next Generation of Hot End Testing - YouTube](https://www.youtube.com/watch?v=rrz3bbsnMUI).

I don't have any experience of using rotary encoders on a printer, so I cannot comment on how the data from the encoder is used to alert the user of a potential problem. I would hazard a guess that it's an OctoPrint plugin which require you to use serial printing (so OctoPrint knows how much filament is being extruded/retracted moment to moment). A quick search shows there is at least one such plugin: [gmatocha/Filament-Watch-Octoprint-Plugin: Octoprint Plugin that monitors filament extrusion with a rotary encoder](https://github.com/gmatocha/Filament-Watch-Octoprint-Plugin), the README lists the required parts and may be a good starting point if you want to build one yourself.

> **Comments:**
> **username_0**: Very interesting plugin but the section https://github.com/gmatocha/Filament-Watch-Octoprint-Plugin#using-filament-watch---reliably does raise some valid concerns. Thank you.  
> **username_3**: QIDI Q1 pro has jam detection  

---

