A
amdx
Guest
Here is an Arduino based Capacitance meter, requires zero additional parts.
 \"Update: I have managed to increase the range, so it can measure
capacitances of less than 1pF to over 1000uF , still with no external
components!\"
\"The circuit is surprisingly easy. In fact there isnât a circuit now.
Weâre going to use the Arduino as follows:
The code above loops round every half second, applying a 5V pulse to the
capacitor, and measuring the voltage of other side.
It then prints out the calculated capacitance (and raw ADC value).\"
\"We will use the ADC to measure VA0. VA2 (input of a capacitance divider
) is actually 5 volts, Â so VA0 will vary from 0 to 5 volts, but, we can
use the ADC value instead,
 to make the calculations easier. Obviously we should then use the
maximum ADC value (1023) for VA2.
 The ADC readings we can expect will range from about 33 for CT = 1pF
to about 993 for CT = 1nF (1000pF).\"
\"If we try this out it wonât be very accurate. That is because the stray
capacitance isnât exactly 30pF. So we need to calibrate it.
I did this with a 100pF capacitor. My multimeter reckons that it
actually has a value of 102pF. The reading I get on my Arduino board is
125pF
 (raw ADC value 825). So if we put VA0 = 825, VA2 = 1023 and CT = 102
into the second equation, this tells us that C1 is 24.48pF.
So I changed IN_STRAY_CAP_TO_GND to 24.48 and uploaded this to the Arduino.\"
So, you will need a Very low tolerance Capacitor to adjust stray
capacitance in programing.
       Thought some might find this interesting,
                                                Mikek
https://wordpress.codewrite.co.uk/pic/2014/01/21/cap-meter-with-arduino-uno/index.html
 \"Update: I have managed to increase the range, so it can measure
capacitances of less than 1pF to over 1000uF , still with no external
components!\"
\"The circuit is surprisingly easy. In fact there isnât a circuit now.
Weâre going to use the Arduino as follows:
The code above loops round every half second, applying a 5V pulse to the
capacitor, and measuring the voltage of other side.
It then prints out the calculated capacitance (and raw ADC value).\"
\"We will use the ADC to measure VA0. VA2 (input of a capacitance divider
) is actually 5 volts, Â so VA0 will vary from 0 to 5 volts, but, we can
use the ADC value instead,
 to make the calculations easier. Obviously we should then use the
maximum ADC value (1023) for VA2.
 The ADC readings we can expect will range from about 33 for CT = 1pF
to about 993 for CT = 1nF (1000pF).\"
\"If we try this out it wonât be very accurate. That is because the stray
capacitance isnât exactly 30pF. So we need to calibrate it.
I did this with a 100pF capacitor. My multimeter reckons that it
actually has a value of 102pF. The reading I get on my Arduino board is
125pF
 (raw ADC value 825). So if we put VA0 = 825, VA2 = 1023 and CT = 102
into the second equation, this tells us that C1 is 24.48pF.
So I changed IN_STRAY_CAP_TO_GND to 24.48 and uploaded this to the Arduino.\"
So, you will need a Very low tolerance Capacitor to adjust stray
capacitance in programing.
       Thought some might find this interesting,
                                                Mikek