Σάββατο 3 Μαρτίου 2012

Designing low noise small-signal attenuators

It seems one of the trivial things to do, creating an attenuator with passive components.
If we want to attenuate the signal by 6dB, then what is more easy, than putting two equal value resistors
in series and form a voltage divider.
But that is that the truth? Equal value yes, but with what value?

Fig.1 shows a classic voltage divider used to attenuate a signal.


Let as consider now how the signal flows.

The signal comes from a source that has an output impedance and the lowest output impedance you will encounter in professional audio equipment is not smaller that 50Ω.  So, the Johnson noise created is -135.2dBu, a low limit.

The maximum signal an OpAmp can handle is +22dBu, as a result the maximum dynamic range is:
135.2+22 = 155.2dB. The dynamic range of the ear is about 130dB.

Let us now examine the circuit with different resistor values. They cannot be low, because they will overload the previous circuit, causing distortion and reduced headroom and the cannot be too high because the induce large Johnson noise. So what is the optimum solution?


If we use 1kΩ resistors, then the Johnson noise floor becomes -125.2dB, because the effective resistor value for two 1k parallel resistor is 500Ω as seen from the output. The input impedance as seen from the source is 2kΩ.
We just raised noise by 10dB and probably the next components in the signal chain will further raise this noise more.

Now, the standard input impedance for a good audio equipment is at least 10kΩ. It means we will have to use 5k resistors, output impedance 2.5k and this produces a Johnson noise of -118.2dBu.

Of course in most, cases resistors near 100k are used because 10k input impedance is not high enough.
For a 100k input impedance we use two 50k resistors with Johnson noise -108.2. That is 27dB more noise than when the signal arrived with -135.2dBu from a 50Ω source.


If we have to use large resistors to create 100k input impedance and even higher, what is the solution to avoid excessive noise contamination?
The solution is to buffer the voltage divider circuit using a good low-noise OpAmp in front of it that can drive heavy loads as shown in Fig.2. OpAmps in general have very high input impedance.
If we use an OpAmp like the low-noise NE5532 we can achieve high input impedance and low noise contamination. The noise produced by NE5532 at its output is -119dBu and we can use two 500 Ω resistors that can be handled by NE5532 as a load. The Johnson noise from those resistors is -128.2dbU.
The output noise of the OpAmp is attenuated just like the normal signal and the result is the half of -119dBu = -125dBu, so the total noise is the sum of noises -128.2dBu and -125dBu, which is -123.3dBu.

Remember that the 6dB attenuator (voltage divider with equal value resistors) is the worst case, since it presents the largest output impedance.



 Table.1 Johnson noise for different voltage dividers, at 25oC
and 22kHz bandwidth.























 

Noise Summing - Equivalent Input Noise (EIN)

Noises from various sources in a circuit can be summed to determine the total noise density.
Note that the noises must be uncorrelated, otherwise measurement errors will rise.

The standard method for noise summing is the Root Mean Square (RMS).
So the total noise in a circuit with severak noise sources is:
$$ \bar{V}_{total}=\sqrt{\bar{v}_{1}^{2}+\bar{v}_{2}^{2}+...} $$
Let as now consider a theoretical example with an amplification stage in the circuit:

                                           Fig.1 Noise in a gain stage

Each gain stage is preceded by a source that has a non-zero output impedance.
Its equivalent circuit is a Voltage source with a series resistor Rs as shown in Fig.1.
Because it has the resistor it produces Johnson noise.

Now there are other two types of noises that are present in an amplifier stage and are produced by that stage component. To model these noises we create the equivalent circuit and place the noise sources at the input of the amp stage. The noises are amplified along with the signal.
These are a voltage noise, depicted as Vn, and a current noise depicted as In.
As the theoretical amplifier has infinite input impedance (practical OpAmps have a very high one)
the current that is induced in the circuit by In is flowing through the source's resistance Rs and that
results in a specific voltage drop across Rs (->voltage noise).

