<p>Both designs listed can detect runout and tangled filament. In both designs, the mechanics of detecting runout is for the filament presence to activate the switch while detecting tangle uses the tension between the reel and the extruder.</p>
<p>The tension mechanism has specific mounting requirements that other runout only sensors do not. It has to be fixed mounted to the printer frame so that the tension can act against it. And the tension arm should be oriented towards the filament reel which in this case is hanging over the printer. Different reel locations will require more thought. As an example, standalone reel holders that sit next to printers might not work if it is not heavy enough where the tension might drag or tip the reel.</p>
<p>The blue design is a well thought out optimization that relies on a rotating stage to pivot the switch away from the filament when the tension increases beyond the opposing spring tab. So a single switch will toggle with either runout or tension.</p>
<p>I agree with other answers that it is not necessary to differentiate between the two errors in firmware since both requires the same user intervention. If I was to implement separate detection anyways using the pink design, I would build a custom Marlin firmware that supports two runout sensors assuming I have enough controller pins to support a seconds input. (i.e. spare z end stop)</p>
<p>A third error that can use tension detection is a clogged/cold nozzle. This is tension that builds up after the extruder that is easy to detect on a Bowden setup. As the extruder tries to push a stuck filament, the net effect will try to elongate the Bowden tube. This can be detected as tension on the tube after the extruder. It is similar to examples on the Bambu tension <a href="https://wiki.bambulab.com/en/ams-lite/manual/filament-tangle-monitoring-intro" rel="nofollow noreferrer">monitor</a>.</p>

CC BY-SA 4.0
2024-05-22T12:17:17.663Z
2024-05-22T12:17:17.663Z
BrChan
<h2>Blue design</h2>
<p>The blue design can only detect a lack of filament. It is boolean: Filament or No Filament.</p>
<h2>Pink design</h2>
<p>The pink design can have multiple states, combining two boolean values.</p>
<p>The right of the sensors is &quot;Filament there&quot;.</p>
<p>The left is using a ramp. On pull along the ramp, the sensor is triggered once a certain amount of pull is overcome, either by pulling up, left or right. As a result of passing through the hole in the lever of known diameter. Any tangle or over thickness will act on the lever to the right and trigger the sensor, and so will strong yanking up or left, through those might self reset. As a result, this sensor will trigger a signal that could be called Tangle or No Tangle, or of course No Jam/Jam.</p>
<p>Your interpretation that there is no way to distinguish the results depends on one thing: that you put the sensors through a single loop back, for the effect of an AND gate.</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Filament</th>
<th>Jam</th>
<th>Output of the Series</th>
</tr>
</thead>
<tbody>
<tr>
<td>Filament in</td>
<td>No Jam</td>
<td>Run</td>
</tr>
<tr>
<td>Filament in</td>
<td>Jam</td>
<td>Stop</td>
</tr>
<tr>
<td>no Filament</td>
<td>No Jam</td>
<td>Stop</td>
</tr>
<tr>
<td>no Filament</td>
<td>Jam</td>
<td>Stop</td>
</tr>
</tbody>
</table>
</div>
<p>The design is set up such, that the filament sensor shows connectivity on being pressed, while the jam sensor is connected in reverse: triggering it opens the loop. While the designer wired the two in parallel, they could also be connected in series for the same effect.</p>
<p>To overcome this design deficiency of only sending a stop message, you need to route the signal to your control board and distinguish the two signals. However, for all but the error message, the practical effect should be the same: the machine shall stop if either of the Stop conditions is triggered.</p>
<p>If you have other sensory equipment on the printer, you might quickly run into problems in that the number of free pins is usually extremely limited, so you might not have enough pins to route the signals separately.</p>
<h3>is tangle trigger separate a good idea?</h3>
<p>Now, is the additional requirement of pins and wiring a <strong>good</strong> idea when it comes to error handling? No.</p>
<p>In either detected case - no more filament or tangled filament - you need to stop printing and access the very same area to deal with the lack of feeding filament. Only in large operations, there is any reason to try and detect the two separately for logging purposes.</p>

