*Project* - CMOY Headphone amp

Soldato
Joined
1 Oct 2004
Posts
10,772
Location
Cambs/Herts
Penski beat me to it in getting his CMOY amp up and running first. But I'm going one better and building my own...:o;)

Here's the main page from which I got the original plan and schematic:
http://tangentsoft.net/audio/cmoy-tutorial/


The reasons for making this amp:

-I like electronics
-I've studied the stuff involved in this sort of circuit and can understand what's going on (hopefully...) so it'll be good to put theory into practice.
-I have a big pair of Sennheiser earphones which I'd like to make louder when I'm away from my HiFi using my iRiver H120
-It's something to do
-It's cheaper than buying one prebuilt (see later)

The circuit is as follows:

powerkr3.png


ampjg2.png


A quick summary:
One or 2 batteries in series are used with a potential divider to creat a "dual" power supply for the op-amp.
The Op amp is fed directly from the line-in, and the gain is controlled by the feedback loop containing R4.

Unfortunately the OPA2132PA Op-amp was only available at one shop in the UK, and the rest of the stuff was far cheaper elsewere so I ended up paying postage twice. It came to £22 in total. (Okay, so maybe a pre-built one from the USA would have been a better option...:p).

Here's all the stuff when it arrived:
dsc06066mediumkw8.jpg


Items clockwise from the top-left:
-Extruded aluminium container
-Coupling capacitors (to isolate the op-amp from any unwanted DC-offset)
-Strip-board (what I'll be building the final circuit on)
-Op-Amp and power LED
-A big bag of resistors
-Bread board for prototyping
-Power switch
-Power capacitors
-2 stereo jacks
-9V battery connectors
-Volume control potentiometers

The aluminium container is gorgeous: it's really light and well made, but smaller than I expected. I'll have to modify the plan to only use one battery rather than 2. Also the power switch is pretty big. I'll probably downsize to a mini toggle-switch I've got lying around from my last project. The stereo jacks are pretty poor quality, I should have bought more expensive ones. They'll do for now though. I also bought the wrong potentiometers. I needed a single dual-potentiometer to handle both channels. So I went and bought one from that popular high street electronics store.

The prototyping stage:

dsc06067mediumqh8.jpg


I put all the stuff in a breadboard. Amazingly it worked first time! The only thing that went wrong initially was that the volume potentiometer when turned clockwise increased the volume in the left channel but decreased it in the right. This lead to some funky sound effects when playing with the volume, but it wasn't really what I was after:p. Some swift re-wiring dealt with it no problem anyway.

First impressions are that THIS THING IS LOUD. I'm certain it could make mincemeat of my Sennheisers if I unleashed it fully. It also seriously amplifies any noise at the input. The only noise-free source I've managed to find is the line-out from my Audigy 2. The background "hiss" from the iRiver really is quite loud when amplified.

I tuned down the gain by swapping out R3 for a 3.3k, which besides preventing me destroying my head at high volumes allows full 360 degree use of the potentiometer.

Tomorrow I'll be planning on how I'm going to fit all this stuff into that tiny container, and perhaps starting the soldering of the finished product.
 
Last edited:
Soldato
OP
Joined
1 Oct 2004
Posts
10,772
Location
Cambs/Herts
Oh, and a warning. Make sure not to accidentally short-circuit a 9V battery. I almost melted this one (and almost melted my hand picking it up...):

dsc06068mediumsi5.jpg
 
Last edited:
Soldato
Joined
4 Jan 2004
Posts
20,803
Location
¯\_(ツ)_/¯
Good luck, you may want to look into a "rail splitter" instead of using a voltage divider. It will use less power and you only need 1 battery then.

Also, that Hammond enclosure looks pretty small, will you fit the PCB plus 2 x pp3's?

Once I get my class D amp working in it's mint tin, I'll add some pics to the thread. :)

EDIT: When you buy another pot, go for a dual gang log one. Linear will work, but not very well.
 
Last edited:
Soldato
OP
Joined
1 Oct 2004
Posts
10,772
Location
Cambs/Herts
Good luck, you may want to look into a "rail splitter" instead of using a voltage divider. It will use less power and you only need 1 battery then.

