Building a capacitance meter is a great exercise. If you’re feeling quite safe in your digital-circuit-only life, this will push just far enough out of the comfort zone for you to see there’s nothing to fear in adding analog circuits to your designs. Here, [Raj] compares a voltage divider and RC timer to calculate the value of a capacitor. The project is aimed at teaching the concepts, and will be easy to follow for anyone who has at least a bit of experience working with a programmable microcontroller.
The meter is based on an established equation that uses are starting and ending voltage, as well as the time it took to transition between the two, to calculate capacitance. The capacitor will be charged from 0 volts to 0.5 volts. Using the built-in analog comparator is the easiest way to do this. [Raj] breadboarded a voltage divider to establish a 0.5V reference on one of the comparator’s pins. The other input comes from a circuit that places a resistor in line with the capacitor being tested. When that reading rises above the 0.5 volt reference the comparator match will be tripped, stopping a timer that had been running during the charge cycle. From there it’s just a matter of using the timer value in the calculation.
I’d love to see this taken to the next level by giving it the ability to charge to *actual* rated or circuit voltage… Running a cap at a higher voltage will result in different measurement. So, having an option to pick the charge voltage would be great. Of course, that wouldn’t necessarily be cheap.
This project is straight-forward and cost effective, so I’ve got to give it props for what it does. Nicely done!
Can you explain how a different voltage will result in a different measurement?
I don’t remember learning that in college.
For a number of materials, a voltage across the material will change the small-scale structure enough to affect the dielectric constant. (Supercap dielectrics don’t even really have a structure until the electric field is present.)
The voltage effect is more significant in semiconductors, where the parasitic capacitance is strongly controlled by the voltage across the junctions. Enough so that they are used as voltage controlled capacitors, and thus enable things like cheap voltage controlled oscillators.
I never learned in school, but learned later in life working as an engineer, that ceramic capacitors lose a lot of their rated capacity (as much as half) when run close to their maximum rated voltage. The rule-of-thumb I was given was to go no higher than 80% of the component’s rated voltage, where the capacitance loss isn’t significant.
As already stated, this is true. I also learned this after my schooling and during my professional EE career. Some manufacturers can provide capacitance derating curves for their capacitors. I’ve rarely seen them on datasheets, but at work we receive them for all of our ceramics due to this.
I work in a high temperature and high pressure/vibration industry, and we constantly run up against this issue. Capacitance of many dielectrics derate significantly at high temperature (I’m talking up to 180-200 C) this, combined with the derating due to voltage, becomes incredibly important in these situations.
I can’t recall this from school either, but the time component is as important as the voltage. Anyway inexpensive microprocessors and the tools to use them weren’t around, so this wouldn’t been around to learn 35 years ago.
You hardly need to change the analog circuit at all for variable voltage, little or no change to the software (which I didn’t examine).
The HaD text is wrong: the device doesn’t measure charge time to 0.5 volts, it measures charge time to 1/2 Vc (1/2 V+ or 2.5v), so changing the test voltage is easy.
RC time constants are independent of voltage. Since the device uses the same Vin for reference divider and DUT charging and a true comparator, the timing eq is the same: you reach 50% Vcharge in the same time, regardless of input voltage.
Not knowing the allowed voltage on the PIC supply or the comparator input (does it go rail-to-rail or even beyond), I can’t say if you can simply make the PS adjustable from 5-12V, or need to jumper it to an external PS, but either way would probably work.
With the resistor values given, you don’t need to worry about the added power dissipation at V+ = 12v (Vth=6v) or thermal effects of common carbon resistors. 1/8 or 1/4W will handle it.
To test at DC voltages much above 12v, change the ratio of the reference voltage divider and add 2 resistors as a voltage divider between Cx and RA1 (e.g. compare 1/16th V+ to 1/8 Vcx; instead of 1/2 V+ to Vcx)
had a very similar circuit in multiple power factor correction production lines in a former client’s location.
didnt actually measure CAP, really was a Charge/Discharge time comparison to a STANDARD.