I want to create a 24v to 12v buck converter. I am trying to control mosfet with optocouplör. I have 25kHz-50kHz pwm signal from arduino/pic16f877A. I have some mosfets like IRFZ44N, IRF540N IRF4905 and etc. I am using PC817 opto but I guess it is not suitable for high frequency pwm like 25kHz. Because there are some pwm problems on rise and fall times. I have found 6n137 opto but it does not works on 5v vcc. I need to drive mosfet like 10v-15v. What should I do. If it is possible, how can I delete the rise and fall time on pwm output from opto. My English is not very good. Sorry for all wrongs on text and thanks for answers.