TN8000.32 ADVANCED COMMUNICATIONS & SENSING Technical Note PRELIMINARY Dealing with noise on ZoomingADC 1. Introduction 3. Linearity With its three amplification stages, the ZoomingADC is able to amplify the input signal up to 1000 times. What are the benefits of this big amplification? How can I improve the linearity? The total gain is calculated by multiplying the gain of the 3 stages. If a PGA is not used it should be disabled: the current consumption is decreased and no noise is added to the signal. This Technical Note discusses the Programmable Gain Amplifier (PGA) of the ZoomingADC. It gives some advice to best use it. The gain depends on the full scale input voltage. It is recommended to take margin for temperature drift then the maximal gain should be around: 2. Input circuit FullScaleInputVoltage gain = ------------------------------------------------------------- × 0.8 VBATT MUX PGA The first PGA is designed for millivolts full scale signal. If the total gain is less than 100, it should not be enabled. Its transfer function is very linear while its output is in the range ±VBATT/5. PGA2 has an offset cancelling block to recenter the signal around 0. It is possible to add or subtract an offset up to VBATT. The output should not be more than ±VBATT/2 after offset cancelation to preserve the good INL of the circuit. MODULATOR (Analog part of the ADC) PGA3 is directly connected to the ADC. It is linear on all the range. PGA3 output range should match ±Vref/2 which is the ADC input range. Vout Figure 1. The PGA before the ADC Vout Vout +VBATT +VBATT/2 +VREF/2 +VBATT/5 The Zooming ADC has an architecture composed of 3 amplifiers with 2 offset cancellation stages. Vin Vin ADC input range -VBATT/5 -VBATT/2 PGA1 transfer function + PGA2 transfer function Vin -VREF/2 -VBATT PGA3 transfer function ADC Figure 3. PGA transfer functions PGA1 PGA2 OFFSET 2 PGA3 - + - + - Linearity is an important characteristic when sensor are used because a good linearity gives a good accuracy on the measurement. OFFSET 3 ST0002_01_US Figure 2. ZoomingADC architecture The offset cancellation permits to recenter the signal and not saturate the amplifier. By this way a high gain setting is possible even if the signal has a DC component. 1TN8000.32, Revision 1.0 / September 2008 ©2008 1. Semtech Corp. To make the amplification optimized in linearity, output of the first stages (PGA1, PGA2) should be as little as possible and less than ±VBATT/5 and ±VBATT/2 respectively. That is the case when the strongest gain is set on the stage closest of the ADC. The gain is set first on PGA3 then PGA2 and at last on PGA1 if needed. Page 1 CONFIDENTIAL www.semtech.com DRAFT - FOR INTERNAL USE The ZoomingADC is used in many Semtech sensing products from the simple SX8725 to the more complex XE8000. It always integrates a multiplexer and a PGA before the Sigma-Delta modulator. TN8000.32 Dealing with noise on ZoomingADC ADVANCED COMMUNICATIONS & SENSING PRELIMINARY Technical Note For example, a total gain of 50 is set with PGA3=10, PGA2=5 and PGA1 disabled. Therefore, a noise requirement should give a noise threshold to not be exceed with a probability. For more explanation on the way to set the gain, see the application note AN8725: Understanding pressure measuring with SX8725. For a given percentage of good reading, the standard deviation has to be multiplied by a number given in table 1. The quantization noise of the ADC is different than the PGA thermal noise. The quantization noise comes from the rounding error between the analog input voltage to the ADC and the output digitized value. This noise is signaldependent and varies with the ADC resolution. Probability that a Width of reading is in the the specification(%) interval 68.2 2 80 2.56 90 3.28 95 3.92 98 4.66 99 5.16 99.9 6.58 The quantization noise of an ADC with a full scale input q signal is n q = ---------- where q is the LSB size in volt. 12 Thermal noise comes from the thermal agitation of electrons. It varies with temperature. The thermal noise of a resistor R at temperature T measured on the bandwidth B is given by the following equation: Vn = Table 1. Confidence intervals 4kTRB (k is the Boltzmann’s constant) We can predict that a cold circuit with narrow band signal will produce less noise than a circuit in a hot environment with large band signal. The noise in the ZoomingADC is random and follow a Gaussian distribution. Consequently, the probability that an output code is in a certain range is computable. The standard deviation of the data set is the RMS noise level. σ = RMSnoise A little bit more than 68% of the output code value are located around ±σ of the data set mean as shown in figure 4. . 5. Noise on ZoomingADC In the ZoomingADC, enabling a PGA add a certain amount of noise to the input signal. The noise measured at the output of PGA3 is the sum of the noise made by PGA1, PGA2 and PGA3. But noise signals are random and uncorrelated. The equivalent RMS is the square root of the sum of the squares. When PGA1 is turned on, the noise generated at the output of PGA1 is amplified by PGA2 and PGA3. As it can be the dominant noise source, it has been designed carefully to minimise the noise. The noise measured at the output is often given in volt rms. Mathematically, it is the root of the mean squared voltage. The output noise can be brought back at the input by being dividing by the gain. It is then called input referred noise. The input referred noise formula of the ZoomingADC is given below: InputNoise = ST0002_01_US Figure 4. Gaussian curve 2 Vn3 - 2 ------------------Vn2 2 Vn1 ---------------------------------------- G3 ⋅ G2 ⋅ G1 + G2 ⋅ G1 + G1 --------------------------------------------------------------------------------------------------OSR ⋅ NELCONV We could think that a noise voltage superior to 4σ couldn’t occur. In fact, it can occur but because the probability is very low the observation time to see this evenement is high. TN8000.32 Revision 1.0/September 2008 ©2008 Semtech Corp. Page 2 CONFIDENTIAL www.semtech.com DRAFT - FOR INTERNAL USE 4. Noise The multiplication factor of 6.6 is often use to compute a peak-peak noise from a rms value. It is a conservative value which implies that 99.9% of the reading are in the noise specification. TN8000.32 Dealing with noise on ZoomingADC PRELIMINARY Technical Note Figure 5. SX8724 Input and output noise fs=500 kHz, OSR=1024, NELCONV=8, Update Rate = 60.97 Hz OSR and NELCONV are two parameters of the Zooming ADC which set the resolution. setting change. The various setting are indicated with arrows. Vn3, Vn2 and Vn1 are respectively the equivalent noise voltage source created by PGA3, PGA2 and PGA1. Vn3=696uV, Vn2=271uV and Vn1=189uV on the SX8724. The blue solid line curve shows the noise for an application optimized in noise. Actually, the noise is lower especially when the gain is around 10 and 100 but the linearity can be degraded. The variable Over Sampling Ratio (OSR) and Number of Elementary Conversion (NELCONV) allows noise reduction by averaging. It is easy to show that for a given gain, the noise could be reduced if the bigger gain is set on the first stages. For example a gain of 500 could be set with PGA1=10, PGA2=10 and PGA3=5 to minimize the noise but be cautious that the output voltage of each amplifier is on the correct linear range. ST0002_01_US It is in contradiction with the previous section on linearity which states the biggest gain on the last stage. depending on the application, a trade-off has to be done between noise and linearity. On the graph of figure 6, from the point OSR=1024, NELCONV=8 to the point OSR=64, NELCONV=1, each successive point is reached by decreasing OSR or NELCONV by a factor of 2. One can conclude that multiplying OSR or NELCONV by 2 decreases the noise and the data rate by a factor of The effective bandwidth is also decreased by 2. 2. As a resistor, decreasing the bandwidth lowers the noise. The curve on figure 5 shows the output and input noise when the SX8724 is set with the maximun of resolution (OSR=1024, NELCONV=8). The red dotted line curve ( shows the noise when the application is optimized in linearity. It presents unsteadiness corresponding to the gain TN8000.32 Revision 1.0/September 2008 ©2008 Semtech Corp. Page 3 CONFIDENTIAL www.semtech.com DRAFT - FOR INTERNAL USE ADVANCED COMMUNICATIONS & SENSING TN8000.32 Dealing with noise on ZoomingADC ADVANCED COMMUNICATIONS & SENSING Technical Note PRELIMINARY LSB InputResolution = ----------gain One could say: the maximum gain you set, the better input resolution you get. But in fact, it’s not as simple because as seen previously the amplifier adds noise to the signal. Enabling PGA3 for example add 5.9 µVrms of noise which is 36µVpp at the output of the amplifier. The LSB size (when gain=1) of a 16 bit ADC with a 3.3V supply is 50µV. It is bigger than PGA3 noise. Therefore enabling PGA3 to match the amplifier’s output range to the input range of the ADC is always efficient. Figure 6. Speed vs. PGA RMS noise for fs=500kHz 6. ADC resolution The ADC resolution is also set by setting OSR and NELCONV. The resolution can be set from 6 to 16 bits. The update rate varies with the resolution. Because of the noise shaping features of the Sigma Delta ADC quantization noise is 2 times better filtered when OSR is doubled than when NELCONV is doubled. That is why the ADC theoretical resolution n up to 16 bits is given by the following equation: n = 2 × log 2( OSR ) + log 2( NELCONV ) Even though the resolution is truncated to 16 bit by the output register size, it may make sense to set OSR and NELCONV to higher values in order to lower the bandwith thus to reduce the influence of the thermal noise in the PGA. ST0002_01_US Amplifier output RMS Noise (µV) Input referred RMS noise (µV) 10 20 50 100 200 500 1000 5.91 32.3 33.1 33.9 53.7 111 208 0.591 1.615 0.662 0.339 0.2685 0.222 0.208 Table 2 SX8724 in 16bits mode (VBATT=3.3V) Update Rate = 60.97 Hz The noise free code resolution of an ADC is the number of bits of resolution beyond which it is impossible to distinctly resolve individual codes. When the gain increase, the noise free counts decrease because of the noise effect. This can be seen on table 3. 7. Input resolution The primary benefits of having a PGA is that the equivalent input noise decreases when the gain is increased. In other terms, the Signal to Noise Ratio (SNR) increase. In the ideal case, with a gain of 2, the input resolution is doubled. With a gain of 1000, the input resolution is divided by 1000 then it’s like the ADC has increased its resolution by almost 10 bits. That is why amplifying a small signal is necessary to gain in resolution. The input referred resolution is given by the following equation: TN8000.32 Revision 1.0/September 2008 ©2008 Semtech Corp. Gain Gain Output noise (LSB) Noise free counts Noise free code resolution 10 20 50 100 200 500 1000 >1 4.2 4.3 4.4 7 14.5 27.3 65536 15604 15241 14895 9362 4520 2401 16 13.9 13.9 13.9 13.2 12.1 11.2 Table 3 Noise free counts and code resolution Page 4 CONFIDENTIAL www.semtech.com DRAFT - FOR INTERNAL USE The typical output and input noise of a SX8724 set up with NELCONV=8, OSR=1024 and various gain is shown on table 2. TN8000.32 Dealing with noise on ZoomingADC ADVANCED COMMUNICATIONS & SENSING However the input referred resolution does improve with gain. For example, a 20 mV full-scale input signal can be converted with 50uVpp noise resolution which corresponds to the quantization noise when the ADC is supplied in 3.3V and the gain is set to 1. If the same signal is converted with a gain of 100, the noise resolution is (4.4x50/100)=2.2uVpp. Technical Note PRELIMINARY Resolution Pressure resolution (Pa) Average size 16 bit 17 bit 18 bit 19 bit 20 bit 1 0.5 0.25 0.125 0.0625 1 4 16 64 256 Right shift >>1 >>2 >>3 >>4 Maximun bandwith (Hz) 500 125 31.25 7.8 1.95 Table 4 Average to increase resolution 8. Increasing the resolution Dividing the data rate by 2 decreases the noise voltage level by 2 and increase the resolution of the measurement by 0.5 bit. In a more general way, for each additional bit of resolution n added, the signal must be oversampled four times. This technique uses the theory of oversampling and decimation. It assumes that: The signal-component of interest should not vary significantly during a conversion The amplitude of the noise should be at least 1 LSB. 9. Measuring noise The SX8724 evaluation kit (ref. XE8000EV121) can be used to measure the noise on the ZoomingADC. The input should be grounded or connected to a DC source. The software permits to set the various parameter of the ADC (Gain, Sample rate) and collect a data set. The standard deviation gives the RMS noise level of the circuit and the histogram permit to check that the noise is Gaussian. If the noise is not Gaussian, it could indicate either a bad PC board layout, poor grounding techniques or improper power supply decoupling. The following figure show a measure of the noise taken with 10000 output codes on a SX8724 set with a gain of 500. To show the efficiency of the method, we can take an example. The measurement of a hyperbaric chamber must be done with a great resolution. The range of the pressure is 0-65535 Pa. The pressure is stable for several hours but has to be measured accurately. A resolution of 0.1 Pa must be resolved for this application. Therefore an ADC with a noise free count of at least 650k samples is required which means a 20 bit ADC is needed. The ZoomingADC is used for its ability to interface easily a pressure sensor. It is set to 16 bit with an update rate of 1000 samples per second. One set of 256 samples are taken. The pressure input range is the exact resolution of the 16 bit ADC, therefore the resolution is 1 Pa. To achieve 20 bit of resolution, 256 samples must be averaged. The trade-off is the output rate (or the bandwidth) has been divided by 256 and the CPU usage has increased. Figure 7. SX8724 noise with OSR=1024, NELCONV=8 ST0002_01_US In concordance with table 2, you can find in appendix the noise histogram for various gain settings for the SX8724. Appendix: Noise histogram TN8000.32 Revision 1.0/September 2008 ©2008 Semtech Corp. Page 5 CONFIDENTIAL www.semtech.com DRAFT - FOR INTERNAL USE Digital filtering permits to increase the resolution to the detriment of the data rate. TN8000.32 Dealing with noise on ZoomingADC PRELIMINARY Technical Note ST0002_01_US DRAFT - FOR INTERNAL USE ADVANCED COMMUNICATIONS & SENSING TN8000.32 Revision 1.0/September 2008 ©2008 Semtech Corp. Page 6 CONFIDENTIAL www.semtech.com Dealing with noise on ZoomingADC DIVISION DOC STATUS Technical Note © Semtech 2008 All rights reserved. Reproduction in whole or in part is prohibited without the prior written consent of the copyright owner. The information presented in this document does not form part of any quotation or contract, is believed to be accurate and reliable and may be changed without notice. No liability will be accepted by the publisher for any consequence of its use. Publication thereof does not convey nor imply any license under patent or other industrial or intellectual property rights. Semtech assumes no responsibility or liability whatsoever for any failure or unexpected operation resulting from misuse, neglect improper installation, repair or improper handling or unusual physical or electrical stress including, but not limited to, exposure to parameters beyond the specified maximum ratings or operation outside the specified range. Contact information Semtech Corporation Advanced Communications & Sensing Products E-mail: [email protected] [email protected] Internet: http://www.semtech.com USA 200 Flynn Road, Camarillo, CA 93012-8790. Tel: +1 805 498 2111 Fax: +1 805 498 3804 FAR EAST 12F, No. 89 Sec. 5, Nanking E. Road, Taipei, 105, TWN, R.O.C. Tel: +886 2 2748 3380 Fax: +886 2 2748 3390 EUROPE Semtech Ltd., Units 2 & 3, Park Court, Premier Way, Abbey Park Industrial Estate, Romsey, Hampshire, SO51 9DN. Tel: +44 (0)1794 527 600 Fax: +44 (0)1794 527 601 ST0002_01_US ISO9001 CERTIFIED TN8000.32 Revision 1.0/September 2008 ©2008 Semtech Corp. Page 7 CONFIDENTIAL www.semtech.com DRAFT - FOR INTERNAL USE SEMTECH PRODUCTS ARE NOT DESIGNED, INTENDED, AUTHORIZED OR WARRANTED TO BE SUITABLE FOR USE IN LIFE-SUPPORT APPLICATIONS, DEVICES OR SYSTEMS OR OTHER CRITICAL APPLICATIONS. INCLUSION OF SEMTECH PRODUCTS IN SUCH APPLICATIONS IS UNDERSTOOD TO BE UNDERTAKEN SOLELY AT THE CUSTOMER’S OWN RISK. Should a customer purchase or use Semtech products for any such unauthorized application, the customer shall indemnify and hold Semtech and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs damages and attorney fees which could arise.