Author Topic: Design critique: headphone amplifier  (Read 14952 times)

0 Members and 1 Guest are viewing this topic.

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
Design critique: headphone amplifier
« on: February 07, 2016, 01:13:14 pm »
For the most recent schematic, please find my latest post.

I finished the design for my headphone amplifier (schematic attached). Before I lay out the board, can you check it for me?

Two questions:
- Can I feed the two parts of the op-amp with the same fake ground, or would that introduce crosstalk?
- Do I need to bother with hysterisis for the low-battery comparator? The circuit won't use much current (35mA max) so voltage drop should be small especially with the (relatively) massive 18650 battery I will use.

Thanks!
« Last Edit: February 07, 2016, 06:05:00 pm by microbug »
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1352
  • Country: si
  • I like to measure things.
Re: Design critique: headphone amplifier
« Reply #1 on: February 07, 2016, 01:30:52 pm »
The gain will be 2.5 or 3, not 1.5 or 2.
You need a low voltage cutoff, to avoid draining the battery too much and destroying it.
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Offline HAL-42b

  • Frequent Contributor
  • **
  • Posts: 423
Re: Design critique: headphone amplifier
« Reply #2 on: February 07, 2016, 02:05:13 pm »
1 - Separate the switcher ground and the opamp ground, connect them at single point only.

2 - Ferrite beads, common mode chokes etc. etc. (aka. That switcher is making me nervous.)

2 - Try two different values of caps at opamp input, one electrolytic and one ceramic. Make sure they don't ring (as per Jim Williams app note 47). http://cds.linear.com/docs/en/application-note/an47fa.pdf

3 - There is no provision for charging of the battery. You are planning on replacing batteries all the time? Sounds like a hassle.
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
Re: Design critique: headphone amplifier
« Reply #3 on: February 07, 2016, 02:15:15 pm »
Thanks to Dave - I have corrected those errors. I changed the gain to either 2 or 4, after reviewing the max output of my phone vs what my headphones can take. I stuck a BQ29700 in for lithium battery protection.

1 - done now (I'll upload a new schematic when I've corrected the other problems)
2 - Will do
3 - I assume you mean at the op-amp's power supply, not the inv/non-inv inputs?
     EDIT: I see what you mean, I didn't realise I had left the values of the decoupling caps the same. I've changed them to one 47µF electrolytic and one 100nF ceramic, and will make sure they're properly laid out as per that app note. I've also substitued some of the 10µF ceramics for 47µF electrolytics (all of them have 100nF ceramics too so ESR shouldn't be a problem).
4 - I'll stick an MCP73831 in there since I have a few anyway. This thing shouldn't need charging often though: at 50mA, it would take 68 hours to deplete the 3.4Ah NCR18650B that I'll use.
« Last Edit: February 07, 2016, 02:23:32 pm by microbug »
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
Re: Design critique: headphone amplifier
« Reply #4 on: February 07, 2016, 02:39:21 pm »
OK, current schematic attached. I haven't put in the battery charger yet but that's easy enough. I put in this ferrite bead (600 ohm version) on the output of the LDO and a choke on the output of the switcher - I don't know what inductance to use, any suggestions?
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Design critique: headphone amplifier
« Reply #5 on: February 07, 2016, 03:20:46 pm »
1. No designators or net names... so I can't even call things out for critique. ::)

2. No battery protection. If this is a Li Ion or related battery, you don't want to discharge it below 3V.  (Maybe a fuse too, in case the converter or load shits the bed, or something?)

3. Low battery indicator literally makes things worse, and if you don't see it, well... yeah.  :-\  A battery management IC would be safer.  (Ideally, one with integrated charge controller so you can maybe run the whole thing from, like, a 5V USB charger cord or something?)

4. The LDO probably isn't necessary.  The battery is almost noiseless, so you're only filtering against whatever noise the converter produces (which shouldn't be much worse than the LDO itself), plus switching noise.  The switching noise is near 1MHz, which the LDO says will be around -40dB, but it looks like a capacitor up there.  You could do just as well with an LC filter of 0.5uH and another 10uF, for example (which will be cheaper and smaller; and besides, you already have the other 10uF).  Note that this does nothing about possible common mode noise, which you'll have to address in the layout (keep the switcher well away from the signal path).

5. Not just the input coupling caps, but all caps in the signal path (which includes the output caps, and the coupling caps for the inverting input pins) should be low-piezo types.  Which really stinks for SMT construction, but if you don't mind using tantalum, that'd do a fine job.  Otherwise, SMT films suck for a number of reasons (they're still large; they're expensive, and although it's not a problem here, they do absorb flux/moisture, a problem for sensitive circuits).  But if you have to use through-hole films, that's hardly the end of the world. :)

6. The input and output should be referred to the "virtual ground", not power supply ground.  This way you only need one divider, and you don't get a power-on/off "pop".  Or you could reconfigure the switcher so it makes symmetrical e.g. +/-5V rails (which isn't hard to do, using a dual winding inductor), but that's dumb.  As long as you don't need common ground between things*, it's fine.

*Which is actually a good point, if you add a e.g. USB charging connector -- charging it from the same computer it's connected to would short out the negative rail, making a bipolar supply better.

7. A make-before-break switch is preferred for the gain setting.  But even better: you can swap the cap-to-GND with the resistor, and switch a resistor in parallel with the existing resistor, needing only a DPST switch. :)  As shown, with a break-before-make (most common) switch, you'll get a pop as it goes to unlimited gain for a few milliseconds and probably makes a nasty output voltage.

