As you can see from my previous question, I am trying to measure resistance within the range of 200k-60 ohms (around 4-5 decades). I will be using a pulse (5us pulse width and 50ns each rise and fall time) voltage source of 200mV (max) across the RUT (resistor under test) and measuring the pulse current using a TransImpedance Amplifier (TIA).
Now I am planning for a programmable gain TIA and here is the below circuit.
I have chosen 4 approximate switchable gain of around 430, 4.3k, 43k, 430k that is good enough to measure the above-mentioned resistance range. In the circuit, I have used an ultra-low input bias current and low input capacitance opamp LTC6268 with ±2.5V supply followed by an inverting amplifier (LTC6228) with a gain of 3. The output of this opamp goes to a bipolar input ADC[AD7606C-18](hence inverting is not really needed but still I kept it for now) The switch is ADG613 (4 SPST switches) with low charge injection and low on/off source/drain capacitance (5pF each at Freq=1MHz).
There are 4 resistors connected to 4 switches. The voltage sources V8, V7, V6 are 3.3V digital pulses (more like digital steps, see point '1' below) to turn connect/disconnect the 430k resistor, 47k resistor, 4.7k resistor, and the 430 ohms resistor respectively. V9 is just a dummy here since the 430k resistor is always connected (the trigger is connected to the ground permanently). Now one may question the value of the resistors which are not the same as my gains. The reasons are:
- I'll be changing the gain by adding (using the switches) resistors in parallel by connecting them one after another (higher to lower) without disconnecting the previous one and taking the equivalent resistance (from the highest to the current lowest) and hence the equivalence gain. The voltage sources V8, V7, V6 act like digital step trigger for the switches activating them one after the other with a certain delay. Instead of switching one resistor on at a time, I saw that this approach reduces glitching a bit.
- Doing some trial and error in the simulation I found that when considering approach '1' and the internal resistance of the switch (which is modeled) the chosen set of resistors give a fairly decent approximation of the above-mentioned gains.
I'll be using 4 pulses for single resistance measurement and during those 4 pulses approach '1' would be used (i.e. connecting a new lower value resistor at each pulse to give a new equivalent gain), which would give me four different results and using software thresholds I can choose one of the 4 readings to get an accurate measurement.
Here are some results when trying different decades of RUT 60 ohms, 600, 6k, 60k, 600k in the respective order. V(n008) is the output (in green). V(n009) is the input pulse (in grey) and the rest (V8, V7, V6) are triggers of the switches. The output will be sampled only during the input pulses so glitches due to switching are not a real problem as long as they settle before the actual input pulse. Here is another set of results (switch trigger voltages are hidden) showing the glitches more clearly. The parameters are exactly the same as the previous result.
As you can see for smaller resistances the higher gains make the opamp reach saturation and therefore I have chosen a meaningful range of 4V and 0.4V for measurement in any decade to be valid (software threshold as mentioned before).
So all these look good in simulation but before putting it in the PCB, I want to know your opinion of the required changes and consideration required to achieve this simulation behavior as close as possible with actual non-ideal PCB. I mean things like adding capacitors across resistors as compensators (if required) to prevent ringing at the output, maybe some noise consideration, or some additional passive components for any other purpose.
I also understand that using 5 resistors would be ideal but I am okay with a small decrease in resolution around 200k resistance (a change of 1k results in 7mV change, which is still easily measurable) So I chose 4 resistors.
Edit: After adding parasitic capacitance of the switch (5pF each for source and drain), I was getting oscillation in my simulation for pulses when the lowest gain resistor was connected (when measuring higher RUT values). I know I won't be using that reading (I would be using readings from higher gain resistor for high RUT values) but if my opamp is not stable then it could cause my whole system to be unstable. I somehow fixed the issue by adding different decades of parallel capacitors across all the Feedback (gain) resistors as shown here (the pic also shows the parasitic switch capacitance). The values were chosen with trial and error. After this, the oscillation didn't occur. Is this the right way to do it? Would this work? Could someone explain what is happening here? How can I improve it?