Guys, I found something interesting. I have ported the coremelt firmware to the Teensy module, and was just testing yesterday with reading capacitors. It seemed to be off by a factor of x10. I then looked at the ReadCapacity function and changed the statement on line 1284 in main.c
gcval /= 100;
to
gcval /= 1000;
I then tested with some ceramic caps and a tantalum cap. Value measured by the tester in brackets.
33pf (0.03nF) 100pf (0.11nF) 470pf (0.47nF) 1uF (940nF) 470uF tantalum (477.78uF) - this one took a few seconds to measure.
That's amazingly accurate. This is with the original fudge factors for capacitance measurement, the processor on the Teensy is an ATMega32u4.
Another note : the caps were placed across pins 1-3. If placed across pins 1-2, the tester measured values of a few tens of pF. I assume it stops after measuring the stray capacitance across the unused lead pair 1-3 rather than checking for the largest value across all pairs of test leads.
is an online gerber viewer that works well for me. I use Cadsoft Eagle 6.0.0 on windows xp, with the sparkfun cam processor for generating the gerbers.
I've tried Viewplot 1.5, it is just a pain, and it has trouble understanding the drill file format.
Here's info on the ESR meter. Still having trouble referring to offsite urls, so please google "ludens esr meter" for the original circuit and description.
[attachment=2] [attachment=1] [attachment=0]
Mods to the original circuit : I used a LMH6619 opamp for the oscillator, this is rail-to-rail output/input and 35mA current sourcing. It was salvaged from another project. Because of this, I had to modify the transformer turns ratio from the original circuit, the output is 10turns instead of 20turns because of the additional voltage swing on the LMH6619 opamp output compared to the TL062 in the original. Good, because that lowers the output impedance even more. I salvaged the ferrite core from an SMPS (see another example in the snaps above). I cut off the isolation bobbin separator and basically wound the 10T winding on top of the 400T winding. Maybe 36SWG for primary and 28SWG (guesstimates) for secondary. You remove the metal retainer clip on the ferrite and then the core splits into two U shaped pieces, so can be removed from the bobbin for easy winding.
I got 250mV p-p @80kHz on the transformer secondary across the 10ohm resistor, perfect. The p-p voltage needs to be low enough so when you measure ESR in-circuit, any connected semiconductor junctions do not conduct to throw off the reading. The oscillation frequency just needs to be high enough that the AC reactance is negligible. I have seen variations of the oscillator circuit that range from 50kHz to 100kHz or more.
The back to back diodes, 1M and 0.68uF 400V caps are to protect the circuit from undischarged caps, these are taken from another ESR measurement circuit that I found. The diodes clamp the max voltage across the DUT (device under test) to 0.7Vpp, the 0.68uF blocks DC from the circuit or an undischarged capacitor, and the 1M resistor discharges any voltage across the test capacitor. I used 4.7 ohm on the test output instead of 10ohm in the original Ludens circuit, this just affects the range of measurement that you are interested in. You will see circuit variations that use 2.2 ohms or 3.9ohms for example. For me I need to resolve up to 10ohms ESR really anything more than that indicates a bad cap unless you are testing a supercap meant for SRAM memory retention, those have about 20-30 ohm ESR.
I used a trimmer 100k pot to modify the gain of the second opamp, this also affects the range (how compressed the scale is) of measurements, along with what value of resistor you use instead of the 4.7ohm.
The Schottky diodes BAT54 in the peak detection rectification circuit are an improvement over the 1N4148 in the Ludens circuit, the lower Vf means more sensitivity. Important because I used a cheap 500uA VU meter from Dealextreme. The original Ludens circuit had a 50uA meter, 50k pot, and a 100nF capacitor. Even with my 4.7uF capacitor replacement, I found very little initial damping of the needle in my circuit, possibly because of the cheap meter construction. So be careful and set the pot to maximum when initially testing as you could slam the needle against the stop pretty hard !
You use the meter set screw and the leads open to set the no-deflection (infinite ESR) needle position, and the variable 5k pot with the leads shorted to set full scale deflection corresponding to 0 ohms. So the meter is essentially reversed, I removed the original VU meter scale on a metal foil, and marked (not very clearly i admit) the scale with a black marker on a plastic transparent sheet cut to size. Upside down, because then 0ohm is on the left and high values on the right :-).
I used resistors in my parts bin to identify known scale markings. Again, this is really meant to identify bad parts, any cap more than 1 ohm is no good for a DC-DC converter for sure. Most ceramic SMD parts with 1uF or higher that are meant for DC-DC switching circuits should have milliOhm ESR readings. Sometimes with LDO regulators, the output cap needs to have a minimum ESR to avoid oscillations, so the ESR meter is useful for this as well!
In the snap the meter shows ~3ohms ESR for a salvaged electrolytic 100uf cap, so I know this one is junk, compared to other new 100uF caps I have that read almost 0ohms.
BTW, I got this neat measurement clip off ebay, but its not very good, the probe pins are plated with something that seems to be a bit oxidized, and the tips are too flexible. The clip itself contributes about 0.3ohms to the reading. I need to find some gold plated pins and solder them to the probe, hopefully that will make it easier to measure incircuit and smd parts.
All right, back to the original thread, then. Sorry for the diversion :-)
Here's a summary of the LM311 oscillator based LC meter. ESR meter to follow in another post ...
The LCD is a 122x32 graphics STN lcd that was(is) very cheap off ebay (about $6). Cheap for a reason. I found out that the website published pinout was incorrect, and the LCD requires a -5V bias supply (argh!), which i supplied with a MAX889. The PIC32MX320F64 break out board is my design, nothing fancy. The leads coming out of the box are for ICSP pickit2 flash programming. The LM311 oscillator front-end is wrapped up in tape and copper foil shielding on the right. Plenty of space in the "enclosure" because I intend to add more capabilities. It was supposed to do the semiconductor component testing as well, but dropped the idea due to the limitation of the 3.3V part when testing power fets, as I found out from reading this thread.
[attachment=3]
There's an L/C option switch, a Zero button to cancel out stray capacitance/inductance in the test leads, and a mini-USB connection.
[attachment=2] [attachment=1]
It measures up to 1uF and a few mH, no problem, have not investigated the maximums. Only non-polar caps by the way. My multimeter does large caps and inductors, this is really meant for the pF and uH parts.
[attachment=0]
Mods to the basic circuit (don't know who to credit for the original LM311 circuit, there are lots of websites with LC meter circuits that are based on this) : Added a 600ohm ferrite (e.g. BLM18AG601SN1D) inline on the 5V supply from USB. I dropped all the auto-calibration options. So no relays. I had a 4240pF 1% cap in my parts bin, added a 22uH 1A power inductor and then measured the oscillation frequency. From that I calculated the actual inductance as 20uH. So these are now hardcoded in the sw as the reference values. The trace marked as "open L/sht C" goes to the PIC32 as a signal to let the mcu know whether L or C is being measured. All the electrolytics are tantalum caps. The output resistor is 4.7K instead of 6.8K but thats not significant.
I scoped the output of the LM311 and the square wave edges looked a bit nasty. So I added a single gate schmitt inverter 74SV14. Output limited to 3.3V with a zener. Very clean square waves at the output now.
On the PIC32, unfortunately, even with all the available pins, the only counter that has a external clock pin is a 16bit counter. Would have preferred a 32bit counter for added flexibility on the oscillator frequency resolution. Turned out it was not really significant.
All I do is use the LM311 square wave output as pulses to a 16bit counter, and another 100mS periodic timer to count how many pulses per 100mS interval, to calculate the oscillation frequency. BTW, the PIC32 is running off a 16MHz crystal. I average the results from 5 consecutive readings, so I have a 0.5second measurement repeat rate. Good enough. It seems to be accurate enough for my needs, which is basically identifying components that I salvage, or coils that I wind myself.
I edited the screen snapshot to add in red the part markings of the tested component. The 6N06 is a PHT6N06 The K2248 is a 2SK2248 The others are marked as per the datasheet part number.
I verified the Vgs threshold voltages were within the datasheet spec. As you can see for some of the N enh MOSFETs, I had to change the leads around before it was correctly recognized.
And for the PNP BJT 2N4403, the hFE is either incorrectly calculated or the transistor is bad. Except for the BT131 Triac and PN2222A BJT, these are scavenged components.
New to the forum, and I have to post something within 24 hrs... Have been following this thread with interest as I have been building homebrew instruments recently. First, a modified version of the LM311 oscillator based LC meter (hosted on my own PIC32MX breakout board connected to a 122x32 GLCD type display). Then, a modified version of the ludens ESR meter. (Tried to post the url but got a "too spammy for a new user" message :-).
Then thought I would use the PIC32MX platform to port the AVR based semiconductor component tester, but reading this thread, understood the 3.3V part wouldn't do the job. As luck would have it, I just received a Teensy 2.0 (AVR Atmega32u4 based) board a couple days ago. I have experience with PIC and ARM but had never used an AVR mcu before. I decided to port the component tester (freely using Google Translate to get some sense of the comments) as my first hands-on tutorial, and managed to get it up and running this morning!
Redirecting the LCD display routines to print on a USB HID "console " was trivial (PJRC provides a working hid_listener console app for this), but it was a fair bit of work to get the ADC code ported. The tester code makes liberal use of the fact that the ADC pins are at port pins 0,1,2. The Teensy does not have contiguous ADC0,1 and 2 pins available. I used ADC4,5,6 and had to insert quite a bit of bit shifting/offset code. But it actually worked on the first try, and I am chuffed - can finally identify and use the parts I have been scavenging over the years ...
I used SMD1206 package 680 and 470K resistors, no idea what the tolerance is, but I had plenty, so I hand-picked the parts with a multimeter, much better than 1% at least as installed.
Have not exhaustively tested yet but it correctly identified known BJTs, Mosfets and Triacs from my parts bin.The hFE values seem to be a bit off on some scavenged BJTs. And on a couple of NMOS power fets, I had to transpose the leads before it was correctly recognized (otherwise identified as a capacitor on two of the pins).
If I figure out any useful mods, will let you guys know! Glad that there are so many eyes (and hands) on this project.
How do you post images on this thread? I tried to link to a couple of snaps of the working project in my Picasa Dropbox, but again got the "too spammy" message ( for linking to offsite urls).