In the latest firmware release (at the time of writing this article) Prusa Research added a feature for filament sensor recognition (available for i3 MK3S only). Essentially the printer can tell when then filament sensor is disconnected and can interrupt the print and wait for user action. More details can be found in their GitHub release at https://github.com/prusa3d/Prusa-Firmware/releases/tag/v3.9.0 section “Filament sensor recognition (MK3S)”.
If you have an older machine, let’s say produced in early 2019 or even older, it’s quite probable its filament sensor won’t have the recognition feature. In order to work you need sensor rev. 0.4 (https://github.com/prusa3d/MKxS-IR-sensor). The sensor can be easily modified with some solder tools and few components – resistor and diode. In this article, I will show you how I did it and activated it in the firmware.
The difference between rev. 0.1 and rev. 0.4 can be found by comparison of their circuits (https://github.com/prusa3d/MKxS-IR-sensor/blob/master/rev.01/IR-sensor-01.pdf and https://github.com/prusa3d/MKxS-IR-sensor/blob/master/rev.04/IR-endstop-04.pdf). The difference is R4 and D2. To make the changes I cut the track that goes out of connector P1, pin 3, and soldered 56k resistor between pins 2 and 3 of the connector. Then I soldered the cathode of BAT54KFILM diode to pin 3 of the same connector. The last modification is a wire that goes from the diode anode to pin 2 or 3 of U1. Here is the result:
The firmware didn’t recognize automatically the new sensor, I had to unload the filament, wait for the printer to cool, and restart it. Then the “magical” message appeared on the main screen: