The Schmitt optical trigger current in the dark is low. The transistors can be the BC548 and the current adjustment in the dark is done in the trimpot. The circuit is from a Texas Instruments opto-electronics manual. With adaptations the circuit works as a shield for microcontrollers.