OP amp troubles

Thread Starter

TzTok Shane

Joined Jul 15, 2012
16
For the peak detector i was thinking about just making a simple capacitor with a resistor and diode. I do want this project to look nice and everything but for the most part its still my first one and some of the things I have been looking up with all the level shifters and stuff seem a bit over my head. I will get into all of that when i do my other projects further down the line. I was thinking about making a virtual ground and a simple peak detector and see how that goes.
 

Audioguru

Joined Dec 20, 2007
11,248
The input of my circuit uses an ordinary non-inverting opamp with its bias provided by a voltage divider. It is biased at half the supply voltage so its output can swing normally up and down. It can drive your two-pole filter opamp properly. Since its opamp is connected as non-inverting then its input resistance is very high so a virtual ground circuit is not needed and a simple voltage divider is fine.

Then I posted my peak detector circuit that produces an output that is 0VDC to +5VDC depending on signal level. It can have a gain adjustment if you want.
My peak detector circuit is inverting so the input never becomes negative. Its input uses a coupling capacitor for level shifting.

The input of most opamps must never go more negative than its power supply which is 0V here since the supply does not have dual polarities. But the opamps I listed have an input that works fine down to -0.3V and works oddly if it becomes more negative than -0.3V. Your input signal might swing +1.5V to -1.5V.

Your idea for a simple peak detector causes all kinds of problems because it is too simple.
My peak detector uses an opamp (and a transistor instead of a diode). The very high internal gain of the opamp cancels the 0.7V voltage lost by your diode or my transistor base-emitter.

Your resistor slowly charges your filter capacitor but my transistor charges my filter capacitor extremely fast.
 

Audioguru

Joined Dec 20, 2007
11,248
You deleted two posts;
1) My peak detector works from a supply that is 3V to 44V for the MC33171 opamp I use. It is 3V to 32V for an old LM358 or LM324.

The gain is the values of R8/R9. For a gain of 5.1 times then R8 is 510k and R9 is 100k.
 

Thread Starter

TzTok Shane

Joined Jul 15, 2012
16
Yea i did delete those posts i am having a very hard time getting the voltage divider to work... the leds just get stuck on, and that's it.
 

Thread Starter

TzTok Shane

Joined Jul 15, 2012
16
If i take the smaller of capacitors off my lowpass filter and pull it out from the ground so its not connected then the filter still appears to work the exact same, i have no clue why it does that.
 

Audioguru

Joined Dec 20, 2007
11,248
Yea i did delete those posts i am having a very hard time getting the voltage divider to work... the leds just get stuck on, and that's it.
Without seeing your complete schematic with a voltage divider SOMEWHERE then we don't know what you are doing.

I use Microsoft Paint program to make schematics. Usually I simply copy and paste pieces of other schematics or parts.
 

Thread Starter

TzTok Shane

Joined Jul 15, 2012
16
i think a part of the problem might be because im using a breadboard to test it on maybe i hooked something up wrong.. is there a way i can send you some pictures?
 

Audioguru

Joined Dec 20, 2007
11,248
If i take the smaller of capacitors off my lowpass filter and pull it out from the ground so its not connected then the filter still appears to work the exact same, i have no clue why it does that.
With C2 disconnected then it is no longer a 2-pole filter. I think it will oscillate.

I don't think you understand how an inverting opamp works. It is used in my peak detector circuit.
Its opamp works with its input as low as 0V (but most other opamps do not work). When the input to the input resistor goes negative then the opamp inverts and its output goes positive. Then the current in its negative feedback resistor is the same as the current in the input resistor but is inverted so the input pin of the opamp remains at 0V.
 

Audioguru

Joined Dec 20, 2007
11,248
Your deleted post about using a breadboard and the LEDs are turned on all the time:
I hate looking at the tangle of messy wires on a breadboard.

You did not show your schematic so you probably drew and wired it wrong.

You talked about using a voltage divider to bias something, maybe your filter circuit?
Then the filter circuit drives a transistor that turns on the LEDs?
Of course the LEDs are turned on all the time, the output of the filter circuit has a positive voltage all the time.
 

Thread Starter

TzTok Shane

Joined Jul 15, 2012
16
like i said im just beginning :p i figured out the problem, it wasnt really working at all because one of my grounds (c2) wasnt connected, the wire was all ripped apart. Then i didn't have enough gain on my first op amp so the voltage divider wasn't turning on my transistor ^.^ =D it is working a lot smoother now, im about to go to the store to get the few parts i need to make your circuit you gave me.
 
Top