Also, that Hammond enclosure looks pretty small, will you fit the PCB plus 2 x pp3's?

Once I get my class D amp working in it's mint tin, I'll add some pics to the thread. :)

EDIT: When you buy another pot, go for a dual gang log one. Linear will work, but not very well.

I've already bought the dual pot, but I think it's a linear one. It seems to work okay though. I assume the log one you mention is simply a logarithmic resistance scale?

The enclosure is very small, yes, but I'm confident that with some careful design work I'll be able to fit it all in. Only room for one battery though.

I'll look into the rail-splitter that you mention.

I'm also thinking about whacking in some slightly bigger coupling capacitors to improve bass response.
 
Soldato
Joined
29 Oct 2004
Posts
10,884
Funnily enough I also bought all the components I need for 2 of these last night, though it set me back a bit more as I had to buy solder/wire etc.

Most of the components will be here tomorrow but I managed to accidently pay for the protoboard using PayPal e-cheque :)rolleyes:) so will have to wait 7-10 days more for that.
 
Soldato
Joined
4 Jan 2004
Posts
20,803
Location
¯\_(ツ)_/¯
I thought Class D was mainly used for bass/sub woofer amps?
Yep it normally is, but recently the switching frequency has got high enough so that it can now be used for anything. :)

Here's the module I'm using btw, all I have to do us add the connectors and a few caps and a volume pot to my mint tin, and it should be as easy as that.

http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=160224825086

Even tho it's meant for speakers, people have used it with headphones with no problems (the mod is pretty simple).
I've already bought the dual pot, but I think it's a linear one. It seems to work okay though. I assume the log one you mention is simply a logarithmic resistance scale?

The enclosure is very small, yes, but I'm confident that with some careful design work I'll be able to fit it all in. Only room for one battery though.

I'll look into the rail-splitter that you mention.

I'm also thinking about whacking in some slightly bigger coupling capacitors to improve bass response.
Yep. A linear pot will work, but the Decibel scale is Logarithmic, meaning the volume control will work, but it will have a strange scale.

The rail splitter should help with the single battery configuration... I'll see if I can dig out a link or two.

Bigger caps wouldn't hurt, but be aware they will probably be physically larger and may not fit in your case...

Good luck.
 
Associate
Joined
8 Mar 2007
Posts
98
You can simulate a logarithmic scale with a linear potentiometer by strategically placing a resistor to ground, after the wiper.

See http://sound.westhost.com/project01.htm


I would personally add a low pass input filter. This is a resistor in series with the input, after C2 and R2, and then a small capacitor to ground after said resistor. Something like 2k and 390pF. That should give a corner frequency of around 200KHz.

100nF or 10nF supply bypass capacitors should probably also be added if you haven't got those. The schematic doesn't show them, but some schematics assume you know they should be there. They should go from V+ to ground and V- to ground, as close to the opamp pins as you can get them.
 
Last edited:
Soldato
OP
Joined
1 Oct 2004
Posts
10,772
Location
Cambs/Herts
Thanks for the responses and input.


markiemrboo - thanks for the advice on the log pot, I'll give that a shot later on.
What's the advantage of the low-pass filter? I understand how they work, but why do I need to filter out high input frequencies?
Also, what exactly is the purpose of a supply bypass capacitor? Are the 220uF capacitors not the same thing, if they're to go from V+ and V- to ground?



MikeHunt - I was looking at some more advanced power supply designs. This one seems pretty simple:

vfbopaii1.png


I've got a pile of 741s lying around somewhere which I guess I could use as the buffer.

I'm still not really clued up on the advantages of this design are over the simple resistor-divider. This part of the tutorial page tries to explain the disadvantages of the resistor-divider:

tangentsoft.net said:
cmoydcjh3.png

Because the op-amp's two inputs are always equal due to op-amp action, 1 mV is forced across R3. The op-amp must then put 10 mV across R4 to keep the op-amp inputs equal. As you can see, this puts 11 mV of DC across the load; if the load is 32 Ω at DC (such as a pair of Grado SR-60s), 0.34 mA is forced through the load. This current can only come from the rail splitter, which looks like two parallel resistors to the load. Ohm's law tells us that since the current is 0.34 mA and the resistance is 2.35 KΩ (two 4.7 KΩ resistors in parallel), the voltage at the midpoint of the divider is forced ~0.8 V away from the ideal midpoint.

