Arduino Capacitance Meter Resolution

I worked out the theoretical resolution of the Arduino Uno capacitance meter using a spreadsheet. Resolution is the ability to distinguish between nearby values; It is not the same as accuracy. In a way, accuracy can be viewed as an absolute error, whereas resolution is relative error.

I started with a 10% resolution:

CapTestRes_all

I then looked at 5%:

CapTestRes_5percent

Then 1%:

CapTestRes_1percent

And finally the 0.5% level of resolution:

CapTestRes_0p5percent

Unsurprisingly, the best resolution is at about 25pF. This is because C1 is 24.48pF. So when CT = C1 the error will be at its minimum. I think 5% is a reasonable level, so would suggest using this for capacitors between  0.5pF and 1.3nF (1300pF). Larger capacitors could be measured by adding additional capacitance to C1, but care should be taken because larger capacitors would take longer to reach a steady state condition, and delays in the code may become necessary.

The resolution drops off pretty rapidly below 0.5pF, so this is worth looking at in more detail:

CapTestRes_0p5pF

This clearly shows that you could get useful measurements down to about 0.1fF (0.1pF), but in tests I found that the stray capacitance between A0 and A2 was being displayed at about 100fF. You can improve the low end resolution by using pins that are further apart – e.g. using A0 and A4 rather than A0 and A2. This reduces the stray capacitance between the pins.