Simple switch Run-Out Sensor too sensitive. Add timeout?
-
Whenever a spring arm is being used to depress a microswitch there will be difficulties keeping the switch depressed because of the varying tolerances of the switch and the filament passing through.
Adding a time out could make them a bit more reliable.
daemon.g is a macro file that gets run repeatedly during operation. Inside that file you could place your M581 to check the pin created in M950 to see if the switch is still depressed.
https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M581_Configure_external_trigger
M950 in config.g to define a pin for the switch
M581 in daemon.g to check if the switch is still depressed.You can add a G4 P500 command to add a 500 millisecond delay.
Does that make more sense?
-
@felek said in Simple switch Run-Out Sensor too sensitive. Add timeout?:
What if printer is doing long travel without extrusion?
In this case nothing would happen since it's just a simple switch checking for filament presence. The switch would still be depressed.
-
@Phaedrux understood, tomorrow i will check
-
@FBG said in Simple switch Run-Out Sensor too sensitive. Add timeout?:
Looks like the sensor is a spring-loaded switch. I can't see why such a sensor should be unreliable, as long as the filament path is sufficiently constrained. Maybe the switch mechanical sensitivity isn't properly adjusted? Can you provide a photo of the filament path where it passes the switch?
-
@Phaedrux I get it, but I think a bit different.
Let's look an example:
- printing some part
- switch is depressed
- printer is doing long travel > 2s (no extrusion)
- in this time we check switch (interval 500ms/1s) and is depressed
so, we pause the printer
In scenario when we check extrusion length there is no problem, because while traveling we don't have extrusion.
That is my idea -
@felek are you using a switch to detect filament presence/no presence or something more complicated for movement? because if just presence then there is no reason for the switch state to change if its extruding or not.
-
My guess is that the switch only triggers when the filament is under tension. But is that intentional in the design of the filament sensor, or due to poor manufacturing or poor adjustment?
-
@T3P3Tony I'll try to explain my story.
I bought Dyze design sensor (https://dyzedesign.com/shop/filament-detector/sentinel/)
which looks pretty solid and it is simple on/off presence sensor.I tested many materials from different suppliers, as you can image sometimes quality of filament is quite low (I mean filament diameter).
I had big trouble with this sensor, because it is optical sensor and sometimes when diameter is a bit smaller than reference sensor change the state. I checked it on oscilloscope.
In this case SimpleFilamentMonitor doesn't work well. So I decided to rewrite this code in order to set flag when filament is depressed. It is a simple filter which remove noises from sensor. I also added parameter to help adjust filter length (extrusion length).
I hope this image help to understand what I mean. It really helps when someone uses cheap filament sensor or low quality filament.
-
-
@FBG What exactly do you have right now?
-
In config.g:
M950 J1 C"e0_stop" ; Filament RunOut Sensor E0
M581 T2 P1 S1 R1 ; Call trigger2.gIn trigger2.g
G4 S1 :Wait 1 second
And now...What? -
If in trigger2.g i write:
G4 S1
M582 T2Starting a loop....