op-amp questions

I've been tinkering with these nifty Microchip mcp6022 op-amps. I've run into some things that I don't understand (again). I'm trying to garner additional gain by using both halves of the dual op-amp. I have attached a sample schematic of what I was trying. You can see that the + input of U1 is biased at 1/2 Vcc (Vcc=5V), therefore the output of U1 idles at ~2.5V. That's all well and good, but when I tried feeding that into the + input of U2 (trying to avoid plugging in 2 more resistors), I find that the output of U2 stays locked to 5V (unless I ground the + input in which case it promptly causes the output to go to ground). I ended up having to change U2 to be setup like U1 with a voltage divider on the + input and feeding the signal thru a decoupling cap into the - input (thru R4 which had been disconnected from ground).

Now, what I was thinking is that U2 was trying to amplify the 2.5V input by

10 (or is 11?) which caused the output to remain stuck on the positive rail.

1) Does that sound right? If that's the case, why doesn't U1 do the same thing with the bias voltage that is applied to it's + input? It has something to do with R4 being grounded?

After I modified the circuit to have the second stage (U2) work like U1, all was fine. So I then tried to balance the over all gain between the two stages. When I lowered the gain of the first section to 50, and raised the second one to 50 by using 2K resistors for R4 and R5 I also noticed that the noise level went up quite a bit. I thought that balancing the gain was the correct thing to do to minimize noise.

2) Am I just seeing the effects of the myriad of other impacts that I made by lowering the gain of the first stage? The noise is a 100kHz signal coming from another circuit that is apparently being picked up by microphone leads. Perhaps by lowering the gain of the first stage, I tilted the frequency response more towards level causing the highs to be rolled off less?

The desired signal is in the 500Hz to 1kHz range (clock ticks).

Reply to
Anthony Fremont
Loading thread data ...

Oops, I guess it would help to actually attach the schematic.

begin 666 op-amp.GIF M1TE&.#EAV@-:`O*&NJJ MJK;*ZJNNMO^&ZJRTUFKKF+'"JFNNO.[J:Z]-W2KLL,066R*POR:+[++*-KNI ML=!&*^VTWC%KK;/87JMMMC-2Z^VWX(;;V;;D:FNYVX[+;K[KLMJ2LO MNO3.:V^]D\\&K[[[\\]@L1OO9K4^Z^NPJGNYPZZ[7- 7NMJ?N>YNT(^CP=(PT(//*Z$*NS-"CITP@2*, M80O?L\\(:VA!5,S38Z$J7PQ[*$#$W!%#K_P!(D/NE,(A(/(T/F=5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G&HFK:J+K8'#JV?$"E9&;U M-%8L4A.MC5JK7X6"3+X&=CEX'>R]#+@ZO]95C+!U;0FM.9668N2TL15L;HF" M4W?J-*L,2J=G[^)8SD;V;LZ=+&4J:Y#+#DNT,MOL9:9;5=!*\\KIJ:NAKB_G; M(:VTM1JI+7!#A=LR,I%?,#GO%IGI1QGYU?((_GS!?_W3:E^YS;:8%SS MP.M(Z+$O[U''SP^8__4M[8^M_E]; M#OED';]4E _LXP=?2O.G(/-E[7S1'^3[TM\\EUJ,^6^D^V'1OW31_ZK 49_)SR3KS8@(Q#7-T3T+T+A9EH,R*.G\\48E9SM2PD#ME MD3P%U&:1I0.4Q$-%U$15U%/SOU:;C"F%GT65U$FE5%OS-%B[+RIM)RMUQ=NA MB+4XFH%)3YFLDJ;Q5.-HG[(TS(D`U9J"NS,%RC0E"OR:4QRCT0JTB."3TS)- MNSH=F^%8D1&1FP015CWU$ L!ULCWI=;FBMK&)2+NRUA-HUR[R5J^35RGP-YL4\\FPK=-$-=Y3A>