8. More gain settings would be better, too.  1.5 and 2 is hardly 2dB different, not even worthwhile for headphones.  One or two 10dB steps (~3x gain per step) might be helpful, to deal with widely varying sources.  Note that attenuation might even be desirable, which you can't implement on the feedback resistors.  (You could with an inverting configuration.)  A good old fashioned volume control would be the most universal, of course.

9. The op-amp only delivers ~40mA (as measured from 15V supplies; unknown if that's supply independent), which might not be enough for very loud signals into 32 ohm headphones.  A buffer/driver/power amp device might be better suited, at least if high dynamic range is desired.

I think that covers about everything, HTH :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4427
  • Country: dk
Re: Design critique: headphone amplifier
« Reply #6 on: February 07, 2016, 04:21:20 pm »
it is not all opamps that like to drive the capacitance of a cable without a bit of resistance on the output
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
Re: Design critique: headphone amplifier
« Reply #7 on: February 07, 2016, 04:26:56 pm »
langwadt - I have added a 100 ohm resistor on the op-amp outputs. You're right, the datasheet for the OPA1612 recommends a small resistance on the output.

T3sl4co1l - thanks for the feedback. I think you might be working from the original schematic - the (now second) most recent one (in my last post) has some improvements. The latest schematic is attached.

1. I'll add designators.

2. Already fixed in most recent schematic.

3. I know the battery low LED won't help. Originally it was there in lieu of a protection IC so I know when to recharge, but now that there is one so the LED isn't useful. I have removed it.

4. OK, I have removed the LDO and added that LC filter. I removed the choke since the LC filter should do the job. I'll keep your post in mind when laying out.

5. I don't mind tantalum: I've put tantalum caps in.

6. I have put a SPDT switch in for the power switch, to make it only charge when off. I have made the inputs and outputs referenced to the virtual ground, so that should solve the problem.

7. I have switched the cap to GND and the resistor, and added the DPST gain setting. Thanks - I hadn't considered the pop but it would be there.

8. The gain as of last post was 2 or 4, but that's only 3dB. I'll make it 2 or 8.

9. This amp is really only for my 80 ohm DT770 headphones which benefit from a bit of a boost. I'm no audiophile and don't want to deafen myself; my phone will be fine for driving 32 ohm headphones.

Question: for 7, what is the advantage of switching the cap to GND with the resistor? Also, do I have enough filtering now?

Thanks to everyone for helping!

EDIT: just realised GNDA and GNDPWR aren't connected  ::). Updated schematic with fix attached.
« Last Edit: February 07, 2016, 04:29:37 pm by microbug »
 

Offline dom0

  • Super Contributor
  • ***
  • Posts: 1483
  • Country: 00
Re: Design critique: headphone amplifier
« Reply #8 on: February 07, 2016, 04:50:14 pm »
If you drive a headphone from a high-impedance output, make it 120 ?. The designers of the transducers either assume a => 0 ? drive or ~120 ?. The sound of them changes significantly when varying drive impedance. This is pretty much indepedent of the headphones, it was easily observable in Beyerdynamic DT-770 Pro (my main phones), various no name and brand name in-ears and a Sennheiser I borrowed for testing.

SW?B (get your ref designators straight please) will pop your ear, unless it is guaranteed make-before-brake both ways. Already fixed

It should be noted that there are many ways around using so many capacitors in the signal path. I tend to see that as a sign of poor design. With modern op amps the offset voltages are so low that there is no need for additional LF roll off (neither in- nor out-loop) other than an input coupling filter.
« Last Edit: February 07, 2016, 04:54:41 pm by dom0 »
,
 

Offline Lightages

  • Supporter
  • ****
  • Posts: 4314
  • Country: ca
  • Canadian po
Re: Design critique: headphone amplifier
« Reply #9 on: February 07, 2016, 04:55:35 pm »
This 120 ohm output impedance requirement fallacy needs to stop. This has been discussed before. The lower the output impedance, the better. If one insists on having 120 ohms, make it a switchable resistor on the output so it can be bypassed.
« Last Edit: February 07, 2016, 05:10:27 pm by Lightages »
 

Offline dom0

  • Super Contributor
  • ***
  • Posts: 1483
  • Country: 00
Re: Design critique: headphone amplifier
« Reply #10 on: February 07, 2016, 05:00:06 pm »
or
or
or

you could read the complete paragraph I wrote, not just a number.
,
 

Offline Lightages

  • Supporter
  • ****
  • Posts: 4314
  • Country: ca
  • Canadian po
Re: Design critique: headphone amplifier
« Reply #11 on: February 07, 2016, 05:11:21 pm »
I did read your post, and it isn't clear if you are advocating 120 ohms or not. So I made my position clear. :)
« Last Edit: February 07, 2016, 06:50:09 pm by Lightages »
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
Re: Design critique: headphone amplifier
« Reply #12 on: February 07, 2016, 06:17:41 pm »
Latest schematic attached. I removed the output decoupling caps, but I don't think I can remove C7 and C16 because the output is biased at fake ground. I changed the output resistance to 47 ohms, since it seems that lower is better. If there is proof otherwise, let me know.

EDIT: I have replaced the unpolarised symbols with polarised ones for the tantalum caps.

EDIT 2: 10nF tantalum caps don't seem to be available so the input decoupling caps will have to be film.
« Last Edit: February 07, 2016, 06:30:06 pm by microbug »
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Design critique: headphone amplifier
« Reply #13 on: February 07, 2016, 06:32:43 pm »
langwadt - I have added a 100 ohm resistor on the op-amp outputs. You're right, the datasheet for the OPA1612 recommends a small resistance on the output.

T3sl4co1l - thanks for the feedback. I think you might be working from the original schematic - the (now second) most recent one (in my last post) has some improvements. The latest schematic is attached.

Yes, in the time I took to write that, well... ::)

