# Adjusting and calibrating out offset and gain error in a precision DAC

Overview

All digital/analog converter (DAC) systems experience gain and offset error. These are analog errors caused by many factors in the DAC and in the external signal path. Gain and offset error should, therefore, be specified in the data sheet for a precision DAC.

This application note describes these DAC errors and their sources, and then describes methods for calibrating out that error in both the analog and digital domains.

Gain and offset errors

An ideal 14-bit DAC has the characteristic shown in Figure 1 .

Figure 1. Ideal 14-bit DAC characteristic.

At code 0, the output voltage is exactly 0V, and at code 16383 the output voltage is exactly VREF . The line is perfectly linear. If a DAC like this could be made at an affordable price, someone would be a millionaire.

Unfortunately, nothing in engineering is perfect. There is offset error, which is the error from the ideal at minimum output voltage. Zero error is the deviation from the ideal at code zero. In a unipolar DAC, offset and zero code error are defined at the same point. In a bipolar DAC, they are defined at different points. A DAC that can be used in both unipolar and bipolar modes often has both offset error and zero code error specified. Many DACs just have offset error specified.

At code 0, the output voltage is never exactly what it should be. The deviation from the ideal code 0 voltage is the offset error. Offset errors are normally bipolar and often expressed in a DAC data sheet in terms of millivolts.

The gain of a DAC is the slope of the output characteristic. Gain is generally specified in DAC data sheets in terms of %FSR (full-scale range), and measured between code zero and maximum code or, in some cases, between codes close to zero and maximum. The deviation from the ideal over the full output range is known as the gain error. Since the characteristic is never a straight line, the end points (or a point close to each end) are used in calculating gain error. If the offset error is removed from a real characteristic, then what remains at maximum code is the gain error. An exaggerated but still linear DAC characteristic is shown in Figure 2 .

Figure 2. Offset and gain errors.

Integral nonlinearity error (INL)

This application note does not discuss how to calibrate out INL. However, INL is defined since it needs to be considered when using digital calibration.

All of the characteristics shown in Figure 2 above are perfectly linear; they are never exactly linear, as shown in Figure 3 . INL is a measure of how far the characteristic deviates from the ideal. It is measured in two ways: end to end and best fit. To measure INL, the offset and gain errors are first removed.

Figure 3. Integral nonlinearity (INL) error.

Most DACs are specified using the end-to-end method. The measurement is expressed in LSBs.

Causes of errors

Given the multiple types of DAC errors, it is virtually a “given” that the DAC’s output will only be used if the signal is run through some kind of conditioning circuitry. This circuitry can range from a simple transistor or op amp to a more complex IC like the MAX15500 output conditioner. Still, it is important to realize that all stages through which the signal passes will add some amount of offset and change the gain to some degree.

In many DAC systems an external voltage reference is used to set the gain. An imperfect voltage reference will also introduce gain error.

Calibrating out the errors

Systems must either be designed to perform with the required gain and offset errors without calibration, or they must be calibrated. High-accuracy systems most often require calibration which can be done in the analog domain, the digital domain, or a combination of both.

There is an important advantage to calibrating offset and gain errors in the digital domain: most systems already have some form of digital processing in the digital domain. The process requires little, if any, hardware overhead. The disadvantage to digital calibration, however, is the introduction of ±0.5LSB of INL (Figure 4).

The advantage of calibrating in the analog domain is that it does not incur the INL penalty. The downside is that it often requires more hardware. Digital calibration is normally implemented by either a lookup table or a mathematical function (Figure 4).

Figure 4. Typical mathematical calibration block.

First, the gain error is corrected, and then an offset to correct for the offset error is added or subtracted. The effect of this is shown in Figure 5 .

There is a two-fold advantage of this method versus the lookup-table method: it is simple to implement, and it is simple to calibrate with ATE at final test. This approach is linear, but that is a disadvantage. Hence, any nonlinear effects of the DAC cannot be calibrated out.

This calibration can, however, be done with a lookup table, but final test calibration is very time consuming since many more points must be calibrated and that adds cost. If ultimate linearity is required, a suitable more-linear DAC is a better alternative.

Figure 5. INL introduced by calibrating digitally.

Figure 5 shows that the original noncalibrated characteristic exhibits a gain error less than 1. So, initially the calibrated DAC code follows the input code, until the gain error results in -0.5LSB of error. At this point one code is missed and the output jumps to +0.5LSB of error.

