I'm glad you solved it! Bear n mind that the Duet 3 has 27K pullup resistors on the inputs, so any low pass filter you add should have a low enough resistance so as not to affect the low-level voltage significantly. A 1nF capacitor connected between the input pin and ground would probably be sufficient, but then the output transistor in the NPN sensor will discharge this rapidly when it turns on. That is unlikely to harm the sensor, but if you want to avoid it then I suggest a series resistor in the range 100R to 1K between the sensor output and the capacitor/IOx_IN pin.
