Solenoid valve with optocoupler and transistor

perfect, thanks!