Calibrating Amplifiers and ADCs in SoCs

Similar documents
Conversion Between Analog and Digital Signals

Interfacing Analog to Digital Data Converters

Digital to Analog and Analog to Digital Conversion

DIGITAL-TO-ANALOGUE AND ANALOGUE-TO-DIGITAL CONVERSION

Section 3. Sensor to ADC Design Example

LEVERAGING FPGA AND CPLD DIGITAL LOGIC TO IMPLEMENT ANALOG TO DIGITAL CONVERTERS

DAC Digital To Analog Converter

Microcontroller to Sensor Interfacing Techniques

Microcontroller-based experiments for a control systems course in electrical engineering technology

MECE 102 Mechatronics Engineering Orientation

Android based Alcohol detection system using Bluetooth technology

Chapter 6: From Digital-to-Analog and Back Again

Simple SDR Receiver. Looking for some hardware to learn about SDR? This project may be just what you need to explore this hot topic!

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

ADC-20/ADC-24 Terminal Board. User Guide DO117-5

Programmable-Gain Transimpedance Amplifiers Maximize Dynamic Range in Spectroscopy Systems

Basic Op Amp Circuits

Freescale Semiconductor, I

Scaling and Biasing Analog Signals

Analog Signal Conditioning

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1

Basic RTD Measurements. Basics of Resistance Temperature Detectors

Op-Amp Simulation EE/CS 5720/6720. Read Chapter 5 in Johns & Martin before you begin this assignment.

A Collection of Differential to Single-Ended Signal Conditioning Circuits for Use with the LTC2400, a 24-Bit No Latency Σ ADC in an SO-8

AVR127: Understanding ADC Parameters. Introduction. Features. Atmel 8-bit and 32-bit Microcontrollers APPLICATION NOTE

Digital Guitar Effects Pedal

Analog-to-Digital Converters

THERMAL ANEMOMETRY ELECTRONICS, SOFTWARE AND ACCESSORIES

Evaluation copy. Build a Temperature Sensor. Project PROJECT DESIGN REQUIREMENTS

SINGLE-SUPPLY OPERATION OF OPERATIONAL AMPLIFIERS

WHAT DESIGNERS SHOULD KNOW ABOUT DATA CONVERTER DRIFT

Pressure Transducer to ADC Application

Measuring Temperature withthermistors a Tutorial David Potter

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

Temperature Sensors. Resistance Temperature Detectors (RTDs) Thermistors IC Temperature Sensors

b 1 is the most significant bit (MSB) The MSB is the bit that has the most (largest) influence on the analog output

30. Bode Plots. Introduction

FREQUENCY RESPONSE OF AN AUDIO AMPLIFIER

Smart Thermostat page 1

Tire pressure monitoring

Atmel Norway XMEGA Introduction

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

NETWORK ENABLED EQUIPMENT MONITOR

Lab 7: Operational Amplifiers Part I

Lab 1: DC Circuits. Student 1, Partner : Student 2, student2@ufl.edu

INSTRUMENTATION AND CONTROL TUTORIAL 3 SIGNAL PROCESSORS AND RECEIVERS

Constructing a precision SWR meter and antenna analyzer. Mike Brink HNF, Design Technologist.

School of Engineering Department of Electrical and Computer Engineering

Designing the Solution for Electrochemistry Potentiostat/Galvanostat І Battery Cycler І Fuel Cell Test Station І

Using a Thermistor to Measure Temperature. Thermistors are resistors that vary their resistance according to temperature.

Signal Processing in So.ware and Electric Field Sensing

FREQUENCY RESPONSE ANALYZERS

Lecture N -1- PHYS Microcontrollers

8051 MICROCONTROLLER COURSE

Procon Engineering. Technical Document PELR TERMS and DEFINITIONS

Thermistor Calculator. Features. General Description. Input/Output Connections. When to use a Thermistor Calculator 1.10

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

Optimizing IP3 and ACPR Measurements

SIGNAL GENERATORS and OSCILLOSCOPE CALIBRATION

A PC-BASED TIME INTERVAL COUNTER WITH 200 PS RESOLUTION

STEPPER MOTOR SPEED AND POSITION CONTROL

Measuring Electric Phenomena: the Ammeter and Voltmeter

Picture 1 Lead Color Code Lead Function V-Link Function V-Link Pin Table 2 Picture 2 Node Commander software

11: AUDIO AMPLIFIER I. INTRODUCTION

