4
\$\begingroup\$

I was looking for a voltage controlled current source see here , and I stumbled upon this circuit with description here :

enter image description here

Now I am having difficulty figuring out how this works - I made a model of the circuit in SPICE and I am utterly confused. enter image description here

When I measure the Gate voltage it shows up as 297 KV! - How on earth can it have that much gain. I do get the current through Load and sense resistor, as predicted. But when I use a general op amp model with reasonable supply voltages (5V and Gnd) to the opamp. I get output current in uA.

I am missing something here. What am I doing wrong?

I also found this with similar circuits. enter image description here

I guess, what I am really asking is how things work when MOSFET is thrown in the op-amp feedback.

Edit:

I managed to get the expected output current with the new circuit -

enter image description here

\$\endgroup\$
4
  • 2
    \$\begingroup\$ Try selecting an N-Channel MOSFET model for M1 in the LTSpice schematic. \$\endgroup\$ Feb 8, 2013 at 15:02
  • 1
    \$\begingroup\$ M1 is a N Channel MOSFET already \$\endgroup\$ Feb 8, 2013 at 15:06
  • \$\begingroup\$ what if you try building and measuring the circuit instead of simulation? :) \$\endgroup\$
    – miceuz
    Feb 8, 2013 at 15:30
  • 1
    \$\begingroup\$ You get 297kV because you use an ideal opamp. If you use any practical opamp, the gate will saturate to (almost) positive supply voltage. \$\endgroup\$ Feb 8, 2013 at 15:49

3 Answers 3

6
\$\begingroup\$

There are a few things:

As Dave mentions, you are setting the current higher than the supply can provide, therefore the voltage at R1 will never reach 3.7V. So set the voltage lower or increase the set resistor.

A couple of other things about SPICE:

  • You are using the basic ideal opamp model, so it will ignore supply voltage and drive as high as it can (e.g. 297kV if that's what is necessary for 3.7V at the inverting input. It could be infinite if it can't achieve 3.7V at any voltage, only limited by the FP range in SPICE) A better model is "Universal Opamp 2" (you can set various parameters such as gain, bandwidth, etc, with this one), or you can use one of the many LT opamps. These would do what would happen in real life, simply hit the supply rail.
  • Right click on the MOSFET and select a real model from the list. Otherwise you are again using the basic model. This is what @Abdullah was referring to.

EDIT - here's an example circuit:

Circuit

Simulation with the input swept from 0 to 5V:

Simulation

\$\endgroup\$
6
  • \$\begingroup\$ As per your recommendation and Dave's I changed the v1 to 15 V and used the "Universal opamp 2" with supplies of +/- 15V . The set and the load resistors are now 1 Ohms each. I tried control voltages of 2V and 5 V..in either case, a 2A current and a 5A current should make the drop across R1 (in LTSPICE) 2V and 5V respectively, which is less than 15/2 = 7.5V. And yet, the output saturates to 15V (rails) and I don't get the expected current. \$\endgroup\$ Feb 8, 2013 at 17:33
  • \$\begingroup\$ Okay, hang on a minute, I'll post an example LTSpice circuit. \$\endgroup\$
    – Oli Glaser
    Feb 8, 2013 at 17:34
  • \$\begingroup\$ I got it to work (I think) , and edited my post. But I am not sure if it is a good idea to have 1 Ohm for both load and Rset. It seems like a lot of power is being wasted on Rset , which I will be using as a sense resistor. \$\endgroup\$ Feb 8, 2013 at 17:45
  • \$\begingroup\$ I just checked without using a proper model for the MOSFET and it does not simulate correctly (it saturates) so that's probably your issue. If you want less power dissipated in the Rset resistor, reduce it and your set voltage as necessary (e.g. use 100mOhm and 0 - 500mV for 0 - 5A, or lower). Usually the sense resistor is a low as is reasonably possible, you certainly wouldn't want to use a 1Ohm resistor with 5A in real life. \$\endgroup\$
    – Oli Glaser
    Feb 8, 2013 at 17:46
  • 1
    \$\begingroup\$ By the way - if you hold Alt down and click on a component, you can plot it's power dissipation. \$\endgroup\$
    – Oli Glaser
    Feb 8, 2013 at 17:52
4
\$\begingroup\$

The problem with your simulation is that you have limited the current through the load to 4.17A (5V / (1Ω + 0.2Ω)), but you're asking the current source to draw 18.5A (3.7V / 0.2Ω). Since it won't ever succeed at this, the simulator is driving the gate arbitrarily high in the attempt.

You simply need to pick self-consistent values for the components and sources in the simulation.

\$\endgroup\$
1
  • \$\begingroup\$ thanks! I changed the V1 to 15, therefore limiting the current and changed the load resistor and R1 in LTSPICE to 1 Ohms each. So the current limit should be 15 V/2 = 7.5A . I am applying the control voltage of 2 V so the current drawn should be 2A (2V/1 Ohms) , which is less than 7.5A. The output is still blowing up. \$\endgroup\$ Feb 8, 2013 at 17:22
4
\$\begingroup\$

R1, R2, and C1 can be ignored for a first understanding of the circuit. They keep the op-amp stable by decreasing high-frequency gain, but with ideal components they would not be necessary.

The voltage at the inverting input is equal to the voltage drop over R3. Since the Q1 gate current is negligible, and R3 and the load are in series and thus must have equal currents, if we can control the voltage drop over R3, we control the current in the load.

If the current is too low, the voltage drop over R3 will be too low, and the inverting input will be less than the non-inverting input. The op-amp will raise its output voltage, increasing Q1's gate voltage, allowing more current to the load.

If the current is too high, the voltage drop over R3 will be too high, and the inverting input will be greater than the non-inverting input. The op-amp will decrease its output voltage, decreasing Q1's gate voltage, allowing less current to the load.

An om-amp with negative feedback attempts to make its inputs equal through the feedback path.

\$\endgroup\$
3
  • \$\begingroup\$ Note to OP: To be clear, Phil is using the designators from the Protel circuit. In the LTSpice circuit, R1 can definitely not be ignored. It would be very helpful to keep the designators consistent between your drawings. \$\endgroup\$
    – The Photon
    Feb 8, 2013 at 17:01
  • \$\begingroup\$ Thanks,yeah I realized that right away after I posted it. @Phil when you said "The voltage at the non-inverting input is equal to the voltage drop over R3." you meant inverting (-) input, right? because the non-inverting input (+) is the control voltage. \$\endgroup\$ Feb 8, 2013 at 17:04
  • \$\begingroup\$ @EnderWiggins yes, that's probably what I meant to write, although since both inputs are equal as long as the op-amp is in its regular operating range, either statement is true. \$\endgroup\$
    – Phil Frost
    Feb 8, 2013 at 22:17

Your Answer

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

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