I need to measure current through a microcontroller at high side, with about ~1 µA resolution, ranging from 1µA to 25mA. The result is sampled by a microcontroller and sent to a computer or an on board display. The sampling speed I need is about 500kHz.
The problem I am facing is that the linearity of the gain when the current drawn is in the one digit µA area is quite unlinear. Say my amplifier circuit (consisting of simple op-amps) has an amplification of 800, the actual amplification is around 1000 at 1-3µA, and closer to 800 at 9-10µA.
I guess this is due to the power drawn by the operational amplifiers themselves in some way, so I tried to preamplify the signal with LTC6102 first and then feed this into my opamp circuits (one circuit per range of current), but still I struggle with non linear amplification even from the LTC circuit.
I have been in contact with Linear, and they propose a buck boost converter with integrated coloumb counter, but this is I2C and cannot give me the speed I need for sampling.
Are there any examples of circuits that can actually measure these tiny currents while still maintaining the sampling speed? I don't have the schematics right now, but can provide later. I just had to ask right away cause I cannot get this problem out of my head.