The circuit shown can be used to send command pulses from a cogwheel or other sensor placed between LED1 and the photo-transistor Q. The circuit is compatible with the characteristics of a PC's parallel port but can also be used as shield for microcontrollers. The resistor marked with (*) can eventually be changed according to the level of light necessary for the excitation of the phototransistor. The phototransistor can be of any type. It is possible to assemble 8 similar units to obtain an optical decoding system (by means of a card, for example) to excite the parallel port of the PC.