Differential Audio Signal to Single-Ended Audio Signal - use op-amp?  - Page 1
Forum section: electronics / beginners

author: LooseJunkHater
author_rank: Frequent Contributor
timestamp: April 11, 2025, 07:33:40 pm
content: Probably super basic, but I want to convert a differential audio signal (ex. from the OUTPUT of some old bluetooth earbuds) to a single-ended audio signal (ex. to input the signal into aTPA3110 module), using op-amps. I used a multimeter to confirm that neither side of the output is connected to ground, so I'm assuming it must be using a differential signal driving the earbud speaker diaphragm.I'm aware that the TPA3110 supports *either* a single ended/differential audio signal, however, I don't want to modify the pre-built module (but I have done it before without issue).I came across this basic schematic of converting the differential signal to single-ended, and my understanding is that it keeps a gain of 1x (ie. no gain), butI just want to confirm with y'all that I'm understanding it correctly and that this will work.

author: LooseJunkHater
author_rank: Frequent Contributor
timestamp: April 11, 2025, 07:39:10 pm
content: Maybe as a follow-up question, I came across the following circuit fromthis schematic, which appears to convert a single-ended signal to differential.For both circuits, I notice that avoltage(I assume a stable reference voltage?)is applied to the +input of the op-amp;why is this being done?

author: bson
author_rank: Unknown
timestamp: April 12, 2025, 12:19:14 am
content: Quote from: LooseJunkHater on April 11, 2025, 07:39:10 pmWhen Vout+ is 0V the difference in the second opamp's inputs is 12V, and its output Vout- is 12V (assuming unity gain).When Vout+ is 12V the difference is 0V, and Vout- is 0V.

author: bson
author_rank: Unknown
timestamp: April 12, 2025, 12:20:50 am
content: In the first post, isn't the Vin+ input already single-ended? You could just AC couple and buffer it.

author: Buriedcode
author_rank: Super Contributor
timestamp: April 12, 2025, 01:35:40 am
content: Quote from: bson on April 12, 2025, 12:20:50 amOne could do that - just use the positive output, AC coupled, for half the amplitude of the differential signal, but that can defeat one of the benefits of bluetooth modules/devices driving speakers differentially (apart from doubling the amplitude for a low voltage).. and that is common mode noise. Bluetooth SOC devices - the highly integrated stuff thats everywhere these days can have a fair bit of noise from its onboard systems riding on the audio outputs. Since thise noise is on both the positive and negative outputs of each speaker, they cancel.You'll have to test your particular earbuds -they could be just finein this respect, but the CSR/Qualcomm bluetooth "modules" have I used over the years had very audiable noise on their speaker outputs that was completely inaudiable when driving speakers directly, or using a difference amplifier (like the one shown in the first post) to get a single ended output for external headphones (that often have a common ground).

author: SteveThackery
author_rank: Super Contributor
timestamp: April 12, 2025, 11:08:03 am
content: Quote from: LooseJunkHater on April 11, 2025, 07:33:40 pmBack to your original question: I am not qualified in EE, but as far as I can see, yes, that circuit should work fine. If I'm wrong, hopefully someone will say so.That voltage applied to the positive input of the op-amp is important for most, but not all, op-amps. Most op-amps will not drive their output all the way to the positive or negative supply rail. Therefore it is necessary to "shift" the inputs to somewhere in the middle of the op-amps operating range, such that the output from the op-amp can go positive and negative without crashing into a supply rail. See the attached diagram.You can also buy op-amps that will drive the output all the way to one or both rails (called "rail-to-rail" op-amps). No need for that in this circuit, though.

author: eleguy
author_rank: Regular Contributor
timestamp: April 12, 2025, 11:34:40 am
content: Not now taking any aspect to all potential "features" but just instead giving a hint. Maybe one likes to consider (classic audio stuff?) NE5532 instead of general TLV6001. Specially if you have "golden ear". Check out the specs. CMRR, noise and distortion are on own levels but still having price at the same level. So, in bonus you get two opamps in the price of one.

author: LooseJunkHater
author_rank: Frequent Contributor
timestamp: April 12, 2025, 03:46:12 pm
content: Quote from: bson on April 12, 2025, 12:20:50 amI had actually pulled that image fromthis document by TI, but forgot to source in my original post. The input isn't single-ended, but receiving signals from both VOUTN & VOUTP. I'm assuming that the 1.25v is being used for some-sort of biasing??? I'm thinking that since I'll need a capacitor on the output of the op-amp, that I actually don't need to provide that 1.25v DC offset?Quote from: SteveThackery on April 12, 2025, 11:08:03 amSo, even though the output of the op-amp will be using a capacitor to remove the DC, the 1.25v is still needed to be inputed? Won't that 1.25v also feed back into the bluetooth earbuds (limited by the resistors)?

author: LooseJunkHater
author_rank: Frequent Contributor
timestamp: April 12, 2025, 03:49:03 pm
content: Quote from: eleguy on April 12, 2025, 11:34:40 amHad no intention of using the TLV6001, I had just found that circuit (image) on the internet, fromthis document by TI. I will likely be using the NE5532, or a rail-to-rail op-amp with low noise.