CC BY-SA 4.0
2023-12-06T08:11:18.890Z
2023-12-06T08:11:18.890Z
Trish
<p>I found two great designs for a DIY sensor that achieve both <strong>filament runout</strong> and <strong>filament jam</strong> detection in one unit.</p>
<p>A clever design that only uses one microswitch as follows:</p>
<p><a href="https://i.sstatic.net/bZx6N.jpg" rel="nofollow noreferrer" title="Filament runout and jam sensor with one microswitch"><img src="https://i.sstatic.net/bZx6N.jpg" alt="Filament runout and jam sensor with one microswitch" title="Filament runout and jam sensor with one microswitch" /></a></p>
<p><sup>Source: <a href="https://www.thingiverse.com/thing:5165299" rel="nofollow noreferrer">Thingiverse.com</a></sup></p>
<p>Another design using two microswitches, as follows:</p>
<p><a href="https://i.sstatic.net/Xy9iz.jpg" rel="nofollow noreferrer" title="Filament runout and jam sensor with two microswitches"><img src="https://i.sstatic.net/Xy9iz.jpg" alt="Filament runout and jam sensor with two microswitches" title="Filament runout and jam sensor with two microswitches" /></a></p>
<p><sup>Source: <a href="https://www.thingiverse.com/thing:5158978" rel="nofollow noreferrer">Thingiverse.com</a></sup></p>
<p>I am not sure about the reliability of either yet, and I initially liked the design with one more switch. Then I realized there was no way to distinguish what event occurred (runout <strong>or</strong> jam), so I plan to make the second two microswitch versions instead. However, how would I wire this in a way so that my Ender 3 V2 running Marlin, specifically <a href="https://github.com/mriscoc/Ender3V2S1" rel="nofollow noreferrer">mriscoc firmware</a>, would be able to interpret both signals separately and interpret them as two distinguishable events so that the exact event is reported (runout or jam)?</p>
<p>Alternatively, I could wire it to my Raspberry Pi, since I always print from OctoPrint only, and implement it there instead. However, I'd prefer to wire it to the printer board and have the firmware handle it.</p>
<p>Lastly, in comparison to these two specific designs, would an encoder wheel approach add benefits other than runout and jam detection?</p>
<p>Suggestions for better designs or approaches are also welcome.</p>

<marlin><electronics><filament-jam><sensors><runout-sensor>
How to distinguish filament runout and filament jam using a microswitch-based filament sensor in Marlin?
Bob Ortiz
# How to distinguish filament runout and filament jam using a microswitch-based filament sensor in Marlin?

(Asked by: username_0 on 2023-12-05)

I found two great designs for a DIY sensor that achieve both **filament runout** and **filament jam** detection in one unit.

A clever design that only uses one microswitch as follows:

