Filament detector doesn't seem to act properly

I have it installed now, but had to unplug it. As it is no... - With filament loaded it displays "empty" in Klipper, refuses to print unless I disable it with the toggle, and the toggle resets after each print - If I use Klipper to unload filament it seems that everything ejects fine - If I feel filament its triggering the extruder to eject (stepper spinning backwards) - Lighted ring is working, though not indicating properly Im running 100% stock VC4 - 500 at the printhead ATM
18 Replies
cgrr
cgrr7d ago
Probably need to play with "!" in the config setting, your setting is probably reversed.
AceMan
AceManOP5d ago
I was the not about that, but it only mentioned the one pin. That one definitely made things worse. Can the other one be reversed too? Im new enough to Klipper that Im not sure about crap like that Apparently I was half asleep when I posted that above at 10:30 PM I think I MEANT to say "I thought about that, but...." So... My current config. After this post Ill just state the changes to the 2 pin assignments
#################################################################################################
### Filament Sensor - Single #
#################################################################################################
[filament_switch_sensor toolhead_filament_sensor_t0]
pause_on_runout: False
event_delay: 0.1
switch_pin: ^!toolboard_t0:PB4
runout_gcode:
_ON_TOOLHEAD_FILAMENT_SENSOR_RUNOUT TOOLHEAD=0
insert_gcode:
_ON_TOOLHEAD_FILAMENT_SENSOR_INSERT TOOLHEAD=0

[gcode_button toolhead_filament_sensor_button_t0]
pin: ^toolboard_t0:PB3
release_gcode:
{% if (printer.print_stats.state == "printing") %}
_ON_TOOLHEAD_FILAMENT_SENSOR_CLOG TOOLHEAD=0
{% else %}
_ON_FILAMENT_SENSOR_BUTTON_PRESSED TOOLHEAD=0
{% endif %}
press_gcode:
#################################################################################################
### Filament Sensor - Single #
#################################################################################################
[filament_switch_sensor toolhead_filament_sensor_t0]
pause_on_runout: False
event_delay: 0.1
switch_pin: ^!toolboard_t0:PB4
runout_gcode:
_ON_TOOLHEAD_FILAMENT_SENSOR_RUNOUT TOOLHEAD=0
insert_gcode:
_ON_TOOLHEAD_FILAMENT_SENSOR_INSERT TOOLHEAD=0

