Hre is how I made this simple but efficient detection of end of ribbon:
I simply wired two endstop switches (scavaged from an old micro waves owen) in parallel to the power cord switch.
Here is the schematics, quite simple !
So the original switch is still active and allows to startup operations. Heater can be powered and when temperature is reached, the wiper motor can also be switched on.
Then the paddle can be inserted under the filament. This is enough to close the switches S3 and S4 wired in serie into the paddle.
You can now switch off the power cord switch. The cord will remain powered until S3 or S4 is released.
stl files are avaliable here. Bear in mind that the filament must push down on the switches... you may need to adapt this design to your pullstruder geometry !
Once finished, it works like a charm!