Maker Pro
Maker Pro

Op-amp peak detector with gain

S

SDC

Jan 1, 1970
0
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---
 
E

Eeyore

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---

You need the diode in the feedback loop to avoid seeing a significant effect
from the forward voltage drop.

Graham
 
S

SDC

Jan 1, 1970
0
Eeyore 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---

You need the diode in the feedback loop to avoid seeing a significant effect
from the forward voltage drop.

Graham
Thanks for the reply Graham.
In my circuit, won't the first op-amp's output just rise to about 0.6V
higher and automatically compensate for the diode to balance the circuit, as
it would do in a standard (unity gain) peak detector as shown below:-

IC=LM324
+-------------+---------+
| | |
| | |\ |
| |\ +--|-\ |
+--|-\ 1N4148 | >---+---o Vout = Vin(pk) x 2
| >-->|--+---|+/
Vin o-------|+/ | |/
|/ 0.01uF---
 
S

SDC

Jan 1, 1970
0
SDC said:
Eeyore 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---

You need the diode in the feedback loop to avoid seeing a significant effect
from the forward voltage drop.

Graham
Thanks for the reply Graham.
In my circuit, won't the first op-amp's output just rise to about 0.6V
higher and automatically compensate for the diode to balance the circuit, as
it would do in a standard (unity gain) peak detector as shown below:-

IC=LM324
+-------------+---------+
| | |
| | |\ |
| |\ +--|-\ |
+--|-\ 1N4148 | >---+---o Vout = Vin(pk) x 2
| >-->|--+---|+/
Vin o-------|+/ | |/
|/ 0.01uF---
A typo in my last post with the unity gain peak detector. Vout=Vin(pk), NOT
Vout = Vin(pk) x 2

.... Steve
 
E

Eeyore

Jan 1, 1970
0
SDC said:
Eeyore 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---

You need the diode in the feedback loop to avoid seeing a significant effect
from the forward voltage drop.

Graham
Thanks for the reply Graham.
In my circuit, won't the first op-amp's output just rise to about 0.6V
higher and automatically compensate for the diode to balance the circuit, as
it would do in a standard (unity gain) peak detector as shown below:-

IC=LM324
+-------------+---------+
| | |
| | |\ |
| |\ +--|-\ |
+--|-\ 1N4148 | >---+---o Vout = Vin(pk) x 2
| >-->|--+---|+/
Vin o-------|+/ | |/
|/ 0.01uF---

Yes, silly me ! I haven't actually seen that configuration previously so I
missed that point.

You'll need to consider drift due to the input bias current of the 2nd op-amp
btw.

Please, please don't use am LM324 either. What are your specific requirements
for bandwidth and precision ?

Graham
 
S

SDC

Jan 1, 1970
0
Eeyore said:
Eeyore 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

You need the diode in the feedback loop to avoid seeing a significant effect
from the forward voltage drop.

Graham
Thanks for the reply Graham.
In my circuit, won't the first op-amp's output just rise to about 0.6V
higher and automatically compensate for the diode to balance the circuit, as
it would do in a standard (unity gain) peak detector as shown below:-

IC=LM324
+-------------+---------+
| | |
| | |\ |
| |\ +--|-\ |
+--|-\ 1N4148 | >---+---o Vout = Vin(pk) x 2
| >-->|--+---|+/
Vin o-------|+/ | |/
|/ 0.01uF---

Yes, silly me ! I haven't actually seen that configuration previously so I
missed that point.

You'll need to consider drift due to the input bias current of the 2nd op-amp
btw.

Please, please don't use am LM324 either. What are your specific requirements
for bandwidth and precision ?

Graham

