need help with project measuring frequency response for headphones.. - Page 1
Forum section: electronics / beginners

author: technoob
author_rank: Newbie
timestamp: April 26, 2013, 01:29:00 pm
content: I would like some directions on what do i need if i wanted to measure frequency response of headphones,.would any guru/kind soul help a noob on the right direction and what equipments i need for this purpose?thanks in advance

author: Psi
author_rank: Super Contributor
timestamp: April 26, 2013, 01:50:58 pm
content: I would start by getting a microphone with known frequency response, preferably its own frequency graph.From that you can build a system to generate a series of tones and measure the microphone signal.Apply the inverse of the microphone, microphone preamp and headphone amp frequency response. The result will be the frequency response of the headphones.If i was doing it i'd probably use a microcontroller and dac.It could generate the signal, read the mic responce, apply any response correction and plot the data on a LCD.

author: AndyC_772
author_rank: Super Contributor
timestamp: April 26, 2013, 01:51:34 pm
content: How precise do you need to be?The most important thing you'll need is a microphone whose response is well characterised across the frequency range of interest. It doesn't necessarily need to be extremely flat, but you do need to know how its response varies with frequency so you can compensate.That's probably the easy part, though, and more than likely just involves a little research and giving a company like Sennheiser a surprisingly large sum of cash.The tricky part will be setting up the mic and headphones in a way which is consistent, repeatable, and representative of how they'll be used in practice. I believe for some purposes a dummy head with anatomically accurate models of the ears is used, so the microphone receives a sound from the headphones that approximates what an actual ear would receive. As you know, if you just put a pair of even the best headphones on a table and listen from a distance, what you hear is tinny and nothing at all like the sound from a pair of speakers. Your experimental setup needs to use them properly or you'll get a meaningless measurement.Other than that, you'll need a signal generator which can generate sine waves of accurately controlled amplitude, and some way to monitor the output from the microphone and accurately measure its amplitude. You'll probably also want to monitor the electrical signal at the input to the headphones, as they're likely to present a varying load at different frequencies, which means the amplitude of the driving signal could vary even if you don't adjust the signal generator. (If you connect the signal generator to the headphones via an amplifier with a low impedance output, then this effect may be small enough to ignore).To monitor the output level from the microphone, I'd use an oscilloscope and/or an accurate AC voltmeter.

author: blasto9000
author_rank: Contributor
timestamp: April 26, 2013, 03:34:57 pm
content: Quote from: AndyC_772 on April 26, 2013, 01:51:34 pmThe audio amplifier and all leads carrying signal would also have to be compensated.I suppose if the OP only wants to know the high and low limits of the response, the setup would be simpler, using two narrowband microphones/transducers in the spectrum of interest.

author: Lightages
author_rank: Unknown
timestamp: April 26, 2013, 05:58:58 pm
content: This is not a trivial task. A dummy head is just the start. Each person has a different pinna, our outer ear shape. Because of this each person has a different physical frequency response, but the person's brain knows nothing of this and just hears things correctly for them.When you try to measure the frequency response of a speaker the result holds true for everyone because a speaker is used at a distance where the pinna of the user acts as it would with any external sound source. When you place a headphone at the surface pinna, then the position of the headphone driver can have a marked effect on the perceived frequency response as different parts of the pinna are either taken out of use or more emphasized in their effect.It is possible to make a generic pinna on the dummy head and then draw some inferences on how the headphone responds but it will have low accuracy to perceived frequency response in real use when compared to the frequency response measurement of a speaker.If you want to know how a headphone might present its reproduction to your specific ears then you need to make a mold of your head and outer ears and ear canal. Then you would take a microphone capsule and embed it at the same position as your ear drum. Then using this dummy head you would measure the frequency response of this measurement rig in comparison to a reference speaker with a known frequency response. This can be done in an anechoic chamber to remove room influences or an MLS (Maximum Length Sequence) pulse that minimizes the room influence. Once you have characterized the response of the test jig then you can start putting headphones on it and see how the response looks compared to a non-headphone source. Now even then this is a simplified model because there are other effects such as bone coupling of sound from the headphones through your skull into the eardrum, plus the head shape transform on the external sounds. But the "simplified" model I have presented should be pretty close to reality.This pinna effect on headphone sound is why people cannot agree on the best sounding headphones. The opinions vary wildly on the same headphones mainly because of the pinna of the individual having such a dramatic effect on the perceived response of headphones that are so close to the pinna whereas normal sounds almost never are, especially music. This has nothing to do with audiophool nonsense but is a real effect.So I am sorry to say if you want to measure headphone frequency response there is no answer except for that of one particular user. That result might be valid or close to valid for someone else but nobody has the exact same shape of pinna.

