Author Topic: ESR Meter Build  (Read 21002 times)

0 Members and 3 Guests are viewing this topic.

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
ESR Meter Build
« on: January 13, 2014, 01:50:09 am »
Plan is to build a fairly simple ESR meter with reasonable accuracy.

I will base it on Jay_Diddy_B's elegantly simple 5 transistor design:

https://www.eevblog.com/forum/projects/5-transistor-esr-meter-design/


But slightly modified as I want to use it with a small uC ADC and a display.




There might be a simpler way, but adding a dual opamp should do the job to give a voltage output with close to full ADC scale:




Output should be something like this:




I like the idea of having much higher resolution in the low ohms part of the range. It will of course make it slightly more challenging to translate the ADC values into milliohms, but I can probably get away with a 10-20 point LUT and linear interpolation while maintaining reasonable accuracy.



Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7549
  • Country: 00
  • +++ ATH1
Re: ESR Meter Build
« Reply #1 on: January 13, 2014, 02:01:17 am »
Why not this second Jay_Diddy_B's design ? -> ESR Meter Adapter Design and Construction ?

It has a very linear output that will ease the ADC process there, only need minor adjustment on gain & offset. Coupled with mcu as your plan, it will be handy as the source for the main pulse and for the switchers. At the end of that thread he posted another revision that you can tweak the timing at among the switchers that the result will be no longer sensitive to the inductance and averages out the capacitive part to zero, just pure ESR, cmiiw.

Again, I'm no expert on this, just what I've observed all this time on both Jay_Diddy_B's ESR circuits.

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: ESR Meter Build
« Reply #2 on: January 13, 2014, 02:18:10 am »
I hope to build the whole thing based on parts I already have, found a couple of these small 8bit PIC16F684, it's a nice little uC.




It should do the job. It's got 10 bit ADCs, PWM support and internal oscillator that will run it at up to 8MHz, 2048 word flash and 128 bytes RAM.

Datasheet for reference: http://ww1.microchip.com/downloads/en/DeviceDoc/41202C.pdf


And a standard 1602 display:




Transistors will be BC327 and BC337, for opamp I think a TLC2272 will do.


Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: ESR Meter Build
« Reply #3 on: January 13, 2014, 02:27:11 am »
Why not this second Jay_Diddy_B's design ? -> ESR Meter Adapter Design and Construction ?

It has a very linear output that will ease the ADC process there, only need minor adjustment on gain & offset. Coupled with mcu as your plan, it will be handy as the source for the main pulse and for the switchers. At the end of that thread he posted another revision that you can tweak the timing at among the switchers that the result will be no longer sensitive to the inductance and averages out the capacitive part to zero, just pure ESR, cmiiw.

Again, I'm no expert on this, just what I've observed all this time on both Jay_Diddy_B's ESR circuits.

I guess mainly 2 reasons, I'd like to use a cheap/small PIC with only 10bit ADC, that would not give a very good resolution on the low ohms part of the range with the new design. But I could of course switch to the larger and more powerful PIC24H with 12bit ADCs, just seems like a bit overkill :). 2nd and probably right now most important, I don't have all the parts for the new and improved design. I want to build, not wait for parts :)

I like the simplicity and the exponential increase in resolution at the low range.

Actually I might have a go at both designs :) Starting with the transistor one this weekend.

Cheers

« Last Edit: January 13, 2014, 02:46:58 am by jaxbird »
Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2747
  • Country: ca
Re: ESR Meter Build
« Reply #4 on: January 13, 2014, 02:39:16 am »
Jaxbird,

What you are planning should work. Be carefully with the selection of the diodes D3 & D4 in the meter circuit.

You can do a piecewise linear correction in the PIC to linearize the output.

Good luck !!

Jay_Diddy_B
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: ESR Meter Build
« Reply #5 on: January 13, 2014, 03:19:34 am »
It should work.

Some suggestions:

1) generation of the excitation signal: you could use the pwm generator in the mcu to do that.

2) excitation frequency: I would think hard about using 100khz signal, especially if you are primarily measuring large (1100uf+ capacitors) - the approach here is essentially measuring the impedance of the dut. Large capacitors tend to have high ESL and at 100khz, it could overwhelm your ESR. I think 10khz is a good compromise.

3) simplicity: in the first schematic, you have a discrete amplifier, taking a differential signal from the bridge. That differential signal is further amplified by the opamp (against, configured differentially). I would do away with the discrete amplifier.

4) simplicity again: there are some mcus (atmega32 for example) that have differential adc with high gains. They are superbly suited for this application.

