# Input voltage for LM4862 audio amplifier

I just started working on an embedded side project that requires me to pump .wav files through headphones.

My main microcontroller is a PIC32, and my audio amplifier is an LM4862. For the DAC conversion for the audio, I am using an MCP4921 (I know it is TOTALLY the wrong chip for audio, but I've already ordered them :( )

If I replicate the "typical application" amplifier circuit in page 2 of the LM4862 datasheet, can I feed in a 0 - 3 V signal from the MCP4921 and get a reasonable volume from the LM4862? The capacitor between the audio input and the (-) input of the operational amplifier makes me uncomfortable.

Why is the capacitor there anyway? Why not put the audio input straight into the plus side of the opamp and ground the (-) side?

In my application circuit, one of the speaker inputs MUST be tied to ground. I have no way to tie it to vo1 or vo2 as per the "typical application" section of the LM4862 datasheet. How can I circumvent this? Can I just tie vo1 or vo2 low? (I don't think so). Can I leave one or the other disconnected? Should I choose a different amplifier for my application?

However, I think I will just use Ti's LM4881, which is similar to the LM4862.

• en.wikipedia.org/wiki/Capacitive_coupling – Ignacio Vazquez-Abrams Sep 7 '14 at 3:49
• OH WOW! I can't believe I didn't know this!! Thank you very much, Ignacio. – johnny_boy Sep 7 '14 at 3:53
• It's not natural to realize it unless you understand the underlying electronics. – Ignacio Vazquez-Abrams Sep 7 '14 at 3:56
• So I think I can answer my own question, then. Please tell me if I understand correctly. Only the amplitude of my signal matters, the dc voltage that my signal is centered around is of no significance. This means that as long as I can arbitrarily increase or decrease the amplitude of my signal (in software or by using a resistor divider on the vref input of my DAC), I can change the volume? – johnny_boy Sep 7 '14 at 4:00
• I was about to complain about people not explaining downvotes then I realized it was mine and I'd just misclicked(I was upvoting 'cause you at least showed some effort). Anyway, yes: it's an amplifier, so increasing the input will also increase the output, but bear in mind it can't amplify past the limits I mentioned in my answer, so if your signal is too big, it will just be driven to flat lines and you'll either hear nothing or something horribly distorted at best. – Daniel B. Sep 7 '14 at 4:14

Regarding the capacitor, Ignacio beat me to it. shakefist You'll see capacitive coupling all over the place in circuits like these.

As far as what you feed in, actual amplification will depend on the resistor values. The specs say -.3 to vdd (your source voltage) + .3V, so provided your VDD is >= 3 volts, you should be able to amplify to that level.

update

You can simply leave the V01 disconnected. The speaker wire connected to pin 5 in that schematic would be connected to ground instead.

That said, the configuration shown in the schematic is said to have a gain of $$2(\frac{R_i}{R_f})$$ This is because the outputs are 180 degrees out of phase with eachother, so that even though both amplifiers being unity gain (when Ri = Rf), it winds up doubling the input.

If you don't use pin 5(V01), you'll need to adjust your gain. The new formula would be $$\frac{R_i}{R_f}$$

That said, if you haven't already ordered a different chip, I think the LM4880 is more in line with what you want, it's mentioned in the automatic switching circuit in the datasheet, and it's a single output headphone amplifier.

• Thanks Daniel, but what does "The specs say -.3 to vdd (your source voltage) + .3V" mean? – johnny_boy Sep 7 '14 at 4:03
• The op amp has a + and a - input, that's your audio input. There is also the voltage that drives the op amp, that's VDD/supply voltage on the datasheet. So if you have a supply voltage of 6 volts (the max the op amp can handle) then it can amplify at most to a range of -.3 to 6.3 volts. – Daniel B. Sep 7 '14 at 4:05
• I have a followup question: In my application circuit, one of the speaker inputs MUST be tied to ground. I have no way to tie it to vo1 or vo2 as per the "typical application" section of the lm4862 datasheet. How can I circumvent this? Can I just tie vo1 or vo2 low? (don't think so). Can I leave one or the other disconnected? Should I choose a different amp for my application? – johnny_boy Sep 7 '14 at 5:50
• I'm currently not at a computer that can make pretty schematics and the like. I'll try to respond better when I get back (after I've read over the application notes a bit more, too :) ) – Daniel B. Sep 7 '14 at 16:28
• @johnny_boy Updated. If you need a schematic to go with the talkies, I can do that in ... about 4 hours. – Daniel B. Sep 7 '14 at 18:14

The reference design has an input level of 1V RMS (page #8). 1V RMS means that you need about 2.8V p-p, so 3V is about perfect.

The capacitor is to block DC since the input of the amplifier (and your DAC output) will be biased somewhere between ground and supply voltage (probably near the middle).

• Couldn't the RMS value change depending on the shape of the waveform? – johnny_boy Sep 7 '14 at 4:06
• @johnny_boy Sure.. the real test is whether the DAC can cause the outputs to rail or whether you run out of bits first. The point is that the level is about right with the default setup, you can fiddle with one of the 20K resistors to optimize the gain for the DAC swing, the power supply voltage and resulting available output swing. – Spehro Pefhany Sep 7 '14 at 4:13
• It would be prudent to build a test circuit on a breadboard with some potentiometers in the range you anticipate, then you can vary them until you get to the values you really want. – Daniel B. Sep 7 '14 at 4:16
• SpehroPefhany: Ok, thanks for clarifying. The DAC can cause the outputs to rail, however, I can limit this by putting a resistor divider on the vref of my DAC. I will probably just swap out resistors once I get my PCB fabbed. I would go with @DanielBall's suggestion of fiddling on a breadboard, but I don't have a good signal generator handy. anyways, I've hand-soldered enough 0402's to deal with it. – johnny_boy Sep 7 '14 at 4:22
• @johnny_boy If you don't have a signal generator, you can hook up a 9V (or preferably just 2 AAs if you have a holder) battery to a potentiometer and use it as an input, then use a voltmeter to measure the level. Just be sure to keep the input in the range specified on the datasheet. – Daniel B. Sep 7 '14 at 4:24