Pre-amp circuit not quite working - Page 1
Forum section: electronics / beginners

author: Steve Benz
author_rank: Newbie
timestamp: May 01, 2016, 11:31:51 pm
content: I'm attempting to boost the audio volume from my Raspberry Pi. Sure I could buy a USB card, but where's the sport in that? Besides, the project I'm working on already features a mess of OpAmps. Surely I could shove another one in. Below is my LTSpice schematic, which I think I executed correctly in solder, but what I'm observing is that the sound quality is bad. When I look at the signal with my scope, I observe a soft-floor around -70mv. That is, if the signal goes a little bit low, but not enough to hit that limit, it looks fine. If it wants to drive the signal to a little bit less than -70mv, it outputs -70mv, and if it's substantially below, it lets that signal through.To put the pathology another way, when I look at my scope, I see a dotted line at that -70mv mark and no such dotted line above 0v.The trouble seems to start at the OpAmp output. That is, the problem exhibits itself there. The capacitor (Cnp4) passes the problem on through.I can't find any fault in my soldering of the thing. Doesn't mean it isn't there, but I can't spot it. And whatever I did affected both left & right channels equally (this is a stereo amplifier, I just omitted the other half of it in the diagram to make life simpler).My understanding of how C1 works is pretty poor; if I had to guess where to look for the problem, I'd guess there. But since LTSpice isn't showing the problem, then I gotta think it's a problem where the real world components aren't modeled correctly or I'm not picking components in LTSpice that exactly match the parts in my prototype.(If it matters, capacitors Cnp2 and Cnp4 are "non-polarized" capacitors. The rest are electrolytic, polarized capacitors (and I checked again, they're pointed the right wayThanks for any tips!

author: danadak
author_rank: Super Contributor
timestamp: May 01, 2016, 11:36:21 pm
content: I opened schematic but it drops the symbol, part number, for the OpAmpRegards, Dana.

author: DrGeoff
author_rank: Frequent Contributor
timestamp: May 01, 2016, 11:42:26 pm
content: Same here. LM324 not found.Try a 100K from the output of the opamp to ground to force a small amount of bias current through the output transistors and see what happens.

author: uncle_bob
author_rank: Unknown
timestamp: May 01, 2016, 11:43:16 pm
content: HiShoot the schematic to something common like a pdf and post that.Bob

author: Steve Benz
author_rank: Newbie
timestamp: May 02, 2016, 12:29:48 am
content: Hm. Can't figure a way to get OneDrive to cooperate on the screenshot I tried to embed as an image. Sending it as an attachment until I can figure out something better.

author: Steve Benz
author_rank: Newbie
timestamp: May 02, 2016, 12:52:30 am
content: I think DrGeoff got it! (Or close enough to got it.)I took a quick rummage through the resistor bin and came out with a 200k; tried that, no dice. Rummaged more and found a 50k. That didn't eliminate the line either,but it moved itfrom -70mv to -110mv. I tried a 25k and that moved it to a range where the music doesn't hit it (or, if it does, it's hard for me to see it.) A waveform generator would be nice.Are there places to go to read more about this effect?

author: uncle_bob
author_rank: Unknown
timestamp: May 02, 2016, 01:24:12 am
content: HiAre you measuring the output across R6 or at the output of the op-amp? You will get a lot better idea of what is going on at the op amp output pin. It *should* sit at about 2.5V and swing to both sides of 2.5. The output will only go up to within 1.5V of the supply, so it will distort pretty fast.There are better op amps to do this with ...Bob

author: danadak
author_rank: Super Contributor
timestamp: May 02, 2016, 02:34:08 am
content: You have a G = 26. If the 5.25 and bias tree spot on, ignoring offsets,then bias point is 2.625V.The output will not common mode to ground to + rail, in fact its ~ 1.2 Vfrom datasheet, no load.I got 40 mV in max, no distortion, thats nominal. 50 mV output starts to clip.Just take the difference form bias point, subtract from 5.25 - 1.2, and divide thatby G to get input before limiting occurs.Sim attached.Regards, Dana.

author: Johnb5012
author_rank: Newbie
timestamp: May 02, 2016, 02:47:08 am
content: The 33uf coupling cap seems too high to me. Should that be a 3.3uf cap?

author: Audioguru
author_rank: Super Contributor
timestamp: May 02, 2016, 02:49:26 am
content: The LM324 is no good for audio because it is noisy (lots of hiss), has crossover distortion (the datasheet recommends a resistor from the output pin of the IC to ground, try 560 ohms) and has a slew rate so low that it cannot pass high level frequencies above only 2kHz. But your power supply voltage is so low that the opamp has no high level signals so its output frequencies will go as high as about 25kHz.You obviously did not calculate the low cutoff frequency of Cnp2 (33uF) and R4 (1M) because they cutoff at 0.005Hz and Cnp2 takes 165 seconds to fully charge. For audio then R4 can be 100k and Cnp2 can be a 100nF (0.1uF) film capacitor.

author: danadak
author_rank: Super Contributor
timestamp: May 02, 2016, 10:27:01 am
content: The 1M is effectively out of the signal path, its the fdbk 33 uF thatdetermines most of the LF response.Attached a sim where I raised the fdbk C to 3300 uF.Regards, Dana.

author: Johnb5012
author_rank: Newbie
timestamp: May 02, 2016, 01:56:57 pm
content: Dana, On your schematic, C1 and R3 form the highpass filter that audioguru and I were talking about. On the OP's schematic its Cnp2 and R4.

author: Zero999
author_rank: Super Contributor
timestamp: May 02, 2016, 03:23:53 pm
content: Try the TLC072.http://www.ti.com/cn/lit/gpn/tlc072-q1

author: danadak
author_rank: Super Contributor
timestamp: May 02, 2016, 09:42:15 pm
content: I understand its a filter, but "effectively" it does not matter, specifically toyour point that breakpoint is essentially DC which means the filter is effectivelydoing nothing but blocking DC from sig source and keeping bias networkfunctioning at the desired bias point. The 1M is to keep Zin high.You obviously did not calculate the low cutoff frequency of Cnp2 (33uF) and R4 (1M) because they cutoff at 0.005HzRegards, Dana.

author: Audioguru
author_rank: Super Contributor
timestamp: May 03, 2016, 01:19:41 am
content: The amplifier does not need a 1M input impedance and it does not need a huge input capacitor that takes a long time to charge. 0.005Hz is silly, use a capacitor that rolls off below 20Hz (for music or at a higher frequency for voices) instead then it charges quickly.

author: uncle_bob
author_rank: Unknown
timestamp: May 03, 2016, 01:33:22 am
content: HiWell, if we are re-designing the circuit, they still make LM380's. Not so great at 5V, but fine with a bit more voltage.Bob

author: Cerebus
author_rank: Super Contributor
timestamp: May 04, 2016, 02:50:31 pm
content: Quote from: Steve Benz on May 01, 2016, 11:31:51 pmHello Steve.A tip, if I may, on how to get quick, effective help around here. You've given a rather vague description of your problem. That's fine, you're a beginner, and we ought not to expect you to have yet grasped quite the right vocabulary and idioms for describing a problem like thisbutyou must have heard the phrase "A picture is worth a thousand words". If you but thought a moment, you have those pictures. You say "When I look at the signal with my scope" - but we can't see that. However, if you had grabbed a few screenshots from the scope and posted those with your question we could have seen them and understood your problem much, much faster, if not immediately.If it isn't already obvious from other's replies your real problem is with your choice of op amp. You've got a very old op amp that was designed for power supply rails on the order of +/15V (i.e. a 30V supply) and it's really not happy working with a 5V supply. Yes, it will work after a fashion but not well. To compound the problem it's not a particularly good op amp for its age anyway - poor noise, poor slew rate, awful crossover distortion and poor basic linearity. Perversely, your choice of op amp got you a, likely correct, answer quickly despite the vague description precisely because the LM324 is known to have a nasty quirk near mid rail that goes away if you put a sufficiently large pre-load on it.You'd be better off picking an op amp specifically designed to work well off a 5V rail and that has a rail-to-rail output specification and ideally a rail-to-rail input specification as well. I'll leave others to suggest exactly what as I rarely use such parts and I'm likely to pick a part that reflects my design biases (which would get you into precision DC or old professional audio territory and you don't care about DC accuracy or having +22 dBm headroom and a balanced output).

author: danadak
author_rank: Super Contributor
timestamp: May 04, 2016, 05:06:18 pm
content: Here is a zillion R-R Opamps to choose from -http://www.digikey.com/product-search/en/integrated-circuits-ics/linear-amplifiers-instrumentation-op-amps-buffer-amps/2556125?k=&pkeyword=&pv41=112&FV=fff40027%2Cfff800dd&mnonly=0&newproducts=0&ColumnSort=0&page=1&quantity=0&ptm=0&fid=0&pageSize=25Regards, Dana.