# How to minimise capacitive effects on signal switching with MOSFETS?

I am designing a circuit where I need to measure the mid-point of a voltage divider with a 1kHz square wave, where the output is buffered with an op amp. The upper resistor is a fixed resistance, the lower is a sensor. The simplified circuit looks like this:

simulate this circuit – Schematic created using CircuitLab

So this all works fine, and is very straightforward.

However, I need to measure a wide range of resistances, so for accuracy, I want to switch in a different fixed resistor as a "drive" resistor when needed. I decided on using MOSFETS for this. The circuit now looks like this:

simulate this circuit

Which isn't too difficult to understand. If the 1k resistor is needed, M2 is switched on, the others are off, and so on.

The problems happened when using the 100k resistor. My op-amp output had a curve to it, rather than a nice square wave, like it did with all the other ranges. It was almost like some stray capacitance was about, so I did some investigating and eventually realised it was down to the capacitance of the MOSFETS and being in parallel, the problem was obviously worse.

The MOSFETS being used are the IRLML6402 which has an input capacitance of 633pF per FET. With 4 of them, that's just over 2nF, which made sense when I analysed the curve a bit closer, so I am assuming it is the input capacitance here. Someone please correct me if I am wrong.

So, I have been looking at FETS with much lower input capacitance to try out, but it will be a few days before they arrive (yay to component shortages!), so in the meantime, is there anything I can try? I am not even 100% sure this will fix the issue, as I haven't been able to try any other components, so can anyone see any problems with this approach? Any assistance or help is appreciated.

• 1) Realize that this can only work properly if you make sure that the Vgs of the MOSFET that is enabled is high enough. 2) Most discrete MOSFETs are for switching low impedance loads where some capacitance isn't an issue so I would think that it will be hard to find a MOSFET with a low enough Cgs. 3) I would look at analog switches like in the old HEF4066 to replace the MOSFETs. Yes the HEF4066 also uses MOSFETs but these will be much smaller (and therefore have a smaller Cgs) than any discrete MOSFET. Nov 1, 2021 at 12:44
• You could try this: place a high value resistor (1 Mohm) in series with the gate of each MOSFET, then there will be 1 M in series with the capacitances so their influence will be much smaller. The MOSFETs should still remain on despite the resistor (for DC, Vgs remains the same). If not, I would try adding a capacitor (10 nF) between gate and source of each MOSFET to keep the MOSFET on. Nov 1, 2021 at 12:47
• @Bimpelrekkie Thanks for the tips. As for point 1, that's taken care of. Point 3 is interesting. I mostly went for MOSFETS because of cost, my budget allowance for this isn't very large, but might be able to do it if it works. Adding in a high value resistor in series with the gate is something I haven't tried, so will give that a go. Thank you for your suggestions!
– MCG
Nov 1, 2021 at 12:55
• Why a square wave instead of a DC reference? Nov 1, 2021 at 13:02
• Instead of the ancient HEF4066 I mentioned, a more modern alternative is: 74HC4016 but there are plenty more if you search on Farnell etc. Nov 1, 2021 at 13:06

You may have trouble using MOSFETs as switches in that configuration, because they are all acting as source followers. This means that the source potential follows the gate (with an offset equal to $$\V_{GS(TH)}\$$ ≈ 2V), and the MOSFET is therefore a unity gain buffer rather than an on-off switch.

The on/off state of a MOSFET is dependent entirely on the voltage difference between its source and gate. As you have it, with the MOSFETs on the signal side of the divider, gate potentials guaranteed to switch completely on or off the MOSFET will vary with the input signal! The gate potential will have to be beyond either extreme of excursion of the input signal, and you will have to build some very special gate drive hardware.

The gate capacitance of a MOSFET is not the problem you believe it to be. It can certainly cause the on/off switching speed to suffer, but it can't determine to any degree how "on" or "off" the MOSFET is. I think in this application you should be more concerned with the "on" resistance $$\R_{DS(ON)}\$$ of the MOSFET.