This can be repeated as many times as necessary to calibrate the gain error. Once this is done, a simple offset is applied to correct for the offset error. If the gain error resulted in a steeper curve, codes would be missed. The effect in INL would be the same.

Practical solution to the problem

The Maxim® MAX5774 is a 14-bit, 32-channel DAC with integrated gain and offset calibration registers for each DAC channel. Using its global offset register, both device and system gain and offset errors can be calibrated out and each channel set to output a specific range. The MAX5774 is just one of several parts offered by Maxim with these functions.

If the MAX5774’s gain calibration registers are set to 1 and the offset calibration registers (Figure 6 ) are set to 0, the typical gain error will be 0.1% and the typical offset error will be 8mV. Calibrating the device results in an improved gain error of 0.05% and an offset error of an impressive 300µ V.

Figure 6. Block diagram of the MAX5774.

Summary

This article has defined DAC offset and gain errors and looked at some of the sources for that error in DAC systems. Ways to calibrate out these errors in both the analog and digital domains were demonstrated. Finally, the article presented an integrated solution to this DAC calibration problem with the MAX5774.

David Fry is the Strategic Applications Manager for the DACs, Digital Potentiometers, and Voltage References product line at Maxim Integrated Products. He has over 25 years experience in the electronics industry, with the last 13 years working in semiconductor field applications, market development, and product-line applications. Prior to joining Maxim, David spent 11 years as a board-level designer working on RF designs and several years designing high-end broadcast video equipment. He earned a BSc in Electronics in 1984 from the University of Manchester Institute of Science and Technology in the UK.

Editor's note : Liked this? Want more?

If you are interested in “analog” issues such as signal input/output (sensors and transducer, real-world I/O); interfacing (level shifting, drivers/receivers); the signal chain; signal processing (op amps, filters, ADCs and DACs); and signal integrity, then go to the Planet Analoghome page for the latest in design, technology, trends, products, and news. Also, sign up for our weekly Planet Analog Newsletter .

## 1 comment on “Adjusting and calibrating out offset and gain error in a precision DAC”

1. ljsoifjsfl
August 16, 2015

Are you a real estate agent looking for marketing ideas in 2015?

My primary piece of advice is that you need to put your customers' needs first. While all forms of marketing should encourage your audience to eventually do business with you, your approach needs to be subtle and less self-serving. In 2015, your marketing strategy should focus on humanizing your business and automating things when you can.

I recently put together an infographic that outlines how agents spend their marketing dollars and compared it to where they're getting their leads from. As I researched this topic, two things became very apparent:

75 percent of a real estate agent's business comes referrals and word of mouth.
But agents are still spending way too much money on new lead sources, rather than investing in their existing clients.
Simply put, if most of your business is coming from your past clients and it costs you six to seven times more to acquire a new customer than it does to retain an existing one, then you should focus your efforts on marketing to your past clients.

The post I wrote last year titled “7 Marketing Ideas for Real Estate Agents in 2014” quickly became the most viewed post on our site (over 20,000 unique viewers). So for 2015, I came up with 10 marketing ideas that agents can use to really help grow their businesses.

1) Be Mobile and Responsive
In 2014, I stressed that going mobile was important in terms of you posting to your social networks while on the go. This is still true today, but this year, I want to stress the importance of being mobile accessible.

You cannot avoid it anymore. Your website and emails need to be designed for all devices and screen sizes and be responsive. Sixty-six percent of emails are opened on a phone or tablet. Facebook has more than 650 million daily active users on mobile devices. And mobile traffic to websites now accounts for almost 30 percent of visits. In short, there are plenty of reasons why you need to be sure that your business is mobile ready.

How It Helps: Being mobile-friendly ensures whoever reads your emails or visits your website has a good experience and that this experience creates a positive perception of your business.

2) Use GIFs in Email
You've all seen GIFs before; they're those soundless graphics that automatically play on a loop. They're great for getting a quick laugh, but these days, they're more often used to caption a situation and convey human emotion without using words. For example…if it's Monday morning, and I'm having a tough time getting motivated, I might text or email this GIF to my friends:

Marketing ideas – GIF use in email

Did you know that you can use GIFs in email too? Our friends at Litmus have put together an awesome guide to using GIFs in emails. While you shouldn't use them in everything you send, they do add a comical element you just can't get from static images.

Even though GIFs have been around since the late '80s, they've had a resurgence in popularity. GIFs are a fun way to help show off the human side of your business.

This site uses Akismet to reduce spam. Learn how your comment data is processed.