I want to run the mosfet (irf540n) through opto coupler(4n25) for driving the motor. I refered some formula from this website, but my circuit is not working.
I calculated opto coupler current limting resistor by using this formula:
Rf = (vin-Vf)/If = (5v-1.15)/10ma = 385R
then calculated the mosfet gate resistor using
5v/150ma=34R
but this circuit is not working.
I tried this circuit too but not working.
Thanks for your answer, now I attached the image of my schematic. Please check it.