[![Filament runout and jam sensor with one microswitch](https://i.sstatic.net/bZx6N.jpg "Filament runout and jam sensor with one microswitch")](https://i.sstatic.net/bZx6N.jpg "Filament runout and jam sensor with one microswitch")

Source: [Thingiverse.com](https://www.thingiverse.com/thing:5165299)

Another design using two microswitches, as follows:

[![Filament runout and jam sensor with two microswitches](https://i.sstatic.net/Xy9iz.jpg "Filament runout and jam sensor with two microswitches")](https://i.sstatic.net/Xy9iz.jpg "Filament runout and jam sensor with two microswitches")

Source: [Thingiverse.com](https://www.thingiverse.com/thing:5158978)

I am not sure about the reliability of either yet, and I initially liked the design with one more switch. Then I realized there was no way to distinguish what event occurred (runout **or** jam), so I plan to make the second two microswitch versions instead. However, how would I wire this in a way so that my Ender 3 V2 running Marlin, specifically [mriscoc firmware](https://github.com/mriscoc/Ender3V2S1), would be able to interpret both signals separately and interpret them as two distinguishable events so that the exact event is reported (runout or jam)?

Alternatively, I could wire it to my Raspberry Pi, since I always print from OctoPrint only, and implement it there instead. However, I'd prefer to wire it to the printer board and have the firmware handle it.

Lastly, in comparison to these two specific designs, would an encoder wheel approach add benefits other than runout and jam detection?

Suggestions for better designs or approaches are also welcome.

**Tags:** marlin, electronics, filament-jam, sensors, runout-sensor


---

## 2 answers

### Answer by username_2 on 2023-12-06. Score: 2 | Accepted answer

## Blue design

The blue design can only detect a lack of filament. It is boolean: Filament or No Filament.

## Pink design

The pink design can have multiple states, combining two boolean values.

The right of the sensors is "Filament there".

The left is using a ramp. On pull along the ramp, the sensor is triggered once a certain amount of pull is overcome, either by pulling up, left or right. As a result of passing through the hole in the lever of known diameter. Any tangle or over thickness will act on the lever to the right and trigger the sensor, and so will strong yanking up or left, through those might self reset. As a result, this sensor will trigger a signal that could be called Tangle or No Tangle, or of course No Jam/Jam.

Your interpretation that there is no way to distinguish the results depends on one thing: that you put the sensors through a single loop back, for the effect of an AND gate.

| Filament | Jam | Output of the Series |
| --- | --- | --- |
| Filament in | No Jam | Run |
| Filament in | Jam | Stop |
| no Filament | No Jam | Stop |
| no Filament | Jam | Stop |

The design is set up such, that the filament sensor shows connectivity on being pressed, while the jam sensor is connected in reverse: triggering it opens the loop. While the designer wired the two in parallel, they could also be connected in series for the same effect.

To overcome this design deficiency of only sending a stop message, you need to route the signal to your control board and distinguish the two signals. However, for all but the error message, the practical effect should be the same: the machine shall stop if either of the Stop conditions is triggered.

If you have other sensory equipment on the printer, you might quickly run into problems in that the number of free pins is usually extremely limited, so you might not have enough pins to route the signals separately.

### is tangle trigger separate a good idea?

Now, is the additional requirement of pins and wiring a **good** idea when it comes to error handling? No.

In either detected case - no more filament or tangled filament - you need to stop printing and access the very same area to deal with the lack of feeding filament. Only in large operations, there is any reason to try and detect the two separately for logging purposes.


---

### Answer by username_1 on 2024-05-22. Score: 1

Both designs listed can detect runout and tangled filament. In both designs, the mechanics of detecting runout is for the filament presence to activate the switch while detecting tangle uses the tension between the reel and the extruder.

The tension mechanism has specific mounting requirements that other runout only sensors do not. It has to be fixed mounted to the printer frame so that the tension can act against it. And the tension arm should be oriented towards the filament reel which in this case is hanging over the printer. Different reel locations will require more thought. As an example, standalone reel holders that sit next to printers might not work if it is not heavy enough where the tension might drag or tip the reel.

The blue design is a well thought out optimization that relies on a rotating stage to pivot the switch away from the filament when the tension increases beyond the opposing spring tab. So a single switch will toggle with either runout or tension.

I agree with other answers that it is not necessary to differentiate between the two errors in firmware since both requires the same user intervention. If I was to implement separate detection anyways using the pink design, I would build a custom Marlin firmware that supports two runout sensors assuming I have enough controller pins to support a seconds input. (i.e. spare z end stop)

A third error that can use tension detection is a clogged/cold nozzle. This is tension that builds up after the extruder that is easy to detect on a Bowden setup. As the extruder tries to push a stuck filament, the net effect will try to elongate the Bowden tube. This can be detected as tension on the tube after the extruder. It is similar to examples on the Bambu tension [monitor](https://wiki.bambulab.com/en/ams-lite/manual/filament-tangle-monitoring-intro).


---