5) mcu choices: In a different thread, I started something like yours (however, totally different approach), using a 16f684. I eventually ended up with an avr, for its speed, and adc. You may look at that thread and see if it could be of help to you.

6) nulling offset: I think you will find extremely useful if the meter can null offset, generated by either the oscillator or the amplifiers along the way. If the excitation signal is generated by the pwm, you can turn it off to null the offset; if externally generated, you can short the excitation signal (split R1 and insert a pin from the mcu in between the two resistors now consisting of R1) to measure the offset when the input signal is 0. Offset, in situations with high gain + discrete parts, will drift and a mcu-based nulling at the beginning of each measurement would be very handy.

Hope it helps.


================================
https://dannyelectronics.wordpress.com/
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: ESR Meter Build
« Reply #6 on: January 13, 2014, 03:21:06 am »
Jaxbird,

What you are planning should work. Be carefully with the selection of the diodes D3 & D4 in the meter circuit.

You can do a piecewise linear correction in the PIC to linearize the output.

Good luck !!

Jay_Diddy_B

Thanks  :-+

I have a good selection of diodes to try out.

I'll keep the thread updated with progress.

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: ESR Meter Build
« Reply #7 on: January 13, 2014, 03:29:59 am »
Quote
But I could of course switch to the larger and more powerful PIC24H with 12bit ADCs, just seems like a bit overkill

not at all. I implemented a PIC24-based lcr meter using minimum external parts. The pic generates a 10khz sine output, driving into the dut and two adc modules perform simultaneous sampling, with the result fitting into a LMS algorithm. 1% accuracy down to about 100mohm. The chip I used is a dsPIC33 with four s/h channels. If you don't mind math, one s/h channel is sufficient but two s/h channels make life easier.

The newer commercial meters tend to use DFT (=LMS under certain conditions). You can google a msp430-based lcr meter by a russian guy - he used DFT to get similar results.

================================
https://dannyelectronics.wordpress.com/
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: ESR Meter Build
« Reply #8 on: January 13, 2014, 04:14:03 am »
It should work.

Some suggestions:

1) generation of the excitation signal: you could use the pwm generator in the mcu to do that.

2) excitation frequency: I would think hard about using 100khz signal, especially if you are primarily measuring large (1100uf+ capacitors) - the approach here is essentially measuring the impedance of the dut. Large capacitors tend to have high ESL and at 100khz, it could overwhelm your ESR. I think 10khz is a good compromise.

3) simplicity: in the first schematic, you have a discrete amplifier, taking a differential signal from the bridge. That differential signal is further amplified by the opamp (against, configured differentially). I would do away with the discrete amplifier.

4) simplicity again: there are some mcus (atmega32 for example) that have differential adc with high gains. They are superbly suited for this application.

5) mcu choices: In a different thread, I started something like yours (however, totally different approach), using a 16f684. I eventually ended up with an avr, for its speed, and adc. You may look at that thread and see if it could be of help to you.

6) nulling offset: I think you will find extremely useful if the meter can null offset, generated by either the oscillator or the amplifiers along the way. If the excitation signal is generated by the pwm, you can turn it off to null the offset; if externally generated, you can short the excitation signal (split R1 and insert a pin from the mcu in between the two resistors now consisting of R1) to measure the offset when the input signal is 0. Offset, in situations with high gain + discrete parts, will drift and a mcu-based nulling at the beginning of each measurement would be very handy.

Hope it helps.

Hi dannyf, thanks for your inputs and suggestions  :-+

I have been following your thread with experiments on a different approach.

Is is my plan to use the PIC to generate the 100kHz signal, so it should be possible to experiment with different frequencies, even selecting frequency.

I plan to use the PIC like this:



The 3 ICSP pins (MCLR, PGC & PGD) can double for IO, e.g. extra buttons if needed.

It's been a long time since I last used a PIC16F684, so I am doing a quick breadboard (without the actual ESR circuit portion), just to avoid any surprises on what pins can be used in what situations :)

I don't expect ADC sample speed to be an issue in this case, it only needs to do a loop of sampling (probably lots of averages) translate (using interpolation) and then update the display 2-3 times per second.

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: ESR Meter Build
« Reply #9 on: January 13, 2014, 05:08:53 am »
Quote
But I could of course switch to the larger and more powerful PIC24H with 12bit ADCs, just seems like a bit overkill

