Simple filament sensor, not working properly.
-
Hey, im trying to get a simple filament sensor working on my Duet but something is off, when i poll the sensor with M591 D0 i get, seemingly random, filament present yes or no, even if it is filament in the sensor.
This is the sensor i use:
This is the config i use:
M591 D0 P1 C"e0_stop" S1 ; filament monitor connected to E0_stopSoftware versions
Board: Duet WiFi 1.02 or later
Firmware: RepRapFirmware for Duet 2 WiFi/Ethernet 3.0 (2020-01-03b3)
Duet WiFi Server Version: 1.23
Duet Web Control 2.0.4How can i fix this?
Best Regards -
@brasse I'd suspect the wiring; it sounds like something is 'floating', or perhaps the filament is not pushing the switch down fully. Though could be a similar issue as in this thread (similar hardware) https://forum.duet3d.com/topic/14014/openbuilds-limit-switch-reads-hit-in-s1-and-s0
For connecting it up (and do check the wiring), see https://duet3d.dozuki.com/Wiki/Connecting_endstop_switches#Section_Makerbot_Mechanical_Endstop_v1_Num_2
Edit: from the above page:
These devices produce an active-low output. If using RepRapFirmware 1.x or 2.x, use the S0 parameter in your M574 command
I think you need to invert the switch logic. The above is for M574, which defines endstops. With M591 you invert by sending P2, so in RRF3 I think your command should be :
M591 D0 P2 C"e0_stop" S1 ; filament monitor connected to E0_stop
Ian