Detecting the peak value

I did a few magazine articles _many_ years ago. They don't pay well enough to even cover postage :-(

It would be nice if the OP would "spill the beans" and let us know what he's really trying to accomplish. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |
             
               Friday is Wine and Cheeseburger Day
Reply to
Jim Thompson
Loading thread data ...

Hi, How should I select the vaues of capacitor and the resistor, if I go with the RC circuit. I have followin knowledge about it

f= 1/ 2 pi RC

F= 100KHz

R= 10K

C= 159 pF.

Would it be the best way to go with? Will these values provide the edge right near the peak value of the sine wave?

Thanks

John

Reply to
john1987

Did you miss...

Date: Thu, 29 Jul 2010 12:38:12 -0700 Message-ID:

[snip]

This seems to work pretty well...

formatting link

"U1" is a comparator.

Use 200pF and 82 Ohms per the schematic in the referenced PDF. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |

                   Spice is like a sports car... 
     Performance only as good as the person behind the wheel.
Reply to
Jim Thompson

--- Since 100kHz is 10 µs, 100kHz is 10µs +/- 3µs, (+/- 30% !!!) which means the period can vary from 10.3µs 9.7µs, which corresponds to frequencies of 67kHz and 133kHz, respectively.

Since the period is 10µs and there are 360 degrees per cycle, that's

27.8ns per degree, so the +/- 3µs error would correspond to +/- 108 degrees.

That's just insane, and it means that using simple phase shifting detectors won't work unless each one is individually tuned.

---

--- I don't understand what you mean by that.

BTW, when you reply to a post leave enough of the post you're replying to in the reply so that someone will be able to figure out what you're talking about if they're just strating to read the thread with your reply.

I notice you're posting through Google, so you might want to go by their guidelines:

From:

formatting link

"Summarize what you're following up.

When you click "Reply" under "show options" to follow up an existing article, Google Groups includes the full article in quotes, with the cursor at the top of the article. Tempting though it is to just start typing your message, please STOP and do two things first. Look at the quoted text and remove parts that are irrelevant. Then, go to the BOTTOM of the article and start typing there. Doing this makes it much easier for your readers to get through your post. They'll have a reminder of the relevant text before your comment, but won't have to re-read the entire article. And if your reply appears on a site before the original article does, they'll get the gist of what you're talking about."

JF

Reply to
John Fields

Wheeeeee!

± 1.9V is 3.8V Peak-to-Peak

Your "signal" is only 2V Peak-to-Peak, or ± 1V

What is the REAL performance requirement/criteria?

That is, what are you trying to accomplish when all is said and done? ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |

                   Spice is like a sports car... 
     Performance only as good as the person behind the wheel.
Reply to
Jim Thompson

Hi,

200pF and 82 ohm resistor gives me approximately 9 Mhz frequency and its a high pass filter. SO, does it mean that filter will pass all the frequncies less than 9MHz.

Thanks John

Reply to
john1987

Stop snipping content and look at my drawing. ...Jim Thompson

-- | James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at

formatting link
| 1962 |

Spice is like a sports car... Performance only as good as the person behind the wheel.

Reply to
Jim Thompson

=A0 =A0 ...Jim Thompson

=A0 =A0| =A0 =A0mens =A0 =A0 |

=A0 | =A0 =A0 et =A0 =A0 =A0|

=A0|

=A0 =A0 =A0 |

=A0=A0=A0=A0=A0=A0=A0(480)460-2350=A0=A0=A0=A0=A0=A0end_of_the_skype_highli= ghting=A0Fax: Available upon request | =A0Brass Rat =A0|

Hi,

I looked at your drawing and also simulated in pspice. Why did you go for the High pass filter? I tried 220pF and 7.6KOhm. Is HPF more accurate than LPF?

The positive peak voltage is + 1 volts and negative peak voltage is -

1 volts. So, 2 volts peak to peak.

I do not know how accurate should be the measured voltage. It would be desirable to have it as little as possible.

when said and done, I will read the voltage into the ADC and read the numbers and try to monitor the voltage across the resistor.

Thanks

John

Reply to
john1987

[snip]

Why did you try 7.6K Ohm when I said 82 Ohms?

It's a differentiator, so you place it much higher in frequency than the signal.

Doesn't matter for differentiator. We're looking for sign change (slope, at the input peak) with the comparator.

You said you wanted a transition... as you drew it.

Do you want the peak voltage?

What is it you want? ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |

                   Spice is like a sports car... 
     Performance only as good as the person behind the wheel.
Reply to
Jim Thompson

Erm, in my mind, a microcontroller is smaller, like a PIC chip, I really do have difficulty realising the ARMs and other 32bit controllers are about as cheap and have so much greater power :)

But then I time-travel in a sense from early '90s, returning to electronics after a long break. And, picking up where I left off, in a sense, by using the PIC chips. That'll do for this year, for me.

Grant.

Reply to
Grant

Hello all,

I've been following this thread and it has brought up some issues I'm currently working on. First of all, I'm a hobbyist that likes to learn by doing; as such, I'm interested in making a circuit do what I want without regards to a BOM - especially in regards to performance. In other words, I like "best" rather than "cheapest" or "easiest."

Currently I'm working on a LCR meter for personal use with better than .1% accuracy (closer to .02% if possible) for all functions. Also, all calibration will be internal and automatic; I have quite a few of Vishay's S102C series resistors (.01%, 2ppm) so I have a ready internal reference to use, keeping all measurements ratiometric if possible, and use resistance as the "known" in all equations.