Controlling a Dot Matrix LED Display with a Microcontroller

CALIBRATION OF A THERMISTOR THERMOMETER (version = fall 2001)

Note monitors controlled by analog signals CRT monitors are controlled by analog voltage. i. e. the level of analog signal delivered through the

Evaluating AC Current Sensor Options for Power Delivery Systems

Data Acquisition Using NI-DAQmx

Application Note 142 August New Linear Regulators Solve Old Problems AN142-1

Welcome to this presentation on Driving LEDs Resistors and Linear Drivers, part of OSRAM Opto Semiconductors LED Fundamentals series.

Analog Devices Welcomes Hittite Microwave Corporation NO CONTENT ON THE ATTACHED DOCUMENT HAS CHANGED

PROGRAMMABLE ANALOG INTEGRATED CIRCUIT FOR USE IN REMOTELY OPERATED LABORATORIES

Signal Conditioning Amplifier System

Application Note for SDP600 and SDP1000 Series Measuring Differential Pressure and Air Volume with Sensirion s CMOSens technology

WHY DIFFERENTIAL? instruments connected to the circuit under test and results in V COMMON.

PPM Users Manual Signature Software

[F/T] [5] [KHz] [AMP] [3] [V] 4 ) To set DC offset to -2.5V press the following keys [OFS] [+/-] [2] [.] [5] [V]

LAB 7 MOSFET CHARACTERISTICS AND APPLICATIONS

Multiplexing and Sampling Theory

Buffer Op Amp to ADC Circuit Collection

Designing Gain and Offset in Thirty Seconds

Practical Application of Industrial Fiber Optic Sensing Systems

Chapter 19 Operational Amplifiers

RGB for ZX Spectrum 128, +2, +2A, +3

AN_6521_035 APRIL 2009

How To Calculate The Power Gain Of An Opamp

Design of an Insulin Pump. Purpose of an Insulin Pump:

AND9035/D. BELASIGNA 250 and 300 for Low-Bandwidth Applications APPLICATION NOTE

SIMPLE TECHNIQUES TO IMPROVE SOLAR PANEL EFFICIENCY USING A MICROCONTROLLER OR SOC

BrightSign Expander Hardware Guide

Build A Video Switcher. Reprinted with permission from Electronics Now Magazine September 1997 issue

GENERAL SCIENCE LABORATORY 1110L Lab Experiment 6: Ohm s Law

Building a Simulink model for real-time analysis V Copyright g.tec medical engineering GmbH

The Operational Amplfier Lab Guide

DATA LOGGER AND REMOTE MONITORING SYSTEM FOR MULTIPLE PARAMETER MEASUREMENT APPLICATIONS. G.S. Nhivekar, R.R.Mudholker

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Electronic Circuits Spring 2007

V out. Figure 1: A voltage divider on the left, and potentiometer on the right.

Transcription:

By M. Ganesh Raaja and Pushek Madaan Introduction Calibrating Amplifiers and ADCs in SoCs In today s world of mixed signal systems, many applications require analog quantities to be measured and processed. Some examples are voltage, current, temperature, pressure, acceleration, ph, flow, ECG etc. The field of use range from lab and medical equipment operating under controlled environment to industrial equipment operating under harsh operating conditions. The analog signals to be measured can range from a few micro-volts in ECG systems to thousands of volts in electricity generation plants. Whatever be the application, environment or quantum of signal being measured, a basic signal acquisition system comprises of an analog front end which amplifies and conditions the signal followed by an Analog to Digital Converter (ADC) that converts the analog signal to a digital value which is then processed by a microprocessor. The analog front end could be a simple amplifier or a complex system comprising of multi stage amplifiers and filters. The block diagram of a basic signal conditioning circuit is shown below. + Vin - Amplifier Gain = A ADC Figure 1: Basic Signal Acquisition Considering the system to be ideal, the ADC output is denoted by the following equation. Equation-1 Where, V IN is Input voltage A is Gain of the Amplifier V FS is Range of the ADC N is Resolution of the ADC Given the ADC counts, the microprocessor calculates the input voltage from below equation. Equation-2 Unfortunately, there is no such thing as ideal in the real world. In real world, there are many errors that get introduced into the system affecting the ADC s output. The most important errors and the ones that we are going to discuss in this article are the offset and gain errors.