This circuit will only be used for test purposes, and precision isn't too
important. I'm developing a 2-quadrant 12V, <= 40A regenerative brush-motor
controller and will eventually measure both driving and braking currents for
current limiting. I'm using a PIC16F876 to run the show. Although I'm
running the PWM at 20kHz, the motor's inductance smoothes this to a more
constant voltage, so bandwidth isn't much of a problem either. The sensing
element is a 10 milliohm, 3W (Ohmite) current-sensing resistor and the
amplifier's front end is a precision op-amp rectifier with a (maximum) gain
of 5, giving 50mV/A. I want a total gain of 10, so that the output is
100mV/A, hence the extra gain in the peak detector stage.
I need the input to be able to go right to 0V and wanted to keep the parts
count and cost as low as possible. That's why I'm using an LM324. (Also,
it's the only quad op-amp that I have on hand.)
Why is this a bad choice?

.... Steve
 
E

Eeyore

Jan 1, 1970
0
SDC said:
Eeyore said:
message

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

You need the diode in the feedback loop to avoid seeing a significant
effect
from the forward voltage drop.

Graham

Thanks for the reply Graham.
In my circuit, won't the first op-amp's output just rise to about 0.6V
higher and automatically compensate for the diode to balance the circuit, as
it would do in a standard (unity gain) peak detector as shown below:-

IC=LM324
+-------------+---------+
| | |
| | |\ |
| |\ +--|-\ |
+--|-\ 1N4148 | >---+---o Vout = Vin(pk) x 2
| >-->|--+---|+/
Vin o-------|+/ | |/
|/ 0.01uF---

Yes, silly me ! I haven't actually seen that configuration previously so I
missed that point.

You'll need to consider drift due to the input bias current of the 2nd op-amp
btw.

Please, please don't use am LM324 either. What are your specific requirements
for bandwidth and precision ?

Graham

This circuit will only be used for test purposes, and precision isn't too
important. I'm developing a 2-quadrant 12V, <= 40A regenerative brush-motor
controller and will eventually measure both driving and braking currents for
current limiting. I'm using a PIC16F876 to run the show. Although I'm
running the PWM at 20kHz, the motor's inductance smoothes this to a more
constant voltage, so bandwidth isn't much of a problem either. The sensing
element is a 10 milliohm, 3W (Ohmite) current-sensing resistor and the
amplifier's front end is a precision op-amp rectifier with a (maximum) gain
of 5, giving 50mV/A. I want a total gain of 10, so that the output is
100mV/A, hence the extra gain in the peak detector stage.
I need the input to be able to go right to 0V and wanted to keep the parts
count and cost as low as possible. That's why I'm using an LM324. (Also,
it's the only quad op-amp that I have on hand.)
Why is this a bad choice?

I'd have thought that the LM324's inpur bias current will cause quite a high
rate of droop ( or rise ) in the peak detector voltage on the cap. Yes, it's pnp
input. So, in the absence of an input, your output will float toward the supply
rail.

Are they really OK with inputs as low as ground on a single supply btw ?

Graham
 
S

SDC

Jan 1, 1970
0
Eeyore said:
I'd have thought that the LM324's inpur bias current will cause quite a high
rate of droop ( or rise ) in the peak detector voltage on the cap. Yes, it's pnp
input. So, in the absence of an input, your output will float toward the supply
rail.

Are they really OK with inputs as low as ground on a single supply btw ?

Graham

Thanks for the continued interest Graham. The LM324 datasheet claims
that the common-mode input range extends to the negative supply rail, as
does the output if it is not heavily loaded. It also claims fairly low input
bias currents, about 100nA for the '324A. This is why I'm using the '324,
(besides the prev mentioned fact that it's the only quad that I have on
hand). However, I don't want the output to rise in the absence of inputs.
This could potentially be a problem. I was probably going to add a
high-value, (1M to 10M, yet to be determined), bleed resistor across the
cap. Do you think the voltage across the capacitor would still rise due to
the input bias current, even if I used a 10M resistor, allowing for the
leakage of the cap?

.... Steve
 
S

SDC

Jan 1, 1970
0
It appears that mt ISP is having problems. 10 minutes and my reply hasn't
appeared, so here it is again:-

Eeyore said:
I'd have thought that the LM324's inpur bias current will cause quite a high
rate of droop ( or rise ) in the peak detector voltage on the cap. Yes, it's pnp
input. So, in the absence of an input, your output will float toward the supply
rail.

Are they really OK with inputs as low as ground on a single supply btw ?

Graham

Thanks for the continued interest Graham. The LM324 datasheet claims
that the common-mode input range extends to the negative supply rail, as
does the output if it is not heavily loaded. It also claims fairly low input
bias currents, about 100nA for the '324A. This is why I'm using the '324,
(besides the prev mentioned fact that it's the only quad that I have on
hand). However, I don't want the output to rise in the absence of inputs.
This could potentially be a problem. I was probably going to add a
high-value, (1M to 10M, yet to be determined), bleed resistor across the
cap. Do you think the voltage across the capacitor would still rise due to
the input bias current, even if I used a 10M resistor, allowing for the
leakage of the cap?

.... Steve
 
E

Eeyore

Jan 1, 1970
0
SDC said:
Thanks for the continued interest Graham. The LM324 datasheet claims
that the common-mode input range extends to the negative supply rail, as
does the output if it is not heavily loaded. It also claims fairly low input
bias currents, about 100nA for the '324A. This is why I'm using the '324,
(besides the prev mentioned fact that it's the only quad that I have on
hand). However, I don't want the output to rise in the absence of inputs.
This could potentially be a problem. I was probably going to add a
high-value, (1M to 10M, yet to be determined), bleed resistor across the
cap. Do you think the voltage across the capacitor would still rise due to
the input bias current, even if I used a 10M resistor, allowing for the
leakage of the cap?

The 10M will limit the effect to 100.10^-9 x 10.10^ 6 = 1000.10^-3 or 1V !

You need a fet input op-amp.

Graham
 
S

SDC

Jan 1, 1970
0
Eeyore said:
The 10M will limit the effect to 100.10^-9 x 10.10^ 6 = 1000.10^-3 or 1V !

You need a fet input op-amp.

Graham

When you put it like that:- (10^-9 x 10.10^ 6 = 1000.10^-3 or 1V !)
Incidentally, I hadn't realised that the input stage of the '324 was PNP.
I don't have room for 4 single FET input op-amps. I could use a pair of
CA3230's, if I can find them. Off the top of your head, do you know of a
quad FET input op-amp with a common mode input range and output that extends
to 0V, (in a 5V single-supply circuit)?
I'll also do a quick Google
.... Steve
 
E

Eeyore

Jan 1, 1970
0
SDC said:
When you put it like that:- (10^-9 x 10.10^ 6 = 1000.10^-3 or 1V !)
Incidentally, I hadn't realised that the input stage of the '324 was PNP.
I don't have room for 4 single FET input op-amps. I could use a pair of
CA3230's, if I can find them. Off the top of your head, do you know of a
quad FET input op-amp with a common mode input range and output that extends
to 0V, (in a 5V single-supply circuit)?
I'll also do a quick Google

You specifically need 4 ?

Unless DC precision is an a big issue, I'd look at TI's offerings. I'm sorry but
I'm not that familiar with the single supply types.

Graham
 
S

SDC

Jan 1, 1970
0
Eeyore said:
You specifically need 4 ?

Unless DC precision is an a big issue, I'd look at TI's offerings. I'm sorry but
I'm not that familiar with the single supply types.

Graham
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
 
S

SDC

Jan 1, 1970
0
Jamie 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
 
S

SDC

Jan 1, 1970
0
Jamie 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.
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5

I should have added that a fast, low-leakage would make a difference,
though.
.... Steve
 
S

SDC

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.
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5

I should have added that a fast, low-leakage would make a difference,
though.
... Steve
I left out the "diode". I'm getting tired.
.... Steve
 
J

John Larkin

Jan 1, 1970
0
Jamie 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

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
 
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.

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
 
F

Fred Bartoli

Jan 1, 1970
0
SDC a écrit :
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.
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5
I should have added that a fast, low-leakage would make a difference,
though.
... Steve
I left out the "diode". I'm getting tired.
... Steve

No need for a 'fancy' opamp.
You can easily make it like that:


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



Or better if you have enough supply:


+-[10K]-+----[10K]-----------------+----------+
| | | |
=== | 2N7000 + | |\ |
GND | |\ | `---|-\ |
+--|-\ 1N4148 |- | >---+---o Vout = Vin(pk) x 2
| >-->|--+---+---||<. .---|+/
Vin o-------|+/ | | |-| | |/
|/ | | +--'
0.01uF--- RL |
--- | 10K
| | |
=== === ===
GND GND GND
 
S

SDC

Jan 1, 1970
0
"Fred Bartoli"
SDC a écrit :
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.
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5

I should have added that a fast, low-leakage would make a difference,
though.
... Steve
I left out the "diode". I'm getting tired.
... Steve

No need for a 'fancy' opamp.
You can easily make it like that:


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


Or better if you have enough supply:


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

Hi Fred, I only have a 5V supply for this circuit, not high enough for a
MOSFET, so the first of your suggestions is more suitable. It looks good to
me. I don't know why I didn't think of it. It's almost 2am here, so I'd
better get to bed and continue tomorrow. (I said this a couple of hours ago)
Thank you for your help.
.... Steve
 
Top