author: Buriedcode
author_rank: Super Contributor
timestamp: April 12, 2025, 04:09:08 pm
content: Quote from: LooseJunkHater on April 12, 2025, 03:46:12 pmNo, capacitors block DC - so they remove a DC offset frm a signal. Since many devices want to use a single supply - say 4.2V from a lithium battery, they can only output a voltage within that range. So for a single ended audio output, that has to push and pull current to/from a speaker, it "sits" at half the supply, so it can go both above, and below this. Usually a large capactior is required to block the DC offset - that half supply voltage it sits at - so that the speaker "sees" AC.This way, the other end of the speaker can connect to 0V, with the speaker terminal being driven at 2.1V + 2.1V = 4.2V, or 2.1V - 2.1V = 0, the DC blocking capacitor removes that 2.1V offset. The speaker sees just +2.1V, and-2.1V.When driving them differntially, the other end of the speaker isn't connected to 0V, it is connected to another pin that drives this to the opposite voltage of the positive input. So, they both still sit at half the supply voltage = 2.1V. Because they are the same voltage, there is no voltage difference across the speaker, so no current flows, so it isn't driven at all. When the positive pin goes higher, the negative goes lower, dirivng the speaker one way. And visa versa, so say the positive goes to 3.1V (from 2.1V idle) and the negative goes to 1.1V (from 2.1V idle) the difference is 2V.This means you can drive the speaker at +4.2V, and -4.2V from a single 4.2V supply. WHich is a swing of 8.4V, so double the amplitude that can be achieved with driving from a single IO swinging from 0-4.2V.Plus, since there is the same DC offset on both sides, there is no net DC offset flowing through the speaker (speakers hate DC, they work on AC, current flowing either way).Note, these numbers are just for example - most drivers can't output exactly 0V, or exactly its supply voltage, but can get close.By using a single speaker output - the positive one, along with a blocking capacitor you should get the same audio singal that you would if you using a differential to single ended circuit (like your first post) but it will be half the amplitude.Regarding the specifics of using a difference amplifier (again, like the one in your first post) - many opamps cannot sense, or output voltages close to theier power rails. That is, if you power an opamp with 5V, it cannot output exactly 0V, or 5V, but get within <1V of either. There are "rail-t-rail" opamps, that allow the output to get close to the rails, sometimes even 50mV, but that is dependent on the load - if you draw higher current from the output, the difference between output and the rail is larger.Same with input, "rail-to-rail" inputs can sense voltages close to, or even beyond the votlage rails.The whole point of these is that, same your earbuds output between 0.5 and 3.5V. If an amplifier doesn't have rail to rail input, it cannot sense <1V input, or > VCC - 1.5V ( it depends on the opamp!). So traditionally, opamps were powered with voltage rails much larger than the signal they're working with. Eg: an audio signal between 0 and 5V, the opamps were powered with -5V and say 9V.These days, RRIO (rail to rail input/output) are very common, and whilst the NE5532 is a lovely opamp for audio with good noise specs despite its age, it would require a bipolar power supply. Unless you are planning to add alots of gain - which this application doesn't require - you don't need massive bandwidth. And since this isn't driving headphones or speakers, you don't need a high current output. So I would say any CMOS RRIO opamp would work.As for your end application - I would say, try just a capacitor form the positive earbud side. If you get some noise coming through, you'll need that difference amplifier and use both earbud lines. Don't worry too much about matching resistors (the resistors should have almost the exact value to completely subtract differential singals) because you don't have to eliminate massive common-mode noise.Edit: Sorry for writing a small novel. note in your original schem the VCM should be half the supply of the opamp, and the inputs should have capacitors on them to block the DC offset from the earbud drivers. That way you remove the DC offset form teh earbuds, and thenadd your ownDC offset for the difference amplifier. So the input can swing to its maximum amplitude without hitting the rails.

author: LooseJunkHater
author_rank: Frequent Contributor
timestamp: April 12, 2025, 06:00:54 pm
content: Quote from: Buriedcode on April 12, 2025, 04:09:08 pmI didn't understand most of your novel during the first-read, but the more I read it, the more I understand it. The important part for me though is> the VCM should be half the supply of the opamp, and the inputs should have capacitors on them to block the DC offset from the earbud drivers.I think I'll need to experiment a bit with some basic LM358's on a breadboard and this circuit to get a better understanding & visualization of op-amp biasing, as right now, I have no knowledge of it, but so far the comments here have been quite helpful! (I definitely won't build the final circuit using an LM358 nor a breadboard, but just use it for learning).Thank you all!

author: Buriedcode
author_rank: Super Contributor
timestamp: April 12, 2025, 06:20:08 pm
content: Quote from: LooseJunkHater on April 12, 2025, 06:00:54 pmJust a heads-up about the LM358. It can sense inputs near its negative supply (0V or GND if you're using a single supply), but only sense within about 1.5V of its positive rail. So if you power it with 5V, it can't "see" inputs above about 3.5V.Its the same deal with the output. Although datasheets claim "output near negative rail" it can only drive its output to within about 0.15V of its negative rail (GND in your case) with a 50k load, and can't output within ~1.5V of its positive rail. Aside from that, its a handy cheap opamp to run tests on. So if your earbuds output a maximum of say 4V, and you power the LM358 with 5V, you'll get clipping and distortion at higher volume. This can be pretty much eliminated if you power the LM358 with 6V or above just for testing. It all depends on the earbuds, but I'm guessing they are powered by a lithium cell, which has a maximum voltage of ~4.2V.

author: LooseJunkHater
author_rank: Frequent Contributor
timestamp: April 12, 2025, 06:44:27 pm
content: Quote from: Buriedcode on April 12, 2025, 06:20:08 pmHmm, that's actually good to know. I do have many MCP6V96, and while they're probably overkill to test with, they are also rail-to-rail and can output within 0.15v of the supply rails, so they'll probably be less of a headache to use. Probably can't use them for this audio application, because the MCP6V96 doesn't list a THD value, so I guess they're probably nosier than the NE5532 or other audio-targeted op-amps.