Offset Error Refer graph below. This is a plot of an 8 bit ADC with a range of +2.5V. X axis denotes the input voltage and Y axis denotes the ADC counts. The blue line is the ideal ADC output. The red line is the actual ADC output. Notice the actual output is shifted from the ideal. This shift is called the offset error. Figure 2: System with Offset Error All operational amplifiers have a finite offset voltage at the input. This offset voltage gets added to the input signal, gets amplified by the amplifier s gain and manifests at the output. Apart from the amplifier stage, the ADC also has its own offset voltage which adds to the system error. Offset error is an additive error and can be easily removed from the system. Gain Error Refer graph below. This is the plot of the same 8 bit ADC with the +2.5V range. Note that the slope of the actual output is now different from the slope of the ideal output. This shift is called the gain error.

Figure 3: System with Gain Error Gain error is caused mainly by the tolerance of gain setting resistors in the amplifier and tolerance of the reference voltage in the ADC. Gain error is a scaling error and can also be easily removed from the system. Mathematical Representation of a Practical System An ideal acquisition system can be represented with the help of a simple mathematical equation given by equation 3. Equation-3 Where, y is the output of the system or ADC counts m i is the ideal gain of the system x is the input voltage But as discussed in previous sections, introduction of offset and gain errors results in the below equation. Equation-4 Where, m a is the gain with error of the actual system C is the offset error Below graph shows a system with both offset and gain errors.

Figure 4: System with Offset and Gain Errors SoCs System On Chips are mixed signal controllers that have analog and digital peripherals and a microprocessor on a single chip. They integrate all ingredients for an analog front end like amplifiers, filters and ADCs on the same device with flexible routing options. Using these flexible resources, the offset and gain errors can be easily dealt with. Let us now discuss some widely used calibration methods to get rid of the offset and gain errors. Each of the methods has its own merits and demerits. Depending on the application one or more of these methods can be combined to get the maximum accuracy. Two point calibration This method of calibration takes care of both offset and gain errors. In Equation-4, if the actual gain m a and offset C are known, the actual input can be calculated by using equation 5. Equation-5 Parameters m a and C can be determined by using the following two point calibration process. 1. Apply 0V at the input of the analog front end, measure the ADC output and record this as Offset (C). 2. Apply a known reference voltage at the input and measure the ADC output. For best performance, the reference voltage should be more than 90% of the full scale value. 3. Calculate Gain in Counts/Volts (m a ) or Volts/Counts (1/m a ).! "#$%&'' ( )(' Equation-6 )('! "#$% &'' (