author: Kompost
author_rank: Contributor
timestamp: April 26, 2013, 06:39:09 pm
content: Lightages is right, there's just no way you'll get useful results by just sticking a microphone into the headphone. You might get repeatable results, but they will be useless. My HD600's sound DRAMATICALLY different if I just shift them 2cm up or down over my ear (they have really big ear cups), the difference is much bigger the results I get by plugging them into different amplifiers.

author: Razor512
author_rank: Regular Contributor
timestamp: April 26, 2013, 08:18:33 pm
content: Pretty much the only low cost way to do it is to use a microphone with a wide frequency response range, then look at the published frequency response of the microphoneideally, you would want info on how many dB of drop you get at certain frequencies so you can adjust your equalizer to smooth the response out, then after that, get some audio that can sweep through frequencies, or just play an audio file that you know can take advantage of a wide frequency range, then monitor the waveform of what the mic is picking up while the headphone is pressed onto the mic.My microphones go up to 28,000 Hz, and I am unable to measure it all because my mic reaches it's limit at around 21-22 khz.

author: Lightages
author_rank: Unknown
timestamp: April 27, 2013, 12:06:43 am
content: You can buy a device like this but it costs thousands of dollars:http://www.neumann.com/?lang=en&id=current_microphones&cid=ku100_descriptionInstead there is a not so expensive way to do it.You need to make a mold of your outer ears and part of the ear canal. This can be done using alginate or some other molding gel. You also need to have a bit of the area surrounding the ear area of the head. Once you have this you need to make some silicone ears from the molds and trim them to make them useable in a dummy head. The dummy head can be made many ways so I will go into that here. All of this is a whole other subject and skill which is not in the realm of electronics so I will leave to the reader to find out how to do it.Then you need a couple of microphone capsules that are around the same size as the ear canal. These need to be inserted in the fake ear parts around the same distance as where the real ear drum would be. The type of capsule is something like this:http://www.sensibleaudio.dk/Measurement_Mic/microphone.htmonly you would just use the mic capsule and the electronics.Once you have the mic capsules installed in the fake ears and the fake ears installed on the dummy head, then you need to characterize the frequency response. This can be done at great cost again at a professional anechoic chamber facility or you can do it yourself by doing the following.First you need a reference speaker setup that has a known frequency response. The best way to do this with free software is to use this:http://www.audua.com/and a "flat" and inexpensive measurement microphone like this:http://www.behringer.com/EN/Products/ECM8000.aspxYou need only use one speaker and make a reference response test of the speaker following the recommended procedures for the software. Once you have a known frequency response you then measure again the response of the speaker using the dummy head microphone. The difference is what your ear drum actually receives based on your head shape, the pinna shape, and the ear canal shape. This difference curve is what needs to be considered when headphones are playing back on the dummy head microphone, plus the actual response curve of the headphones.So when you play a flat frequency sweep or other way of measuring the response of the headphone on the dummy head you first need to subtract the dummy head response to get the response of the headphones.Like I said this whole thing is not a trivial task and has many pitfalls. Each ear cast is only good for that person. If you find a set of headphones that are perfectly flat for you with your ear mold, they will be way out for another person.Technically it is easier to make "perfect" in ear phones, the type that go inside your ear. This removes the pinna from being an interactive and variable influence in the positioning and design of the transducer. But now you need to know its response influence and equalize the signal so that the pinna response is replicated. Again this is done by using the dummy head microphone to record your specific ear response. An alternative, yet less detailed, curve can be made at an audiologist and apply that curve to your equalization for the in ear phones. This of course assumes that the in ear phones are flat responding. To measure the response of the in ear phones is much less work as you now only need to model the ear canal and not the whole head.The end moral of this story? There are no "perfect" headphones. Because you cannot buy perfect headphones for you then the next best thing is to equalize the signal to the headphones to match what your ear needs when the pinna is crippled by having those headphones jammed against the pinna. Or you can do the in ear phone thing and get close with an audiologist's curve after measuring the in ear phones in a model ear canal and adding the two curves.Will this be perfect after this? Probably not but it sure will beat the totally subjective opinions and reviews of headphones that can't be true for anyone except the person writing the opinion/review.

author: David_AVD
author_rank: Super Contributor
timestamp: April 27, 2013, 12:38:08 am
content: Quote from: Kompost on April 26, 2013, 06:39:09 pmSo what does the headphone manufacturer's frequency response graph represent then? Do they measure on-axis or using an ear model?

author: Lightages
author_rank: Unknown
timestamp: April 27, 2013, 12:41:36 am
content: Ask the manufacturer! There is no standard for these measurements and it will depend on what the manufacturer cares or doesn't care to do. Headphones are still the wild wild west of audio. Well there is still the audiophool and his money but that is more akin to ufology and homeopathic BS.

author: David_AVD
author_rank: Super Contributor
timestamp: April 27, 2013, 03:06:32 am
content: I'm sure that respected brands such as AKG and Sennheiser do proper testing and provide accurate results. Down at the crappy end of town however, I'd say that any frequency response graph is plucked out of thin air.

author: Lightages
author_rank: Unknown
timestamp: April 27, 2013, 03:08:59 am
content: Unless they provide the test parameters with the tests, they are useless specifications.

author: David_AVD
author_rank: Super Contributor
timestamp: April 27, 2013, 03:16:47 am
content: The ultimate test device is the things on the sides of your head and the thing in the middle. If you like what you hear, it's all good.

author: Lightages
author_rank: Unknown
timestamp: April 27, 2013, 03:22:12 am
content: Yes, if you are happy, you are happy! But that is not the point of the OP's question. He wants an objective measurement not just feel good vibes.

author: technoob
author_rank: Newbie
timestamp: April 27, 2013, 06:25:07 am
content: Thank you all for the quick reply.after researching and reading through it all.. i came out with a layout plan with minimal costs in setting up -http://imageshack.us/photo/my-images/594/mictoscopediagram.gif/Do you guys think its fine? I could probably opt for the BEHRINGER - ECM8000 microphone, a oscilloscope with signal generator as well to save space and money. Is my layout fine? or im still missing something else?as for accuracy wise, i also know that it will be pretty hard to measure it accurately but i found a website called inner fidelity where the folks seem to be using some really expensive top of the line equipments to measure various headphone frequency response accurately. I figure i could use some of their headphone datas to match the data that i might receive from my setup and use it to tweak it to their result as close as possible.anymore help is greatly appreciated!

author: Lightages
author_rank: Unknown
timestamp: April 27, 2013, 06:36:33 am
content: I am sorry to say that this will be useless. Did you read my information, that on the innerfidelity site? You will measure nothing that matches reality and it will not be even a repeatable difference between headphones. You need to do what I suggested or you will have useless and irrelevant results.Sorry to be blunt but I spelled it all out already.

author: David_AVD
author_rank: Super Contributor
timestamp: April 27, 2013, 07:23:53 am
content: I say measure the response on-axis and see what results you get. Having fun, experimenting and learning is what it's all about.

author: bingo600
author_rank: Super Contributor
timestamp: April 27, 2013, 07:37:43 am
content: I have just bought a used Keithley 2015-THD DMM , and i think GSM audio measurements was one of the targets for this meter. I have absolutely no idea how to use the THD part of the meter , but KJDS might have some left.http://www.keithley.com/products/dcac/audioanalyzer/?mn=2015http://www.atecorp.com/ATECorp/media/pdfs/Keithley-2015-16_Datasheet.pdfManualhttp://www.w12.pwr.wroc.pl/lue/pliki/Keithley_2015.pdf/Bingo