Vn, V caused by In across Rs, and Johnson noise of Rs are amplified with our signal at the output of the stage. Measuring the noise at the output and dividing by the voltage amplification factor Av gives as the Equivalent Input Noise or EIN. 
The EIN, is the equivalent circuit that shows the noise sources at the inputs of the amplifier. (That's how Fig.1 is created).
Measuring those noises directly at the input of the stage is very difficult, because it is difficult to distinguish the noises between them (especially Vn and In).


Furthermore, comparing the EIN with the Johnson noise produced by the source's impedance Rs gives as the Noise Figure (NF) that tells us how noisy our circuit is according to a source output impedance.

I wonder why they don't give this measurements in the datasheets of the components. I guess that
the measurements would show a bad value...




Noise in electronic components

All components that are used in electronics suffer from noise production and that noise is said to be thermal noise that adds up with the signal that passes through the component.

In electronics circuits there are two main types of noises: voltage noises and current noises.
Voltage noises add a voltage waveform to the signal and current noises add a current waveform to the signal that also becomes voltage waveform if that current is passed through a component.

Let as summarize the types of noise that are frequently present in audio equiment in terms of distributions:
  • White noise: has equal power in all frequency ranges and has a gaussian distribution. This type of noise is the dominant in audio electronics and is created mainly by the heated components.
  • Red noise: it is a Brownian type of noise and its energy decreased 6dB per octave. It is more prevalent in the low frequencies and is not created by discrete components as resistors, BJTs, etc. It is present thow in oscillators used in synthesizers.
  • Pink noise: has equal power in equal ratios of bandwidth. For example pink noise has equal power at range [200Hz,400Hz] and  at [400Hz, 800Hz]. Its power decreased 3dB per octave as frequency increases.
  • Blue noise: power increases 3dB per octave as frequency increases
  • Purple noise: power increases 6dB per octave as frequency increases
 These are general types of noises and below are some other forms that are present in audio circuits:

Johnston noise: is a form of white noise and is the kind of noise created by almost all electronics components that have inherent ohmic resistivity. It is most prevalent in resistors. Transistors for example have also Johnson noise because of their ohmic resistance at the base (rbb) . Johnston noise is a voltage noise and its density is given by the following equation: $$ \bar{v}_{n}=\sqrt{4kTRB} $$
where, k is the Boltzmann's constant, T is the environmental temperature in Kelvin R is the ohmic resistivity  of the component in Ohms and B is the bandwidth of the signal
Capacitors do not suffer from Johnson noise due to their reactance of capacitance. It cancels out the noise produced by their inherent ESR.

The resistor is the component that suffers most from Johnson noise and the larger its ohmic value the larger the noise induced. If it is avoidable to use a smaller resistor value then resistors with higher power rating are usually used. Larger power rating means lower noise (of course for a quality resistor).

The table below gives a list of resistor values and their Johnson noise.



Shot noise: this noise is a current noise and is correlated to the moving charge inside a conductor. It is correlated with the space that the charge is gathered, rather than the current value in Amperes. Furthermore, research has proven that small currents suffer most from that kind of noise.
It is a significant noise in Bipolar Junction Transistors when operated at small collector currents.
The following equation gives the density of this noise: $$ \bar{i}_{n}=\sqrt{ZqI_{DC}B} $$
where, Z is the ohmic impendance of the component that the current passes through, q is the charge of the electron, Idc is the mean value of the signal and B is the bandwidth.

1/f noise (Flicker noise): as implied by its name it is decreased as frequency is increased and is prevalent in low frequencies, where the AC waveform of the signal comes closer to DC (alters with at smaller rate).

Popcorn noise: This type of noise is produced by semiconductors, due to heavy metal ion contamination in their materials (Gold). Measurements with such noise are used to determine the quality of a semiconductor. The distribution of this noise is not Gaussian.








Thermal Noise and Gain Structures of modern audio equiment

All audio equipment use discrete components, passive and active ones, like resistors, capacitors, BJTs, JFETs and OpAmps. Each of these components creates a thermal noise that adds up to the audio signal. The creation and the parameters of the noise and how it correlates with the sequence of the components has been in the interests of science for more than 100 years.

The main law we are interrested in and plays a major role in audio electronics design is the Signal-to-Noise ratio, that tells us how much contaminated with noise is our signal. $$ SNR=\frac{P_{signal}}{P_{noise}}=\left ( \frac{A_{signal}}{A_{noise}} \right )^{2} $$
Looking at the above equation and we realize that the more powerfull our signal is the less contaminated with noise is. Thermal noise from components is around -110 dBuV (in terms of voltages). It looks just easy; all we have to do is to increase the distance between our signal and the
noise floor of -110dBu. Unfortunately, this is not true, because the term of clipping comes into our design and can mess up our signal and dramatically reduce the headroom of a device.

Practical components like discrete amplifiers have a maximum Aplification Factor they can achive. For most OpAmps this is +22dBu. Except that the available power from our Power Supply Unit restricts us to amplify inside specific limits.

A signal voltage cannot cannot go above +22dBu or the available voltage from power rails and this means it will be clipped and the output waveform will be distorted with extra harmonic content in it.

Headroom is the maximum available voltage swing without clipping. A signal is amplified near the maximum limit has increased probability of becoming clipped and thus our design has reduced headroom.

So, what's the best way to avoid high noise contamination and maintain a nice headroom?
It seems the best method is to keep enough distance from the noise floor and also enough distance from the maximum limit as well. It is the optimal solution between noise contamination and headroom.

Lets  take a look at a common gain stages sequence of a device. The signal would probably be amplified or attenuated in several stages to achieve the best output in terms of headroom, noise and in/out impedances. (We want go into operating point details in this text).

In Fig.1 The signal is amplified and then attenuated with a voltage divider to pass through Stage 3.
Stage 2 is supposed to be our main amplification stage.

                                              Fig. 1: Amplify then attenuate

This configuration has increased probability of clipping at Stage 2 and thus has reduced headroom.

In Fig.2 the signal is first attenuated the restored and amplified in Stage 2.

                                            Fig.2 Attenuate then amplify

This configuration does not suffer from clipping and has and increased headroom available compared to the previous configuration, but our signal is much more noise contaminated. This is because it is difficult for Stage 2 to restore the attenuated signal to some level. Amplifying an attenuated input signal adds up noise because of:
1. The signal magnitude is decreased and gets closer to the noise floor (so the SNR becomes low).
2. Using a voltage divider, such as a potentiometer, adds up some more noise to the total noise from the componentes, and this total noise is then amplified along with our signal. As a result the SNR at the output signal will be also low, because of the amplified noise.

It is not good to amplify attenuated signals without amplifying them first to an optimal level for processing by next stages. This level is called the nominal level and is an internal signal level for every device, even IC operational amplifiers chips. It is selected to optimize further signal processing
without noise contamination and without reducing headroom too much.

The best place to bring the signal to the nominal level is a soon as possible it gets into the input of the device. Then we have a signal that is amplified to a nominal level right at the input and is then further processed with reduced risk of clipping and noise contamination.