Quote
1. I'll add designators.

Thanks!

Quote
2. Already fixed in most recent schematic.

3. I know the battery low LED won't help. Originally it was there in lieu of a protection IC so I know when to recharge, but now that there is one so the LED isn't useful. I have removed it.

4. OK, I have removed the LDO and added that LC filter. I removed the choke since the LC filter should do the job. I'll keep your post in mind when laying out.

Hmm, 100nH isn't very much.  The capacitance after is quite a bit larger than necessary, too: C9 and C16, when just C13 will do.  And having just the one chip, there's not really any need for extra bypasses (C8, C15). :)

Quote
5. I don't mind tantalum: I've put tantalum caps in.

You'll be hard pressed to find one as small as C4/C14 I think, but those impedances can be made lower too, or the additional LF bandwidth simply allowed.

Quote
6. I have put a SPDT switch in for the power switch, to make it only charge when off. I have made the inputs and outputs referenced to the virtual ground, so that should solve the problem.

7. I have switched the cap to GND and the resistor, and added the DPST gain setting. Thanks - I hadn't considered the pop but it would be there.

8. The gain as of last post was 2 or 4, but that's only 3dB. I'll make it 2 or 8.

9. This amp is really only for my 80 ohm DT770 headphones which benefit from a bit of a boost. I'm no audiophile and don't want to deafen myself; my phone will be fine for driving 32 ohm headphones.

Question: for 7, what is the advantage of switching the cap to GND with the resistor? Also, do I have enough filtering now?

