Capacitance Meter demo on VGA
Peter Jakacki
Posts: 10,193
Last night I was sorting out some SMD parts off their reels as I was making up a new prototype. To save myself time I placed the various components down into their respective places onto the overlay sheet so it would be ready for assembly. This was to save time as I would otherwise manually pick and place from my prototyping component bins (pill boxes).
So there were all these components neatly laid out on the paper sheet (which I never really do) and it was important not to knock anything because most of the smd capacitors look the same and have no markings. Well, guess what? I immediately knocked the sheet (dumbo) and the caps were everywhere.
What could I do? Well, I could just scrape the parts into a "dunno" bin and just use new parts. But I thought "What I need is a capacitance meter so I can probe these little parts". I do have a DMM with capacitance function but it's made for parts with long leads etc. So I thought I would go one better and just hack some code I had for the RPM display and get it to display capacitance. In less than an hour it was up and running.
Here's the result
It's rough and ready but surprisingly good. Try it yourself and just uncomment the "#define demoboard" and specify your test pin on line 159. The code will autorange and hold as well as smooth out the reading etc. I might do some further enhancements and get it to automatically detect and measure resistance, capacitance, and inductance, why not?
EDIT: Updated the archive and added an extra feature that displays the three digit cap code so 100nf also reads as "104"
So there were all these components neatly laid out on the paper sheet (which I never really do) and it was important not to knock anything because most of the smd capacitors look the same and have no markings. Well, guess what? I immediately knocked the sheet (dumbo) and the caps were everywhere.
What could I do? Well, I could just scrape the parts into a "dunno" bin and just use new parts. But I thought "What I need is a capacitance meter so I can probe these little parts". I do have a DMM with capacitance function but it's made for parts with long leads etc. So I thought I would go one better and just hack some code I had for the RPM display and get it to display capacitance. In less than an hour it was up and running.
Here's the result
It's rough and ready but surprisingly good. Try it yourself and just uncomment the "#define demoboard" and specify your test pin on line 159. The code will autorange and hold as well as smooth out the reading etc. I might do some further enhancements and get it to automatically detect and measure resistance, capacitance, and inductance, why not?
EDIT: Updated the archive and added an extra feature that displays the three digit cap code so 100nf also reads as "104"
Comments
What VGA pixel ratio is that, as it does not look like the usual aspect ratio ?
PAL? All the analog TVs we have here handle NTSC just as well. I modified the original graphics driver so that I could scale the Propeller font in the X and Y directions so this is probably what you are seeing. You could easily use this code with a TV text object and simply disable the special scaling commands etc.
The idea was that PAL has a higher chroma Freq, and so better pixel bandwidth room, but I have not tried a side by side comparison
on a real TV set.
I guess the Dual-mode LCD ones, convert to a third raster anyway, so it may be a moot point ?
Fan-tastic! I've always wanted something like this. Thanks for sharing!
Just shows what the prop can do so easily.
EDIT: The other thing I always wanted to do was implement a voltmeter that measured the source resistance and extrapolated if necessary. What this means is that 3.3V through a 10K pull-up would report that it exhibited a 10K source resistance whereas a power source might well report only a few ohms etc.
con
#ifdef demoboard
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
#else
_clkmode = xtal1 + pll8x
_xinfreq = 10_000_000
#endif
creates error. It seems that #else is interpreted as else, because it is bold! What to do? BST is no longer officially supported?
30 seconds later.....compile.....that's it!
I just tried this out (remembered seeing it awhile ago and something reminded me of it earlier today) - such a neat project! Just out of curiosity, does it read quite high for most caps you've tried? Any of the ones I've tried read a few hundred pF high (for small value ceramics, e.g. 496pF for a 27pF cap), 83uF for a 47uF electrolytic. I know most of the caps I have are pretty wide tolerance (my ceramics all vary from J to M), but this still doesn't seem to account for how far off it is. This is with a demoboard, have tried all I/O pins that are broken out to the header, and both resistors as the spin source prescribes. Do you think the breadboard could have this much effect on capacitance?
Also did you ever implement the other meters you were talking about (inductance, resistance, voltage, etc)?
Cheers,
Jesse
The large eletrolytics will always vary quite a lot especially at test current levels. The tests that I did were straight from a pcb out onto a header and the readings were what I would expect especially when I had some caps with tight tolerances. But like all "meters" there is a limit to the range so that even the common multimeter has probe and contact resistance which limits it's low end so you end up reading a few ohms just with shorted probes. The cap meter "demo" is no different and will not be able to accurately measure very small caps plus you will have some stray capacitance around anyway although the 496pF reading sounds very high.
I never did get around to the other measurements but I might have a look at them and allow for character LCDs as well as VGA output, that way the device could be portable.
Thanks, I will take a look at measuring other components as well plus allow for a character LCD.
With a stable resistance and capacitance it's possible to measure other resistors and capacitors using the RC time method plus one method of measuring inductors is by connecting them in a tank circuit and exciting them with a short pulse and measuring their resonant frequency. Of course frequency measurements are easy to do too using a combination of cycle time measurement or pulse counting.
Diodes, LEDs, and transistors are fairly easy to check so it's possible for the meter to tell you that it's an NPN darlington or P channel FET for instance along with gate capacitance readings. Gain measurements could also be incorporated but this is where an ADC (perhaps a NAU7802) would be desired in which case we could also do all those voltage and current readings along with ESR measurements to discern whether the 3.3V you are reading is a voltage source, an output, or a pull-up. Where do you stop?
But I would probably write the software in Tachyon Forth since is so easy to use and fast.