Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC based high-resolution cap meter

Status
Not open for further replies.
Hi Burt, I'm not an opamp expert basically the "best opamp" depends on whatever the opamp will do. :)

Personally I think a separate test instrument is best, and ESR meter should be optimised for what it has to do and a cap meter does a very different task. If you are measuring ESR on electros then the value is written on the electro in big letters anyway, so the cap meter is not needed.
 
I found a good idea I was just thinking of using the same LCD but Your right It would make a better tester by it's self. I'll start a new thread and post something showing one.
 
I've had a bit of a think about this, and I'm not sure it would be easy (or even a good idea) to try to add a few parts to this project to make it measure ESR.

This meter was optimised for low cap current, and a large voltage swing to give good accuracy and high resolution measuring capacitance.

If you need an ESR meter for fault finding, it is important to have a very small voltage swing <0.3v maybe even <0.1v (so as not to activate any semi junctions in the target PCB). Also the fault ESR of many caps that you need to test are PSU caps and might have a fault ESR as low as 1 or 2 ohms. So the cap ESR needs to be measured in a way to give good low-ohms measuring which means higher cap currents and an opamp system set up for very low voltage oscillation at a fairly high current (tens to hundreds of mA).

Really I think a good ESR test meter for electros 1uF to 2200uF (especially an in-circuit ESR tester) would need a very different circuit approach to the one I chose for this project, which was chosen for beginner simplicity and high resolution measuring of caps from 50uF down to the sub pF range.

Sorry guys! But if someone is interested in designing a good ESR meter (which would deserve its own thread) I have a few ideas to throw into the mix. :)

for all those here that wantideas to make their esr meter, here is my esr repository with plenty of (free) ideas...
**broken link removed**

then Mr Black, as I really appreciate your previous ideas in many domains, I really want to know more about your "few ideas to throw into the mix" ...;)
 
Hi Kripton, well my usage of ESR meters has been from the late 1980's when I worked in electronics repair. Many of the caps that are suspect are in the 1 to 2 ohms ESR range and it's critical to have really pointy probes to reduce connection resistance, and an ESR meter that produces a reasonable amount of current and prefereably a very low voltage, under 0.1v?

My ESR testers have a manual "zero ohms" button, but I think a smart designer could do an auto zero of connection ohms in firmware (invisible to the user), by testing the cap with multiple frequencies and the connection ohms would be common to all but the ESR ohms would be frequency dependent.

It would be cool too if the display showed both stats;
Probe ohms = 1.34
ESR ohms = 2.11
 
esr doesnt really change with frequency ...
see attached curve.
esr versus frequency.jpg
 

Attachments

  • NRE-HL102M16V-ESR-Temp-Freq0909.pdf
    420.5 KB · Views: 507
The ESR "effect" measured by the oscillator changes. That's exactly the point with ESR, it won't affect low freq power supplies much but has a drastic effect on high frequency power supplies.

Anyway if you don't think you can do the auto zero/ auto compensate function then don't worry about it.
 
Mr. RB,

In the figure that shows the square wave, the figure indicates oscillations between 1.3V and 3.7V. The text says 1/3 Vdd and 2/3 Vdd. If Vdd is 5 V, doesn't that make 1.67V and 3.33V? Any clarification would be helpful.
 
Nice project Mr RB. Have you considered an inductance meter along the same lines? ie inductor in place of the 10k, and 10k in place of the cap.

Calibration unfortunately is not as simple as for the C meter however.
 
Mr. RB,

In the figure that shows the square wave, the figure indicates oscillations between 1.3V and 3.7V. The text says 1/3 Vdd and 2/3 Vdd. If Vdd is 5 V, doesn't that make 1.67V and 3.33V? Any clarification would be helpful.

I can't remember exactly, it was a while ago now! I had been doing some tests on the 'scope before doing the diagrams so I might have been influenced by remembering 'scope voltages, but it's just as likely it was brainfade and I simply got the numbers backward, and typed 1.3-3.7 instead of 1.7-3.3. :)

Due to the PIC output not being exactly 0v and 5v the voltages won't be exactly 1.67 or 3.33 anyway, and it has no significant effect on operation so I can't be bothered changing the artwork now. But thank you anyway for mentioning it!

