This is to trigger a 12v solenoid (acting as a laser shutter) with 5v (JP2) thru an optocoupler. The problem is 5v line have bit fast interruptions on a laser show, so I'd like to add a bit of delay OFF (say 0,5sec) in order the shutter remains active (energised) when this fast OFF interruptions happens (you know, to avoid click-click shutter open-close noise) So I think I need to put a capacitor and maybe resistor+capacitor, but sorry, I don't know where on this circuit...could you help me please? Many thanks
The biggest problem with your circuit is that it works backwards from what you want. With 5 volts applied to the optoisolator, the OI will turn on, and the MOSFET gate will be pulled low, and the MOSFET will turn off. So the shutter coil will not be energized when 5 volts is present. Is this a problem? I'll assume not.
Then, for a 0.5 second delay, your proposed circuit won't work - both the resistor and the capacitor are too small. A 10k resistor and a 100 to 200 uF will probably do what you want. Just be aware that the delay will vary from MOSFET to MOSFET, over about a 2:1 range.