Maker Pro
Maker Pro

Op-amp peak detector with gain

J

John Larkin

Jan 1, 1970
0
John Larkin said:
SDC wrote:
I need a single-supply positive peak detector with a gain of 2.
(Previously
I used an op-amp with a gain of 2 followed by a peak detector, but would
like to simplify the circuit.) The input voltage will range from 0V to
about
2.5V.
Will the following circuit work? (Please excuse my ignorance - I don't
have
much experience with op-amps.)

... Steve

IC=LM324

+-[10K]-+----[10K]----+----------+
| | | |
=== | | |\ |
GND | |\ +-- |-\ |
+--|-\ 1N4148 | >---+---o Vout = Vin(pk) x 2
| >-->|--+----|+/
Vin o-------|+/ | |/
|/ 0.01uF---
---
|
===
GND


looks good here except for the use of the diode
with that diode you have selected the Vfm (Max Forward voltage) is
aprox 0.65 like most diodes in that fam.
this means the first 0.60 or so won't be seen in the
circuit from the your (Vin) also, this will produce a
0.65 error in the calculation of the multiplier due to the
drop.
using a lower (Vfm) diode in my opinion would help things
greatly.
something like what a Germanium diode would do.(aprox 0.3 volts).
also there is the problem of linearity, a little negative feed
back via the same type of diode could counter act it.

just an observation.
--
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5


We've already covered this point in the earlier posts. The diode will not
introduce any error.
... Steve

You'll eventually need to discharge that cap, too. Some opamps, like
the 324, have positive input bias current so will charge the cap until
it hits the positive rail.

John

Yep, that's the biggest drawback. (We also covered this earlier). I've spent
the last hour or two searching for a suitable rail-to-rail input and output
FET-input quad op-amp. The AD8544 is looking good so far, with the AD844
running a close second.

... Steve

But you'll still have to discharge the cap once in a while.
Mathematically, the charge on a cap is an indefinite integral, namely
unknown if you don't know its full history. As a practical matter, the
question is "peak voltage since when?"

And a 1N4148 willy typically leak a lot more than a decent fet opamp.

John
 
S

SDC

Jan 1, 1970
0
John Larkin said:
SDC wrote:
I need a single-supply positive peak detector with a gain of 2.
(Previously
I used an op-amp with a gain of 2 followed by a peak detector, but would
like to simplify the circuit.) The input voltage will range from
0V
to
about
2.5V.
Will the following circuit work? (Please excuse my ignorance - I don't
have
much experience with op-amps.)

... Steve

IC=LM324

+-[10K]-+----[10K]----+----------+
| | | |
=== | | |\ |
GND | |\ +-- |-\ |
+--|-\ 1N4148 | >---+---o Vout = Vin(pk) x 2
| >-->|--+----|+/
Vin o-------|+/ | |/
|/ 0.01uF---
---
|
===
GND


looks good here except for the use of the diode
with that diode you have selected the Vfm (Max Forward voltage) is
aprox 0.65 like most diodes in that fam.
this means the first 0.60 or so won't be seen in the
circuit from the your (Vin) also, this will produce a
0.65 error in the calculation of the multiplier due to the
drop.
using a lower (Vfm) diode in my opinion would help things
greatly.
something like what a Germanium diode would do.(aprox 0.3 volts).
also there is the problem of linearity, a little negative feed
back via the same type of diode could counter act it.

just an observation.
--
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5


We've already covered this point in the earlier posts. The diode will not
introduce any error.
... Steve


You'll eventually need to discharge that cap, too. Some opamps, like
the 324, have positive input bias current so will charge the cap until
it hits the positive rail.

John

Yep, that's the biggest drawback. (We also covered this earlier). I've spent
the last hour or two searching for a suitable rail-to-rail input and output
FET-input quad op-amp. The AD8544 is looking good so far, with the AD844
running a close second.

... Steve

But you'll still have to discharge the cap once in a while.
Mathematically, the charge on a cap is an indefinite integral, namely
unknown if you don't know its full history. As a practical matter, the
question is "peak voltage since when?"

And a 1N4148 willy typically leak a lot more than a decent fet opamp.

John

I was planning a bleed resistor across the capacitor, as mentioned in an
earlier post. Also, I did mention changing to a fast, low-leakage diode.
.... Steve
 
J

John Larkin

Jan 1, 1970
0
I was planning a bleed resistor across the capacitor, as mentioned in an
earlier post. Also, I did mention changing to a fast, low-leakage diode.
... Steve