I'm measuring capacitance using constant-current charge time, so I already will know the capacitance before I measure the ESR and can account for Z. I originally planned to use a peak-detection (measurement) scheme with a

100khz low distortion sine wave, however 1-2% accuracy was the best it seemed that I could do (Yes, I realize that for ESR, that is good enough - but remember, I'm doing this to learn and just to see if I can for the fun of it). So, as it stands, I am planning on using a S/H or tracking ADC with a high enough sample rate to detect both high and low peaks of both the DUT and a reference resistance and calculate the ESR from there.

As the required additional circuitry to measure the ESR is almost as much as all of the rest put together, I can't help but wonder if there's an easier way that I've missed and I'm using a sledge hammer to drive a nail. So, I would welcome any suggestions, tips or hints.

Thanks,

Hal

Reply to
hal

Are you not deluding yourself that you know "constant-current" to 0.1% accuracy?

...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |

                   Spice is like a sports car... 
     Performance only as good as the person behind the wheel.
Reply to
Jim Thompson

Probably so - hence my request for suggestions. I suppose that I should have emphasized that this is not only something that I do for enjoyment, but to _learn_. As such, I would welcome feedback on not only that I *am* going wrong, but *how* as well.

Reply to
hal

Yep. A welcome change in SED direction.

Pondering that, it's going to be tricky to make a loop-stabilized current source that tracks a slewing capacitor's change in voltage (Early-effect or channel-length modulation).

Perhaps _not_ use a classic current source, instead sense capacitor current (into a virtual ground) and adjust a voltage drive?

I presume you're measuring time-to-voltage to get capacitance?

...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |

                   Spice is like a sports car... 
     Performance only as good as the person behind the wheel.
Reply to
Jim Thompson

Really precise capacitance measurement (and "really precise" starts at

1% maybe) generally uses a bridge driven by a sine wave. One problem with caps is that C varies with frequency because of dielectric absorption and other effects, so the frequency is usually specified for accurate measurement. DA can make a ramp-type C measurement nonlinear.

If you have a fast ADC, I'd suggest just taking a lot of samples and absolute value+averaging. That would be better, lower noise data than looking for/at the peak, and you could include a lot more samples.

If you can use a capacitor for the reference, you can make a voltage divider with Cref and Cx, digitize the overall voltage and the midpoint voltage, and do the math. That's ratiometric on the excitation source, and works for resistors, too. I guess you could make a divider from a precision resistor and Cx, given a good sine reference.

A decent 16-bit SAR ADC is cheap nowadays and they tend to be amazingly linear. Sampling all up and down the waveform makes it even better, and averaging lots of samples can extend the resolution beyond

16 bits. You can do synchronous detection tricks to reduce noise. The nice thing about an ADC approach is that the tweaks are software.

To do fancy stuff, like 3/4 terminal measurements, you might buy a couple of old HP or GR RLC bridge manuals and study their topologies. Those old manuals generally had schematics and good theory sections.

John

Reply to
John Larkin

You don't really need an accurate current source, just a fairly stable one. Dump the current into a reference resistor (you need one of those anyhow) and measure it, then use the same current on your cap.

Actually, you don't even need a current source. Just a voltage and a reference resistor...

A B V+---------Rref---------Rx---------gnd or Cx

Just measure VA and VB relative to ground and do a little math. It would get tricky for small values of Cx. This works great for resistors; I use it for RTDs all the time.

Modern ADC are so linear that it pays to do ratiometric stuff whenever you can.

Here's another idea:

Sine wave goes through Cref or Rref into the summing point of a transimpedance opamp. Digitize the opamp output. Substitute Rx or Cx or Lx for Rref, digitize again, do some math. That can handle very small Cx values and avoids a lot of strays problems.

John

Reply to
John Larkin

Yes, it seemed the best way to use the high precision components that I have. I was going to charge through one of the precision Rs and measure to get the charging current. As long as the current source is linear over a small range (a couple volts starting at .5 or 1V - NOT in-circuit, of course), with an accurate clock, and using Kelvin sensing for both the reference and DUT, I felt that I should be able to achieve very good accuracy. I realize that this is a one-dimensional measurement of the capacitance, but it suits for what I am trying to accomplish. The fun part, for me, is trying to see how accurate I can get that one measurement - ditto for ESR. One issue I'm still working on is a current source with the required linearity. There are quite a few designs that are accurate at a set current, but I don't have the expertise or equipment to determine if they are accurate over a sweeping voltage range. Suggestions, anyone?

Reply to
hal

How are you going to calibrate your equipment (test your accuracy)?

Reply to
krw

[snip]

Larkin misses the Early-effect/channel-length-modulation errors as the voltage changes. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |

                   Spice is like a sports car... 
     Performance only as good as the person behind the wheel.
Reply to
Jim Thompson

A bridge was my first inclination; however, I'm wanting an all-in-one LCR meter with one (Kelvin) set of test leads. To do so will involve fairly complex switching circuitry and trying to make a bridge topology work with that arrangement was a little too far beyond my comfort level. For the sine source, I was going to use one of the ADI DDS chips. Do you think I would achieve better results using a sine-measurement technique for the capacitance as well as the ESR? Most of what I do is low frequency or DC so I don't really have a need to measure the cap at 50 or 100khz. I don't want to use a reference cap as the best I have is 1% and I was hoping to better that.

Hal

Reply to
hal

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.