switched from optocoupler to mosfet