To Dougy83; I did actually try some inductor tests, the results were most unsatisfactory. In theory it should work fine but the problem is the inductor performance (measured period) in RL osc is very dependent on current and inductor characteristics, much more so than the inductance value. With the low current from the PIC and resistors I could not get any useful results. To get accurate inductor performance you need an LC oscillator, as is used in all of the L meter kits. You may also be able to use a high current RL oscillator, depending on the inductor type but I'm thinking 100mA might be the minimum which means it's just not going to work from my design.

I posted this link before but here it is again;
https://www.rfcandy.biz/communication/imp_lc.html
a very nicely designed LC meter kit.
 
Mr. RB,

In your original article, you give an example of a 10nF capacitor giving a 435 Hz frequency with a half period of 1.149 ms. When I calculate the RC time constant for a 10 nF capacitor and a 10K resistor, I get 0.1 ms. Does this mean that their are ~11.5 time constants per charging? I have been struggling to derive your scale constant of 919, and I think I must have a basic misunderstanding of your circuit.
 
Total period is given by a charge and discharge.

I can't remember off hand as it is an old project, but I just chucked a 9.94nF cap in the meter and checked the osc frequency, it was about 6570Hz at the osc itself, but the PIC would have used the capture compare module set to /4 or /16 (to increase accuracy) so the period actually measured might have been 1642Hz or 410Hz respectively.

That's probably where the 435Hz figure came from, it would have been measured during the earlier testing. Some parts did change for the final version, but rest assured I spent some time calibrating the firmware with the parts shown in the final diagram, and the constant value in the firmware was carefully chosen.
 
Mr. RB,

Thanks! It had not even occurred to me that the frequency that you were referencing might be divided by 16! I have no doubt that your firmware works as well as advertised, but for me to understand a thing, I need to work out the math. Would it be OK if I have some more questions later?
 
To Dougy83; I did actually try some inductor tests, the results were most unsatisfactory. In theory it should work fine but the problem is the inductor performance (measured period) in RL osc is very dependent on current and inductor characteristics, much more so than the inductance value. With the low current from the PIC and resistors I could not get any useful results. To get accurate inductor performance you need an LC oscillator, as is used in all of the L meter kits. You may also be able to use a high current RL oscillator, depending on the inductor type but I'm thinking 100mA might be the minimum which means it's just not going to work from my design.
Yes, quite true re requiring a higher current; for low value inductors the oscillation freq will be very high with a 10k res.
 
...
Would it be OK if I have some more questions later?

Sure, that's why I posted the project in a public forum. :)

dougy83 said:
Yes, quite true re requiring a higher current; for low value inductors the oscillation freq will be very high with a 10k res.

Yeah it's not easy to do a good RL based meter, which is probably why that method is reserved for some special inductor testors.
 
great circut

Hello,this circuit looks to me is the best I found in the net.
I tried to simulate it using proteous isis with 16f628A because isis does not have component library for 16f628. It does not work.I tried to make similar one using 16f877A. I started making the oscillator first using pibasic pro,but the wave is ugly, pulse on cycle may be 10 times the off cycle and oscillate for 1s then stops.I am a retired elec. engineer d'nt have much experience with pic except making two projects in picbasic pro. can you mr.RB help me on this issue. I will be more than greatful to you. I love pic's it is most enjoiable but d'nt like ASM and d'nt know much about c.
I did'nt build it i have just used isis.

Obaid
 
First I suggest you get the oscillator working, you can do that in ISIS with any of the comparator components, and the few resistors and cap shown on my schematic.

Please note if the comparator does not have a push-pull output you will need to add a pullup resistor of 470 ohms on the comparator output.

Once you have the comparator oscillator working in the simulator you can recreate it using the 16F628A comparator. The duty cycle should be close to 50:50, or in any case much better than 10:1 which would indicate a fault! :)
 
HELLO ALL
Mr.RB good day to you. How can I measure capacitance smaller than 20pf since the timer1 tick at .2us when xt=20MZ. 20pf is =1tick (RC=T, C=T/R) in this case 0.2X10^-6/10000=2X10^11=20pf. Do you recommend changing the value of RT what is the max value of RT weil be practical.

Obaid
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top