M\\*U%FBU>X_O>\\>M>*HU>DI1=5MLA'GK?9[U8^ETB)KK?7&E?])6_OY79^UG? M;UP@`)[915S>E?T(S?VU5#&>+$ZLF["'98KJQ>"X.X"=9@B'A@ M!+XV\\07@8XU\\FYADM9DCNY? 3Y&3.9%YF9@\\YYLX-YK089EFV MY@"^YFP>B6>^L%SF9D)VYF]^D&C>VFEFCFHF9VTV9G7^97%NIW"6.GX]:/]B MK-V(5DF!!E^_\\L>44$_T*^B.MD"/KF.*MB&?4NC^2!1GJD[M$FDXGNB5'A:0 MWLVUJI93

Reply to
Anthony Fremont

The news servers clipped the attachment off. Please describe the resistor configuration for me.

Without seeing your circuit, I can only guess that your configuration is doing its best to get the two inputs equal to each other by slamming the output to +5.

Opamps amplify the difference voltage between the two inputs. Does your configuration produce about zero volts difference between the two inputs when the signal is 2.5 and the output is 2.5 volts?

Can't see R4.

Equally dividing the gain maximizes the bandwidth. It doesn't necessarily decrease the noise.

Yes.

Reply to
John Popelish

(snip)

I take it, this is the version that works. What about the first one that locks up?

And, if you are going to post a schematic, please don't also cross post to design, since the attachments cannot appear, there. At most, post a separate announcement there that you are starting a thread here. Anyone interested will look for it where the schematic can appear.

Reply to
John Popelish

Please ignore my previous reply. This is definitely the version that doesn't work. The feedback divider on the second stage connects to the negative rail, so that stage amplifies the voltage it receives with respect to that voltage. You could replace the grounded resistor with a pair of resistors in series, each double that value, connected across the supply, with the center node connected to the - input of the opamp. This would cause the amplifier to amplify the signal with respect to half the supply voltage. It would work, but it would not be my first choice. It consumes power, makes noise, and the DC bias point depends on the ratio of the two resistors to the ratio used in the first stage. But you might simulate this, to convince yourself that it does work.

Reply to
John Popelish

There are a couple of mistakes.

  1. The first stage will not amplify that much, because the impedance of your mike is in series with the input resistor. If it is an electret mike, the impedance will be about as high as the resistor for the supply, usually in the 2 to 6k range. The whole gain is probably less than 20. Thus you can as well drop R5 entirely. Place a cap 330p across R3 attenuating higher frequencies than 5kHz.
  2. You didn't show the mike bias circuit, but I strongly believe it might be responsible for the ripple. Use a capacitor across the mike to attenuate the high frequencies, something like 5.6n to 10n depending on your feeding resistor. The supply should be filtered too.
  3. The second stage will not work at all, how can the 100k/33k divider pull up the +input to 2.5V? even with the output at +5V the +node will be only a quarter of it. Drop this stage all together. If you want more gain increase R3 to 1M or even more.
--
ciao Ban
Apricale, Italy
Reply to
Ban

Try hooking the bottom of R4 to the u1 through a 10uF cap. Connect the in+ of u1 to the in+ of u2. That will bias U2 to 2.5 volts also.

In the current form it is trying to make a gain of 4 (gain=R3/R4 + 1) to a

2.5 volt input (10 volts) and is railing out at 5V.

This is in addition to the gain of 1001 for the first stage and makes a total gain of 4000!!

a +/-1mV input will drive the outputs to the rails. is that what you were after. With gains thi high you start running into the opamps openloop response as frequency goes up.

The noise pickup is usually due to layout (especially at these gains). you have to keep everything tight and small.

Reply to
mook Johnson

I wondered if it would be kosher to use one divider to bias both amps. What are the negative consequences of doing this?

Ok, I think I understand that now.

Yes, I want huge amounts of gain. I don't care about distortion since the ultimate goal is to create a nice pulse "envelope" that frames the entire tick sound. This is done by sending the amplified output to a comparator that (now) has it's - input biased at 1.5V. The DC bias on the output of the op-amp holds the comparator output high during silent periods. When a tick occurs, the op-amps output dives below 1.5V triggering the comparator. This really squares things up, but still doesn't frame the full tick/tock sound. This is done by a 74122 monostable multivibrator (I really wanted a

74221, but I screwed up when I ordered parts. After all, isn't that what engineering is....making things you need from things you actually have?). The multivibrator is set to time out ~80mS after the tick sound dies down enough to stop triggering the comparator and multivibrator. This works very nicely for driving an interrupt pin on a PIC, even though the timing cycle varies with each tick due to the multiple retriggers.