The c-b junction of a small-signal transistor (2N4400 maybe) is a
superb low-leakage diode, ans the gate junction of a jfet is even
better.

John
 
S

SDC

Jan 1, 1970
0
John Larkin said:
The c-b junction of a small-signal transistor (2N4400 maybe) is a
superb low-leakage diode, ans the gate junction of a jfet is even
better.

John
I guess you mean to leave the emitter open? I'll check this out. Otherwise,
I'm pretty sure I've got some suitable diodes here.
... Steve
 
J

Jamie

Jan 1, 1970
0
SDC said:
I need a single-supply positive peak detector with a gain of 2. (Previously
I used an op-amp with a gain of 2 followed by a peak detector, but would
like to simplify the circuit.) The input voltage will range from 0V to about
2.5V.
Will the following circuit work? (Please excuse my ignorance - I don't have
much experience with op-amps.)

... Steve

IC=LM324

+-[10K]-+----[10K]----+----------+
| | | |
=== | | |\ |
GND | |\ +-- |-\ |
+--|-\ 1N4148 | >---+---o Vout = Vin(pk) x 2
| >-->|--+----|+/
Vin o-------|+/ | |/
|/ 0.01uF---
looks good here except for the use of the diode
with that diode you have selected the Vfm (Max Forward voltage) is
aprox 0.65 like most diodes in that fam.
this means the first 0.60 or so won't be seen in the
circuit from the your (Vin) also, this will produce a
0.65 error in the calculation of the multiplier due to the
drop.
using a lower (Vfm) diode in my opinion would help things
greatly.
something like what a Germanium diode would do.(aprox 0.3 volts).
also there is the problem of linearity, a little negative feed
back via the same type of diode could counter act it.

just an observation.
 
J

Jamie

Jan 1, 1970
0
SDC said:
SDC said:
I need a single-supply positive peak detector with a gain of 2.
(Previously
I used an op-amp with a gain of 2 followed by a peak detector, but would
like to simplify the circuit.) The input voltage will range from 0V to
about
2.5V.
Will the following circuit work? (Please excuse my ignorance - I don't
have
much experience with op-amps.)

... Steve

IC=LM324

+-[10K]-+----[10K]----+----------+
| | | |
=== | | |\ |
GND | |\ +-- |-\ |
+--|-\ 1N4148 | >---+---o Vout = Vin(pk) x 2
| >-->|--+----|+/
Vin o-------|+/ | |/
|/ 0.01uF---

looks good here except for the use of the diode
with that diode you have selected the Vfm (Max Forward voltage) is
aprox 0.65 like most diodes in that fam.
this means the first 0.60 or so won't be seen in the
circuit from the your (Vin) also, this will produce a
0.65 error in the calculation of the multiplier due to the
drop.
using a lower (Vfm) diode in my opinion would help things
greatly.
something like what a Germanium diode would do.(aprox 0.3 volts).
also there is the problem of linearity, a little negative feed
back via the same type of diode could counter act it.

just an observation.


We've already covered this point in the earlier posts. The diode will not
introduce any error.
... Steve
have it your way, i wouldn't use it.
 
C

Chris

Jan 1, 1970
0
SDC said:
Yes, I do need four - two for the precision rectifier and two for the peak
detector. In my prototype, I used separate CA3130E's. I just checked out a
few of the LFxxx series and the LT1058, but their input/output ranges aren't
suitable. Thanks for the tip and for all of your help. I'm grateful. I'll
check out the TI site in the morning. I'll also check back here in case
someone has made any suggestions. It's getting late here, (NSW Australia),
so I'd better hit the sack.

... Steve

Graham was kind enough to carry this almost to completion. He's
steering you straight here.

As long as you can guarantee your input voltage won't exceed either
your + or - rail, you could do worse than go with the TI part TLV2374.
It's a quad op amp that operates on a single +5V supply, has
rail-to-rail inputs and outputs, 3MHz GBW with 2.4V/uS slew rate, has
only 60pA input current with very low offset drift, and is available in
quad DIP, SOIC and TSSOP packages from Mouser for less than a buck in
100 qty:

http://www-s.ti.com/sc/ds/tlv2374.pdf
http://www.mouser.com/search/refine.aspx?Ntt=TLV2374

If your power supply is going to turn off very quickly, I'd be thinking
about a protection diode to discharge the cap (even at the risk of
higher leakage current), or 2.2K series resistors at the inputs of the
second op amp to safely limit discharge current. And the 10M bleeder
resistor at the cap is a good idea.