By switching the value of R6/R13 instead, you can put the switch to ground, minimizing possible noise introduction, say if the switch is on wires and mounted to a panel.  Probably a very small issue indeed here, but hints at an underlying method: the switch should be on the least sensitive nodes in the circuit, if possible.  Putting it on the input pin side (where C5/C17 are now, or the same side of R7/R16) would introduce more sensitivity to noise.

Quote
EDIT: just realised GNDA and GNDPWR aren't connected  ::). Updated schematic with fix attached.

How well does that work in KiCAD?  What does it end up calling it?  Does it compile as a net bridge?  Is one name preferred?  Are they aliases somehow?

In Altium, that generates a net naming conflict error; in others, the net is a property of the schematic rather than of graphical objects, and cannot be misnamed (e.g., Multisim).

It's also odd that VGND bypass is asymmetrical (only C18 to GND, but nothing to +V); and R6/R13 can be returned to VGND, so they have the same reference as the input and output.

And R5/R12 can be smaller, since C4/C14 will probably be larger, which will reduce the voltage offset due to input bias current.  You might want to keep the input coupling capacitors, but strictly speaking, beyond that, you might not need C5/C17 and C11/C19 at all.

Also, D3 should probably be moved to +BATT so the resistor drops less voltage, and the resistor should be larger so as not to blind the user, and to save a few mA. :P

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
Re: Design critique: headphone amplifier
« Reply #14 on: February 07, 2016, 07:46:34 pm »
Quote
Yes, in the time I took to write that, well... ::)
Just checking you had noticed the new attachments! Thanks for helping.

Quote
Hmm, 100nH isn't very much.  The capacitance after is quite a bit larger than necessary, too: C9 and C16, when just C13 will do.  And having just the one chip, there's not really any need for extra bypasses (C8, C15). :)
I meant to write 500nH as originally suggested. I removed those extra caps, thanks.

Quote
You'll be hard pressed to find one as small as C4/C14 I think, but those impedances can be made lower too, or the additional LF bandwidth simply allowed.
The smallest widely available tantalums I can find are 100nF, so I'll make the impedance 100k.

Quote
And R5/R12 can be smaller, since C4/C14 will probably be larger, which will reduce the voltage offset due to input bias current.  You might want to keep the input coupling capacitors, but strictly speaking, beyond that, you might not need C5/C17 and C11/C19 at all.
I've removed C5/17/11/19.

Quote
By switching the value of R6/R13 instead, you can put the switch to ground, minimizing possible noise introduction, say if the switch is on wires and mounted to a panel.  Probably a very small issue indeed here, but hints at an underlying method: the switch should be on the least sensitive nodes in the circuit, if possible.  Putting it on the input pin side (where C5/C17 are now, or the same side of R7/R16) would introduce more sensitivity to noise.
Thanks for clarifying, I've sorted it out now. I upped the resistances in the feedback loop by 10× since there isn't a cap there to cause trouble at startup now.

Quote
How well does that work in KiCAD?  What does it end up calling it?  Does it compile as a net bridge?  Is one name preferred?  Are they aliases somehow?
In Altium, that generates a net naming conflict error; in others, the net is a property of the schematic rather than of graphical objects, and cannot be misnamed (e.g., Multisim).
They compile as a net bridge. I just checked by generating a net file, and the name is GNDA, presumably because that was the first one.  During layout I'll separate the power from the audio, and do a fill in each, connected by one point.

Quote
It's also odd that VGND bypass is asymmetrical (only C18 to GND, but nothing to +V); and R6/R13 can be returned to VGND, so they have the same reference as the input and output.
Fixed.

Quote
Also, D3 should probably be moved to +BATT so the resistor drops less voltage, and the resistor should be larger so as not to blind the user, and to save a few mA. :P
Done :P

New schematic attached. I re-annotated it since several components were removed.

EDIT: Schematic now more organised.
« Last Edit: February 07, 2016, 07:56:21 pm by microbug »
 

Offline jeroen74

  • Frequent Contributor
  • **
  • Posts: 396
  • Country: nl
Re: Design critique: headphone amplifier
« Reply #15 on: February 07, 2016, 09:16:10 pm »
You might want to take a look at the circuit around C8,R12 and C7.
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
Re: Design critique: headphone amplifier
« Reply #16 on: February 07, 2016, 09:30:39 pm »
Well spotted. C7 and R12 should be connected to Vout.