not at all. I implemented a PIC24-based lcr meter using minimum external parts. The pic generates a 10khz sine output, driving into the dut and two adc modules perform simultaneous sampling, with the result fitting into a LMS algorithm. 1% accuracy down to about 100mohm. The chip I used is a dsPIC33 with four s/h channels. If you don't mind math, one s/h channel is sufficient but two s/h channels make life easier.

The newer commercial meters tend to use DFT (=LMS under certain conditions). You can google a msp430-based lcr meter by a russian guy - he used DFT to get similar results.

That does sound like a very interesting design, have you published the project anywhere?

I believe I have a couple of dsPIC33 in DIP28 somewhere :)

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: ESR Meter Build
« Reply #10 on: January 13, 2014, 12:15:59 pm »
It isn't published - just for self use.

the basic structure is simple: a v-I approach where the current is converted to voltage. Two samples each time. Hardware -wise, you need only an opamp.

the complications come in the software: from the v and I samples, you have to reconstruct their amplitude and phase differential. While dft routines are abundant, doing it fast, accurately and in integer on a mcu is tricky.

in the end, I went with the IEEE approach for a two-parameter sine quantification.

having gone through it, I found that you need a fast mcu with two high speed channels, and inboard opamp, and preferably dacs. That points to some msp430 or if money permits, some free scale mcus.
================================
https://dannyelectronics.wordpress.com/
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: ESR Meter Build
« Reply #11 on: January 13, 2014, 07:07:56 pm »
It isn't published - just for self use.

the basic structure is simple: a v-I approach where the current is converted to voltage. Two samples each time. Hardware -wise, you need only an opamp.

the complications come in the software: from the v and I samples, you have to reconstruct their amplitude and phase differential. While dft routines are abundant, doing it fast, accurately and in integer on a mcu is tricky.

in the end, I went with the IEEE approach for a two-parameter sine quantification.

having gone through it, I found that you need a fast mcu with two high speed channels, and inboard opamp, and preferably dacs. That points to some msp430 or if money permits, some free scale mcus.

It does sound interesting, but I'm afraid such a design would be slightly above my level of ambition for this project :D

Thanks for sharing, I find the idea of having a mcu do the majority of the work interesting. Maybe one of the new PIC32MZ (330DMIPS and 28Msps ADC)

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: ESR Meter Build
« Reply #12 on: January 13, 2014, 07:36:40 pm »
Progress update, I have a PCB layout:




I'm using 38mm between the terminals so I can use this DMM adapter for easy testing:




And I've made a board:



« Last Edit: January 13, 2014, 07:58:44 pm by jaxbird »
Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: ESR Meter Build
« Reply #13 on: January 14, 2014, 05:42:58 am »
Board assembled:




After a bit of coding and adjusting resistor values it's fully functional. For D3 and D4 I just use standard 1n4148, seems to work fine. I soldered in the same diodes for protection, but I should probably change them to some higher rated ones, maybe 1n400x.

I did have to do a bit of fine tuning on the ratio between R3 and R4 to make sure ESR+ is always above ESR- for the differential amplifier and some slight adjustments on the amplification in the 2nd amplifier for full scale.









Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2747
  • Country: ca
Re: ESR Meter Build
« Reply #14 on: January 14, 2014, 01:10:28 pm »
Jaxbird,

Looks Great !!! Nice work.

It looks like the board was cut on a milling machine. What machine did you use?

Where did you get the banana jacks from?

Thank you for sharing.

Jay_Diddy_B

 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: ESR Meter Build
« Reply #15 on: January 14, 2014, 02:00:10 pm »
Nice work.

Would suggest that you use resistors to calibrate - for this approach, a resistor is equivalent to infinite capacitance + ESR. Pick something big (11 - 47ohm for example), and then something small (0.22 - 0.47ohm, or lower if you have one) and see what you have.
================================
https://dannyelectronics.wordpress.com/
 

Offline kripton2035

  • Super Contributor
  • ***
  • Posts: 2658
  • Country: fr
    • kripton2035 schematics repository
Re: ESR Meter Build
« Reply #16 on: January 14, 2014, 02:46:48 pm »
nice and very quick design ! hope I could do as fast as you do ...
how about the source code ? will it be available ?
how about the precision : you seems to get the milliohm, do you have any calibration method, any comparaison with a known resistor ?
thanks again for sharing your design with us.
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2127
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: ESR Meter Build
« Reply #17 on: January 14, 2014, 02:53:38 pm »
Where did you source that grey block with the component leg connections? - looks interesting.

Great project BTW.
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: ESR Meter Build
« Reply #18 on: January 14, 2014, 06:38:56 pm »
After calibrated it with resistors, you can try a capacitor: take a ESR reading with just the capacitor, and then another with the capacitor + serial resistor. The differential between the two ESR readings should be your serial resistor. Otherwise, your meter isn'g working right.
================================
https://dannyelectronics.wordpress.com/
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: ESR Meter Build
« Reply #19 on: January 14, 2014, 08:35:21 pm »
Jaxbird,

Looks Great !!! Nice work.

It looks like the board was cut on a milling machine. What machine did you use?

Where did you get the banana jacks from?

Thank you for sharing.

Jay_Diddy_B

Thanks :D It worked out even better than what I'd hoped for :)

Yeah, I do have a small machine I built some time ago, mostly use it for wood, acrylic and circuit boards. It's not as precise and nice as the Protomat you showed in the other thread, but I get usable results with a bit care and attention to to it's limitations. Sure beats etching, manual drilling and cutting :) For software I use Eagle with a G-CODE plugin (not ideal, but it works) and then and old PC running Linux CNC for the control.

The banana jacks are just some re-purposed cheap binding posts (I seem to remember they were $0.25 each) not the best quality, but for small projects they are great:




With the screw top removed, they are deep enough to accept shrouded DMM cables and attachments:




Just cut the excess and tightened:




Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: ESR Meter Build
« Reply #20 on: January 14, 2014, 08:51:43 pm »
Nice work.

Would suggest that you use resistors to calibrate - for this approach, a resistor is equivalent to infinite capacitance + ESR. Pick something big (11 - 47ohm for example), and then something small (0.22 - 0.47ohm, or lower if you have one) and see what you have.

Thanks dannyf :)

Yeah, I used a number of low value resistors for calibration. I built up two look up tables. From memory, I think the values were 0R, 50m, 100m, 200m, 500m, 1R, 2R, 5R, 10R, 20R, 30R and finally 47R. Second table contains the averaged ADC value measured with each resistor combination tightly clamped to the terminals as close to the pcb as possible.

Based on the two tables I do a linear interpolation to translate the measured ADC value into milliohms.

Some of the resistors and the clamps I used:






Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: ESR Meter Build
« Reply #21 on: January 14, 2014, 09:43:13 pm »
A real test, after the meter is calibrated, would be if it can measure serial resistance (a cap + resistor) correctly.
================================
https://dannyelectronics.wordpress.com/
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: ESR Meter Build
« Reply #22 on: January 14, 2014, 10:34:25 pm »
One of the tests I have done was to find some fresh capacitors in my collection with a usable datasheet, so far I have found these 220uF Panasonic, got about 50 of these:




And from the datasheet they are specified as having an impedance of 117 milliohms @ 100kHz (20C):




Measuring two of them gave me ~114 milliohms for the first one and ~117 for the 2nd one (readings do fluctuate a few milliohms e.g. between 116 and 119 for the 2nd one)






I can't verify whether this is actually correct or not, but it does look encouraging, Much better than what I need or even hoped for.

The meter is not long term stable as I didn't add a reference, just the lm317 regulator. It will drift slightly up and down, but the measurements appear to be repeatable as long as they are done within a minute or so from shorting the terminals and using the zero button.

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: ESR Meter Build
« Reply #23 on: January 14, 2014, 11:07:39 pm »
It is good, but not as conclusive as the Cap + Resistor test.

If you cannot do the Cap + Resistor test, you can test the two capacitors separately, and then test them in serial and in parallel. The ESR readings should be the serial and (close to) the parallel of the two ESR readings - the 2nd reading is actually dependent on the capacitance.
================================
https://dannyelectronics.wordpress.com/
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: ESR Meter Build
« Reply #24 on: January 14, 2014, 11:38:00 pm »
nice and very quick design ! hope I could do as fast as you do ...
how about the source code ? will it be available ?
how about the precision : you seems to get the milliohm, do you have any calibration method, any comparaison with a known resistor ?
thanks again for sharing your design with us.

Thanks kripton2035 :) ..

Most of the design credit goes to Jay_Diddy_B, I just made a digital version of his design.

I'll post the proper details with hex/source, but there are a few things I want to experiment with first, e.g. switching frequency, 10kHz and 100kHz. Also if anyone is interested in building one it would probably be best to have some built in calibration method with the values stored in eeprom instead of hardcoded.

But in general anyone interested in building one would probably be better off building Jay_Diddy_B's latest and improved design. Or at least have a look at that thread first to get some understanding of the limitations of this simple design.



Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf