Capacitor Measurement


Closed Thread
Results 1 to 11 of 11
  1. #1
    Join Date
    Aug 2005
    Location
    Houston, TX
    Posts
    43

    Default Capacitor Measurement

    I saw an article in "Nuts & Volts" about a capacitor test device based on the discharge time of a capacitor. It occurred to me that the pot command would work in the same manner, and be much easier to assemble.

    With a 16F84A chip, I gave it a try, and it works, within limits, very accurately. I have an old Heathkit Capacitor substitution box, and my bread boarded effort is dead on from 100pf to 1uf.
    Anything below 100 pf returns 0, even with a 10meg discharge resistor.

    Above 2.2uf, I get a return, but it has no relationship to the cap's value. A 220uf cap might return 90uf, while a 47uf might return 148. I tried discharge resistors as small as 1 Ohm. Any return is useful, as open and short both return 0, but I would like to get a measurement over 2.2uf. And I would like to get a measurement below 100pf as well.

    I tried adjusting the prescaler, but it had no effect on my results. I am using a 4mHz resonator. Perhaps a faster clock would help the low end?

    For caps from 2.2uf - .001, I am using a 1k discharge resistor and a scale of 40. For 1000pf to 100pf, 20k and scale at 255.

    I suspect that internal resistance of the high value electrolytic affects their discharge curve in a way that confuses the chip. I get better results with tantalum caps, but they are still off 50 - 100%. And, perhaps any charge on a very small cap is lost during the time the chip switches from charge to measure.

    The author of the article claims better than 1% accuracy, 1pf to 999uf, but I wonder.

    The program is attached. I will provide a schematic when I draw one if any are interested.

    Any thoughts?

  2. #2
    Join Date
    Aug 2005
    Location
    Houston, TX
    Posts
    43


    Did you find this post helpful? Yes | No

    Default Program

    I tried to attach it, but it didn't happen. I'll put it here.

    ' Capacitor Measurement
    ' Four digit common anode mulitplexed display
    ' Scan about 60/s (4ms pause)
    ' Driver 74HC4511
    ' Works for 2.0 uf (1K)- 100pf (20K)
    ' 8/20/06
    ' For 16F84A Chip
    ' Data output port A (Pin A5 NC)
    ' Pins 1 - 4 - Digit select for multiplex
    ' Pin5 - pot command
    ' Pin6 - Display Blanking signal (0 = blank)
    ' Pin7 - Range 1 = high value (1K resistor); 0 = low (20K)
    ' Digits 1 - 4; W1 - W4
    ' Measurement (Msr) W10

    Settings:
    Symbol Blank = pin6
    Symbol Range = pin7
    Symbol D1 = w1
    Symbol D2 = w2
    Symbol D3 = w3
    Symbol D4 = w4
    Symbol Msr = w10
    Symbol PortA = 5
    Poke $85, 0 ' Set port A to all outputs
    Output 1 ' Digit 1 - MSD
    Low 1 ' off
    Output 2 ' Digit 2
    Low 2
    Output 3 ' Digit 3
    Low 3
    Output 4 ' Digit 4
    Low 4
    Output 6 ' Blanking
    Low 6 ' Blank all segments


    Start:
    pause 750
    Blank = 0
    If range = 0 then testlow 'Check high or low state

    'Testhigh:
    pot 5,40,msr
    Msr = Msr*10 'Raise results for 4 digit display
    goto math

    Testlow:
    Pot 5,255, msr
    Msr = Msr*100

    Math: 'Set up digits in memory for display
    D1 = Msr/1000
    D4 = Msr//1000
    D2 = D4/100
    D4 = D4//100
    D3 = D4/10
    D4 = D4//10

    Display:
    poke porta, D1 'Send data
    High 1 'Select Digit
    Blank = 1 'Remove blanking
    Pause 4 'Pause
    Blank = 0 'Blank
    Low 1 'Unselect digit

    poke porta, D2
    High 2
    Blank = 1
    Pause 4
    Blank = 0
    Low 2

    poke porta, D3
    High 3
    Blank = 1
    Pause 4
    Blank = 0
    Low 3

    poke porta, D4
    High 4
    Blank = 1
    Pause 4
    Blank = 0
    Low 4

    Goto display
    end

  3. #3
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    AMay, I personally would tend to use a constant current source with the RCTIME function. That way you can measure the timing between 2 points with the cap charging at a fixed rate (much more linear). Remember that the resultant range can not be greater than 0 to 65535 so you will probably have to use different current levels to maintain accuracy over large ranges 100Pf to 100 uF. I have used this methode for measuring the backup storage of airbag modules capacitors in production equipment with great success. LOL

    Dave Purola,
    N8NTA

  4. #4
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    >> caps, but they are still off 50 - 100%.

    Bear in mind that unlike Resistors, Capacitors are pretty much guaranteed NOT to be the value printed on them. With most Capacitors, if you're within 20% of what they're supposed to be, you've got a good one!

    So, if your gizmo is telling you it's 50% off... it could actually be telling you the truth!

  5. #5
    Join Date
    Aug 2005
    Location
    Houston, TX
    Posts
    43


    Did you find this post helpful? Yes | No

    Default RCTIME function

    Thanks for the response.

    I can imagine a constant current source.
    I can imagine starting it, and stopping it with a comparator.
    I can't imagine how to time the interval in PIC basic. The books I have don't help, or I am not looking in the right place. (I am just a retired bookkeeper having fun with this.)

    I don't want to get involved with a separate counter. The author who got me started on this ran into all kinds of stability problems with his on the small caps.

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Wink Elektor !!!

    Hi,

    Some times ago, Elektor published a nice project about a capacitance meter; It's not PbP, but fairly works ...

    Project N° 020144 ... Programmed PIC and PCB available.

    Good choice ... if for measuring !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7


    Did you find this post helpful? Yes | No

    Default

    here's a good one but it's not basic either
    http://www.ubasics.com/adam/pic/archive.shtml
    Autoranging Digital Capacitance Meter .01pF to 16,777.215 uF
    by Fr. Tom McGahee
    it's at the bottom of the page

  8. #8
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Smile Modern Electrolytic Capacitors - Nothing To Fear!

    Quote Originally Posted by Melanie View Post
    >> caps, but they are still off 50 - 100%.

    Bear in mind that unlike Resistors, Capacitors are pretty much guaranteed NOT to be the value printed on them. With most Capacitors, if you're within 20% of what they're supposed to be, you've got a good one!

    So, if your gizmo is telling you it's 50% off... it could actually be telling you the truth!
    Many books quote it, I even recall one of my old tech teachers saying it: "Electrolytic capacitors have a huge varying degree of tolerance" But in practice, I have never measured any capacitor with a +/- 20% tol. I have however measured many of them faulty with very high ESR, which is a common fault with electrolytic capacitors used in switch mode circuitry. Sometimes, an extremely high ESR – near open circuit – will result in a somewhat lower capacitance measurement. All and all, I think modern-day components have traveled miles ahead. In reality, today, +/- 20% tol with anything would be very seldom.

    Regards,
    Trent Jackson

  9. #9
    Join Date
    Oct 2005
    Location
    Loveland CO USA
    Posts
    83


    Did you find this post helpful? Yes | No

    Default Heathkit Capacitor substitution box

    I have old Capacitor substitution boxes dating back 50 years. (20 years for the Heathkit boxes) Large capacitors 2 to 470 uf do not last many years. I replaces all the large capacitors in my HeathKit radio 10 years ago. I have some capacitor boxes where one decade failed because of a bad switch. “Anything below 100 pf returns 0, even with a 10meg discharge resistor.“

    I think you should go to the store [DigiKey] and get some capacitors you know are good

  10. #10
    Join Date
    Oct 2005
    Location
    Loveland CO USA
    Posts
    83


    Did you find this post helpful? Yes | No

    Default measure cap.

    1)
    I have used a NE555 IC + R + unknown Capacitor. The 555’s time is dependent on capacitor. The PIC measures time and drives a LCD display. A one-shot [multivibrator] converts capacitance to time. [74LS221]
    2)
    I built a C & L meter based off a kit. I measure well under 0.1pf.
    http://my.integritynet.com.au/purdic...er-project.htm
    It uses an oscillator and reference coil and two reference capacitors.
    The oscillator oscillates at C1= 680pf and L1= 68uH or .01uf and 68uH.
    An unknown capacitor is placed across the reference capacitor. If the unknown cap is 1pF then the frequency changes by square root (681/680). If the unknown cap is 1000pf then the new frequency is a product of 1680pf and 68uH.

    The math is hell.
    I measure the inductance of inches of wire or tiny ‘gimmick’ capacitors (1pf).

  11. #11
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Wink Another link

    http://www.electronics-diy.com/lc_meter.php

    here ... soft available !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts