is this a stupid way to measure capacitance? - Page 1
Forum section: electronics / projects

author: Gibson486
author_rank: Frequent Contributor
timestamp: October 29, 2020, 09:04:20 pm
content: It seems simple, but maybe not a good idea....Send a signal through the cap in question and a resistor in series after (a HPF). With a scope, measure the voltage across the resistor. You know the voltage in, and you measured voltage is the voltage out and you know what resistor you used. The series configuration makes a voltage divider, so we can solve for impedance Z... vo = vin (r/(r+z)). From impedance Z, we can now find what the capacitance value is. I am trying this now, but it seems pretty inaccurate....maybe this is a foolish way to do this? You need to adjust the r value depending on what the cap range is, so I have been doing that as well.

author: tmadness
author_rank: Regular Contributor
timestamp: October 29, 2020, 09:14:07 pm
content: Sounds reasonable. Only issue I see is that if your frequency is < the corner frequency you will not see any appreciable reduction in amplitude (unless you really know what voltages go in and out).

author: bson
author_rank: Unknown
timestamp: October 29, 2020, 09:24:29 pm
content: The voltage on the resistor will be Vr = Vin*(1-e^(-t/RC)), basically the RC discharge curve. Solving for C; C = -t/(R*ln(1-VR/V0)) where V0 is the starting voltage. So for example R=10kΩ, V0=5V, t=50ms, and the final voltage at 50ms over the resistor is 3.5V, then C = -50m/(10k*ln(1-3.5/5)) = 4.15µF.

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 29, 2020, 09:42:30 pm
content: It's not unreasonable as tmadness said, but the key is 1/ to select a proper frequency so that the module of the impedance of C is not too far from the resistor's value. The point 2/ is that using a scope for that is unfortunately a bad idea. Scopes are not accurate devices for measuring voltages. At all. You need something more accurate. If you want to use this method, I'd suggest using some true RMS multimeter instead, and make sure the test frequency is within said multimeter's specs. Since the multimeter would be the limiting factor, it probably makes more sense to select a reasonable test frequency first, and then select a resistor value with the above criterion. If all you have is a scope, you should at least try and set it in some averaging mode that enhances voltage accuracy (read your scope's manual.)Another method is to get in the time domain and measure the charge/discharge of the capacitor. This also requires accurate enough measurements, but it would be slightly less taxing, as solving for C involves a log, which should get you less error relative to the error on the voltages, if my memories on error estimation are correct.

author: TimFox
author_rank: Super Contributor
timestamp: October 29, 2020, 09:51:54 pm
content: This should work, assuming you are using a sinusoidal signal, but it's not clear from your equation if you are doing the complex algebra (real and imaginary) part right.For good accuracy, assuming an oscilloscope, you want the resistor (including the input resistance of the oscilloscope) to be smaller than the capacitor reactance, at the frequency of operation (which you should adjust to achieve this).If the reactance of the oscilloscope input capacitance (including any cables) is not very high with respect to the resistance and capacitive reactance, you must modify the equation to include it.

author: Gibson486
author_rank: Frequent Contributor
timestamp: October 30, 2020, 02:29:04 pm
content: Quote from: SiliconWizard on October 29, 2020, 09:42:30 pmhahahha....I never saw an oscope as a inaccurate measurement for voltage. Makes sense, though. I was trying to do this to fully automate this since the real project has 20 measurements on one device. I guess I could buy a DVM that has serial out, but maybe being inaccurate is a standard that I have held my self to that I really did not to need to do. Maybe I can get away with just doing a reference and measuring from there? Not sure, I will have to figure it out as I go along...Thanks!

author: Mechatrommer
author_rank: Super Contributor
timestamp: October 30, 2020, 07:41:40 pm
content: Quote from: Gibson486 on October 30, 2020, 02:29:04 pmjust buy a dedicated capacitance meter to save time and food. china L&C meters are cheap enough and can measure down to pF. DSO cant do that easily.

author: Conrad Hoffman
author_rank: Super Contributor
timestamp: October 30, 2020, 08:46:27 pm
content: It's a perfectly fine method as long as losses are low and you don't need to measure them, which is true most of the time.

author: TimFox
author_rank: Super Contributor
timestamp: October 30, 2020, 09:10:30 pm
content: Again, in your original equation, R is real but Z is imaginary (neglecting loss), so the equation using only magnitudes needs to be a complex calculation.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: October 30, 2020, 11:03:35 pm
content: If you just want to measure capacitance, some ready made meter is simpler and cheap enough.If you like it as a project. Sure, lots of areas to have fun with...Your way of measurement is close to the way that LCR meters tend to work, especally the higher end versions.You have not specified what "signal" you want to use to measure your capacitor.A sine wave is the most logical signal, and sine waves these days are "easy" (and accurate) to generate with a DDS chip.With a DDS chip you have the added benefit that you can easily adjust the test frequency.You probably get the most accurate results if you let a uC iterate to a frequency that results in a 45 degree phase shift, which means the impedance of the capacitor (at that frequency) is equal to the series resistor.You can also measure other parameters this way such as the ESR of the capacitor.And the measurement hardware for inductors is pretty much the same, only he phase shift is in another direction.

author: ledtester
author_rank: Super Contributor
timestamp: October 31, 2020, 04:02:37 am
content: Compare what you get against this sound card lcr meter:http://www.rcl-meter.strobbe.org/or this one:https://daqarta.com/dqdown.htm(free 30-day license)with this plug-in:https://daqarta.com/dw_0o0z.htmor this one:https://www.virtins.com/multi-instrument-LCR-meter.shtml(21-day free trial)

author: 741
author_rank: Frequent Contributor
timestamp: October 31, 2020, 06:08:39 pm
content: How about making an oscillator, even just a 555 type, and calibrating frequency to capacitance... Admittedly that needs a frequency meter or similar.Or the Schering Bridge (https://circuitglobe.com/schering-bridge.html) maybe?

author: pwlps
author_rank: Frequent Contributor
timestamp: October 31, 2020, 06:19:39 pm
content: You might have a look at this recent thread where many options were explored :https://www.eevblog.com/forum/projects/stable-and-fast-measurement-of-variable-capacitor/

author: David Hess
author_rank: Super Contributor
timestamp: November 02, 2020, 03:17:28 am
content: What you suggest is adequate for moderate levels of accuracy but is limited by the total of many error sources compared to the alternatives. Sampling is inherently less accurate than integration. Voltage measurement is less accurate than frequency measurement. Absolute measurements are less accurate than differential null measurements. The measurement you are describing is a large signal measurement so more susceptible to picking up voltage coefficient of capacitance and dielectric absorption.