Voltage Divider Ratio Switching with N-channel MOSFET - Page 1
Forum section: electronics / projects

author: Prithul0218
author_rank: Contributor
timestamp: September 25, 2023, 01:34:45 am
content: HiI am trying to precisely measure two different voltage ranges with a single voltage divider, buffer, and ADC input. I aim to use a MOSFET to switch the voltage dividing ratio. This lets me use a single voltage buffer and avoid using the internal gains on the ADC which might add noise and offset drifts.My question is, is this technique of switching voltage dividing ratio using MOSFET going to work well and are there any traps for young players? Is it also used in professional equipment by any chance?

author: jwet
author_rank: Frequent Contributor
timestamp: September 25, 2023, 01:57:19 am
content: There is nothing wrong with the general technique. This is done commonly in general. You have to do some analysis to see if it will meet your precision requirement. Though the idea is sound, your implementation has some problems1. The FET you've chosen is way over kill at 1/10 ohm and 2 amps- you can use a VN10K or other little mosfet or an analog switch, the resistance doesn't matter, it just needs to be small compared to your R's which are very large. This Ron could be 10 ohms with no effect. Low R switches bring capacitance and leakage. If this is all just DC, the C may not matter much. The FET has 120 pF or more of capacitance- when this works against those big R's things will get pretty slow. The hot leakage on those FET is 10 uA which will create a DC error.2. Hanging 10 nF on the output of an op-amp will create an oscillator. If you must have a reservoir for the ADC, isolate with as much R as you can- 100 ohms is a good start. If you're concerned about droop, have a DC loop downstream of the resistor and an AC loop at the op-amp output.Hope this helps.

author: Prithul0218
author_rank: Contributor
timestamp: September 25, 2023, 02:08:45 am
content: Just to clarify, I am only planning to measure DC voltages up to 50V.Quote from: jwet on September 25, 2023, 01:57:19 amIt just seemed like one of the cheapest N-channel logic level MOSFETs on LCSC.comQuote from: jwet on September 25, 2023, 01:57:19 amOh yeah, 10uA seems pretty significant and would cause a DC offset I suppose. VN10K also seems to have a leakage current of 10uA. Any advice on how to get around this? Ordinary transistors like the 2N3904 seems to have much lower leakage currents. Maybe that's a better option?Quote from: jwet on September 25, 2023, 01:57:19 amI meant to create an RC low pass filter there. Totally missed the resistor. Thanks for pointing it out.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: September 25, 2023, 02:55:29 am
content: Quote from: Prithul0218 on September 25, 2023, 02:08:45 amTransistors have a saturation voltage that is non-zero, so they will inject a DC offset of millivolts.The MOSFET specs are worst case, so have considerable margin.You could also look at analog switch parts like 74LVC1G66, (etc) which do have more defined leakage specs.If it really matters, buy various candidates and measure them.

author: jwet
author_rank: Frequent Contributor
timestamp: September 25, 2023, 03:23:20 am
content: I'm surprised that SPICE didn't flag that Cload.With 50V input, you need to make sure that you don't exceed Vcc on amplifer. Your gains are 1/20 and 1/5. You're pretty safe with that 910K series R but you might want to put a clamp to both rails to be safe.As PCBWiz said, FET leakages are worst case but smaller FET's leak a lot less either way and FET's do leak when hot. A single analog switch might be a good fix. There are some clever topologies that have been used in DVM's and such in similar circuits to get around these problems. The other option is to lower the input impedance a bit to maybe 100K, still a light load but puts less demands on stuff upstream.

author: moffy
author_rank: Super Contributor
timestamp: September 25, 2023, 04:27:55 am
content: I am not sure what C11 is doing, since you have effectively bootstrapped it so that it effectively disappears i.e. the voltage across C11 is almost 0 at all times. The only real effect it could have is if the opamp becomes a bit peaky it could provide a feedback path into the +ve input causing instabilities. I would guess that one side of C11 should be tied to ground.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: September 26, 2023, 05:04:28 pm
content: As others have already mentioned, the circuit around the opamp does not make much sense.I thin the SI2302 is one of those "default" Fets, probably millions of them are made, which makes them easily available and cheap.Also, leakage current for (all) MOS fet's is exponentially with temperature. (It roughly doubles every 10 degree centigrade), so leakage will be a lot smaller as long as your fet does not get very hot. It's also common to print quite big numbers for leakage in the datasheet, simply because manufacturers would have to test it otherwise.For the rest of the circuit, you can also turn it around. Use a simple divider in front of the opamp for the "high voltage" range, and then use the Fet to switch a resistor to GND to modify the amplification factor of the opamp. This has some advantages. You have a constant input impedance, and no risc of over volting the opamp inputs when the "range switch" is in the wrong position. You can also use a lower value resistors around the amplifier, and this reduces the effect of FET leakage current.

author: Kleinstein
author_rank: Super Contributor
timestamp: September 26, 2023, 07:25:36 pm
content: Though only 910 K the upper resistor of the divider would provide protection for the OP-amp, even if the supply range is exceeded. So not worries there - maybe to be on the safe side make sure that the resistor can withstand also high voltage spikes or use a combination of a few in series.A common small MOSFET is the BSS138.Thing depends also on the accuracy level aimed for. No issue for more normal uses, but it may be if you want more than 25 bits.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: September 27, 2023, 02:02:56 am
content: Quote from: Prithul0218 on September 25, 2023, 02:08:45 amIf you only need DC, then any almost any switch will do.MOSFETS have relatively high capacitance, and do not nail-down leakage very well, but are cheap and widely available.For high performance, I see TI have recent parts likeTMUX1511 4 channels Voltage : 1.8, 2.5, 3.3, 5, 2 Ohms 3.3 pF 0.05 uA 37uA Icc 3000Mhz BW TSSOP, UQFN 14, 16 $0.170 | 1ku( the Icc and RDS curves suggest internal charge pump)Compare with more generic partsSN74LVC2G66 2 channels. 6 Ohms 14pF 1uA 1uA Icc 300MHz DSBGA, SSOP, VSSOP $0.077 | 1ku