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.

Odd LM358 behaviour

Status
Not open for further replies.

Mosaic

Well-Known Member
Hi All:
I am using an LM358 as a unity buffer to act as a peak detector. The non inverting is fed by a 1n4148 diode and has a 0.1uf ceramic cap across it.

The oddity is, with no signal thru the diode ..the unity buffer output slowly ( about 5 or 6 seconds) floats up to max output (around 3.5V of a 5V supply). If I place a 10Meg ohm probe across the cap, it discharges in about 3 seconds and all is well, the peak detector works with the 10M load.

Ideally, it seems I might need a much bigger resistor ( 50M to 100M) to permit the peak to have any longevity. These are kinda expensive. I tried using a rev biased diode but the leakage isn't enough, the output still floats high.. A rev. biased schottky 1n5817 leaks like a sieve here...discharges in 0.25 sec. No luck with a rev. biased LED either...no load. Even an el cheapo 1 uf electrolytic..didn't leak enough to offset this weird effect.


I thought the OPamp required an input bias current. It seems this opamp has a -ve input bias current?

Since I am sampling every 1 mSec or so I can live with a bit of droop with a smaller resistor, but this effect is unexpected.

I suppose a 1uF cap might be the way to go....to offset the droop with a smaller/cheaper value 'load' resistor. With an equivalent resistance of about 150 ohms to simulate the OP amps output current of around 20mA avg I see a time constant of about 5xRC = .00015 Sec or .15 mSec. This is ok as I would have around a 0.5mS min charge time, with a similar reset time (less adc sample time of about 40uSec). 3 time constant charging gets the cap close to full voltage.

thx for any input.
 

alec_t

Well-Known Member
Most Helpful Member
Can you post a schematic? I'm assuming a single 5V supply (not dual)?
 

atferrari

Well-Known Member
Hi All:
I am using an LM358 as a unity buffer to act as a peak detector. The non inverting is fed by a 1n4148 diode and has a 0.1uf ceramic cap across it.

The oddity is, with no signal thru the diode ..the unity buffer output slowly ( about 5 or 6 seconds) floats up to max output (around 3.5V of a 5V supply). If I place a 10Meg ohm probe across the cap, it discharges in about 3 seconds and all is well, the peak detector works with the 10M load.

Ideally, it seems I might need a much bigger resistor ( 50M to 100M) to permit the peak to have any longevity. These are kinda expensive. I tried using a rev biased diode but the leakage isn't enough, the output still floats high.. A rev. biased schottky 1n5817 leaks like a sieve here...discharges in 0.25 sec. No luck with a rev. biased LED either...no load. Even an el cheapo 1 uf electrolytic..didn't leak enough to offset this weird effect.


I thought the OPamp required an input bias current. It seems this opamp has a -ve input bias current?

Since I am sampling every 1 mSec or so I can live with a bit of droop with a smaller resistor, but this effect is unexpected.

I suppose a 1uF cap might be the way to go....to offset the droop with a smaller/cheaper value 'load' resistor. With an equivalent resistance of about 150 ohms to simulate the OP amps output current of around 20mA avg I see a time constant of about 5xRC = .00015 Sec or .15 mSec. This is ok as I would have around a 0.5mS min charge time, with a similar reset time (less adc sample time of about 40uSec). 3 time constant charging gets the cap close to full voltage.

thx for any input.

Hola Mosaic,

I recall reading something about that op amp like requiring the output loaded with a resistor going to ???.

I do not even know if this could apply to your problem but it is in the datsheet for sure.

Buena suerte.
 

audioguru

Well-Known Member
Most Helpful Member
The datasheet of the LM358 shows that it has PNP input transistors that need a resistor to ground at the input to prevent the input from floating to a positive voltage.

Maybe you should use an opamp with Fet inputs that have no input bias current.

The diode should be included within the negative feedback loop of the opamp so that the forward voltage of the diode is minimized.
 

atferrari

Well-Known Member
The datasheet of the LM358 shows that it has PNP input transistors that need a resistor to ground at the input to prevent the input from floating to a positive voltage.

Maybe you should use an opamp with Fet inputs that have no input bias current.

The diode should be included within the negative feedback loop of the opamp so that the forward voltage of the diode is minimized.


I was recalling that wrong. Good that you put it right!
 

Mosaic

Well-Known Member
Thx AG, the peak detector is a relative solution to be compared to 3 other similar units for a sound localization module based on amplitudes.

I'll have to look at low voltage single supply opamps, as this is battery operated.
 

MrAl

Well-Known Member
Most Helpful Member
Hello,

Did you try connecting a high value resistor to the OTHER side of the diode instead of at the non inverting input?
The resistor would go from the diode anode to ground, assuming you have the cathode and cap connected to the op amp non inverting input.
 

MrAl

Well-Known Member
Most Helpful Member
Hi again,

Mosaic:
It sounds like your non inverting terminal needs a "DC path to ground". That may be what makes it stay at zero volts for zero input.
The suggesting was just in case the input source was disconnected for the test, and that would mean there was no DC path to ground.
The diode provides roughly 500 Megohms of resistance in the reverse direction, so that would be like putting a 500 Megohm resistor from the non inverting terminal to ground, which may help.
If the source is always present this may not help, but it was just a suggestion to try and it is a simple one.
 
Status
Not open for further replies.

EE World Online Articles

Loading
Top