Single-supply OpAmp to bring audio up to Line Level - Page 1
Forum section: electronics / beginners

author: akasaka
author_rank: Regular Contributor
timestamp: April 04, 2023, 01:31:51 pm
content: I'm trying to build a small MIDI synth box as a project, based around the Aides eVY1 module.I built a small test rig connecting the outputs the manufacturer claims to be "headphone out" to the line in of my amp, but the sound is very quiet with more power supply noise than actual music, and that is with the amp dial turned up to the max and MIDI volume on the max too. "Speaker out" of the module is not an option, since it's designed for actual speakers with a Class D amp inside it (I think — the tiny-chip-that-outputs-PWMish-stuff kind of thing).Measuring with my scope I got around 0.7-0.8Vpp out of it, even though I always thought 0dBV is 0.775V apparently that is not enough — and reading up the specs on the Line Level suggests I need to go to around 1.6Vpp for +4dbU.For that I chose to use a TL072 opamp configured for 2x gain. However, the synth isn't going to have bipolar power, so I have to make do with +5V and GND only.Reading up on OpAmps and all I eventually came up with the following output stage, rightmost section:U7 is the TL072, +Vcc is to 5V, -Vcc to Gnd.Then pairs of R16/R17 and R18/R19 are used as voltage dividers to set the positive inputs to 2.5V — the midpoint between the +Vcc and -Vcc rails of the opamp.C3 and C4 are blocking that voltage from going back into EVY_HPL/HPR which are my 0.7Vpp outputs from the generator chip.Am I correct in this schematic and would it produce the desired 1.6Vpp output?(If so, would I need some super precise resistors for the dividers?)Thanks!

author: Roehrenonkel
author_rank: Frequent Contributor
timestamp: April 04, 2023, 02:23:24 pm
content: Hi,reverse C3 and C4. Put a C (10uF each) between R6.1 and R12.1 and ground.Have fun

author: jonpaul
author_rank: Super Contributor
timestamp: April 04, 2023, 02:37:43 pm
content: 0 dbm = 0.775 VRMS, into 600 ohms.Unclear your actual load, or understanding of PP vs RMS vs DBM.Suggest you check the TL072 specs,and app notes.Better for a single supply opamp, no bipolar and just AC couple at output.Jon

author: akasaka
author_rank: Regular Contributor
timestamp: April 04, 2023, 02:45:46 pm
content: jonpaulThe load will be a standard line-input of an amplifier, I'm assuming it's 10kOhms.RoehrenonkelThanks for the notice, how do I properly determine the polarity of blocker caps such as C3/C4?----We ran an LTSpice simulation with a friend and he says this schematic will clip off the top half-wave of the output, because the opamp will try to go above 5V on the output when the input pulls to (2.5+0.6)=3.1 [and subsequently 3.1 x2 = 6.2].His suggestion is to change R17, R18 to 50k to shift the midpoint voltage down to around 1.8V.And change the OpAmp to a Rail-to-Rail one, such as MCP6232https://akizukidenshi.com/download/ds/microchip/mcp6232.pdf(one I can easily find locally, but it's suspicious they don't have THD graphs in the datasheet)Would that be a sensible change?Thanks

author: Benta
author_rank: Super Contributor
timestamp: April 04, 2023, 02:59:20 pm
content: Put the extra caps like roehrenonkel said. That will set the DC levels correctly. The "-" inputs should also be biased to 2.5 V, which they're not in your original circuit.

author: Roehrenonkel
author_rank: Frequent Contributor
timestamp: April 04, 2023, 04:02:18 pm
content: Hi akasaka,Quote from: akasaka on April 04, 2023, 02:45:46 pmPolarity: I was just guessing. ;-)) No, i assume the input (evy_XX) is on ground-level and the bias-network is +2.5V - so positive side of elko goes to the right.(Better use film-caps anyway)Simulation: It was run with an AC- and DC-gain of two (2). Simulate again with my proposed caps and you'll have AC-gain of 2 and DC-gain of 1.Electronics is great, isn't it?Have fun.

author: Terry Bites
author_rank: Super Contributor
timestamp: April 04, 2023, 09:54:45 pm
content: With 100k of input impedance, you only need a 220n coupling capacitor to get down to an 8Hz corner, so just use a non polarised type to avoid regrets.I'd use 100n, 16Hz is low enough for human needs.The DC gain needs to be zero or you end up amplifiying the mid-rail bais voltage.As Roehrenonkel notes you need capacitors in series with R6 R12 to ground to make this so.It also lets you add more AC gain without DC problems.2.2u (negative to ground) is enough unless you need to go below 8Hz. Again 1u (for 16Hz) will do.You can get a non-polarised 0805 2.2u for $0.20ea.Generate your mid rail bias with a single bypassed divider. This will help decouple your inputs from power rail noise.

author: james_s
author_rank: Super Contributor
timestamp: April 04, 2023, 10:03:27 pm
content: If you decide you don't want to mess with the single supply you can get dual output DC-DC converter modules for a few dollars that will give you a split supply from whatever input you have. I've used one that takes 3.3V and gives me +/-15V in one of my projects that uses op amps.