The circuit below is a small adjustment of yours, with the transistors and resistors swapped. Now the sources are connected to the input signal, which prevents the transistors from operating as source followers, but it doesn't solve the gate control signal amplitude problem. The digital gate potentials must be guarateed to be higher than the highest input signal you expect, or $$\V_{GS(TH)}\$$ less than the lowest input potential you expect:

simulate this circuit – Schematic created using CircuitLab

Since you probably wish to be able to use standard 3.3V or 5V logic signals at the gates, to switch the MOSFETs on or off, you need the MOSFET source connected to a potential where those logic levels are guaranteed to produce states of $$\V_{GS} << V_{GS(TH)}\$$ and or $$\V_{GS} >> V_{GS(TH)}\$$. That usually means connecting an N-channel MOSFET with its source connected to ground (0V), a configuration called common source.

The following circuit will ensure that the MOSFETs are unambiguously on or off when the gates are presented with standard logic level potentials. They will behave as switches, open or closed, as you require. However, that simplicity comes at a cost - they are N-channel devices, common soource, and your sensor has to be on the high side:

simulate this circuit

• I had tried the high side sensor before earlier in this project. I cannot remember exactly why, but i went for low side for a reason. I'd have to try and find it in my notes somewhere, but I likely won't be going back to that configuration, although appreciate the suggestion. And the capacitance is the issue, as the MOSFETS are still switching fully on or off, it's because the speed is suffering the signal doesn't reach the level it is supposed to before going low again. After the high pulse, I wait approx 250µS before taking the reading. (about halfway through the high part of the 1kHz......
– MCG
Nov 1, 2021 at 13:36
• square wave. Because of this capacitance, the level is still rising by the time I take the measurement and the result is incorrect. I will try the suggestion of moving the resistor to the other side of the FET, see if that makes a difference, I'll have to see how easy it is to hack this PCB, or I'll have to wait until I can do a new one! I appreciate the answer, and the time taken to write it
– MCG
Nov 1, 2021 at 13:37
• don't you need ground in your schematic? Nov 1, 2021 at 13:42
• @MCG I cannot imagine how gate capacitance is an issue. Even if your gate drive signals had a source impedance of 10kΩ, the gate (with 2nF) would still reach the required potential within 50µs, way before you take the reading. I think you are seeing some other issue manifesting - that is, unless the source of gate potential is very high impedance, like over 10kΩ, which is never a good thing in any design. Instead of better MOSFETs, use a better gate driver. Nov 1, 2021 at 13:44
• @vicatcu Ooops! Thanks! Nov 1, 2021 at 13:45

CMOS analog switches are the typical choice with various RdsOn. The lower the maximum Vdd rating, generally the lower the RdsOn from 1k to 10 Ohms. 74HC's might be suitable https://www.mouser.com/c/semiconductors/switch-ics/analog-switch-ics/?q=4066&sort=pricing

## Details

Depending on noise immunity for stray C, you may prefer to connect the common inputs to a low impedance source rather than the high impedance input of a CMOS Op Amp , loaded by sensor.

Think about CMRR of the cable noise and balancing impedance as a differential input. This gets more challenging from a long sensor cable.

• I have been looking at a few of these. I am not too worried about the RdsOn as I can calibrate out this part. And what do you suggest as a low impedance source? Bearing in mind this result will eventually have to be read by an AtoD, hence buffering with an op-amp first in my original schematic
– MCG
Nov 1, 2021 at 13:25
• The sensor itself isn't the issue, it should be noted as this problem happens even when the sensor is open circuit, and only on the 100k range
– MCG
Nov 1, 2021 at 13:27
• If you want 1% accuracy R ratio tolerances matter. But if you want 10 bit accuracy then everything has to be better than 0.1% ratio Nov 1, 2021 at 13:27
• Accuracy isn't my focus right now. I can calibrate things out. I'm mostly concerned with getting a clean square wave out of the op-amp
– MCG
Nov 1, 2021 at 13:31
• You have to add parasitic C to each node and determine RC response times for various R to determine the best config. Variable gain, attenuator or unity gain-passive R Nov 1, 2021 at 13:34