Current measurement circuit
It is sometimes hard to get into the mind of a designer. Especially, for someone like me who is merely a hobbyist with very modest practical experience in electronics.

But to my eyes the NFET must have been added for a reason. Otherwise, if it's just a current to measure then simply driving that current through a resistor would be sufficient to create a measurable voltage and that would be that.



Let's call the unknown current, \$I_X\$. \$R_{251}\$ and \$C_{256}\$ have a \$\tau=4.7\:\textrm{ms}\$. If you wait several \$\tau\$, the voltage at the input of the follower will settle down and the ADC's measured voltage will then be \$I_X\cdot R_{250}\$. By itself, that alone might be good enough. So why the NFET, at all? Well, obviously so they could turn it on and off. But why?

That's really the only question. And I think the answer isn't terribly complicated. The answer, I think, is found by simply asking yourself what happens when the NFET is off.



With \$R_{250}\$ disabled when the NFET is off, the current is mostly sunk by \$C_{256}\$ (which obviously dominates.) And assuming there are no other unknown sinks or sources, the voltage of \$C_{256}\$ will simply rise upward limited only by whatever compliance voltage sits above your PTC.

But what if you aren't sure about "other sinks or sources?" What if you want to be sure that you can measure any extraneous bias currents from the opamp follower, for example?

Well, if you assume there is another current at the opamp follower's input node, let's call it \$I_{BIAS}\$, then you do have a problem. Especially when trying to measure small currents where a bias current might be important.

Bear in mind that the maximum bias current for the LMV772 is \$250\:\textrm{pA}\$. Given that you are discussing currents on the order of \$10\:\mu\textrm{A}\$ and possibly smaller, that's a significant error value that may very well need to be nulled out!

In that case, your NFET=ON measurement will actually be measuring the ADC value \$V_X=\left(I_X+I_{BIAS}\right)\cdot R_{250}\$. How can you work out the error? Well, just turn NFET=OFF. Then the voltage will rise upward on a nearly linear ramp due to the combined currents. The slope of the voltage at the ADC will be \$\frac{\textrm{d}V}{\textrm{d}t}\approx \frac{I_X+I_{BIAS}}{C_{256}} \$.

So this means you can get the following two equations:

$$\begin{align*}
I_X+I_{BIAS}&amp;= \frac{V_X}{R_{250}}\\\\
I_X+I_{BIAS}&amp;=\frac{\textrm{d}V}{\textrm{d}t} C_{256}
\end{align*}$$

The value for \$\frac{\textrm{d}V}{\textrm{d}t}\$ can be derived by using a pair of sums of ADC values and computing the slope from a basic slope equation:

$$\frac{\textrm{d}V}{\textrm{d}t} = \frac{n\sum x_i y_i - \sum x_i \sum y_i}{n\sum x_i^2-\left(\sum x_i\right)^2}$$

(where \$x\$ is time and \$y\$ is the ADC measurement.)

Given \$N\$ measurements, that value can be computed and the noise will be squeezed down by the \$\sqrt{N}\$ samples. So if a similar number of ADC measurements are also made for the first equation's result (and averaged, obviously, to get \$V_X=\frac{1}{N}\sum y_i\$) then there will be rough noise parity between the two sets of measurements.

With two equations and two unknowns, both can be resolved now and the truer value for \$I_X\$ determined -- without the confounding \$I_{BIAS}\$ polluting the result as much as before.



Once those two pairs of measurements are made, the process repeats. They turn the NFET back on and wait a bunch of \$\tau\$s until the voltage settles down again. Make some measurements to get an average value for \$V_X\$, and the turn the NFET back off, etc. Just that, over and over.



That's what struck me instantly when looking at the circuit, anyway. I went from "Hmm. Switch. Must be used. So what does it mean when it is OFF?" to "Oh, there is a voltage slope then. Hmm." That's all my mind did, really. I may be wrong, of course. And someone with better experience and more training (I haven't even taken so much as a DC electronics course) may certainly point out my errors here.