author: akasaka
author_rank: Regular Contributor
timestamp: April 05, 2023, 12:25:23 am
content: Hmm, I tried to build a simulation of this (work computer so I only have CircuitLab here)However I'm getting less voltage amplitude on the output than on the input?(the trial expired and deleted my graph as I was about to snapshot it, dammit!)I'll try to build it in real parts later today hopefully with a TL072

author: akasaka
author_rank: Regular Contributor
timestamp: April 05, 2023, 09:24:18 am
content: OK, so I tried building the schematic fromTerry Bites.For C1, C4 I used 100nF ceramic capacitorsFor C2, C3 and C5 I used electrolytic capacitors with negative to ground.The opamp is TL072CN.All the values I picked as listed on the schematic.Additionally I added a 220uF capacitor across the power line to reduce noise.The outputs of the circuit I sent directly into the amp's line in (no DC blockers for now).The good news is, nothing has exploded!The bad news is, the sound is even more silent and distorted than it was without the output stage.The Vref point is spot on at 2.54V as expected, but the output is much less, IIRC around 0.2V max now.(Frankly, the piano sample sounds totally fine but quiet, but the vocal synthesis mode is distorted)Is it important to have film caps for this application, or am I missing something?Thanks

author: Terry Bites
author_rank: Super Contributor
timestamp: April 05, 2023, 12:11:43 pm
content: Thats the TL072 for you. Its a "high voltage" opamp.Its output can only swing to within 1.5V (typical) of the rails. So you'll max out at 2Vpp (0.7V RMS, -3.01dBV) or less.You hit the lower limit of the input CM range at GND+1.5V as well.It'll never work with a TL07xx. Don't use a jfet input opamp.You need a single supply /RIRO opamp. eg LMP7732 (about $4).Note that noise is proportional to the sqrt of the bandwidth.Adding a cap across the fb resistor will fix that. eg 20kHz as shown.1% resistors will be more than good enough. Output CMRR is not a problem in this application.You could add noise and expense with a DC-DC converter.https://www.analog.com/en/design-center/interactive-design-tools/dbconvert.html

author: akasaka
author_rank: Regular Contributor
timestamp: April 05, 2023, 12:36:41 pm
content: Thanks for the explanation!Yep, my friend helped run another LTSpice simulation and it was exactly like that.Actually the ST TL072CN datasheet says it goes in the range of -12 to +15 when powered by ±15V, so it's even worse than you've described.To add insult to injury, my wife (whose parts box I snatched the OPAmps out of) said she bought them a while ago in a big lot and some turned out to be noisy fakes...I've ordered the Rail-to-Rail MCP6232 from Akizuki, the one I've mentioned a few posts above (https://akizukidenshi.com/download/ds/microchip/mcp6232.pdf). Hopefully it arrives within next week and everything works fine. Also tossed in some film caps for DC blockers while I was at it.Speaking of DC-DC, I'll likely have to add one for 3V3 power since the eVY1 isn't 5V-tolerant even though it runs off 5V. Would the cap I added across +5V-GND be enough to cover for that noise?

author: Terry Bites
author_rank: Super Contributor
timestamp: April 05, 2023, 04:24:53 pm
content: That'll do. Expect an SNR of about 100dB (if you limit the BW to 20kHz). Job done.Ceramic caps have a small voltage dependent change in capacitance.You get a little more distortion and they are sometimes microphonic.If you're worried about being dragged from your home at gun point by a drooling audiophile use film.Tantalums would be the best compromise.T491 Series 2.2u are about $0.30ea.

author: james_s
author_rank: Super Contributor
timestamp: April 05, 2023, 06:12:34 pm
content: Quote from: Terry Bites on April 05, 2023, 04:24:53 pmIt can be a surprisingly large change in capacitance, especially some of the dielectrics, IIRC they can lose something like 80% of their rated value when there is a DC voltage across them. These traits are not as widely known as they ought to be, I got bit a few times before I learned about it.

author: akasaka
author_rank: Regular Contributor
timestamp: April 08, 2023, 03:32:20 am
content: Just as expected the new OpAmp works flawlessly!One thing worthy of note is when I went to swap the Opamp out, I've noticed the +IN_B and +V inputs of my current one were wired the wrong way around... so maybe it would have worked with the TLPThanks to everyone for your help

author: donlisms
author_rank: Frequent Contributor
timestamp: April 08, 2023, 07:32:41 pm
content: My suspicions, my wondering, started with the original post. If there's enough voltage to drive headphones, there should be enough to drive a power amp. I wonder if there is something else wrong. I would try driving something else, or driving the amp with something else, or take some measurements or gather some data in some way about whether the pieces are doing what they're supposed to individually, before combining them. It just strikes me as odd that it didn't "just work." I've done this kind of thing lots of times.

author: akasaka
author_rank: Regular Contributor
timestamp: April 08, 2023, 07:37:38 pm
content: The amp I'm using is my daily driver for CDs, PC (through an external DAC) and all sorts of gear — no problems there. In fact it's not even an amp but a pair of powered JBL 305 monitors :-)That being said the output just goes direct to the DAC pins on the CPU inside the module, so I think they just handicapped it somehow in firmware and then said it's for "headphones" so that people who want an actual synth would go and buy the premade box edition of the thing for 3x the price (even counting in all the extra parts, not to mention the fun)I.e. another port they labeled as "NC" turned out to be an UART Tx pin which let me see logs to get rid of their stupid "DRM"