1
\$\begingroup\$

I am new to LTSpice and am working on modelling a DC Load circuit using NMOS and an opamp. I wanted my simulation to be as accurate as possible so I downloaded the spice model for LM358 OPamp and MOSFET IRF450N directly from the manufacturer's website and imported them both to my LTSpice library.

Testing both devices independently seem to give expected results (image 1 and 2 attached). In MOSFET simulation, Rsense current is proportional to Vgs voltage however when I use OpAmp to drive the gate voltage, Isense is in mA! I've redrawn my circuit just be sure thre're no disconnected items. What am I doing wrong here? The circuit is dicto copy of hundreds of circuits available online.

MOSFET IRF540N Simulation Vgs vs Ids

LM358N OpAMP

DC Load Circuit with OPAMP and MOSFET

\$\endgroup\$
13
  • \$\begingroup\$ Well, you built a voltage divider with R1 and Rsense, so the opamp will not really regulate the output in a way to drive the current with the mosfet. What purpose should R1 fulfill? \$\endgroup\$
    – Arsenal
    Commented Sep 15, 2023 at 11:22
  • \$\begingroup\$ @Arsenal I was just testing a scenario. I've also tested the circuit without R1 and the result is still the same. I will see if i can update the 3rd image to the one without R1. \$\endgroup\$
    – Prashant
    Commented Sep 15, 2023 at 11:24
  • \$\begingroup\$ Okay, then the issue you are facing is likely, that the LM358 is not able to provide a high enough output voltage to drive that mosfet. Have a look at the voltage of the opamp output, it is probably saturated at the maximum voltage. If you increase the supply of the opamp to say 15 V it could look different. \$\endgroup\$
    – Arsenal
    Commented Sep 15, 2023 at 11:34
  • \$\begingroup\$ @Arsenal Thanks for your comment. When i try to increase the OpAmp voltage above 5VDC, LTSpice throws an error "Analysis: Time step too small; initial timepoint: trouble with node "u1:i_nn:7" ". Do you have any idea how to fix this problem ? \$\endgroup\$
    – Prashant
    Commented Sep 15, 2023 at 11:38
  • \$\begingroup\$ @Arsenal Okay I changed the simulator engine to "Alternate" in control panel and re run the simulation and now I can increase the Vss supply to opamp to 12VDC. Unfortunately the output current is still 40mA which is incorrect. \$\endgroup\$
    – Prashant
    Commented Sep 15, 2023 at 11:59

1 Answer 1

0
\$\begingroup\$

Solution of this question can be found in schematics posted in thread blow:

Open loop MOSFET switching for DC load

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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