The circuit in the figure has the advantage of using an optical coupler, isolating it from the controlled load. The coupler is 4N25 or equivalent and the power to excite the LED comes from the parallel part itself. This circuit provides a digital output that can be used to excite TTL or CMOS ports. Note that the circuit can be supplied with voltages from 5 to 12 V. The load resistance is small, since the current available is not the highest.
