Printed in PLA, you can probably force it to fit, currently printing in ABS which requires a bit of care when inserting the metal parts. I wanted a tight fit, so its maybe best to use heat to soften the plastic a little.
This thing was made with Tinkercad (initially - then final tweeks with blender). Edit it online https://www.tinkercad.com/things/64EiCUHs7rj
You need a M4x25 or M4x30 cap screw to fit tightly within one part. Shorter will work, but you'll be restricted in adjustment range and might struggle if you have a deeper build plate (for example a glass sheet). Ideally, you can jam two nuts together to gold the rotating bolt in place. Mine is partially threaded, so u use an M5 nut as a spacer, and a M4 nut tight on the end of the thread,
I also have a simple inverter circuit for the cheap opto sensor. Needs 2x1k ohm resistors, and BC547 or similar NPN transistor. Also a 2x6 pin header, and cable to the main board.
Obviously, don't use a transparent flag to block the beam. I had no trouble with sunlight, or an LED flood light.
Still going strong after 6 months, but a bed crash (sensor came unplugged) means I'm waiting for a replacement opto-sensor. (still works, but its in 2 parts). Updated with version 1 of the slider (this has more space for the nuts)
M3 nut x2
M3 bolt (flat or dome, 12-15mm)
Optical Endstop Switch (mounted on PCB, with cable)
2x3 0.1" pin header (optional)
M3 bolt x 12mm (small head, driver to turn this which fits a 3mm hole)
M4 cap screw, 20-30mm
M4 Nut x 2 (half nuts are good)
Lower sensor: done
Wider Y range of sensor attach: done
Recess for SMD : done
Space for locknuts and washer - done
Make space in X : done
Better probe anchor :done
Slide catches: done