In this particular situation, then, a 9 V battery would split to about +3.7 V and -5.3 V instead of the ideal +/-4.5 V. Different op-amps, headphones, and resistor values will give a different split. Therefore, it is best to simply realize that this offset will be significant with low-impedance loads, and it will increase as the load impedance goes down, rather than calculating offset and trying to counteract it somehow.

^which doesn't make much sense...


randal24 - The container is a Hammond extruded aluminium case, 80 X 54 X 23mm with removeable plastic ends:

dsc06069mediumvh0.jpg
 
Associate
Joined
8 Mar 2007
Posts
98
markiemrboo - thanks for the advice on the log pot, I'll give that a shot later on.

Not a problem. I've used that method on a simple preamp with good results.

What's the advantage of the low-pass filter? I understand how they work, but why do I need to filter out high input frequencies?

It one way to help try and stop RFI from spoiling things. RF can be modulated in to something that is audible. On unity gain stable opamps you can put a small capacitor in parallel with the feedback resistor, R4 in your schematic, to limit the bandwidth as the frequency gets higher. An OPA2134 is unity gain stable.

Unfortunately I think that the filter will be affected by source impedance, which would be the potentiometer. This would mean the filter would change with volume. I'm not sure how to combat that. I guess you would just choose a value which gives a high enough -3dB point at highest impedance?

Also, what exactly is the purpose of a supply bypass capacitor? Are the 220uF capacitors not the same thing, if they're to go from V+ and V- to ground?

The general idea is something like this:

Traces, wires etc are not ideal. There is a small amount of resistance, inductance and capacitance which, when current is drawn by the circuit, can create voltage drops. This means you get ripple on the supply / ground.

Capacitors store energy which can help fill in this ripple.

An opamp will have something called PSRR, or Power Supply Rejection Ratio. It's a measure of how much of the supply voltage fluctuation actually makes its way in to the output. Generally these figures are pretty good at lower frequencies, but degrade as the frequency of the power supply fluctuations gets higher.

Larger electrolytic capacitors aren't so good with higher frequencies, so you tend to put smaller value capacitors, with much better high frequency performance, to do this job. A ceramic (NP0 / C0G) or film type is good here.

The opamps - input is connected to ground by a resistor. If ground is varying, this can cause a signal to appear at one input and not the other. This will cause the signal to be amplified by the circuits gain. Not something particularly desirable!


Bit of a mess, but I hope it helped somewhat. There's probably loads of articles out there which explain it much better than I can!
 
Soldato
OP
Joined
1 Oct 2004
Posts
10,772
Location
Cambs/Herts
Okay, so I was noticing a bit of distortion on big drum hits at high volume, which I think might be clipping. (Is this clipping? I'm new to this audio jargon...:p). So I figured I'd follow MikeHunt's suggestion and try out a different power supply design. I had a 741 Op amp going spare so I created this:

vfbopaii1.png


dsc06071mediumiq0.jpg


A separate power supply built on a separate bread-board (which links to the main one seen in the previous photos). And voila, my clipping issues are solved. This should improve the battery life - ie: clipping occurs at a much lower battery voltage now.
 
Soldato
Joined
4 Jan 2004
Posts
20,803
Location
¯\_(ツ)_/¯
Experimenting is half the fun. :D

Basically that quote with the jargon was saying that using a simple voltage divider (2 resistors) can result in some DC offset on the output.

This is more of a problem with speakers, as they are low impedance (4-8 ohms), and if the worst case DC offset can kill your speaker, best case reduce sound quality.

With headphones it's less of an issue, but after building any amp, weather for headphones or speakers, the first thing I do is check of DC offset on the outputs.

Do a google search for "DC offset" for more info. Basically, a rail splitter should eliminate or vastly reduce DC offset. :)
 
Man of Honour
Joined
18 Oct 2002
Posts
40,931
I added up how much it was going to cost me to make one... well, two... I would break one while making it. ;)

I've bought one form the US like Penski's :D Much cheaper.
 
