Can't figure out how to use pwm with an optocoupler and a MOSFET