Equation-7 4. Store the Offset and Gain values in a non-volatile memory and use these values during actual measurement. Once the offset and gain values are stored, the input signal may be measured by using the following process. 1. Measure input ADC counts. 2. Calculate the input voltage using the offset and gain values &'' (! Equation-8 (Using Counts/Volts) &'' (! Equation-9 (Using Volts/Counts) The trigger for performing the offset or scale calibrations can be implemented depending on the application. This could either come from switches or from commands received over a communication interface. The scale can be a function of the actual unit being measured. For example, if you are measuring current from the voltage drop across a shunt, instead of measuring the voltage and then deriving the current, you can directly apply a reference current to the shunt and calculate the scale as Counts/Ampere. This will remove any inaccuracies introduced by the tolerance of the shunt resistor. Disadvantages: There are two disadvantages with this method of offset and gain compensation. 1. The offset of an op-amp has its own temperature coefficient and will change with temperature. This will lead to offset errors at temperatures other than the temperature at which the calibration is performed. 2. The two point calibration introduces an additional step in the manufacturing process. These disadvantages are addressed by the techniques discussed below. Correlated Double Sampling a.k.a CDS Correlated Double Sampling also called CDS is used to dynamically compensate offset error. The following is the procedure to implement CDS. 1. Connect the input of the Amplifier to Ground 2. Measure the ADC output. Any non-zero value measured at the ADC is due to the offset error of the system. 3. Store this value in a variable called Offset 4. Connect input of the amplifier to the signal 5. Measure the ADC output. 6. Subtract the Offset value measured in Step#2. This gives an offset compensated result. 7. Repeat Steps #1 to #6 for every measurement. As the offset is being measured for every measurement, any drift in offset voltage due to temperature is automatically taken care of.

Figure 5: CDS Implementation The disadvantage of this system is that the ADC s throughput is reduced by a factor of 2 as two measurements have to be taken for every cycle. If this low throughput is undesirable, the offset voltage can be measured less often, i.e., instead of measuring the offset for every measurement cycle, offset measurement may be performed say once in 16 or 32 measurement cycles. Gain Calibration by External Voltage Reference Using a highly accurate external reference voltage which has very low temperature coefficient, gain error can be compensated. Figure 6: Gain Calibration using External Reference Following is the procedure for implementing gain compensation using an external reference. 1. Connect the known reference voltage, for example AD1580B with a referencee of 1.225V and a temperature drift of 50 ppm/ / C to the input of the amplifier. 2. Measure the ADC counts. 3. From the known reference voltage and the ADC counts, calculate Gain 4. Connect the signal to the input of the amplifier. 5. Measure ADC counts. 6. Calculate input signal from ADC counts and the Gain calculated in #3. Now, combining the CDS for offset compensation and external reference for gain compensation a completely automatic system can be built. Figure 6 shows the implementation of such a system.

Figure 7: Offset and Gain calibration using CDS and External Referencee This method provides a fully automatic, accurate and an error free system, but has increased cost because of the external precision voltage reference. a disadvantage of Putting the Concepts to Test Some of the afore mentioned concepts CDS and two point calibration were put to test using a PSoC (Programmable System On Chip) mixed signal controller from Cypress Semiconductors with flexible Analog and Digital peripherals and an onboard microcontroller. The device has universal analog blocks using which various analog peripherals like Programmable Gain Amplifiers, ADCs, DACs, Filters etc can be constructed. The device also has very flexible analog routing resources with input i multiplexers, analog output buffers, flexible block to block connectivity etc. The figure below shows a snapshot of how the analog resources are configured in the device. Input Multiplexer Programmable Gain Amplifier Analog Ground Reference Generator ADC Analog Ground Output Buffer Figure 8: PSoC Implementation A 4:1 input multiplexer is used to switch between input signal and analog ground at the input of a Programmable Gain Amplifier with a gain of 16. The output of the PGA is fed to a 12 bit incremental ADC. A reference generator is used to generate an analog ground of 2.5V which is brought out on a pin using an analog buffer. A +60mV input signal is connected to the input pin with respect to the 2.5V reference. Using this hardware setup, three different application codes were written. 1. Application with no offset or gain compensation 2. Application with offset compensation using CDS 3. Application with two point calibration for Offset and gain compensation

In all the three applications the measured input is displayed on an LCD display. The test results obtained for the above three applications is shown below. Input +60mV Gain 16.00 Reference 1.3V (Internal)

Input (mv) Uncalibrated Error on FS % CDS Error on FS Two Point Calibration Error on FS -60.00-53.54 10.77% -59.77 0.38% -60.00 0.00% -50.00-43.50 10.83% -49.83 0.28% -50.01-0.02% -40.00-33.53 10.78% -39.86 0.23% -40.02-0.03% -30.00-23.49 10.85% -29.88 0.20% -30.03-0.05% -20.00-13.49 10.85% -19.92 0.13% -20.02-0.03% -10.00-3.45 10.92% -9.98 0.03% -10.02-0.03% 0.00 6.50 10.83% 0.00 0.00% 0.00 0.00% 10.00 16.55 10.92% 9.96-0.07% 9.98-0.03% 20.00 26.55 10.92% 19.95-0.08% 19.97-0.05% 30.00 36.59 10.98% 29.91-0.15% 29.96-0.07% 40.00 46.63 11.05% 39.93-0.12% 40.00 0.00% 50.00 56.72 11.20% 49.89-0.18% 49.98-0.03% 60.00 66.68 11.13% 59.89-0.18% 60.00 0.00% Table 1: Test results The error on full scale was around +11% for the un-calibrated system. With only offset compensation using CDS, the error reduced to about +0.4% and with two point calibration the error was the least at +0.07% Conclusion Summarizing, the below table lists the advantages and disadvantages of the different techniques to remove offset and gain errors in signal acquisition systems. Technique Advantages Disadvantages Correlated Double Sampling Offset compensation Reduced throughput of ADC Compensates for offset drift due to temperature Two Point Calibration Compensates both offset and gain errors. Offset compensation suffers error due to temperature drift Additional step required for calibration during manufacturing. External Reference Removes gain error External reference increases cost CDS + External Reference No need for manual calibration; Compensates both offset and gain errors Reduced throughput of ADC External reference increases cost Depending on the accuracy and cost requirement one or a combination of many of the above techniques can be used to build a highly accurate signal acquisition system. References: AN2226 Correlate d Double Sampling for Thermocouple Measurement by Dennis Seguine