EDIT: Fixed schematic attached.
« Last Edit: February 07, 2016, 09:57:13 pm by microbug »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Design critique: headphone amplifier
« Reply #17 on: February 07, 2016, 11:38:20 pm »
You probably want to think about how this amp is going to be used.

For most headphones, you wouldn't need to swing more than 1-2v to produce sound that's too loud for most people. With that in mind, I would suggest that going to 9v isn't worth it, particularly at the cost of having a dc/dc converter this close to the audio amplifiers.

For most of those designs, it is the current drive capabilities that matter -> for low-impedance phones. 20ma max is OK but you may want to buffer it, with an IC, a diamond buffer, or even an emitter follower.

If I were you, I would put one dual-opamp per channel. One acting as a rail splitter and another as a follower. Simple and no cross-talk.
================================
https://dannyelectronics.wordpress.com/
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1352
  • Country: si
  • I like to measure things.
Re: Design critique: headphone amplifier
« Reply #18 on: February 07, 2016, 11:57:33 pm »
I see a potential problem in your circuit. If you were to simultaneously plug in charging and audio cables from the same device (a computer, for example), you would be shorting out the virtual ground to your actual circuit ground.
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
Re: Design critique: headphone amplifier
« Reply #19 on: February 08, 2016, 08:07:38 am »
I added a negative charge pump to the boost converter, giving me a negative rail so that the charger and op-amps are running from the same ground. Schematic attached.

Dannyf- I'm only going to be using this to drive high-impedance headphones. My phone (which will be feeding this amp anyway) will do fine for 32 ohm things. I can bring the voltage of the boost converter down; I agree that 9V is too high - it is left from when I was going to use an LDO with it. The op-amp's common-mode voltage range is Vdd-2 to Vss+2, so it wants at least ±3V for the max ±1V signal it will get from my phone, unless I am mistaken. I could attenuate the signal before it is amplified, of course. Is there a viable alternative to having a switcher this close when only using one battery?

Dave - The new negative rail should solve this.

EDIT: Added a second charge pump (so the rails give symmetrical voltages), and reannotated schematic. Rails are now ±5V. Updated schematic attached.
« Last Edit: February 08, 2016, 04:12:29 pm by microbug »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Design critique: headphone amplifier
« Reply #20 on: February 08, 2016, 09:58:26 pm »
You probably want to experiment a little on the need for gains to drive your phones to sufficient loudness. High impedance phones generally are more sensitive than low impedance phones. So it is unclear to me if you really need that much drive.

If a 2Vpp is all it takes, a 3.7v battery will work fine for most opamps without any DC/DC conversion.
================================
https://dannyelectronics.wordpress.com/
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Design critique: headphone amplifier
« Reply #21 on: February 08, 2016, 09:59:48 pm »
As to the use of a charge pump, you should look into their dynamic performance - as you are using them to power class b amps.
================================
https://dannyelectronics.wordpress.com/
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
Re: Design critique: headphone amplifier
« Reply #22 on: February 08, 2016, 10:00:58 pm »
Would an inverter be better? In the other thread, someone suggested the MAX660 which would appear to be more foolproof than a charge pump.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Design critique: headphone amplifier
« Reply #23 on: February 08, 2016, 10:52:23 pm »
I guess I am trying to say that the best solution to any problem is not having that problem in the first place.

I don't think you have established that you needed sufficient gain to drive your phones. Unless that's established, it makes no sense, in my view, to expand the supply rail.
================================
https://dannyelectronics.wordpress.com/
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
Re: Design critique: headphone amplifier
« Reply #24 on: February 08, 2016, 11:25:21 pm »
Ok. The problem here is that my headphones haven't arrived yet, but from reviews I gather that around 1.5V RMS max is needed to drive them. My phone will do max 1V RMS into a high impedance source. To account for weaker sources, I will have this amp at 2x gain. The OPA1612's common mode voltage range is 2V from either rail: the solution then is to have no boost and an inverter for the negative rail, plus a small voltage divider on the input (accounted for in gain) to stop the input going past 1V peak when the battery is low (3V).

I'll post a schematic tomorrow. Thanks for helping me realise the above :).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf