enter image description here

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


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.

enter image description here

  • 2
    \$\begingroup\$ You can do all calculations you want but if your circuit is not correct it will never work. Show us your schematic first. \$\endgroup\$ – Bimpelrekkie Sep 15 '15 at 6:52
  • \$\begingroup\$ You have to charge/discharge the gate capacitance to turn off/on, using just one gate resitor wont work, because MOSFET aint BJT. \$\endgroup\$ – Marko Buršič Sep 15 '15 at 6:56
  • \$\begingroup\$ @MarkoBuršič Well, we don't know whether there is a pull-up (or pull-somewhere) resistor in that secret circuit … \$\endgroup\$ – CL. Sep 15 '15 at 9:18
  • \$\begingroup\$ R2 is way too small in your second schematic. It is only there to pull the gate low when the opto-coupler is off. Try something around 10K. \$\endgroup\$ – Tut Sep 16 '15 at 11:50
  • \$\begingroup\$ For more on determining the pull-down resistor value, see: Calculating the pulldown resistance for a given MOSFET's gate \$\endgroup\$ – Tut Sep 16 '15 at 12:07


simulate this circuit – Schematic created using CircuitLab

Is a circuit that should work for you. D1 and Q1 are used together to form the opto isolator. The values are just ball park, the schematic is just meant for topology purposes.

  • \$\begingroup\$ Where did you get the load resistor value from? \$\endgroup\$ – Andy aka Sep 15 '15 at 8:25
  • \$\begingroup\$ @Andyaka It's just balk park values. I was going for topology not values. \$\endgroup\$ – vini_i Sep 15 '15 at 8:27
  • \$\begingroup\$ sir ,actually i dont know to calculate gate resistor please say me how to find it \$\endgroup\$ – vivek j Sep 16 '15 at 8:00
  • \$\begingroup\$ the gate resistor needs to be just large enough to keep the inrush current in check. The maximum rating for the 4N25 is 150ma, so at 5v i would make the resistor (5/0.15=33.3) about 33ohms. \$\endgroup\$ – vini_i Sep 16 '15 at 10:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.