EEVblog Electronics Community Forum
Electronics => Projects, Designs, and Technical Stuff => Topic started by: tooki on January 20, 2016, 07:28:12 pm
-
Hey everyone. I'm working on a headphone amp project for my desk, where my desktop computer (a Mac Pro tower) is. The primary goal is to have multiple output jacks in easy reach, each with individual volume and on/mute switches, so that I don't have to plug and unplug behind the desk, nor adjust the main volume to compensate for each headphone model's differing sensitivity. (And I need one line output for the speakers, which are self-powered and thus use a line-level signal.)
Additionally, I also need a microphone preamp, so that my headset with a boom mike will work on the Mac. (It has a line-in only, no mike input.) I don't really need a particularly powerful amp; I'm not planning to run audiophile 600 ohm cans, everything I am using can be adequately driven by an iPod.
So far, I've prototyped a few NE5532 designs, and they all seem to work just fine to my ears (which are relatively good). I can't hear any audible difference in the versions I've protoboarded. So I have some questions I hope you can help me with:
- Some schematics I've found use tons of capacitors, others none at all. Good/bad/irrelevant?
- Some are inverting, others not. Why would want to invert an audio signal?
- Is it necessary/advisable/disadvantageous to have a buffer stage before the bank of output amps?
- Is it better to adjust the volume before or after the output amp?
- Why do we adjust the volume at the input instead of adjusting the gain of the op-amp?
- What's the best way to mute an output? (I know that cutting power to the op-amp is not one of the options.) Ideally something that doesn't pop.
- What's a good bias and preamp circuit for the electret mike? I've seen everything from simple voltage dividers all the way to complex op-amp designs.
- I breadboarded one mike preamp circuit (see below) and it seems to work fine, but it uses an NE5532 in single-supply configuration, while all the output amp circuits use NE5532's in double-supply configuration. I'm not entirely confident on how I would make the two work happily off the same power supply.
- Is there a significant advantage to using a real dual supply over a single supply using a virtual ground?
- What are inaudible flaws I should be testing for electronically? (I've got a scope.)
- I had the bright idea of testing some cheap and tiny eBay PAM8403 amp boards, only to learning after ordering some that you cannot share a common ground from multiple channels of a class D amp, which of course is precisely the case with headphones. (The PAM chips have handy mute pins, though the chinese eBay boards all seem to hard-wire them to unmuted, and use hard power switches instead. :palm: )
- I had originally planned to just use protoboard for this, but now I'm leaning more towards etching a board (which I have never done) to save space and give me more flexibility to use components that don't use 0.1" lead spacing. Any other reasons pro/contra either way?
Anything else I haven't thought of? There are no sacred cows here, I'm not wedded to any particular circuit or part, other than that I don't want to make one of the big, powerful headphone amps where each output uses $50 of parts. (If the NE5532 remains a good choice, that's handy cuz I already have them.)
For reference, here's the first circuit I built up: http://www.paia.com/proddetail.asp?prod=9206KP (http://www.paia.com/proddetail.asp?prod=9206KP)
It seems to work perfectly, though it kinda bugs me intellectually that it's inverting.
I then built up this one (except in the stereo input configuration, not mono): http://www.paia.com/proddetail.asp?prod=9605K (http://www.paia.com/proddetail.asp?prod=9605K)
I can't hear any difference in sound quality.
This is the electret preamp circuit I tried: Microphones Direct to Headphones - Audio Amplifier? (http://forum.allaboutcircuits.com/threads/microphones-direct-to-headphones-audio-amplifier.103039/#post-779149) (I built it according to the suggested changes in the post linked.)
Anyway, I appreciate both the concrete tips and theoretical knowledge you can share. As you can imagine, simple multi-output headphone amps can be bought for $30. I'm building this for the learning and fun!
Thanks so much!!!
-
I have some questions I hope you can help me with:
I'll have a go... (I love being wrong - it's how I learn stuff)
Some schematics I've found use tons of capacitors, others none at all. Good/bad/irrelevant?
I don't believe you can build an audio amp with no capacitors.
Some are inverting, others not. Why would want to invert an audio signal?
It makes no difference to the listener but op-amps naturally tend to invert the signal.
Is it necessary/advisable/disadvantageous to have a buffer stage before the bank of output amps?
Depends on your source and how many output amps you have. If in doubt, add one.
Is it better to adjust the volume before or after the output amp?
If you want to match a whole bunch of outputs with varying input audio then maybe "both".
Why do we adjust the volume at the input instead of adjusting the gain of the op-amp?
Don't know.
What's the best way to mute an output? (I know that cutting power to the op-amp is not one of the options.) Ideally something that doesn't pop.
Use an op-amp that's designed for headphones and has a 'mute' pin.
What's a good bias and preamp circuit for the electret mike? I've seen everything from simple voltage dividers all the way to complex op-amp designs.
Depends on how loud the input sound is.
Human voice? You need an op-amp.
Is there a significant advantage to using a real dual supply over a single supply using a virtual ground?
No.
-
I don't really need a particularly powerful amp; I'm not planning to run audiophile 600 ohm cans, everything I am using can be adequately driven by an iPod.
In terms of the current needed, 600 ohms is an "easy" load; 32 ohms is somewhat less so.
But it depends on what you have. In an iPod, you don't have many volts, so low-impedance cans are needed to draw the current needed to produce power. Whereas in a home hifi, voltage is no problem at all, so high impedance cans will accept the greater voltage while not drawing much current - but will be producing similar amounts of power.
What you're looking at should be able to drive both types with relative ease...
Some schematics I've found use tons of capacitors, others none at all. Good/bad/irrelevant?
You need to decouple the PSU rails of the op-amps, and these decouplers are often omitted from schematics, or are somewhere else outside of the extract that was posted on the forum or whatever.
The details depend on the op-amp. Impossible to generalise. Perhaps 100n between pins 4 and 8 of each 5532 is a good start. Perhaps 100uF between the rails for every 3 or 4 NE5532s? It just depends...
Capacitors are also used to pass signal while blocking DC. It's good practice to include them at every input, as you don't know what the previous device might be doing. Are they needed at the headphone outputs? It depends on the DC offset of the output op-amps. 5532s have a reasonably high bias current, so that can be a bit "offsetty". Each case is different and needs consideration...
Often capacitors are used to couple the signal within the design - not just at the input and output ports. Again, it depends. I would use them to ensure there is no DC on any potentiometers and switches, and other places as needed.
Finally, capacitors can be used as filters. It's good practice to include a low-pass filter at any input, unless you especially value RF interference from your phone! Other filtering might be needed, depending on the application.
Some are inverting, others not. Why would want to invert an audio signal?
The audibility of absolute phase is debated. With the right source material, you can hear a difference when you flip between. With most, you can't. When you can, which is "right"? I've read debates about how "Rumours" is apparently out of phase - presumably this comes about because some hi-fi DACs have an absolute phase button on the front panel.
In terms of electronics, the usual thinking is that it avoids common-mode distortion, but often with a small noise penalty. In practice, the distortion from a properly implemented 5534 is so low that it won't be worth worrying about. Certainly it won't be audible. The noise might, depending on your resistor values.
Of course, it's easy to invert again to restore the absolute phase.
Is it necessary/advisable/disadvantageous to have a buffer stage before the bank of output amps?
It might be. If the output amps are inverting, then each one has an input impedance that is equal to the input resistor (10k in the case of the first link you posted). Each of these 10k impedances end up being in parallel when all volume controls are at max, and that might be a tough load for the preceding device. Or not, depending on what it is. It is good practice to maintain an input impedance of 10k or greater for a standard line-level audio device, but anything goes!
Is it better to adjust the volume before or after the output amp?
After. The headphones might be a low impedance load (perhaps 32 ohms nominally), so a potentiometer that will work with those will be inconvenient to source. There are other negatives as well...
Why do we adjust the volume at the input instead of adjusting the gain of the op-amp?
Because it's easiest. It is quite possible to adjust the gain instead, and such a scheme would be called an "active volume control", or words to that effect.
You need to use the inverting configuration if you wish to get down to nothing at all. Also, the "law" of the control might be altered, depending on which topology you go for. You have to be careful that you don't get DC current flowing through the wiper, else the pots end up getting scratchy far too early in their life - and that usually involves lots of capacitors.
The advantage of an active volume control is that the noise is minimised at low gain settings. With a conventional potentiometer, whatever gain you have after the volume control is there all the time. But it shouldn't be a problem here.
There's a good survey of active volume controls in this book: http://www.amazon.co.uk/Small-Signal-Audio-Design-Douglas/dp/0415709733/ref=dp_ob_title_bk (http://www.amazon.co.uk/Small-Signal-Audio-Design-Douglas/dp/0415709733/ref=dp_ob_title_bk)
Studying this book will answer all your questions better than I can, and he has a very good writing style that works for beginners and experts alike.
What's the best way to mute an output? (I know that cutting power to the op-amp is not one of the options.) Ideally something that doesn't pop.
I'd mute the signal heading in to the op-amp. Many ways - a simple switch to ground, a J-FET, a CMOS analogue switch. If you're happy with a standard mechanical switch, just use that.
What's a good bias and preamp circuit for the electret mike? I've seen everything from simple voltage dividers all the way to complex op-amp designs.
A single resistor is usually all you need. Check the application notes for the microphone in question...
I breadboarded one mike preamp circuit (see below) and it seems to work fine, but it uses an NE5532 in single-supply configuration, while all the output amp circuits use NE5532's in double-supply configuration. I'm not entirely confident on how I would make the two work happily off the same power supply.
To an extent, it really doesn't matter if you wish to use both types together. The mic preamp will do its thing independently of the headphone amp.
But it is worth studying what's going on there. Basically, whether single, dual or more, the idea is to set up the correct DC conditions before you apply the signal. Which means ensuring that the quiescent state of the op-amps is in the middle of the available supply range as audio signals are mostly pretty symmetrical.
Is there a significant advantage to using a real dual supply over a single supply using a virtual ground?
The audio circuitry is usually much easier to design/debug/understand when using split supplies. But the supply is marginally more complex! Or perhaps that should be "inconvenient" - especially if you wish to use batteries, or a "commodity" wall-wart supply. But, earth is a relative concept, and there's nothing wrong with creating a virtual earth for the whole design to use. It just depends...
What are inaudible flaws I should be testing for electronically? (I've got a scope.)
Oscillation and clipping are the main ones. You'll also want to check the frequency response. Assuming you can make sine waves (e.g. Audacity), then you can do most things.
I had the bright idea of testing some cheap and tiny eBay PAM8403 amp boards, only to learning after ordering some that you cannot share a common ground from multiple channels of a class D amp, which of course is precisely the case with headphones. (The PAM chips have handy mute pins, though the chinese eBay boards all seem to hard-wire them to unmuted, and use hard power switches instead. :palm: )
Yes, they are often bridged. Besides, class D amplifiers are much worse than an NE5532. They have advantages in certain circumstances, but if audio quality is high on your priorities, they are best avoided!
[/li][li]I had originally planned to just use protoboard for this, but now I'm leaning more towards etching a board (which I have never done) to save space and give me more flexibility to use components that don't use 0.1" lead spacing. Any other reasons pro/contra either way?
I always prototype. If the thing is a one-of, and not demanding electrically (which this isn't), then a neat Veroboard construction is usually good enough (plenty of examples on my website). If it's a project for a customer, then having prototype PCBs made is a cost that is part of the overall cost, so I get them done by a local company. Remember: the PCB is part of the circuit, and there are many ways to screw it up!
For reference, here's the first circuit I built up: http://www.paia.com/proddetail.asp?prod=9206KP (http://www.paia.com/proddetail.asp?prod=9206KP)
It seems to work perfectly, though it kinda bugs me intellectually that it's inverting.
I'd just reconfigure the op-amps to non-inverting. If you're in any doubt about how to do that, I have a really basic op-amp primer on my site: http://www.markhennessy.co.uk/articles/op-amps.htm (http://www.markhennessy.co.uk/articles/op-amps.htm)
The circuit about half-way down this page is basically what you're after: http://www.markhennessy.co.uk/mf_a1/mods.htm (http://www.markhennessy.co.uk/mf_a1/mods.htm)
Having done that, the input impedance should be 100k / N, where N is the number of amps. 10 of them still gives 10k in, so no need for a buffer...
I then built up this one (except in the stereo input configuration, not mono): http://www.paia.com/proddetail.asp?prod=9605K (http://www.paia.com/proddetail.asp?prod=9605K)
I can't hear any difference in sound quality.
It's a bit depressing, but most competent audio circuits don't really have a "sound" as such - don't believe all you read on the DIY audio forums, where folk argue over the sound of different brands of resistors! Providing you're not changing the frequency response or running into clipping, you should be fine...
Hope this helps,
Mark
-
If money is not an issue, go for CS3318. Not as expensive and power hungry as PGA23xx, but still offers good performance. You can get true mute from it.
These chips are nice. I've used the PGA23xx types extensively, and like them a lot.
However, they need to be controlled. You need some sort of micro-controller to generate the SPI signals to tell them what to do. And then, you need to get a bunch of rotary encoders and/or buttons, plus some sort of display so the user knows where the volume is set to. Of course, this does add the option of remote control - which seems like the only advantage so far.
As the OP has stated this:
The primary goal is to have multiple output jacks in easy reach, each with individual volume and on/mute switches
I don't see any benefit from going down the PGA - micro-controller route. This application requires nothing more complex than some potentiometers and some switches.
Building an amplifier with a PGA device is a great learning exercise, however, and I recommend it. But that wasn't what was outlined in the brief. Incidentally, here's one I did nearly 15 years ago: http://www.markhennessy.co.uk/preamp/ (http://www.markhennessy.co.uk/preamp/) - hopefully some ideas in there...
What are inaudible flaws I should be testing for electronically? (I've got a scope.)
Unless you are building absolute shit, there is no way to measure THD down to -80dB or even -100dB with o'scope. You need $$$$ audio analyzer.
Even THD2015 sucks in front of modern audio optimized opamps.
With practice, you can hear clipping or crossover distortion before you can make it out on a 'scope trace. Levels of audibility are about 0.5 to 1% (-66 to -60dB) when using 1kHz tone, give or take. But both these distortion types are easy to avoid. BTW, a point I've been making for years - clipping is surprisingly inaudible on many types of real programme material:
https://www.youtube.com/watch?v=2V6YN-mshmY (https://www.youtube.com/watch?v=2V6YN-mshmY)
Skip to about 20 minutes in for the tests. This has complex ramifications for audio power amplifier designers, but isn't totally OT here.
I have a Keithley 2015THD, but I rarely use it for analysing distortion - it's simply not discerning enough. I get better results from my HP8903. If I need most insight, I use a Prism Audio Dscope.
Most of the time, you don't need all this fancy stuff - understanding is far more important than test gear. A good sound card and some free software does a lot of what the big-$$$ stuff can do, providing you understand the limitations.
A basic 5532 that isn't going unstable will give a distortion level that is well below audibility. They just work. And they are better than most at driving low-Z loads. Lots of good stuff here: https://books.google.co.uk/books?id=PvKPEFu2PVkC&pg=PA95&source=gbs_toc_r&cad=2#v=onepage&q&f=false (https://books.google.co.uk/books?id=PvKPEFu2PVkC&pg=PA95&source=gbs_toc_r&cad=2#v=onepage&q&f=false)
-
To see distortion on a scope, use the FFT rather than the trace. You must use a pure sinewave at the input but it is very sensitive. I can see crossover distortion before I can hear it although I don't have golden ears ;D
-
Hey guys, thanks for your replies so far! It's a lot to digest! :D
I'm working on a long followup, just wanted to express my gratitude so you don't think I was a drive-by poster. :)
-
OK, here we go! Thanks for your help!
1. Some schematics I've found use tons of capacitors, others none at all. Good/bad/irrelevant?
I don't believe you can build an audio amp with no capacitors.
You need to decouple the PSU rails of the op-amps, and these decouplers are often omitted from schematics, or are somewhere else outside of the extract that was posted on the forum or whatever.
The details depend on the op-amp. Impossible to generalise. Perhaps 100n between pins 4 and 8 of each 5532 is a good start. Perhaps 100uF between the rails for every 3 or 4 NE5532s? It just depends...
Capacitors are also used to pass signal while blocking DC. It's good practice to include them at every input, as you don't know what the previous device might be doing. Are they needed at the headphone outputs? It depends on the DC offset of the output op-amps. 5532s have a reasonably high bias current, so that can be a bit "offsetty". Each case is different and needs consideration...
Often capacitors are used to couple the signal within the design - not just at the input and output ports. Again, it depends. I would use them to ensure there is no DC on any potentiometers and switches, and other places as needed.
Finally, capacitors can be used as filters. It's good practice to include a low-pass filter at any input, unless you especially value RF interference from your phone! Other filtering might be needed, depending on the application.
The more, the best. But, caps are not nearly as efficient as a good regulator design, so spend more money on an ideal volt reg, then put moderate amount, but not superfluous amount of caps.
Huge capacitive load can even make regulators unstable. Refer to mfg's datasheet. I prefer <500uF per rail after TPS7A47 and TPS7A33.
The first circuit I built up (link in OP) uses no caps at all outside of the power supply filter caps. The NE5532 datasheet says "Connect low-ESR, 0.1-?F ceramic bypass capacitors between each supply pin and ground, placed as close to the device as possible."
I've breadboarded the second circuit with and without bypass caps to ±Vss, with and without input and output DC-blocking caps, and frankly I can't hear any difference either way. But I'm also aware that amps can have ultrasonic oscillation, for example, which can damage speakers while remaining inaudible.
2. Some are inverting, others not. Why would want to invert an audio signal?
In a non-inverted implementation, input pins are not tied to a fixed voltage, so voltage dependency creates IMD/THD in the OPAMP.
I see! I had to look at schematics a few times to figure out what you mean, but it makes sense.
On the other hand, inverted implementation has lower input impedance, hence higher distortion in the volume control.
Therefore, for electronics volume control (non-ideal silicon resistor), non-inverted input is preferred, for potentiometer volume control (ideal resistor), inverted input is preferred.
For now at least, I will be using analog pots.
The audibility of absolute phase is debated. With the right source material, you can hear a difference when you flip between. With most, you can't. When you can, which is "right"? I've read debates about how "Rumours" is apparently out of phase - presumably this comes about because some hi-fi DACs have an absolute phase button on the front panel.
In terms of electronics, the usual thinking is that it avoids common-mode distortion, but often with a small noise penalty. In practice, the distortion from a properly implemented 5534 is so low that it won't be worth worrying about. Certainly it won't be audible. The noise might, depending on your resistor values.
Of course, it's easy to invert again to restore the absolute phase.
So basically, if I use an inverting input buffer, I can just have all the output amps be inverted as well, so that in the end everything comes out non-inverted. Correct?
3. Is it necessary/advisable/disadvantageous to have a buffer stage before the bank of output amps?
It might be. If the output amps are inverting, then each one has an input impedance that is equal to the input resistor (10k in the case of the first link you posted). Each of these 10k impedances end up being in parallel when all volume controls are at max, and that might be a tough load for the preceding device. Or not, depending on what it is. It is good practice to maintain an input impedance of 10k or greater for a standard line-level audio device, but anything goes!
So would an amp block identical to each output block work fine as a buffer?
Depends on output amp's input impedance. If the total input impedance is below 10k, definitely buffer it. Most devices' optimum advertised performance is measured under 2K or 10K load.
By "output amp", do you mean the audio source? That would be the line out of the Mac Pro.
Did you look at the first circuit? How does it look for this application?
4. Is it better to adjust the volume before or after the output amp?
If you want to match a whole bunch of outputs with varying input audio then maybe "both".
I think we mean different things. I mean, for a given output amp, do you put the pot before the op-amp or after. (The circuit I built up puts it before.) I am not talking about a master volume that affects all outputs.
After. The headphones might be a low impedance load (perhaps 32 ohms nominally), so a potentiometer that will work with those will be inconvenient to source. There are other negatives as well...
I'm not sure I understand. Can you elaborate?
5. Why do we adjust the volume at the input instead of adjusting the gain of the op-amp?
Because it's easiest. It is quite possible to adjust the gain instead, and such a scheme would be called an "active volume control", or words to that effect.
You need to use the inverting configuration if you wish to get down to nothing at all. Also, the "law" of the control might be altered, depending on which topology you go for. You have to be careful that you don't get DC current flowing through the wiper, else the pots end up getting scratchy far too early in their life - and that usually involves lots of capacitors.
The advantage of an active volume control is that the noise is minimised at low gain settings. With a conventional potentiometer, whatever gain you have after the volume control is there all the time. But it shouldn't be a problem here.
Not quite sure what you mean there. Can you elaborate?
6. What's the best way to mute an output? (I know that cutting power to the op-amp is not one of the options.) Ideally something that doesn't pop.
Use an op-amp that's designed for headphones and has a 'mute' pin.
That's obviously one option (though sadly, all those chips seem to be either SSOP, QFN, or BGA, so would necessitate etching a PCB). How would one do it without a specialty headphone amp chip?
I'd mute the signal heading in to the op-amp. Many ways - a simple switch to ground, a J-FET, a CMOS analogue switch. If you're happy with a standard mechanical switch, just use that.
Isn't a mechanical switch susceptible to popping?
CS3318 has internal true mute. A brute force method will be using signal relays to control signal flow, or use silicon analog switches (be extremely careful since improperly implemented circuitry can introduce huge amount of THD).
Can you give me an idea of what to avoid?
7. What's a good bias and preamp circuit for the electret mike? I've seen everything from simple voltage dividers all the way to complex op-amp designs.
A single resistor is usually all you need. Check the application notes for the microphone in question...
This is all the data I have, since it's the mike in a headset, not a discrete capsule of my choosing: http://europe.beyerdynamic.com/shop/media/datenblaetter/DAT_MMX300_EN.pdf (http://europe.beyerdynamic.com/shop/media/datenblaetter/DAT_MMX300_EN.pdf)
The single resistor would be the one between V+ and the ring of the mike plug, correct? (Cf. http://www.hobby-hour.com/electronics/computer_microphone.php (http://www.hobby-hour.com/electronics/computer_microphone.php) )
8. I breadboarded one mike preamp circuit (see below) and it seems to work fine, but it uses an NE5532 in single-supply configuration, while all the output amp circuits use NE5532's in double-supply configuration. I'm not entirely confident on how I would make the two work happily off the same power supply.
To an extent, it really doesn't matter if you wish to use both types together. The mic preamp will do its thing independently of the headphone amp.
But it is worth studying what's going on there. Basically, whether single, dual or more, the idea is to set up the correct DC conditions before you apply the signal. Which means ensuring that the quiescent state of the op-amps is in the middle of the available supply range as audio signals are mostly pretty symmetrical.
Well the thing is, if I were to build the first headphone amp circuit and the electret preamp circuit I listed, they use different ground references, so if I built them using the same supply and grounds, I'd be shorting the V- to ground, wouldn't I? I guess I'm not confident on how to adapt the electret preamp circuit to match the others.
9. Is there a significant advantage to using a real dual supply over a single supply using a virtual ground?
The audio circuitry is usually much easier to design/debug/understand when using split supplies. But the supply is marginally more complex! Or perhaps that should be "inconvenient" - especially if you wish to use batteries, or a "commodity" wall-wart supply. But, earth is a relative concept, and there's nothing wrong with creating a virtual earth for the whole design to use. It just depends...
Yes. Ground plane will be stiffer, hence harder to be affected by load current. If you have a bunch of load, this is an issue.
I'm far too inexperienced to know whether this circuit counts as "a bunch of load" or not. What you think, after looking at the schematic?
10. What are inaudible flaws I should be testing for electronically? (I've got a scope.)
Oscillation and clipping are the main ones. You'll also want to check the frequency response. Assuming you can make sine waves (e.g. Audacity), then you can do most things.
Clipping is easy to check. But I'll be honest, I have no idea what the proper way is to test for oscillation. Can you point me in the right direction? (As for frequency response, would that just be using a signal gen to generate a sweep and compare for discontinuities?)
Unless you are building absolute shit, there is no way to measure THD down to -80dB or even -100dB with o'scope. You need $$$$ audio analyzer.
Even THD2015 sucks in front of modern audio optimized opamps.
Well, I'm trying to avoid building "complete shit", so surely there are some tests I can do with the equipment I have.
12. I had originally planned to just use protoboard for this, but now I'm leaning more towards etching a board (which I have never done) to save space and give me more flexibility to use components that don't use 0.1" lead spacing. Any other reasons pro/contra either way?
I always prototype. If the thing is a one-of, and not demanding electrically (which this isn't), then a neat Veroboard construction is usually good enough (plenty of examples on my website). If it's a project for a customer, then having prototype PCBs made is a cost that is part of the overall cost, so I get them done by a local company. Remember: the PCB is part of the circuit, and there are many ways to screw it up!
Your veroboard construction is gorgeous! :-+ :-+
Indeed, it's just for me, so it doesn't really matter, except that protoboard may end up making it physically larger than I want.
-
For reference, here's the first circuit I built up: http://www.paia.com/proddetail.asp?prod=9206KP (http://www.paia.com/proddetail.asp?prod=9206KP)
It seems to work perfectly, though it kinda bugs me intellectually that it's inverting.
I'd just reconfigure the op-amps to non-inverting.
That's essentially how the second PAIA circuit is configured, right?
If you're in any doubt about how to do that, I have a really basic op-amp primer on my site: http://www.markhennessy.co.uk/articles/op-amps.htm (http://www.markhennessy.co.uk/articles/op-amps.htm)
The circuit about half-way down this page is basically what you're after: http://www.markhennessy.co.uk/mf_a1/mods.htm (http://www.markhennessy.co.uk/mf_a1/mods.htm)
Having done that, the input impedance should be 100k / N, where N is the number of amps. 10 of them still gives 10k in, so no need for a buffer...
Cool, I'll read your pages in detail a bit later.
I then built up this one (except in the stereo input configuration, not mono): http://www.paia.com/proddetail.asp?prod=9605K (http://www.paia.com/proddetail.asp?prod=9605K)
I can't hear any difference in sound quality.
It's a bit depressing, but most competent audio circuits don't really have a "sound" as such - don't believe all you read on the DIY audio forums, where folk argue over the sound of different brands of resistors! Providing you're not changing the frequency response or running into clipping, you should be fine...
Oh, I don't really believe anything on DIY audio or audiophool forums! ;D I'm much too skeptical. You know, physics and shit... :p
Hey everyone. I'm working on a headphone amp project for my desk, where my desktop computer (a Mac Pro tower) is. The primary goal is to have multiple output jacks in easy reach, each with individual volume and on/mute switches, so that I don't have to plug and unplug behind the desk, nor adjust the main volume to compensate for each headphone model's differing sensitivity. (And I need one line output for the speakers, which are self-powered and thus use a line-level signal.)
That means you need multiple volume pots in the signal path, parallel connected together.
If money is not an issue, go for CS3318. Not as expensive and power hungry as PGA23xx, but still offers good performance. You can get true mute from it.
So the topology should be input-->buffer-->N*CS3318-->8N*output amplifiers.
I'm not quite sure what you mean by "parallel connected together". For sure I need individual pots for each output, as shown in the schematic of the first circuit. I did in fact give thought to a microcontroller-controlled design, but I think I'll save that for Mark II. :-)
So far, I've prototyped a few NE5532 designs, and they all seem to work just fine to my ears (which are relatively good).
Then you are lucky. A pair of golden ear costs a lot of money.
Well, to be honest, I don't think it's so much inherent acuity as it is paying attention. As people say, hearing can be learned. :)
I don't see any benefit from going down the PGA - micro-controller route. This application requires nothing more complex than some potentiometers and some switches.
Building an amplifier with a PGA device is a great learning exercise, however, and I recommend it.
And indeed, I may do that in the future. But I need to learn to work before I run, so I'm doing this to wet my feet with analog. I've got some unrelated Arduino stuff I'm working on, but I don't think I'm entirely ready to be putting them together yet. :)
The only feature I've thought could be handy to do via MCU is muting, so that an output's on/mute switch could work as a 1-of-n radio button by default (since I can only wear one pair of cans at a time, and that wouldn't be at the same time as speakers), but could be overridden (perhaps by press-and-hold) to enable multiple outputs at once for the rare occasion that multiple listeners use headphones at the same time.
Incidentally, here's one I did nearly 15 years ago: http://www.markhennessy.co.uk/preamp/ (http://www.markhennessy.co.uk/preamp/) - hopefully some ideas in there...
I haven't looked at the details yet, but it looks awesome!
With practice, you can hear clipping or crossover distortion before you can make it out on a 'scope trace. Levels of audibility are about 0.5 to 1% (-66 to -60dB) when using 1kHz tone, give or take. But both these distortion types are easy to avoid. BTW, a point I've been making for years - clipping is surprisingly inaudible on many types of real programme material:
https://www.youtube.com/watch?v=2V6YN-mshmY (https://www.youtube.com/watch?v=2V6YN-mshmY)
Skip to about 20 minutes in for the tests. This has complex ramifications for audio power amplifier designers, but isn't totally OT here.
I like to think I am quite sensitive to distortion, and indeed (like another YT commenter) I noticed the distortion before the folks in the video raised their hands.
A basic 5532 that isn't going unstable will give a distortion level that is well below audibility. They just work. And they are better than most at driving low-Z loads.
I mean, when I've thrown it up on the scope, the only thing I notice between the input and output is more noise on the output (high frequency noise visible as a wider trace on the scope, but completely inaudible to me). I was using a signal gen app on my iPhone to generate sine waves for testing.
Lots of good stuff here: https://books.google.co.uk/books?id=PvKPEFu2PVkC&pg=PA95&source=gbs_toc_r&cad=2#v=onepage&q&f=false (https://books.google.co.uk/books?id=PvKPEFu2PVkC&pg=PA95&source=gbs_toc_r&cad=2#v=onepage&q&f=false)
I think I need to get a better grasp of the basics first. :)
-
So basically, if I use an inverting input buffer, I can just have all the output amps be inverted as well, so that in the end everything comes out non-inverted. Correct?
Correct.
What's a good bias and preamp circuit for the electret mike? I've seen everything from simple voltage dividers all the way to complex op-amp designs.
This is the circuit you want. It's just a single resistor:
(http://nootropicdesign.com/projectlab/wp-content/uploads/2013/06/microphoneSchematic.jpg)
The value of the resistor should be chosen so that has about the same resistance as the microphone. This will put the microphone's output close to the middle of the voltage range (ie. 2.5V in that image).
The resistor doesn't have to be very exact because your amplifier will have a capacitor on its input, like this:
(http://www.openobject.org/objectsinflux/images/FIX/Lamp-Parabolic%20Microphone/mic-circuit.gif)
That will remove the 2.5V bias and center the microphone's output on whatever the amplifier thinks is 'zero'.
If the wiggly line coming out of the microphone isn't wiggly enough then you have to add an op-amp. This is where oscilloscopes are handy to have.
-
Answering each point will take far too long - it's sprawled somewhat. So instead, I'll just say this:
You are over-thinking this.
I blame myself for answering your questions initially - I should have said that back then. But then, some other posts have added lots of confusion too.
Regarding inverting verses non-inverting, stop worrying about common-mode distortion (that's what blueskull alluded to, but didn't call it that). You won't hear it - in fact, it'll be hard to even measure it. The real-world issues when deciding which to use are noise and input impedance.
If you haven't already, read up on thermal noise - aka Johnson noise. What you learn from this is that noise is proportional to the square-root of resistance, so for low-noise design, we try to keep impedances nice and low.
But often, we like to have input impedances that are nice and high. So we have a conundrum...
For the same value resistors, inverting amplifiers are always slightly noisier than non-inverting. But when doing inverting amplifiers, we might need to increase the values of said resistors so that the input impedance is high enough. Which, of course, gives us more noise.
Here, we're talking about amplifiers with a gain of 20dB, so actually, noise isn't a massive deal, whatever topology you choose. It's different for power amplifiers where we ask for 30dB or so. Much more of a problem for studio microphones or phono preamp, where 60dB might be needed.
Mechanical switches need not cause clicks. CMOS analogue switches are just as capable of clicking. There is no reason not to use mechanical switches. For simplicity, I'd switch the outputs rather than the inputs.
Here's what I would do:
Input -> potentiometer -> 100n cap -> non-inverting amplifier -> 470uF cap -> mute switch -> headphones.
Repeat as needed. Use 47k potentiometers for 5 channels or less. Use 100k for up to 10 channels. Use a split supply or create a virtual earth - it really doesn't matter. 100n between 4 and 8 of each 5532.
Forget about trying to measure distortion at this stage - you won't get anything you can hear.
Stop worrying about oscillation. You'll see that on a 'scope when it happens - it's really very obvious indeed, and nothing to sweat about at this stage. The fixes are also very easy.
That Douglas Self book I linked to can be read by someone who is totally new to audio. But you do need to know the very basics of electronics. That's all. And if you're rusty about that, you'll find that his writings are very good at bringing you up to speed. Honestly, that is the most productive way you can spend your time. Sorry if that seems a bit old-fashioned!
After that, just build something! Forget about spinning PCBs at this stage - that's just nuts. You don't need anything more complicated than the 5532 - you certainly don't need microcontrollers and dedicated SMD headphone drivers. Get some Veroboard and hack something together. If you don't, you will remain stuck in the loop that I see everywhere these days: paralysis by analysis. You say that you lack experience - well, get some! And then get some more. This won't be the last thing you'll build. And enjoy!
Good luck,
Mark
-
For a microphone preamp, take a look at this:
https://github.com/NiHaoMike/OpenDAC-HD/blob/master/OpenDAC_sch_ana.png (the microphone preamp is near the bottom of the page)
The 33R "soft ground" is an attempt to reduce crosstalk on headsets that have a common ground. (Such crosstalk causes echo on VoIP calls.) If you don't need that feature, replace the 33R with a short.