By the way, on your original question, I don't see any advantage over
the standard method here:
|
|Vin |\
| o---|+\ |\
| | >->|-o----o-----|+\ Vo
| .-|-/ | +| | >---o----o
| | |/ | --- .-|-/ |
| | | --- | |/ .-.
| | | | | | |
| | | === | 10K| |
| | | GND | '-'
| '---------' | |
| '--------o
| |
| .-.
| | |
| 10K| |
| '-'
| |
| ===
| GND
(created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de)

Stand-alone peak detector, followed by a stand-alone gain block of 2.
Same number of parts, similar connections, no?

Good luck
Chris
 
S

SDC

Jan 1, 1970
0
Chris said:
Graham was kind enough to carry this almost to completion. He's
steering you straight here.

As long as you can guarantee your input voltage won't exceed either
your + or - rail, you could do worse than go with the TI part TLV2374.
It's a quad op amp that operates on a single +5V supply, has
rail-to-rail inputs and outputs, 3MHz GBW with 2.4V/uS slew rate, has
only 60pA input current with very low offset drift, and is available in
quad DIP, SOIC and TSSOP packages from Mouser for less than a buck in
100 qty:

http://www-s.ti.com/sc/ds/tlv2374.pdf
http://www.mouser.com/search/refine.aspx?Ntt=TLV2374

If your power supply is going to turn off very quickly, I'd be thinking
about a protection diode to discharge the cap (even at the risk of
higher leakage current), or 2.2K series resistors at the inputs of the
second op amp to safely limit discharge current. And the 10M bleeder
resistor at the cap is a good idea.

By the way, on your original question, I don't see any advantage over
the standard method here:
|
|Vin |\
| o---|+\ |\
| | >->|-o----o-----|+\ Vo
| .-|-/ | +| | >---o----o
| | |/ | --- .-|-/ |
| | | --- | |/ .-.
| | | | | | |
| | | === | 10K| |
| | | GND | '-'
| '---------' | |
| '--------o
| |
| .-.
| | |
| 10K| |
| '-'
| |
| ===
| GND
(created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de)

Stand-alone peak detector, followed by a stand-alone gain block of 2.
Same number of parts, similar connections, no?

Good luck
Chris

Hello Chris, thanks for the input. I would have thought that accuracy would
be improved by taking the feedback from the output of the second op-amp. Is
there likely to be an advantage in changing to your circuit configuration?
Incidentally, I've now added a voltage-follower transistor, (BC549C), to the
input of the second op-amp, to avoid the input creeping toward the positive
rail. This would, of course, still work with your suggestion.

.... Steve
 
S

SDC

Jan 1, 1970
0
Jamie said:
SDC said:
SDC wrote:

I need a single-supply positive peak detector with a gain of 2.
(Previously

I used an op-amp with a gain of 2 followed by a peak detector, but would
like to simplify the circuit.) The input voltage will range from 0V to
about

2.5V.
Will the following circuit work? (Please excuse my ignorance - I don't
have

much experience with op-amps.)

... Steve

IC=LM324

+-[10K]-+----[10K]----+----------+
| | | |
=== | | |\ |
GND | |\ +-- |-\ |
+--|-\ 1N4148 | >---+---o Vout = Vin(pk) x 2
| >-->|--+----|+/
Vin o-------|+/ | |/
|/ 0.01uF---
---
|
===
GND



looks good here except for the use of the diode
with that diode you have selected the Vfm (Max Forward voltage) is
aprox 0.65 like most diodes in that fam.
this means the first 0.60 or so won't be seen in the
circuit from the your (Vin) also, this will produce a
0.65 error in the calculation of the multiplier due to the
drop.
using a lower (Vfm) diode in my opinion would help things
greatly.
something like what a Germanium diode would do.(aprox 0.3 volts).
also there is the problem of linearity, a little negative feed
back via the same type of diode could counter act it.

just an observation.

We've already covered this point in the earlier posts. The diode will not
introduce any error.
... Steve
have it your way, i wouldn't use it.

Real Programmers Do things like this.
http://webpages.charter.net/jamie_5

What makes you think that the diode will introduce an error, equal to the
diode's forward voltage drop?

.... Steve
 
F

Fred Bartoli

Jan 1, 1970
0
SDC a écrit :
I guess you mean to leave the emitter open? I'll check this out. Otherwise,
I'm pretty sure I've got some suitable diodes here.
.. Steve

As your supply voltage is low enough (5V), just change the 1N4148 for a
small signal NPN emitter follower. That'll nicely reduce the rectifier
leakage.
 
Top