Author Topic: Mosfet as variable resistor?  (Read 11164 times)

0 Members and 1 Guest are viewing this topic.

Offline FriedMuleTopic starter

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: dk
  • Can make even the simplest task look imposible.
Mosfet as variable resistor?
« on: January 23, 2019, 12:17:09 pm »
I am trying to understand the Mosfet in general here, so no specific project.

I can see that a Mosfet has a open max resistance and a closet min resistance. Lets say 200 Ohm to 300M Ohm.
Since the gate is voltage dependent. Could I, If we ignore the non liniarity of the mosfet, adjust the resistance between 200 Ohm and 300M Ohm by changing the voltage to the gate?

If so, how fine would such a adjustment be, could it simply be done by turning a single turn pot by hand?
Even if I appear online is it not necessary so, my computer is on 24/7 even if I am not on.
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5570
  • Country: va
Re: Mosfet as variable resistor?
« Reply #1 on: January 23, 2019, 01:10:04 pm »
Yes.
Yes.
Mind there are many types of mosfets available. Therefore different wirings exist in your case.

https://en.wikipedia.org/wiki/MOSFET
Readers discretion is advised..
 

Offline aheid

  • Regular Contributor
  • *
  • Posts: 245
  • Country: no
Re: Mosfet as variable resistor?
« Reply #2 on: January 23, 2019, 01:12:21 pm »
Pretty much. This is the basis for many DC electronic loads.

If you look at the datasheet for a typical MOSFET, you'll see the graph over V_DS vs I_D for various V_GS voltages. If you consider a fixed gate-source voltage, you'll see that the drain current varies very linearly with drain-source voltage until it reaches saturation. That is what we'd expect from a fixed resistor.

You'll also find a graph over I_D vs V_GS for a given V_DS, which is also pretty linear. So you can change the resistance by changing the gate-source voltage.

As with BJTs, they're usually very sensitive (0.1V might result in >1A change in drain current) as well there being individual differences between devices in a batch. So you'll most likely want to use some form of active feedback to control the gate voltage, rather than directly driving it via a potentiometer.

In a basic electronic load, you measure the voltage across a shunt resistor and compare it to a reference voltage with an op-amp. The op-amp drives the gate to the voltage required to keep the two inputs equal (within its limits of course).


An important point though is that not all MOSFETs can handle such linear loads. That is, they're fine if they're fully off or fully on, but not partially conducting. The issue is that if a small part of the device heats up more than the surrounding parts, that part conducts more, and that causes it to heat up more, which makes it conduct more. This can cause a runaway situation (thermal runaway), leading to a catastrophic failure of the device.

This mostly has to do with their construction, AFAIK trench-type MOSFETs are generally not safe for linear loads, while planar MOSFETs are. You can get an indication from the SOA (safe operating area) graph in the datasheet, no DC line = don't use, but even those with DC lines shouldn't always be trusted.
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1666
Re: Mosfet as variable resistor?
« Reply #3 on: January 23, 2019, 02:08:19 pm »
I am trying to understand the Mosfet in general here, so no specific project.

I can see that a Mosfet has a open max resistance and a closet min resistance. Lets say 200 Ohm to 300M Ohm.
Since the gate is voltage dependent. Could I, If we ignore the non liniarity of the mosfet, adjust the resistance between 200 Ohm and 300M Ohm by changing the voltage to the gate?

If so, how fine would such a adjustment be, could it simply be done by turning a single turn pot by hand?

Hi,

Ideally you would want to measure the voltage across the drain-source and adjust the gate voltage as needed.

The problem with the MOSFET is it is not perfectly linear as you noted.  But it is also not perfectly stable either as to voltage at the gate vs current through the drain-source.  If you set the gate to say 5.1v and see 1 amp current through the drain-source, as it heats up the current could change quite a bit while the gate voltage stays stable at 5.1v and that makes it a little more difficult to control.

Almost all circuits like this take note of the variations in mosfet operating points so if the mosfet character changes a little bit the operating point of the entire circuit does not change that much, if in fact the circuit needs high stability.  The variations are always handled by using feedback, negative feedback which helps to keep the operating point stable and they usually do an excellent job because much has been written about this and ways found to do this well.  It would not be unusual to see 0.1 percent accuracy in the DC set point for example, and even that may not be the best example.

So dont expect to get too accurate of a control unless you use feedback.  Once you use feedback however, assuming you can get the circuit stable frequency wise, the accuracy will be hard to beat.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17427
  • Country: us
  • DavidH
Re: Mosfet as variable resistor?
« Reply #4 on: January 23, 2019, 05:26:58 pm »
FETs in (JFETS, MOSFETs, whatever) general can be used as variable resistors.  One of the tricks to doing this over a wide range is to use a pair of FETs with one correcting for the non-linear Vgs versus Rds of the other.  A small amount of positive feedback from the drain to the gate may be used to improve nonlinearity.
 

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2431
  • Country: mx
Re: Mosfet as variable resistor?
« Reply #5 on: January 23, 2019, 05:45:45 pm »
Are we talking resistance or impedance?

Mosfets have significant amounts of capacitance, which would make it unsuitable for AC with the range valuess you are proposing.

Speaking of ranges, 300 Meg would be higher than the board surface leakage. 
 

Offline FriedMuleTopic starter

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: dk
  • Can make even the simplest task look imposible.
Re: Mosfet as variable resistor?
« Reply #6 on: January 23, 2019, 05:49:21 pm »
Really great answers!! :-)

I understand it like, yes you can, you can also sow with a needle while waring boxing gloves, but do not expect a great result:-)
Without feedback where we are talking about that maybe 0.1V can make "big" change, the power supply that have ripple and noise would also make it nearly useless, not to talk about heat or runaway heat:-)

But how would you make so precise a feedback so that you could maybe make a voltage divider out of two mosfet's, used instead of resistors, I am wondering because we have to consider some value as NUL, because i.e. 20V in with  300M Ohm - 200 Ohm, would give a something like from 19.99V to 0,000013V.
Even if I appear online is it not necessary so, my computer is on 24/7 even if I am not on.
 

Offline FriedMuleTopic starter

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: dk
  • Can make even the simplest task look imposible.
Re: Mosfet as variable resistor?
« Reply #7 on: January 23, 2019, 05:53:38 pm »
Are we talking resistance or impedance?

Mosfets have significant amounts of capacitance, which would make it unsuitable for AC with the range valuess you are proposing.

Speaking of ranges, 300 Meg would be higher than the board surface leakage.

I am thinking only resistance, but yes all the other values does effect the usability, but what if we are talking i.e. below 100KHz or maybe even 50KHz?
Even if I appear online is it not necessary so, my computer is on 24/7 even if I am not on.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17427
  • Country: us
  • DavidH
Re: Mosfet as variable resistor?
« Reply #8 on: January 23, 2019, 08:02:46 pm »
Are we talking resistance or impedance?

Mosfets have significant amounts of capacitance, which would make it unsuitable for AC with the range valuess you are proposing.

Speaking of ranges, 300 Meg would be higher than the board surface leakage.

I am thinking only resistance, but yes all the other values does effect the usability, but what if we are talking i.e. below 100KHz or maybe even 50KHz?

The capacitance limits the frequency at high impedances.  JFETs can be used as voltage variable resistors to at least 100MHz with a dynamic range of only 2.5.  At DC, at least 60dB is feasible.  At audio or video frequencies, multiple stages might be cascaded for greater dynamic range.
 

Offline FriedMuleTopic starter

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: dk
  • Can make even the simplest task look imposible.
Re: Mosfet as variable resistor?
« Reply #9 on: January 23, 2019, 08:29:16 pm »
The capacitance limits the frequency at high impedances.  JFETs can be used as voltage variable resistors to at least 100MHz with a dynamic range of only 2.5.  At DC, at least 60dB is feasible.  At audio or video frequencies, multiple stages might be cascaded for greater dynamic range.
Okay, but lets say that you would  build a volume control by using two mosfet (thats the one I am trying to start to understand now) I.e. by building a voltage divider, would that not be doable since the frequency are so wary low?
I am thinking that 300M Ohm, as written above has to be like open circuit and 200 Ohm has to be almost like clean copper wire?
Even if I appear online is it not necessary so, my computer is on 24/7 even if I am not on.
 

Offline aheid

  • Regular Contributor
  • *
  • Posts: 245
  • Country: no
Re: Mosfet as variable resistor?
« Reply #10 on: January 23, 2019, 08:37:41 pm »
Okay, but lets say that you would  build a volume control by using two mosfet (thats the one I am trying to start to understand now) I.e. by building a voltage divider, would that not be doable since the frequency are so wary low?

How would you handle the feedback to ensure that the MOSFETs behave linearly?
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17427
  • Country: us
  • DavidH
Re: Mosfet as variable resistor?
« Reply #11 on: January 23, 2019, 08:48:09 pm »
The capacitance limits the frequency at high impedances.  JFETs can be used as voltage variable resistors to at least 100MHz with a dynamic range of only 2.5.  At DC, at least 60dB is feasible.  At audio or video frequencies, multiple stages might be cascaded for greater dynamic range.

Okay, but lets say that you would  build a volume control by using two mosfet (thats the one I am trying to start to understand now) I.e. by building a voltage divider, would that not be doable since the frequency are so wary low?
I am thinking that 300M Ohm, as written above has to be like open circuit and 200 Ohm has to be almost like clean copper wire?

It is very workable at audio frequencies but as schmitt trigger points out, capacitance across the MOSFET will limit the maximum practical resistance.  A part like the 2N7000 could have a drain capacitance of 30 picofarads which at 20kHz is about 250 kilohms so 300 megohms is not even close to feasible.  A practical audio circuit would probably be limited to 1/10th of this maximum or 25 kilohms.
 

Offline Wolfgang

  • Super Contributor
  • ***
  • Posts: 1826
  • Country: de
  • Its great if it finally works !
    • Electronic Projects for Fun
Re: Mosfet as variable resistor?
« Reply #12 on: January 23, 2019, 09:15:10 pm »
I am trying to understand the Mosfet in general here, so no specific project.

I can see that a Mosfet has a open max resistance and a closet min resistance. Lets say 200 Ohm to 300M Ohm.
Since the gate is voltage dependent. Could I, If we ignore the non liniarity of the mosfet, adjust the resistance between 200 Ohm and 300M Ohm by changing the voltage to the gate?

If so, how fine would such a adjustment be, could it simply be done by turning a single turn pot by hand?

Some points to watch out:
- MOSFETs (at least the larger ones, even more at high voltages and temperatures) do leak. 300MOhm is very ambitious
- a range of more than 1 to 1 million on a single sweep of a pot ? Practically not, without incredible effort.
- you need a current sensing resistor and an op amp. Not an easy choice for your incredible wide range.

Questions:
- what is the maximum voltage and current you want to handle ?
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1666
Re: Mosfet as variable resistor?
« Reply #13 on: January 23, 2019, 10:54:01 pm »
Really great answers!! :-)

I understand it like, yes you can, you can also sow with a needle while waring boxing gloves, but do not expect a great result:-)
Without feedback where we are talking about that maybe 0.1V can make "big" change, the power supply that have ripple and noise would also make it nearly useless, not to talk about heat or runaway heat:-)

But how would you make so precise a feedback so that you could maybe make a voltage divider out of two mosfet's, used instead of resistors, I am wondering because we have to consider some value as NUL, because i.e. 20V in with  300M Ohm - 200 Ohm, would give a something like from 19.99V to 0,000013V.

Hi,

Already been said.  You need to use negative feedback.

You can try it without feedback very easy.  Use two potentiometers and two mosfets, then adjust each pot and see what you get.  Check a few minutes later and see if the reading changes.  Get some real current flowing so the mosfets heat up a little and watch to see how much they drift as they heat up.  The output voltage will change if they drift.
 

Offline FriedMuleTopic starter

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: dk
  • Can make even the simplest task look imposible.
Re: Mosfet as variable resistor?
« Reply #14 on: January 23, 2019, 11:04:26 pm »
I am trying to understand the Mosfet in general here, so no specific project.

I can see that a Mosfet has a open max resistance and a closet min resistance. Lets say 200 Ohm to 300M Ohm.
Since the gate is voltage dependent. Could I, If we ignore the non liniarity of the mosfet, adjust the resistance between 200 Ohm and 300M Ohm by changing the voltage to the gate?

If so, how fine would such a adjustment be, could it simply be done by turning a single turn pot by hand?

Some points to watch out:
- MOSFETs (at least the larger ones, even more at high voltages and temperatures) do leak. 300MOhm is very ambitious
- a range of more than 1 to 1 million on a single sweep of a pot ? Practically not, without incredible effort.
- you need a current sensing resistor and an op amp. Not an easy choice for your incredible wide range.

Questions:
- what is the maximum voltage and current you want to handle ?
Now, this is only theoretical, but I think that 6V 200mA would be what I'd expect would be reasonable per mosfet.
Lets say we are working with audio, just to redoce the frequency problem, could you not calculate the range that are nessesary for i.e. 2V line input
te be reduced to "nothing" = inaudioable even in the speaker after amplification? 2V is full volumen and 0,0000013V is lowest volumen, but the sound has to be gone fare before then?
Even if I appear online is it not necessary so, my computer is on 24/7 even if I am not on.
 

Offline FriedMuleTopic starter

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: dk
  • Can make even the simplest task look imposible.
Re: Mosfet as variable resistor?
« Reply #15 on: January 23, 2019, 11:10:03 pm »
Hi,

Already been said.  You need to use negative feedback.

You can try it without feedback very easy.  Use two potentiometers and two mosfets, then adjust each pot and see what you get.  Check a few minutes later and see if the reading changes.  Get some real current flowing so the mosfets heat up a little and watch to see how much they drift as they heat up.  The output voltage will change if they drift.
Yes that is true, but not sure how to make one mosfet go up and the other go down, in syncron fairly precise, if we are talking about a volume control / voltage divider?
Even if I appear online is it not necessary so, my computer is on 24/7 even if I am not on.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Mosfet as variable resistor?
« Reply #16 on: January 24, 2019, 12:39:09 am »
The definition of resistance is the ratio of voltage to current.

If we are only concerned with the instantaneous ratio, then yes, it's adjustable.  You could call that the average resistance.

But we know it is a nonlinear component.  What matters to circuits -- what affects dynamics -- is the incremental resistance, i.e., a small change in voltage divided by the corresponding small change in current, dV/dI.  This is normally very high, for a MOSFET in linear operation.

An ohmic device is one which obeys Ohm's law, R = V/I, for all V and I in its range.  That is, a linear device.

MOSFETs do have an ohmic region, but it's not very wide (fractional volt), nor very adjustable (a 2:1 resistance range is reasonable).  JFETs are somewhat better, but hardly ideal.

The next best option is an operational transconductance amplifier, which I won't go into detail about here, but you can read about if you're curious.

For greater ranges, we usually synthesize the resistance using a circuit to set I as a ratio of V, which works over a wide range -- compensating for the nonlinearity of the individual components used in the circuit.  For example, in the electronic load, if we have a control circuit to set output current as a function of an input voltage (which might be a potentiometer from a voltage reference, so we can set some constant current load), we can instead connect that input voltage to a fraction of the output voltage.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1666
Re: Mosfet as variable resistor?
« Reply #17 on: January 25, 2019, 03:31:00 pm »
Hi,

Already been said.  You need to use negative feedback.

You can try it without feedback very easy.  Use two potentiometers and two mosfets, then adjust each pot and see what you get.  Check a few minutes later and see if the reading changes.  Get some real current flowing so the mosfets heat up a little and watch to see how much they drift as they heat up.  The output voltage will change if they drift.
Yes that is true, but not sure how to make one mosfet go up and the other go down, in syncron fairly precise, if we are talking about a volume control / voltage divider?

Hello again,

Well then you would need two control circuits, but your inquiry leads to a more general discussion of control circuits.

What is more normal to do is to control exactly whatever it is that has to be controlled, and that is usually current or voltage.  In other words, the current or voltage represents some other control level that has some other significance and so you try to control that.
For a simple example, the power supply circuit where we try to control the output voltage.  This would supersede the use of a voltage divider so you would not control the resistance of the mosfet you would control the output voltage itself.  In the case of a volume control you would control the output volume itself not any resistance.

The resistance of a mosfet is something that is not usually controlled directly.  The mosfet is a device that has such an unpredictable character that a feed forward system is not very accurate at all so some sort of feedback would be necessary.  This leads to a more complicated circuit of course although for DC control it's not usually too bad.  For an AC circuit though it could be more complicated because we have to measure AC voltages which is always a bit harder to do.

I dont think you need to do this to understand mosfets though, but if you still want to do it then i would suggest starting with a DC circuit.  You'd have to measure the current through the mosfet and voltage across it, then use that information to adjust the gate voltage.

Did you mention how you wanted to do this yet?  That is, microcontroller or by analog circuitry alone?

Just to keep in mind the reason we have to do something like this is because the mosfet characteristics change in hard to predict ways that affect the resistance drain to source.  In other words, it's not really like a digital potentiometer because it is less predictable.

This kind of problem is not new though in control theory.  The main idea is the real parameters are measured, then the control signal is changed to compensate, then a new measurement, a new control signal, etc., etc.  The non predictables are taken to be just disturbances in the system, but the feedback helps to compensate.  Sometimes the control can be quite precise.

The simpler problem of course it to try to control ONE mosfet alone.

 

Offline Kasper

  • Frequent Contributor
  • **
  • Posts: 793
  • Country: ca
Re: Mosfet as variable resistor?
« Reply #18 on: January 25, 2019, 05:38:13 pm »
If you search for "simple mosfet audio amplifier" you should see how changing resistance of mosfet can change voltage to speaker.

Yours will be a bit different (simpler) since you want attenuation, not amplification.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf