Tuesday, October 6, 2009
Noise
plotted, they form a random pattern centered on zero. Since noise sources have amplitudes
that vary randomly with time, they can only be specified by a probability density
function. The most common probability density function is Gaussian. In a Gaussian probability
function, there is a mean value of amplitude, which is most likely to occur. The
probability that a noise amplitude will be higher or lower than the mean falls off in a bellshaped
curve, which is symmetrical around the center.
σ is the standard deviation of the Gaussian distribution and the rms value of the noise voltage
and current. The instantaneous noise amplitude is within ±1σ 68% of the time.
Theoretically, the instantaneous noise amplitude can have values approaching infinity.
However, the probability falls off rapidly as amplitude increases. The instantaneous noise
amplitude is within ±3σ of the mean 99.7% of the time. If more or less assurance is desired,
it is between ±2σ 95.4% of the time and ±3.4σ 99.94% of the time.
σ2 is the average mean-square variation about the average value. This also means that
the average mean-square variation about the average value, i2 or e2, is the same as the
variance σ2.
Thermal noise and shot noise have Gaussian probability density functions.
The other forms of noise do not.
Thursday, October 1, 2009
Op-Amp Tester
Op-Amp Tester
I fried an op-amp the other day, but couldn’t prove it immediately. All I knew was that it wasn’t working in the circuit, but I didn’t know if the chip was dead or if it was just one of those picky chips that demands special care. So, I rigged up a simple go/no-go DIP-8 dual op-amp tester: plug the chip in, apply power, and see if the LEDs light up.
The schematic (single channel):
The finished dual channel tester:
The circuit will work with any op-amp. Fortunately, there are just a few standard pinouts, and the circuit is cheap, so you can build just a few versions and cover almost every possibility:
Dual-channel op-amp pinout | | |
The unlabeled pins on the single-channel pinout are used for various purposes on different chips. You should leave these pins disconnected when building a single-channel version of this circuit.
Theory of Operation
This is a very simple circuit. Since most op-amps work best off of a dual supply, we split the single supply voltage in two equal halves with a TLE2426 “rail splitter.” We want to give the op-amps we test the greatest possible chance to pass our test. If the test fails, there should be no question that it’s because the op-amp is dead; if the user begins to doubt the testing circuit, there’s little point in having the circuit in the first place. The TLE2426 also ensures that the power supply doesn’t get unbalanced, which can throw the results off badly. I did try a simple resistor-divider power supply, and it did get unbalanced easily, even with working chips. You could rig another type of virtual-ground power supply, if you don’t like or can’t get the TLE2426.
R1 and R2 form an 0.55× voltage divider. Subtract 0.5× the supply voltage and you get a reference voltage of +0.05× (1/20) the supply voltage relative to virtual ground going into the op-amp’s +IN. With a fresh 9V battery (~9.5V), you get 0.475V out of the divider relative to virtual ground. We divide the voltage down this far because one of the things we want to test about the op-amp is its ability to amplify the input voltage. Since the op-amp is configured for a gain of 7.8, the output can be as high as about 3.7V.
The analysis so far assumes the op-amp is ideal. The load on the op-amp with a fresh 9V battery and a 1.8V LED is about 9mA, and the highest output voltage can be within about 0.5V of V+. Not all op-amps can drive such a load without the output voltage sagging, and others can’t swing that close to the V+ rail, so you might need a fresh battery — or more than 9V! — to get the LEDs to light up with some op-amps.
The low-voltage limit on this circuit depends on your op-amp and battery configuration. Assuming an ideal op-amp, you get 1mA through the LED with about a 5.2V supply. That gives a decent amount of LED brightness with your average red LED. Many op-amps can’t run on such a low voltage, and a 9V battery is pretty much dead by that point, so there isn’t any point in talking about lower voltages.
It’s about as simple as you could want. The circuit supplies a low input voltage to each of the op-amp’s channels, tries to use the op-amp to amplify it, and if the chip is working properly, the LED(s) will light up.
I have tested this circuit on four known-dead dual op-amps, and three fail to light up either LED, and the other causes one LED to flash intermittently and the other LED fails to come on. Known-good op-amp chips have lit both LEDs in all my tests so far.
Monday, September 28, 2009
Concept of Loudness Control
Equal Loudness for All
Research characterizing the human hearing range generated an areal map of auditory response as shown in Figure 1. The shape of the minimum audibility curve tells us something about the frequency response of the ear at low sound pressure levels. At the boundary of minimum audibility, perception of low frequencies and high frequencies requires a significant level boost as compared to the midrange frequencies. Conversely, at the upper boundary the threshold of feeling represents a much flatter response. The incomplete outline of the graph indicates regions of extreme variability where performance data collected on human subjects is not altogether consistent. In the 1930s, two Bell Labs researchers, Harvey Fletcher and Wilden Munson, organized a research project in which they asked that each participant match the perceived level of two pure tones by adjusting the level of one tone source against a 1000 Hz tone at a pre-determined reference level, until the two tones were perceived as equal in loudness. Their test results embodied data at many frequencies at various sound pressure levels across the human hearing range. Since this is a highly subjective way to conduct research, many subjects performed the experiment. Results were averaged to obtain loudness contours intended to represent a "normal" response. Their results, called the Fletcher-Munson equal loudness contours, provide significant insight toward our understanding of how humans perceive relative sound levels. In 1956, D.W. Robinson and R.S. Dadson refined this work in a similar study described as having more reliable measurement results. The Robinson and Dadson equal loudness contours shown in Figure 2 are most widely used today, but are often referred to as the Fletcher-Munson curves. Eventually, the International Standards Organization adopted the Robinson-Dadson curves as a basis for "Normal Equal-Loudness Level Contours," ISO 226:1987, which is now the current standard. Since these curves describe the perception of only pure tones in a free field, they do not necessarily apply to noise band analysis or diffused random noise.1 Additional research continues in an attempt to further characterize our hearing perceptions in real audio applications.
Figure 1: Realm of human auditory response
Figure 2: Equal Loudness Contours
If we invert any of these contour curves at a particular intensity level, we now have the relative frequency response plot of the human ear for all tones across the frequency range on that particular contour. Inversion of the lower curves illustrates human ear frequency response deficiencies at low sound intensities. Conversely, invert any of the upper, higher intensity curves to realize a more flattened frequency response. Fletcher and Munson found human hearing response consistently deficient at low sound intensities, for both low frequencies and higher frequencies compared to the 1000 Hz reference point used to establish these curves. But, the ear is particularly sensitive in the range of about 300 to 6000 Hz. This happens to be the frequency range that includes the sound of most human speech patterns and, curiously, the pitch of a crying baby. For average background sound pressure levels, the rolled-off response at lower sound pressures allows us to more easily listen and understand human speech in the presence of low or high frequency noise.
Meet the Phons
Each contour is identified as a level in "phons." A phon is a subjective unit for loudness equal to the sound pressure level in decibels when compared to an equally loud standard note. The standard note is a 1000 Hz pure tone or narrowband noise centered at 1000 Hz.2 Note that the level in phons matches the sound pressure level in decibels only at the 1000 Hz standard reference point on the graph. Therefore, the 40 phon contour represents a 40dB SPL at 1000 Hz, but a different SPL at most other frequencies. Essentially, each phon contour represents a 10dB step that we perceive as about twice as loud as the previous level. This may be a bit confusing, since we know that a measured 3dB increase represents a doubling of sound power, but only a perceptible increase in volume to the ear. The red dashed line at the bottom of Figure 2 describes the minimum audible level for hearing sensitivity in a free field.
The effect of applying these curves suggests that some form of filtering is required within measurement equipment if we wish to synthesize the normal hearing performance of the ear when calibrating systems or making value judgments as to sound quality. Most often, the sound pressure level (SPL) meter is used to setup listening levels for an audio system. The SPL meter includes selectable filters that modify its calibration so it approximates the ear's response at a given range of sound pressure levels. The most often-used filter settings are the A-weighted and C-weighted. What are these and how do they relate to our hearing response?
Figure 3: Weighting filter response curves used in sound level meters
The concept of weighting refers to the relative shaping of the filter's response so as to mimic the ear at a given loudness level. Four weighted filter functions, A, B, C, and D, are used to simplify and apply regions of the loudness contours that are most meaningful for describing the frequency response of the human ear toward real world applications. Refer to Figure 3 for the following discussion. A-weighting defines the shape of the filter (and the human ear response) at low sound pressure levels, namely the 40 phon loudness contour curve. Sound level measurements in decibels relating to A-weighting are denoted with the units – dB(A). Shaping for this curve means that low frequencies are attenuated and the speech frequencies are amplified within the measuring equipment. B-weighting describes an intermediate level approximating the 70 phon curve. Notice how the ear's response begins to flatten. C-weighting utilizes the 100 phon curve, which describes the nearly flat response of the ear for high levels. The C-weighting response is most useful for typical home theater listening levels and for evaluating system performance for flat response characteristics. The D-weighting Curve is a special case developed for aircraft fly-over noise testing, which penalizes high frequencies.3 Likewise, sound level measurements in decibels relative to these weighting curves are recorded as dB(B), dB(C), and dB(D), respectively. The A and C weightings are most often used since the former relates to normal everyday sound pressure levels and the latter relates to higher listening levels where the ear's response is nearly flat.
Sounding Good
We've covered some significant background, but how does all of that relate to the loudness control feature on an audio system? Understanding how the ear perceives sound intensity versus frequency leads us directly to that loudness feature. The loudness control is simply intended to significantly boost low and high frequencies when listening at low levels so that the ear perceives an overall flatter sound pressure level. In other words, if the loudness contouring control is not enabled at low volume levels, bass and treble appear to be lacking. This effect corresponds to the recently described A-weighted condition where low and high frequencies require additional amplification so the audio "sounds good."
Since the ear's frequency response is relatively flat at high sound levels, the compensating effect of the loudness contouring control is not required. The loudness feature is a kind of equalizing function that, ideally, should adjust itself to have greater compensation effect at low sound pressure levels and less effect as sound pressure increases.
Figure 4: Loudness function compensation range
From Figure 4, you can see that the amount of power needed (green shaded area bounded by LA curve) to compensate for low frequencies is significant. For this reason, in home theater audio system design, it is not uncommon to use fairly large, separate amplification just for the low frequency channel. The shaded area within the high frequency range indicates relative compensation required for this portion of the spectrum when at a lower volume level. At high loudness levels, where the ear's response is nearly flat, compensation requirements decrease to nearly zero as shown by the LC curve.
Introduction to Loudness Control
The first really decent stereo audio system I owned had a pushbutton on the front panel called "loudness." I pushed it. I decided the audio sounded better so I left it pushed in; never changed it. OK, occasionally I would push it to the off position; nope, sounded better on. Thinking back, I really didn't care what it was for. I left it pushed ON because it made the system sound better, so I continued to concentrate on my video career. All the while, my stereo system "sounded good."
Here I am writing about that pushbutton. That pushbutton recently created considerable flurry here at Extron. Since the inclusion of much more audio support in our products, that loudness pushbutton finally crept into a prototype product. Someone in Product Management pushed it, but it didn't do what it was supposed to do: make the system "sound good." That launched an investigation into the real intent of the loudness control function and a bit of re-evaluation by those individuals designing audio products.
We learned something. Different people and different companies have different design philosophies toward functionality of the loudness control. So, when you push it, what should the loudness control do? Let's begin answering that question with a look at the historical basis for the loudness control and why it should make an audio system "sound good."