Not Having Any Luck Trying to Add a Filament Runout Sensor

I'm really frustrated, as I've been working on this for weeks and I can't get it to work. I have a V-Minion and I wanted to add a filament runout sensor. I've had one on my modified Ender for a long time and it works well. I first tried with a BTT Smart Filament Runout Sensor. This type of sensor sends pulses as the filament moves through it so that it can detect jams where the filament is loaded but is prevented from moving. I plugged it into E0_DET port on the SKRat. This is a 3-pin port, which has 5V, Ground, and the Detection pin, and I used the following config: [filament_motion_sensor runout_sensor] detection_length: 10.0 extruder: extruder switch_pin: PF4 runout_gcode: PAUSE This sensor worked at first, but started to stop the print periodically because it wouldn't send enough pulses to the mainboard. This ended up being caused by jams and also because the filament was slipping on the drive wheel inside instead of turning it. I gave up on that filament detection sensor and bought the same one I use on the Ender. It's also a 3-pin connector, with the same signals as the BTT, but doesn't sent pulses, it just sends a simple high or low signal as to whether the filament is detected. I have verified 9 ways to Sunday that the wiring is correct, but I cannot get RatOS to report the correct detection state. The config file is as follows: [filament_motion_sensor runout_sensor] extruder: extruder switch_pin: PF4 runout_gcode: PAUSE I have tried all 6 combinations of inverting the switch pin as well as applying pull-up or pull-down resistors (PF4, !PF4, ^PF4, ^!PF4, ~PF4, ~!PF4). None of them will get proper detection. I know the detector is working properly. It has a blue LED that turns on when the filament is inserted, and turns off when it's removed. I also measured the voltage on the detection pin, it's 3.3V when empty, 0.126V when filament is inserted. What could I possibly be doing wrong here?
6 Replies
correct-apricot
correct-apricot•11mo ago
[filament_switch_sensor BTT Sensor] pause_on_runout: True
event_delay: 3.0 pause_delay: 0.5 switch_pin: PG10 Is it wrong that you are using it as a motion sensor. PG10 is the pin for my board. You can use an endstop port
generous-apricot
generous-apricot•11mo ago
I don't know what you mean by "using it as a motion sensor". It's not a motion sensor, is a simple filament present/absent signal and that's how I have it hooked up and configured. As far as I can tell, it is sending the signal to the SkRat board properly, but Klipper is not telling me the correct status based on the signal.
correct-apricot
correct-apricot•11mo ago
you cfg is for a filament motion sensor, read the first line of your code. So your cfg is wrong. Leave the sensor as it is but use the code I have been given to you, replace pin PG10 with your pin PF4 after that save and restart and check your dashboard
correct-apricot
correct-apricot•11mo ago
No description
generous-apricot
generous-apricot•11mo ago
OH! OK, I did not notice that there was a difference in the Klipper header for "filament_motion_sensor" vs. "filament_switch_sensor". When I was using the BTT Smart Filament Sensor, which is a motion sensor, this section was set up properly, but when I switched it out to this switch sensor I had no idea I needed a different header. I'll try this and report back.
generous-apricot
generous-apricot•11mo ago
Thank you so much! It's working. 🙂 I published my model files for mounting the Creality Filament Runout Sensor if anyone else wants to do this. https://www.printables.com/model/543726-creality-filament-runout-sensor-mount-for-ratrig-v
Printables.com
Creality Filament Runout Sensor Mount for RatRig V-Minion by SomeJo...
Adds the commonly-available Creality Filament Runout Sensor to the RatRig V-Minion 3D printer. | Download free 3D printable STL models