Filament Run Out Sensor Triggering At Wrong Time?



  • Yes I know there are some other threads about the run out sensors, and I've looked through all that I could find, but non seem to have the problem that I have…

    My sensor works. BUT... its triggering backwards.

    My start GCODE has M582 T1 so that it should, from my understanding, detect what state any sensor related to Trigger 1 is currently in. So if there is filament loaded, it should see that the microswitch is currently triggered, meaning there is filament.

    Now, when I remove the filament from the sensor, nothing happens. It continues on its merry little way. BUT if I stick the filament back into the sensor, suddenly the printer stops everything and moves to the 'paused' position!

    WHY?

    As I understood, the M582 T1 is supposed to detect the CURRENT STATE of the sensor, and CAUSE Trigger 1 to, well, trigger when its CURRENT STATE CHANGES. Why is it not doing that?



  • Post your M581 line. Sounds like your S parameter is the wrong way around.



  • M581 E1 S1 T1 C0

    It seems like the Duet doesn't like normally open switches… swapped it out with a normally closed and it appears to be ok. I preferred the normally open switch because that means while there is filament, their is a signal going through... then when the filament runs out, it opens up and breaks the circuit... while it may be basically invisible to human perception, electronics tend to detect a lack of signal (a voltage) faster than detecting the sudden presence of a signal (a voltage).

    I'm bad at explaining things sooo incase that seems like garbage:

    When using an oscilloscope, if you suddenly supply power to something, you can see that the signal its detecting 'ramps up' to the 'high' state. When removing power suddenly, the signal being detected is a flat, sharp fall with no real 'ramping down'. Its just gone. Meaning faster detection since the lack of a signal happens faster than their suddenly 'being' a signal. Normally this would mean I'd go with normally closed switches because once pressed, the signal disappears instantly, but with a run out sensor, it'll be constantly depressed and thus needs to be normally open for my preference.

    I'm assuming that I probably do have the S wrong, as S0 it refers to the 'end' of the signal, which I guess after thinking about it would mean detection of a lost signal rather than the detection of an acquired signal. I'll have to attach another open switch after this print so I can see if that actually is the case. I went with S1 because everyone I've seen in all the other threads on the interwebs had been using S1 in their posts of 'successful operations'.



  • S1 and S0 determine whether the trigger is on rising edge or falling edge so you can use either normally open of normally closed. Normally closed are usually considered safer because if a wire falls off, it'll cause a trigger and so fail "safe". Whereas if you use a normally open switch and a wire falls off, it'll never trigger.



  • @deckingman:

    S1 and S0 determine whether the trigger is on rising edge or falling edge so you can use either normally open of normally closed. Normally closed are usually considered safer because if a wire falls off, it'll cause a trigger and so fail "safe". Whereas if you use a normally open switch and a wire falls off, it'll never trigger.

    Exactly, that's another good reason to have them. But the opposite is true for a run out sensor. If the switch is normally closed on a run out sensor, then having filament against the sensor means the switch is 'opened' and thus if a wire falls off, nothing happens because the switch was already opened, and thus if filament runs out, nothing is triggered. This is why I prefer the normally closed switch for run out sensors, because then if a wire falls off, it'll instantly pause because the state changes to open =D



  • Ahhh OK. I have to agree. Although the switch is normally closed at rest, it's mechanical installation effectively inverts the logic.

    Actually, I do exactly the same on the proximity switch I use my Z end stop/probe. It's mounted on the hot end itself so normally in contact with the carriage. When the bed rises, it pushes up on the hot end and breaks the contact.

    Apologies, for not thinking through how a run out sensor might work.



  • @deckingman:

    Ahhh OK. I have to agree. Although the switch is normally closed at rest, it's mechanical installation effectively inverts the logic.

    Actually, I do exactly the same on the proximity switch I use my Z end stop/probe. It's mounted on the hot end itself so normally in contact with the carriage. When the bed rises, it pushes up on the hot end and breaks the contact.

    Apologies, for not thinking through how a run out sensor might work.

    No problem, I didn't think you were referencing the run out sensor itself with the comment lol. Thought you were talking about end stop switches in general =D

    Currently in the process of moving my printer back to the now permanent 'work room/office', and hopefully gonna have my new printer up and running within a few weeks. Cant' wait to give it a shot!

    Out of curiosity, what sort of Z end stop/probe do you use? Is it literally a prob that you can use for auto 'leveling', or is it just acting as an endstop? And if so, are you using a mechanical type? I'm assuming yes since you said that as the bed raises up, it presses up against something to 'break contact'. I've been thinking about trying out the IR sensor probe that from what I understand, was designed by the same person as the duet, and thus meant to work 'perfectly' with it. My only issue is that it needs to be an exact distance away similar to a BL Touch (which is why I stayed away from the BL Touch… didn't want to deal with the hassle of constantly worrying whether or not the probe was situated properly...). That, I guess and with Tom's 'sensor round up' it appears that the better choice is to literally just do direct contact. In which I've been trying to think in my head how such a thing would be possible. The new printer would be using a 200x300 MK3 style heated bed (has aluminum top and heater pcb all in one) so I'm worried about how bad it would be to have a tiny wire connected/soldered onto the very edge of the bed, connected to the Z Probe's ground, and then an object on the hotend carriage which would be connected to the 3.3v... that way when they touch, it completes the circuit and presto. Thing is, like I said, idk if that's bad to do on the aluminum bed which would be getting 12v... idk if the top aluminum is 100% isolated from the power running through the PCB... I mean, you'd think it should be for obvious safety reasons... but this is reality, and people can be idiots when making things lol.

    Also o.o sorry 😧 i rambled there!



  • I used to use David (DC42)s excellent IR probe for Z homing. The only reason I changed is because I use 3dLac (I have 6mm glass on top of 10mm thick aluminium tooling plate) which was affecting the reflectivity of the glass and thus the readings for the probe. Now I just use a simple switch but it's a Metrol positioning switch with a claimed repeatability of 0.003mm (plenty good enough).

    I only use it for homing. My bed is flat and level and stays that way, so I don't use any form of software compensation for level or flatness. No form of auto levelling whatsoever.



  • Lol sounds nice. My printer is literally made from a recycled swingset into a prusa i3 style printer. usually it works perfectly fine and have had zero issues, until this week when it seems everything wanted to die all at once…


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.