OP-amp/MOSFET constant current source problem with gate voltage

Thread Starter

Makadamij

Joined Aug 23, 2018
10
Hello everyone!

Disclaimer: I am quite inexperienced with analog electronics. I have tried to simulate a constant current source in LTspice, which is composed of an rail-to-rail input/output OP-amp (LT1218 powered with a 5V supply and the other power pin set to ground) and a power-mosfet (IRFZ44N), because it is meant to drive a current of approximately 1A. The non-inverting input of the OP-amp is connected to a voltage divider, which represents a potentiometer for setting the current. It is powered by a square-wave voltage source, which ranges from 0 to 5V with a duty cycle of 50%.
Currently, it is set in such a way that it feeds 500mV to the non-inverting input of the OP-amp. The MOSFET is connected to a 20Ohm resistor which may represent a LED array etc. and a 0.5Ohm shunt resistor.

When running the simulation, the current swings from 0 to 1A as it is supposed to. However, what I've stumbled upon is that when the voltage from the square-wave source is 0, the output voltage of the OP-amp remains nonzero (~3.5V) and is according to the datasheet of the MOSFET somewhere in the range of the Vgs threshold voltage (2V-4V). Although, the MOSFET appears to be off, since no current is flowing though the shunt resistor and the voltages at the inverting and non-inverting input of the OP-amp are the same. I looked in the OP-amp datasheet and found that the input voltage swings can be only a few tens of milivolts, since it is a rail-to-rail OP-amp.

I would be very thankful If you could help me understand why the MOSFET gate voltage remains nonzero and why the MOSFET at the same time is off despite having its voltage within the threshold range. Recommendations on how to improve my current circuit are also warm welcomed. I already plan on putting a bypass capacitor to the OP-amp power supply to eliminate possible noise.

Have a pleasant and joyful holiday week!
 

Attachments

ronsimpson

Joined Oct 7, 2019
3,037
Please share your SPICE file so we can play with it.
Things that usually go wrong with this circuit.
- Vgs threshold voltage (2V-4V) is not tested at 1A but at 1mA. It is hard to see but probably more like 4 to 6V at 1A.
- Your opamp has a 5V supply and probably needs a 12V supply to work in this circuit.
-The supply is 20V and the load is 20 ohms so the max current would be 1A if the MOSFET was shorted out. Also the 0.5 ohm resistors eats up 0.5V of the 20V supply. Please change the 20 ohm to 10 ohms so there is some voltage across the MOSFET at 1A. Or you could change the supply to 30V. Do this first.
RonS.
 

LowQCab

Joined Nov 6, 2012
4,053
The actual Gate-Voltage is completely irrelevant if ..........
when the Input-Voltage is zero, the measured Current though the FET is also zero.

I assume that R-4 is the "Load",
R-4 is not required, and may be any value, including zero-Ohms.

The "Output" Voltage will be equal to the Voltage at the Non-Inverting-Input of the Op-Amp.

~5-Volts is very close to the Gate-Threshold-Voltage,
under certain conditions, this Power-Supply-Voltage will be inadequate for reliable operation.
Either a higher Supply-Voltage, or a FET with a "Logic-Level" Gate may be required for reliable operation.
.
.
.
 

Thread Starter

Makadamij

Joined Aug 23, 2018
10
Please share your SPICE file so we can play with it.
Things that usually go wrong with this circuit.
- Vgs threshold voltage (2V-4V) is not tested at 1A but at 1mA. It is hard to see but probably more like 4 to 6V at 1A.
- Your opamp has a 5V supply and probably needs a 12V supply to work in this circuit.
-The supply is 20V and the load is 20 ohms so the max current would be 1A if the MOSFET was shorted out. Also the 0.5 ohm resistors eats up 0.5V of the 20V supply. Please change the 20 ohm to 10 ohms so there is some voltage across the MOSFET at 1A. Or you could change the supply to 30V. Do this first.
RonS.
Hello!

Thank you for your answer. According to the OP-amps datasheet, I can be powered with a single supply as low as 2V. By reducing the resistor value or increasing the supply voltage value, I sadly see no change in the gate voltage of the MOSFET. I will provide the SPICE simulation file.
 

Attachments

ronsimpson

Joined Oct 7, 2019
3,037
thanks for the circuit.
The MOSFET can make 1A with a Gate Voltage of 4.83. This is too close to the 5V supply. Change to a 10 or 12V supply.

Your question is why the gate voltage does not go to 0V.
At a Gate voltage of 3.59 the MOSFET is off and that is where the circuit is stable. It does not need to go to 0V. Any voltage less than 3.591 will work. 3.59 is the first voltage that turns off the MOSFET.

RonS
ps
If you were using a transistor that turns on/off at 0.6 to 0.7V the voltage will drop to just under 0.6V. No need to go all the way to 0V.
 

Thread Starter

Makadamij

Joined Aug 23, 2018
10
thanks for the circuit.
The MOSFET can make 1A with a Gate Voltage of 4.83. This is too close to the 5V supply. Change to a 10 or 12V supply.

Your question is why the gate voltage does not go to 0V.
At a Gate voltage of 3.59 the MOSFET is off and that is where the circuit is stable. It does not need to go to 0V. Any voltage less than 3.591 will work. 3.59 is the first voltage that turns off the MOSFET.

RonS
ps
If you were using a transistor that turns on/off at 0.6 to 0.7V the voltage will drop to just under 0.6V. No need to go all the way to 0V.
Thank you very much for your answer. I was quite confused, because this only occured in SPICE simulation, while when doing real-life experiments with another OP-amp and the same MOSFET, its gate voltage would drop to 0V.

Yet another interesting thing in the simulation I stumbled upon is, that if I add a, say 10kOhm resistor in the negative feedback loop, the gate voltage swings from 5V to 0V. It's suprising, because the feedback resistor doesn't seem to additionaly limit the current that is flowing into the inverting input (12nA), nor does it affect the current that is flowing through the MOSFET.
 

ronsimpson

Joined Oct 7, 2019
3,037
with another OP-amp and the same MOSFET, its gate voltage would drop to 0V.
On V1 voltage source, change 0, 5 to -0.005, 5. Trying to make a very slightly negative current will force the OP-amp to go as low as possible. The first circuit was happy as soon as the current hit 0A. By trying to go slightly negative will cause the amp to keep reducing the voltage in an attempt to get negative. In the real world, there is a slight offset between the two inputs. When the op-amp thinks both inputs are the same voltage there is likely some uVs difference between them. Depending on which way the offset is (+ or -) the amp will go to 0V on some of the amps.
 
Top