A different type of filament sensor needed

For printing with thin nozzles a lot, I´m facing clogged nozzles quite often. Cleaning the bites out of the extruder the nexxt morning is just one annoing part of the story - cooking the filament all together with obstrucles another disgusting detail.

So I´m looking for a plugin that monitores a light barrier, that get´s triggered by a sliced wheel, that is moved by filament in any direction. The plugin would need a time parameter and routine to check if the light barrier has changed state during the time interval given at least one time - despite if the light barrier is opened or covered. If the light barrier is triggered no action is required. If not, the pause script should be started.

Any idea if there´s already a plugin covering this? - Or anyone interrested in development?

Reg. Charly

the prusa laser sensor can do this
i bought 2 for 4€. Actually the knockoffs costs 8€ each.

I use 2 in my dualcolor extruder with color sensing and nozzle brushing :smiley:

I should have bought more :-/

Or buy the https://shop.prusa3d.com/de/drucker-upgrades/179-original-prusa-i3-mk2s-zu-mk25-upgrade-bausatz.html
It contains good parts which cost in summary same/a little more as the set.

When I replaced my 0.4mm nozzle (since I'd eaten away my last one with three rolls of carbon fiber), I immediately started getting a lot of clogs with the new one. I'm reasonably certain that the fix was to adjust the z-offset down a little to make things happy.

Before adjusting, this would result in vampire bites into the PLA by the feeder gear. I'd then have to remove/snip/replace the filament for the next run.

I've also moved the positioning of the filament rolls so that they're above the printer rather than below.

I've considered adding something like the movement detection seen in this mouse to my filament roll assembly. It's the slotted wheel in the bottom/left of this photo which is paired with an LED and light sensor pair.

I wonder if an optical mouse sensor would see the filament passing by?

why not?
modern mouses have up to 18.000 DPI .

The Prusa Sensor has:

Tracking distance 1 ~ 30mm

Max tracking speed:
On flat STS
30 ips @ distance ≧ 3mm
10 ips @ distance 1~3mm

On 1.0mm diameter STS shaft
900 rpm @ distance ≧ 3mm
300 rpm @ distance 1~3mm

Maximum resolution:
~1,275 cpi (on flat STS) or
~630 counts/rev (on 1.0mm diameter STS shaft at 1.0mm distance)

Which really enough for most of the Filament.
Pusa enclosed the filament sensor and so it works better.

It detects the movement and also if the filament rotates.
But for the last one there is no practical usage XD.
But you can detect it ..

:edit
btw prusa has set the sensor to 240 dpi

In my case, I'll just add the encoders to these two spool holders. You could put an alternating black/white ring (sticker) on the roll and then detect lack of motion over a sampling period.

You could actually route the filament through that mouse in such a way that if it moves, it then moves the ball in one axis and then you just detect that movement programmatically. You'd connect the mouse to the Raspi via USB and read the events from the device in Raspbian from a Python script.

Thank´s but can´t see how it solves my problem. Im not looking for a test how thick or colored the filament ist. "Is it still moving in a given time - independend of tempo or direction." is the question.

The system should work like in this sketch: https://books.google.de/books?id=7IBuDwAAQBAJ&pg=PA236&lpg=PA236&dq=bewegungssensor+schlitzscheibe&source=bl&ots=ITbrC0rjBg&sig=iM6M4Hj_mLhIQBUFhFdDk4dzqG8&hl=de&sa=X&ved=2ahUKEwj-0enknYneAhWSZlAKHVdKA58Q6AEwCXoECAQQAQ#v=onepage&q=bewegungssensor%20schlitzscheibe&f=false
(Page 236, Sample a)

While the technical setup of the mechanical parts is clear, the plugin to do the analyse if there is movement and the call of "Pause" command is what exeeds my personal limits.

The idea with the misstreated mouse sounds great. Can you hand over that phyton script. My only knowledge in this is that i´ve a daugther who certainly can install and adapt if needed :wink:

The idea with the misstreated mouse sounds great. Can you hand over that phyton script. My only knowledge in this is that i´ve a daugther who certainly can install and adapt if needed :wink:

Afaik, the Prusa filament sensor also detects movement

NO IT ONLY detects the MOVEMENT and it is EXACTLY what he wants ...

btw a guy not from prusa wrote a really good article about the sensor and is linked by prusa at their github repo which helps a lot integrating it into you project :smiley:

searching it in the source code of prusa research is meh

I haven't written any Python scripts for this theoretical thingus. I do see a Python-based library for talking to a serial mouse, though. You'd either need the X windows system ("Desktop") or this would need to run as the root user so that it can get at the raw events.

...which of course are the parts from the Microsoft mouse shown above.

That´s exact the way it might work. I´ll try it with some optical mouse first. It should recognize moving filament right in front of the sensor as surface hovering over so there is nearmost any friction to deal with.

in Simplify3d there is a option called retraction which pulls the filament back out of the hotend. .I have mine set to 6mm which has helped tremendously preventing clogs due to material being burned in the nozzle.

1 Like

@Charly3 Today I've been working on this concept. I've got a sample mouse plugged into a Raspberry Pi 3B (with the PIXEL Desktop/X windows) installed. I'm just now installing sudo apt-get install -y python-pygame and I'm waiting for it to finish.

In theory, the pygame module should make short work of trapping the mouse scroll events. I'll then 3D print something to funnel the filament past the external rubber scroll wheel to create those events. I'll need to then write a plugin to make sure that a job printing continues to produce periodic scroll events. In their absence, I'll throw a pause event and fire off a sound event like R2D2 whistling, etc.

Still working on this. blog posts

Great to hear.

I meanwhile switched to direct extruder, shortened and straightened the filament travel path and solved the GIPO sensitivity issues for the traditional filament out sensor - but I´m still facing the base problem. Last night ive lost a three days print for there were a couple of meters of filament right in the middle of the spool that was somewhat wavy and therefore stuck in the pipes.

So I´m eager to hear about some further results of yours.

Oh... definitely lose the PTFE tubing. I formerly thought that stuff was great but it just is a weak link if the filament diameter isn't consistent.

This thread is about a year old, but I'm here searching for this topic and surprised it isn't addressed. There are a lot of ways to do the detection but while my printer has the standard momentary switch used to detect filament out, it lacks the sensor to detect a clog and will continue to air-print for days (as happened to me this weekend) rather than pause or throw a flag. That surprises me as this seems like a no-brainer.
The "mouse wheel" is one fine way- probably the simplest. Easy to build it into the same module as the "filament out" sensor as well. Has nobody done this yet?

I haven't finished that attempt yet but I will eventually. Things that would need to be done:

  • prevent the operating system from binding the mouse events (to the screen) as if it were a real mouse that you need
  • write a plugin to consume the mouse's Y-change detection
  • print (on a standard printer) a round wheel of black/white blocks on paper which go between the spool and the mouse enclosure, helping the mouse know that there is movement (some of my spools are clear)
  • do something when it has stopped moving during a print job

I'm usually very busy with lots of projects. So if that seems like a good idea, make an attempt.