The author of Instructables under the nickname bclamore made do it yourself and placed an optocoupler with an open optical channel in a 3D-printed case. Homemade equipped with a cable for connecting to Vernier interfaces for interaction with various software, for example, LabView. But you can connect such an optocouple to other equipment, including Arduino.
The master draws up an optocoupler circuit. The first resistor limits the current through the LED. The second is the load for the phototransistor. While the optical channel is not blocked, the phototransistor opens under the influence of light, which causes the output voltage to decrease. After the channel is blocked, the phototransistor closes, and a voltage almost equal to the supply voltage is output through the resistor.
The wizard prints body parts from two files: top and bottom, places the components there and connects them according to the scheme:
Assemble, add cable:
And a pen:
The master checks the operability of optocouplers with the help of such a design, glued with hot glue to their ice cream sticks:
Everything works:
The result was an optocoupler with an open optical channel, which not only copes with its function perfectly, but also looks great.