author: Razor512
author_rank: Regular Contributor
timestamp: April 27, 2013, 07:48:31 am
content: Measuring frequency response will show you what sounds the headphone can reproduce under ideal conditions, but where a quality headphone truly shines, and is extremely hard to test on anything other than a human ear, is how it handles multiple frequencies at the same time. Many lower cost headphones will list 20-20,000 Hz but if you play a lot of lows and mids, then use the tone generator in an audio editor and play a high frequency like 18,000-20,000hz, it will either be unable to play them, or they will come out distorted, while on a higher quality pair, it will handle it perfectly.PS while not 100% the case, most of the time, if a headphone can go well above the human hearing limit, eg (going into 30,000-50,000hz then they will handle many simultaneous frequencies really well.If you can get a flac quality copy of a song like thisor any other song that plays complex sounds across a wide frequency range (eg combining a heavy metal style with instrumental/ orchestral style with lots of bass, mids and highs), and play them both on a low cost headphone that supports the human audio range, and also a higher end pair of headphones, you will hear clearly how cheap speakers stumble when it comes to more complex sounds.When audiophiles go crazy about certain headphones, they are focusing on the subtle details, eg some instruments may have a really smooth sound on a $100-150 headphone, but on a $300 headphone, you will hear other sounds like a slight roughness in certain sounds, or subtle articulations that certain string based instruments make. this often leads to certain songs sounding very different, especially ones recorded using top of the line studio microphones.This is also something that sweeping a sinewave from 1Hz to 20,000+ Hz will not showI test certain headphones frequency response ranges just to see if they can actually reproduce the tone, or do certain mods to the speakers, eg adding a hole in the casing, to allow it to reproduce lower frequencies than what was rated.

author: Lightages
author_rank: Unknown
timestamp: April 27, 2013, 08:15:05 am
content: Razor512:He is asking about frequency response, not distortions and efficiency. These are different subjects but related when used as a perception of reality. It has been demonstrated by many researchers that the main difference in perceived sound quality, these subtleties, are frequency response differences. As long as a transducer can reproduce the frequencies in question with better than 0.1% distortion then most people do not hear the distortion especially if the source signal is complex and not a pure sine wave. People can be trained to hear down to maybe 0.01%, MAYBE, with pure sine waves, but beyond that it is audiophoolery and doesn't stand up to ABX testing.Measuring frequency response as it applies to headphones requires no less than what I have written, and that is an approximation as well. Measuring harmonic distortion and IM distortion is another whole can of worms.

author: amyk
author_rank: Super Contributor
timestamp: April 27, 2013, 08:35:44 am
content: As a first approximation to an ear cavity you can put the microphone in an ear-sized container. Add padding as needed to remove any resonance.

author: Lightages
author_rank: Unknown
timestamp: April 27, 2013, 08:45:25 am
content: That first approximation is actually counterproductive. The ear is a resonant cavity with many differences in response to direction. Sorry but that will be very unhelpful.

author: Razor512
author_rank: Regular Contributor
timestamp: April 27, 2013, 09:17:58 pm
content: From my experience, many headphones will meet their advertised frequency responses. Even cheap $2 ones from ebay.(while a little off topic, from my experience, it is easy to tell the difference between headphones even with similar specs, when you make them multitask. lower end headphones become unable to reproduce fine details in the audio, especially at higher frequencies. eg listen to a song that has some bass, heavy metal mid tones, and a violin playing, you will see that the sounds produced by the violin will be simpler on the lower end headphone as compared to the high end one. (for me this was tested on a sennheiser HD 555, as compared to a HD 650 that was on display at a store. (I always being sample flac audio files when shopping for headphones. (headphone shopping kit = good MP3 player, headphone amp, alcohol swabs to clean headphones before using them, and audio samples, it does not take any special training as the difference in that range are enough to be easily noticed.Though for the money as you go higher end, you get diminishing returns, eg in testing the HD 800, other than improved comfort, there was no noticeable improvement in quality and that headphone was 4 times the cost at $1500,

author: 4to20Milliamps
author_rank: Regular Contributor
timestamp: April 27, 2013, 10:40:33 pm
content: I would do some more research before I started buying too much stuff:http://www.innerfidelity.com/content/headphone-measurements-explained-square-wave-response-page-2

author: Lightages
author_rank: Unknown
timestamp: April 28, 2013, 01:18:55 am
content: Here is what I would do.I would build an artificial pinna out of clay that resembles my pinna. Then I would make a mold from this using molding silicone. From the mold I would make the artificial ear using silicone again with the microphone embedded in the ear canal and attach this to a dummy head shape of some arbitrary material. You only need one "ear". Then I would do the measurements I described earlier to characterize the dummy ear. This all can be done for a few tens of dollars.Now that you have the dummy ear it is very inexpensive to do the rest. My post detailing the steps does not describe anything expensive and can easily be done by any hobbiest for low cost. I would guess for less than $200 you would be well on your way to being able to make some meaningful measurements. This includes the materials for the dummy head, the microphones needed, and any additional electronics to mash it all together. It just needs some patience and some crafting of bits. If this is too much then there is no point in going further. Sticking a microphone in some arbitrary position in a headphone is going to produce less than useless results.So what is so expensive about $200 and the time to make the correct parts?

author: vk6zgo
author_rank: Super Contributor
timestamp: April 28, 2013, 03:44:26 pm
content: I used to do something like this for a living when I worked for the Hearing Aid place.We used to do tests on Audiometers,using an artificial ear which was calibrated each year at an Acoustic Research establishment.You had to very carefully position the headphones so that the test would give correct results.

author: olsenn
author_rank: Frequent Contributor
timestamp: April 28, 2013, 03:57:53 pm
content: Unfortunately, headphone measurements are not very objective. Even if you did buy a multi-thousand dollar dummy head and expensive microphones with low distortion and a known frequency response, then the measured results would still not come close to what you perceive. Sites like Innerfidelity and headroom use a dummy head and then apply what's called a "Head Related Transfer Function" (HRTF) to manipulate the graph to look more like what you hear... but this transfer function is just made up on the spot by audiophools (aka not objective). Typically the first kilohertz will be fairly accurate without the need for a HRTF, but after that it's a big mess.

author: Lightages
author_rank: Unknown
timestamp: April 28, 2013, 05:40:35 pm
content: Exactly what I have been trying to say. Headphones are subjective and always will be. You can make a dummy head of your own head and ears and have a good approximation of what you are going to hear but it is only for that person.However, the OP is asking how to measure, not whether he should or not, so we should give him the information on how to measure, not tell him he shouldn't try.