[gcode_button toolhead_filament_sensor_button_t0]
pin: ^toolboard_t0:PB3
release_gcode:
{% if (printer.print_stats.state == "printing") %}
_ON_TOOLHEAD_FILAMENT_SENSOR_CLOG TOOLHEAD=0
{% else %}
_ON_FILAMENT_SENSOR_BUTTON_PRESSED TOOLHEAD=0
{% endif %}
press_gcode:
That already doesnt look right? Ending with press gcode: ?? But as it is now, with filament loaded: Klipper shows detected Light ring is green Using Unload Filament and fully removing shows the same as above Using load Filament made zero change and shows the same as above Cutting filament to force a runout again shows no change Tapping the button with no filament give blue blinking and now Klipper shows empty Adding the end of the filament and both tapping and holding the button does nothing Using Load Filament macro properly loads, but still shows empty and blue flashing ring So it APPEARS that everything is difunctional right now Changed the following
switch_pin: ^toolboard_t0:PB4
switch_pin: ^toolboard_t0:PB4
Same tests below with changes noted with ****** But as it is now, with filament loaded. Then full power cycle reboot: Klipper shows EMPTY ************ Light ring is green Using Unload Filament and fully removing shows the same as above Using load Filament made zero change and shows the same as above Cutting filament to force a runout again shows no change Tapping the button with no filament does nothing ************ Adding the end of the filament and tapping the button give blue blinking, Klipper shows DETECTED ************ Using Load Filament macro properly loads, and still shows detectedand blue flashing ring Changed the following switch_pin: ^!toolboard_t0:PB4 pin: ^!toolboard_t0:PB3 Same tests below with changes noted with ** But as it is now, with filament loaded. Then full power cycle reboot: Klipper shows detected ****** Light ring is green Using Unload Filament and fully removing shows detected and green ring Using load Filament made zero change and shows detected and green ring Cutting filament to force a runout again shows no change Tapping the button with no filament does nothing gives blue blinking and now Klipper shows empty ****** Adding the end of the filament and tapping the button give blue blinking, Klipper shows detected****** Using Load Filament macro properly loads, and still shows empty and blue flashing ring ****** Changed the following switch_pin: ^toolboard_t0:PB4 pin: ^!toolboard_t0:PB3 Same tests below with changes noted with As it is now, with filament loaded. Then full power cycle reboot: Klipper shows empty `**` Light ring is green Using Unload Filament and fully removing shows emptyand green ring Using load Filament made zero change and shows emptyand green ring Cutting filament to force a runout again shows emptyand green ring Tapping the button with no filament does nothing gives nothing and Klipper still shows empty
Adding the end of the filament and tapping the button give blue blinking, Klipper shows detected and it actually loaded Using Load Filament macro properly loads, and still shows detectedand blue flashing ring So everything changed, but still nothing is right. Thats every combination and no correct function. Not understanding the constant tangle blue ring either
cgrr
cgrr5d ago
Sounds like a wiring problem now, I had a similar situation with Orbitool 2 and the smart filament sensor; the electrical bridge they supplied gave power but bad contact on one of the other pins. Took a while for me to figure it out almost sent the sensor back, but once I made my own "bridge" it worked as it should have to begin with. Check your crimps and make sure the wiring is correct. I assume you are using EBB42 not Orbitool?
AceMan
AceManOP5d ago
Correct
AceMan
AceManOP5d ago
No description
AceMan
AceManOP5d ago
No description
AceMan
AceManOP5d ago
As far as I can tell its fine I pulled the RR printer.cfg data and inserted the stock info from LDO and things are running different
blacksmithforlife
no they don't. One if for the pullup resistor, the other is a logic inverter
Ross13
Ross134d ago
Yeah whoops. Double checked my config and you are correct. Not sure where I got that, I'll delete my comment
AceMan
AceManOP4d ago
So any other ideas on this thing? Had to pull the TB and resolder that USB connector. As you can see, and I missed, its a little borked So while running the default sensor config, unchanged... Klipper shows detected when a red ring. Inserting filament I get a green ring and nozzle heat. But the extruder is going backwards, as if ejecting. And Klipper still shows detected Load and unload filament works properly at this point, but klipper always shows detected Extrude and retract work as advertised as well
cgrr
cgrr4d ago
Back to my original suggestion with the "!" i f your motor is inverted. Extrude and retract is not governed by the sensor.
AceMan
AceManOP4d ago
Now Im also dealing with losing connection to my TB randomly, in the middle of prints Going to swap out this EBB42 and see if it at least prints. Then back to screwing with this sensor ******************************************************************************************************************************************
switch_pin: ^toolboard_t0:PB4 # Default - ^!toolboard_t0:PB4
pin: ^!toolboard_t0:PB3 # Default - ^toolboard_t0:PB3
switch_pin: ^toolboard_t0:PB4 # Default - ^!toolboard_t0:PB4
pin: ^!toolboard_t0:PB3 # Default - ^toolboard_t0:PB3
- Sensor empty and Klipper shows empty - Add Filament, sensor show loaded and Klipper shows empty. Also, no auto load of filament at all - Load filament RR macro works, sensor show loaded and clipper shows empty - Cut filament and extruded it to empty. Sensor show loaded and empty shows empty ******************************************************************************************************************************************
switch_pin: ^toolboard_t0:PB4 # Default - ^!toolboard_t0:PB4
pin: ^toolboard_t0:PB3 # Default - ^toolboard_t0:PB3
switch_pin: ^toolboard_t0:PB4 # Default - ^!toolboard_t0:PB4
pin: ^toolboard_t0:PB3 # Default - ^toolboard_t0:PB3
- Sensor empty and Klipper shows empty - Add Filament, sensor show loaded and Klipper shows empty. Extruder is auto-ejecting - Load filament RR macro works, sensor show loaded and clipper shows empty - Cut filament and extruded it to empty. Sensor show empty and Klipper shows empty ******************************************************************************************************************************************
switch_pin: ^toolboard_t0:PB4 # Default - ^!toolboard_t0:PB4
pin: ^!toolboard_t0:PB3 # Default - ^toolboard_t0:PB3
switch_pin: ^toolboard_t0:PB4 # Default - ^!toolboard_t0:PB4
pin: ^!toolboard_t0:PB3 # Default - ^toolboard_t0:PB3
- Sensor empty and Klipper shows detected - Add Filament, sensor show loaded and Klipper shows detected. Extruder did nothing, not ever a hot-end heat cycle - Load filament RR macro works, sensor show loaded and clipper shows detected - Cut filament and extruded it to empty. Sensor show empty and Klipper shows detected ******************************************************************************************************************************************
switch_pin: ^!toolboard_t0:PB4 # Default - ^!toolboard_t0:PB4
pin: ^toolboard_t0:PB3 # Default - ^toolboard_t0:PB3
switch_pin: ^!toolboard_t0:PB4 # Default - ^!toolboard_t0:PB4
pin: ^toolboard_t0:PB3 # Default - ^toolboard_t0:PB3
- Sensor empty and Klipper shows detected - Add Filament, sensor show loaded and Klipper shows detected. Extruder is auto-ejecting - Load filament RR macro works, sensor show loaded and clipper shows detected - Cut filament and extruded it to empty. Sensor show empty and Klipper shows detected ****************************************************************************************************************************************** Thats every combination possible and the core results from the same tests to all options. It seems to me multiple calls are going out with inverted calls. Im not smart enough to break down your printer.cfg additions, but its kinda clear when the sensor is triggering, at time, extruder action. But its triggered backwards, but stock RR macros for load/unload and extrude/retract. and printing, all work fine. That too kinda explains the wrong seignal being sent to Klipper about filament status.... its showing the reverse of whats expected. I THINK I have another sensor being delivered on monday with my IDEX kit. So prior to breaking shit down to add that, Ill test the new sensor against the results above and report back again.
cgrr
cgrr4d ago
I believe you have the non-smart version config. This is mine (copied from Helge, I think) NO ! disregard the pins on mine I have a different toolboard, your pins are correct for EBB42: [filament_switch_sensor toolhead_filament_sensor_t0] pause_on_runout: False event_delay: 0.1 switch_pin: ^toolboard_t0:PA13 runout_gcode: CONSOLE_ECHO TITLE="Filament Runout Detected!" MSG="Please insert new filament." TYPE="warning" _ON_TOOLHEAD_FILAMENT_SENSOR_RUNOUT TOOLHEAD=0 insert_gcode: CONSOLE_ECHO TITLE="Filament Insert Detected!" MSG="Please wait..." TYPE="info" _ON_TOOLHEAD_FILAMENT_SENSOR_INSERT TOOLHEAD=0 [gcode_button toolhead_filament_sensor_button_t0] pin: ^toolboard_t0:PA14 release_gcode: {% if (printer.print_stats.state == "printing") %} CONSOLE_ECHO TITLE="Filament Clog Detected!" MSG="Please fix up your mess." TYPE="warning" _ON_TOOLHEAD_FILAMENT_SENSOR_CLOG TOOLHEAD=0 {% else %} _ON_FILAMENT_SENSOR_BUTTON_PRESSED TOOLHEAD=0 {% endif %} press_gcode:
AceMan
AceManOP3d ago
An LDO guy asked me to run the set-up that they put out. So that testing was 100% with their stuff. Didnt actually mean to post it here. But...
cgrr
cgrr3d ago
You might want to try what I posted with your pins, but it will be different once you get your IDEX.
AceMan
AceManOP3d ago
Ya, I test it out. Im not understanding how RR is managing essentially the same functionality with 1/5 the lines of configuration. But... thats why Im not a programmer! Ive ran into another strant issue that I cant wrap my head around. A new WTF! I've now had 5 failed prints, after absolute perfection for over a week. Every time its an MCU communication failure at the TB. Ive completely disassembled the top half of the TB now 4 times, replaced the USB cable, and tried 2 different prints. The REAL shitter is that they all happen within .2mm of each other. So ya.... its a time thing, and I already eliminated that its something to do with a strange flakey slice. Except last night I printed for over an hour with no filament.... because the sensor doesnt work and I cant see well. When I realize it I shoved in the filament and let it print till I got a clean flow, and restarted. So almost zero downtime! Maybe 5-7 seconds. Yet .16mm of a difference in failed part thickness This one kept me awake half the night. There is zero logic that I can come up with This one kept me awake half the night. There is zero logic that I can come up with
AceMan
AceManOP3d ago
In fact... I just woke up from passing out at my desk!
No description
AceMan
AceManOP3d ago
Ive also used both USB 2 and 3.2 plugs on the Pi, as well as ports on the USB hat ****************************************************************************************************************************************** switch_pin: ^toolboard_t0:PB4 # Default - ^!toolboard_t0:PB4 pin: ^!toolboard_t0:PB3 # Default - ^toolboard_t0:PB3 Sensor empty and Klipper shows empty Add Filament, sensor show loaded and Klipper shows empty. Extruder attempts to eject Load filament RR macro works, sensor show loaded and clipper shows empty Cut filament and extruded it to empty. Sensor show empty and empty shows empty. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * switch_pin: ^toolboard_t0:PB4 # Default - ^!toolboard_t0:PB4 pin: ^toolboard_t0:PB3 # Default - ^toolboard_t0:PB3 Sensor empty and Klipper shows empty Add Filament, sensor show loaded and Klipper shows empty. Also, no auto load of filament at all Load filament RR macro works, sensor show loaded and clipper shows empty Cut filament and extruded it to empty. Sensor show empty and empty shows empty. Extruder is trying to eject? * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * switch_pin: ^!toolboard_t0:PB4 # Default - ^!toolboard_t0:PB4 pin: ^!toolboard_t0:PB3 # Default - ^toolboard_t0:PB3 Sensor empty and Klipper shows detected Add Filament, sensor show loaded and Klipper shows detected. Extruder tries to eject Load filament RR macro works, sensor show detected and clipper shows detected Cut filament and extruded it to empty. Sensor show empty and Klipper shows detected * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * switch_pin: ^!toolboard_t0:PB4 # Default - ^!toolboard_t0:PB4 pin: ^toolboard_t0:PB3 # Default - ^toolboard_t0:PB3 Sensor empty and Klipper shows detected Add Filament, sensor show loaded and Klipper shows detected. No heat or extruder activity Load filament RR macro works, sensor show loaded and clipper shows detected Cut filament and extruded it to empty. Sensor show empty and Klipper shows detected. Extruder is trying to eject * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Had to edit that @cgrr . Silly rules! The print failures SEEM to be related to Adaptive Layers in Prusa Slicer Never mind.. It went about 15mm further this time. But Ive done 5 other single item prints today with no issues. Some much taller than lis invisible limit

Did you find this page helpful?