An attempt at a filament sensor...

An attempt at a filament sensor…

First, clearly I do not know how to spec a limit switch. Got limit switches off Amazon by searching on “limit switch” and buying a couple likely looking popular choices (not having other criteria).

The below is meant to be a minimalist filament-out sensor. The end goal is to detect if filament is physically present, not visual appearance. So a mechanical switch makes more sense than optical, to my mind.

Teflon tube protects moisture-sensitive filaments. Spring in switch presses roller against filament. Hole in side allows visual inspection, and serves as drill guide for putting a notch into the tube for the roller. (Exposure to air only at that notch.) Twist fitting to clamp tube. Adjustment screw to set spacing of switch.

Seemed workable, in theory.

Problem is, this switch needs about 2mm of extra travel to open once closed, and close once open. This extra travel makes sense for many uses, but not so much with 1.75mm filament.

Need to find an appropriate limit switch…

… Just turned around to find a print head waving around in the air, as filament ran out while typing the above. :confused:

Hmm, interesting issue. I would imagine Amazon listings don’t have switch throw specified. Digi-Key is a good option if you want to get real specific with it.

I’m personally torn on whether the roller adds much for this application versus just letting plastic slide on a steel flat arm.

Remove the roller and do a slight bend in the metal arm near the button. This should allow the filament to slide past. sells ready made filament sensors of that design for a few dollars.

The limit switches I have, at present - too big, and too little for this use, I suspect. :slight_smile:

@Stephanie_A Yep. Putting a bend in the arm nearer the pivot would reduce the throw, but adds a fabrication step. Simpler fabrication if I can find the “right” switch to start. Saves work for others, perhaps. I do like to make things as simple as practical.

@Ryan_Carlyle Pretty sure the roller is “better”. Clearly the straight arm could dig into the filament on retraction, or when removing filament. But a bit of bent metal might just be sufficient.

@funinthefalls Might end up going that way, but. Listing on Banggood: Three wires? Powered board? Optical sensor? … which seem to have issues with clear filaments?

If the simplest thing works, a limit switch and a bit of design (that can be integrated into other things) may be more useful.

Have you thought about using an optical switch? they should give the same “it’s missing” performance as a mechanical switch but need less adjustment? I have some of the dirt cheap biqu endstops setup for my runout sensors when i get round to setting that up

@Preston_Bannister The ones I purchased were 2 wire, let me see if I can find the link to them.

Actually, the ones I ordered are 3 wire (I just checked. But ran a piece of filament into it, it is definately a mechanical switch inside, I can feel the click as it passes by the switch.

@Preston_Bannister those are the ones I’ve got, they’re cheap and seem to work ok :slight_smile:

@Owen_Smith I vaguely recall somebody trying an optical sensor and finding that it had reliability issues with translucent filaments.

@Ryan_Carlyle Doh! I also remember reading something about that, which might be why I have endstops in a box rather than on a printer. I found with microswitches the leavers would bend/lose pressure against the filament. I started thinking about some counter sprung cantilever contraption to action the switch, but it got overly complicated

@Owen_Smith I am very fond of translucent filaments. :slight_smile:

Other bits I forgot to mention…

Expect to use an OctoPrint plugin for filament-out handling. This is only vaguely real-time. All my printers will have a Raspberry Pi, running OctoPrint (it is that good). Also, the stock printer control board lacks additional inputs, so that is not an option. The plugin only needs two wires to a simple switch.

Found an example assembly on Thingiverse, of which I am not fond. Filament passing through a printed plastic path seems likely to abrade over time. The lever on the limit switch could dig in on retraction. The small spring in the tiny switch might tire as constantly compressed (and small moves), over time.

Using an larger limit switch is a bit of a hack. I can use one of the mounting holes as a pivot, and a set screw for adjustment against the side of the switch away from the lever. The larger spring in the larger switch should have much longer fatigue life (tends to be very non-linear). The switch is only about $1.50.

Poked around a bit, then ended up ordering the same limit switch, with a shorter arm. Will see if this has short-enough throw.

there is no need for a switch I run wires to two brass wire keepers out of a regular electrical outlet one wire soldered to each they both have a small hump in the center that touch when there is nothing between them and when filament slides between them it isolates them and when filament runs out they touch again but I have never printed with conductive PLA or Petg that might pose a problem for me.

@Preston_Bannister It’s a sound concept. Here is the simple one I did for my printers. Same concept you have here using a small limit switch. Uses a NC limit switch.

Try searching for a micro switch. A limit switch is a micro switch that is being used for limit triggering.

@Preston_Bannister I like that switch :slight_smile: but @Tim_Lindsey 's idea of contacts being seperated by the filament might be worth investigating, possibly with magnets to help with tensioning the contacts

@Tim_Lindsey Interesting alternative, given it uses very common hardware. You tagged the main concern - the assumption that filament is an electrical insulator. (Most are, but.)

Still preferring the mechanical switch as it depends only on physical presence, not electrical or optical properties.

Make something that detects movement so you also detect jams. This could be a simple wheel with small holes and a light sensor. The filament is out or there is a jam if pulses stop from the sensor.

@Baldur_Norddahl Not having an issue with jams, as often as simply running out of filament. So for the moment, only focused on the one problem. Better to keep scope on a project.

Having said that, my new V6 hotend seems(?) to have jammed, yesterday. Might change my mind, later. :slight_smile:

If building a new printer, some Trinamic stepper drivers have stall detection, so (in theory) we do not need a separate mechanism.

Retrofitting an existing printer is different.

But the solution is a simple way to detect running out of filament. Jam detection is a bonus.

The high tech solution is a distance detector that compares filament used with expected use. That way the printer can detect skipping in the filament feed.