Thankyou as always for your excellent replies Kleinstein. You are a wealth of knowledge and I always enjoy your rich with experience feedback.
The nominal offset of the OPA192 is good, but the drift is not that great. So I would not consider the OPA192 a really good choice.
Quite right, did not notice the drift. I'll stick with OPA189 then for first OP.
The 5K resistor in the FB is relatively small. At higher currents one would get quite some heating of the resistor and the OP. So the TIA already starts showing weaknesses from some 1 mA on.
I think I misunderstand here, are you suggesting 5k is too small or too large? I agree, at 5k, only good up to ~1mA, or too much heat dissipation. Will reduce that to 1k. Its difficult to find a balance of getting good resolution at nA range, but still have higher ranges available. 1nA*1k = 1uV, then gained to 5uV on next stage so I guess that's ok. At 10mA that's (.01^2)*1k = 0.1W, that's doable. Will split 1k into two 500R for good margin.
The composite amplifier at the output has some flaws: the switches are in series with the gain setting resistors. So the gain would not be very stable.
Do you mean because of changing Rds_on of the switches due to temperature? I considered that, but according to the datasheet for MAX4614 the on resistance flatness is 1 Ohm over 0-85 C. So 1R change out of the smallest leg, 7.2k, is not too much. Then that in parallel with the other legs makes it very small change. I see what you mean though. I just looked at HC4052 datasheet and it changes on resistance by a factor of 3 over the temp span. That would definitely lead to unstable gain!!
There are usually better ways, e.g. by having the divider at the output side and only switching the feedback path to the OP.
Oh I see what you mean, got it- divider string of resistors, and switching tapped resistor to inverting input. Makes sense and then the switches don't carry current. Cool.
With a fixed gain for the inner amplifier the low gain setting will likely have a stability problem. So usually one has to switch the gain of both amplifiers: one MUX (e.g. 1/2 of HC4052) for the inner amplifier and the other halt for the total gain. Usually the gain of the inner amplifier should be a little lower than the total gain. Only at very high total gain the inner gain should be limited to about 1/3 the GBW ratio of the OPs times the square root of the total gain.
I see littel need for so many amplifier settings: the full scale voltage for the shunts is usually relative fixed and thus not much gain switching needed.
The TIA output is more like a high voltage and thus no need for the extra fixed amplifier stage after the TIA. It would be more that one could consider a divider to get levels comparable to the shunts. So the switching would be choosing the shunt path, the TIA direct and the TIA with a divider.
I agree not so many amplifier settings are needed.
Figure for 1nA we get 5uV out of TIA, it would be nice to have 1000 gain to get to 5mV for ADC. Then have a good span 1nA-900nA (5mv-4.5V), with 1000x gain
Now 1uA, takes us to 5mV already, don't need any more gain in microamp land
1mA, well that requires attenuation as you suggested. Ok, will fix that part.
As usual Kleinstein, you are totally right. Changing to fixed gain for shunts, and attenuation for TIA. With fixed gain of shunt amp will set the gain of the second OP higher. Thank you as always, you are very helpful!