Soldato
OP
Joined
1 Oct 2004
Posts
10,772
Location
Cambs/Herts
Not a problem. I've used that method on a simple preamp with good results.



It one way to help try and stop RFI from spoiling things. RF can be modulated in to something that is audible. On unity gain stable opamps you can put a small capacitor in parallel with the feedback resistor, R4 in your schematic, to limit the bandwidth as the frequency gets higher. An OPA2134 is unity gain stable.

Unfortunately I think that the filter will be affected by source impedance, which would be the potentiometer. This would mean the filter would change with volume. I'm not sure how to combat that. I guess you would just choose a value which gives a high enough -3dB point at highest impedance?



The general idea is something like this:

Traces, wires etc are not ideal. There is a small amount of resistance, inductance and capacitance which, when current is drawn by the circuit, can create voltage drops. This means you get ripple on the supply / ground.

Capacitors store energy which can help fill in this ripple.

An opamp will have something called PSRR, or Power Supply Rejection Ratio. It's a measure of how much of the supply voltage fluctuation actually makes its way in to the output. Generally these figures are pretty good at lower frequencies, but degrade as the frequency of the power supply fluctuations gets higher.

Larger electrolytic capacitors aren't so good with higher frequencies, so you tend to put smaller value capacitors, with much better high frequency performance, to do this job. A ceramic (NP0 / C0G) or film type is good here.

The opamps - input is connected to ground by a resistor. If ground is varying, this can cause a signal to appear at one input and not the other. This will cause the signal to be amplified by the circuits gain. Not something particularly desirable!


Bit of a mess, but I hope it helped somewhat. There's probably loads of articles out there which explain it much better than I can!

Thanks for the in-depth reply, that's really helpful:)

So would a capacitor in parallel with the feedback resistor be a better option than the low-pass filter at minimising RFI interference? I assume RFI is radio frequency, ie: >~100MHz? According to a quick back-of-envelope calculation, a 0.15pF capacitor in parallel with the feedback resistor should attenuate the gain by -3dB at 100MHz. Does this sound reasonable?

In terms of the bypass capacitors: should I add a 10nF capacitor over the existing 220uF one?

Thanks again!



Experimenting is half the fun. :D

Basically that quote with the jargon was saying that using a simple voltage divider (2 resistors) can result in some DC offset on the output.

This is more of a problem with speakers, as they are low impedance (4-8 ohms), and if the worst case DC offset can kill your speaker, best case reduce sound quality.

With headphones it's less of an issue, but after building any amp, weather for headphones or speakers, the first thing I do is check of DC offset on the outputs.

Do a google search for "DC offset" for more info. Basically, a rail splitter should eliminate or vastly reduce DC offset. :)

Cheers:)

According to my multimeter there's no DC offset at either output.:)


I added up how much it was going to cost me to make one... well, two... I would break one while making it. ;)

I've bought one form the US like Penski's :D Much cheaper.

Don't remind me...:o:p

Anyway, I'm really enjoying making this, much better than getting someone else to do it for you!;)
 
Last edited:
Associate
Joined
8 Mar 2007
Posts
98
Thanks for the in-depth reply, that's really helpful:)

So would a capacitor in parallel with the feedback resistor be a better option than the low-pass filter at mimising RFI interference?

Quite possibly.

Another trick I have come across is to put a small value capacitor between the opamps input pins. At higher frequencies this would allow the signal to be at both inputs and so reduces the gain.

Having more gain reduces the bandwidth too, but you probably don't want more gain :)

I assume RFI is radio frequency, ie: >~100MHz? According to a quick back-of-envelope calculation, a 0.15pF capacitor in parallel with the feedback resistor should attenuate the gain by -3dB at 100MHz. Does this sound reasonable?

The OPA2134 only has a bandwidth of 8MHz! -3dB at about 100KHz is probably good to aim for. With your current resistor values this would be around 160pF. That sounds like it'd be a non standard value, so try for something close to that I guess.

In terms of the bypass capacitors: should I add a 10nF capacitor over the existing 220uF one?

Get the smaller capacitors close to the opamp pins, not over the 220u capacitor pins. Trace impedance will destroy the high frequency performance of the capacitor the further away they are.
 
Back
Top Bottom