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_stop

    Software 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.4

    How can i fix this?
    Best Regards

  • Moderator

    @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)

    For connecting it up (and do check the wiring), see

    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

Log in to reply