Ultimately, I will use the correct multivibrator (the 74221 is non-retriggerable) and will be able to control it from a PIC. This will let allow the PIC to "learn" approximately how long each tick/tock cycle is. By knowing this, the PIC will be able to cancel the timing cycle just before it expects to hear another tick/tock sound. This should make the circuit more immune to other spurious noises that might be present inside the clock or in the ambient environment. By the time I get that working, I expect that I'll be in violation of a whole slew of patents, but it's just for my own use so there. ;-)

That's kinda what I figured.

Reply to
Anthony Fremont

If you have a PIC in the circuit, stretch your programming muscles, and eliminate as much of the external circuitry as you can. You can easily build your spurious noise window in software.

-Chuck

Reply to
Chuck Harris

I know, but programming is actually where my strengths lie. I'm actually stretching my hardware design muscles as much as possible. Software is easy. ;-)

Reply to
Anthony Fremont

Yup, thats going to be about 3 times gain on the last stage. 3 times 2.5 V, that pritty much sums it up!.

--
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5
Reply to
Jamie

excuse me, try 4 times.

--
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5
Reply to
Jamie

(snip) This can work pretty well, if both amps are inverting, because this configuration draws almost zero current from the bias voltage node.

Reply to
John Popelish

It's rather odd when using two op amps to break the gain into two portions with such a large disparity, namely 100 and 4.

--
 Thanks,
    - Win
Reply to
Winfield Hill

Forgive me if I am off base here as I didn't get any earlier posts to this thread and high haven't seen the schematic, but it is common practice to place the high gain sections early in the signal chain to minimize noise.

Reply to
G. Schindler

No, the schematic I posted is the one that locks up. What works is to duplicate the first stage by building a resistive voltage divider on the

  • input, and then connecting the output of the first to the - input of the second via a decoupling cap via R4.

appear.

Sorry, I didn't think it would hurt anything if it didn't appear there. That's kinda why I cross posted it.

Reply to
Anthony Fremont

"John Popelish"

OK, I think I understand. Since that divider divides the output by ~4, that means that a 1V input to the + input would drive the output to 4V in order to present 1V to the - input to compensate. Right?

If I understand this, that would mean that the ~2.5V DC bias on the signal coming from the first amp would roughly cancel the ~2.5V coming from the divider you describe. Wouldn't that idle the output at roughly ground level and clip half of the signal?

Reply to
Anthony Fremont

of your

the

Actually, my "mic" is an 8 ohm speaker from a PC. I did note that adding the second stage results in nice oscillations when I disconnect the "mic" or try to use a high impedance mic (such as an electret). Thanks for the hint about the mic impedance being added to the input resistor.

usually in

can as

Ok, thanks. I'll try that. I've been using a .1uF to ground at the - input of U2.

might be

attenuate the

I'll try that when I debug using a real microphone instead of the 8 ohm speaker. The speaker seems to work pretty well actually, it's just a tad big/inconvenient.

pull

only a

increase

I guess you mean R6. So you recommend just using one stage with allot of gain. That would leave the other amp open to use as an active filter. When I build my first "boxed" prototype (it all lives on solderless breadboard right now), I'll use an external pot to tweak the gain.

Reply to
Anthony Fremont

(snip)

Right. Negative feedback always drives the - input of an opamp to match the + input, or hit a limit, trying.

Almost. 2.5 volts becomes the "ground" reference voltage for the amplifier, so that all signals are amplified in proportion to how far they are from this reference voltage. At zero signal, the outputs have nothing to amplify, so the output sits at the reference voltage of 2.5 volts.

In your defective schematic, the first stage had a divider to produce a 2.5 volt reference, but the second stage used the negative rail as its reference. So the second stage saw the signal from the first stage as being a 2.5 volt signal when it was amplifying nothing. Either all stages have to have the same zero signal reference voltage, or they have to be separated by coupling capacitors that charge up to he difference between their individual reference voltages, blocking transmission of that DC error.

Reply to
John Popelish

It doesn't reach the pain threshold, but it does leave dangling threads with no connection to your graphics. Most of the people who keep an eye of basics and design, also look in in a.b.s.e, so you will find them by posting to only the most appropriate newsgroup.

Reply to
John Popelish

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.