A new monostable optical shield configuration is shown below. The time in which the output signal is present is determined by capacitor C. The optical coupler admits equivalents and when excited by a microcontroller, a 120 to 330 ohms resistor must be provided in series with the output. The circuit is from an old French documentation. The transistor can be 2N2222.