Measure a ADC DC characteristics - Page 1
Forum section: electronics / general

author: diyaudio
author_rank: Frequent Contributor
timestamp: February 22, 2015, 12:34:30 pm
content: HiI need some advice, I want to characterise an ADC`s DC characteristics.I want to measure the ADC`s output code VS a precession reference voltage sweep,and compare the difference between code vs sweep reference and preferably send it to a computer to graph it, what instrument or non expensive technique can I use to do this. Its very frustrating and error prone, to capture , compare (against a fluke 87V) and add to excel spreadsheet then graph it. bah!

author: mikerj
author_rank: Super Contributor
timestamp: February 22, 2015, 05:54:30 pm
content: I've done something similar fairly recently to test the performance of the analogue peripherals on an STM32 (and it wasn't great, missing codes etc.). I used a Keithley sourcemeter and an Keithley 2010 (7.5 digit) bench DMM, mainly because that's what I had available that I could automate (GPIB).Provided you have a calibrated voltmeter of suitable precision you don't need a high precision voltage source, just one that is stable and low noise since your reference standard is the DMM. To test for DC accuracy, you will need to measure the ADC reference voltage as well as the input voltage and ADC code output.

author: splin
author_rank: Frequent Contributor
timestamp: February 22, 2015, 10:07:36 pm
content: What ADC are you trying to characterise? How many bits? To what precision and accuracy do you need the results? Do you need to measure differential linearity (ie, the input voltages where the ADC codes transition from one value to the next) as well as integral linearity? How many points do you want to measure - ie. every input code or a subset? How fast is the ADC?Apologies for what follows if it's too simplistic - you didn't provide any clues as to your experience or available equipment beyond the Fluke.The Fluke 87V is 19999 counts or 14.3 bits. It's accuracy is specified as .05%, so accurate to 2000 counts or 11 bits; its linearity however is likely to be much better than that, but is unspecified. So I assume you are wanting to measure a 14 bit or less ADC.Essentially you need an ADC that has more precision than the one you are testing and something to generate the signal into the ADCs such as a DAC or a PWM output; this does necessarily need to be precise as you are measuring its output with the ADC under test and the more precise measuring ADC. Alternatively a triangle, saw-tooth or sine wave can be fed into the ADCs with an amplitude that matches the ADCs input range. Its frequency must be low enough such that the level doesn't change by more than 1/2 of 1 LSB in the time it takes for both ADCs to do a conversion. Whatever you use it must have an output impedance low enough not to cause errors when driving both ADCs - a DAC output would probably be OK but an op-amp or transistor buffer would almost certainly be required if you use a PWM output with by a resistor/capacitor filter. Using PWM does have the advantage of higher resolutions than cheap DACs but are slow, although that wouldn't matter in this case.For example if you are measuring the 10 bit bit ADC on an Arduino then a 12bit ADC is probably good enough. You can buy a Maple mini clone for approx $4 from Aliexpress:http://www.aliexpress.com/wholesale?shipCountry=UK&shipFromCountry=&shipCompanies=&SearchText=maple+mini&exception=&minPrice=&maxPrice=&minQuantity=&maxQuantity=&isFreeShip=y&isFavorite=n&isRtl=n&isOnSale=n&isBigSale=n&similar_style=n&similar_style_id=&isAtmOnline=n&CatId=0&SortType=price_asc&initiative_id=SB_20150222140257&groupsort=1This has 12 bit ADCs and DACs and uses the Arduino IDE to make things relatively simple. It's only 3.3V though, so not ideal for testing a 5V ADC but OK for most Arduinos where the reference is selectable. The Arduino under test could be connected to the Maple mini via the serial port so they can communicate. (The Maple mini has three USARTs so can also send data to the PC over its USB connection). The Maple mini would write a value to the DAC which is connected to the ADC on both the Maple mini and the Arduino, read its value from the ADC and send a message to the Arduino asking it to return its own ADC reading. The Maple mini would then send the DAC value and the two ADC readings to the PC where they would be logged. After an interval the Maple mini would repeat the operation with the next DAC level. A problem with the cheap Maple mini clones to be aware of is that the analogue supply pin, which provides the ADC reference, is connected directly to Vcc so any power supply noise will increase the ADC noise level. It would be tricky, but not impossible, to lift the VDDA pin to provide more filtering.By taking multiple readings of the ADCs and averaging the values at each input level you effectively increase the resolution of the ADCs - 1 extra bit for 4 samples, 2 for 16, 3 for 64. There is a limit to how far you can improve the resolution by averaging though because of 1/F noise in the ADC. Typically ADCs with resolution above 10 bits will have noise levels exceeding one LSB (especially on microcontrollers - often 5 to 10 LSBs) so averaging may be needed anyway to achieve the advertised resolution of the ADC. Averaging does not improve the ADCs linearity which in this case will probably be the limiting factor. For example, in the case of the Maple mini, the STM32F103's ADC has a maximum integral linearity error of +/- 1.5 LSBs.If the ADC you are testing is 12 bits or more then possibly the cheapest high resolution ADC module you can get is one of these with a HX711 ADC for around $1:http://www.ebay.com/sch/Electrical-Test-Equipment-/92074/i.html?_sac=1&_ipg=200&_from=R40|R40|R40|R40|R40|R40&LH_BIN=1&_sop=15&_nkw=hx711&rt=ncIt has a dual channel 24 bit ADC - not one of the best but should be fine for your needs. It has differential inputs but you can afford to lose one bit of resolution by driving it single ended. Because it is designed for measuring load cells, its analog input range is small - channel B has an input amplifier with a gain of 32 limiting the input range to the supply voltage/32 (156.25mV with a 5V supply). Channel A has a smaller range still of Vcc/64 of Vcc/128. A resistive divider will probably be required to match the range of the ADC you are testing. It doesn't specify the input loading so you probably need a reasonably low source impedance to avoid errors (perhaps 1k ohms or less?) - you might need to experiment. Don't be tempted to put a capacitor on the ADC input or this will reduce the allowable source impedance. Unfortunately the HX711's linearity isn't specified either but I'm pretty sure that it will be at least as good as your 87V. Arduino sketches are readily available to interface to the HX711 boards.If you are using an unsynchronised waveform source then the waveform will be sampled randomly; given sufficient readings of the ADCs, eventually every ADC code will be measured. It will take more time with a sine wave than a triangular waveform as it spends less time around the mid point than at the peaks. If you are averaging multiple readings to improve resolution then the waveform frequency will have to be reduced to ensure that it doesn't change by more than 1/2 LSB of the desired resolution over the duration of the multiple samples.The accuracy of the reference on your measuring ADC doesn't matter so long as it is stable over the test duration. You can measure the peak waveform/input voltage with the Fluke to calibrate the ADC peak and short the input to ground to calibrate 0V.Have fun,Splin

author: Brutte
author_rank: Frequent Contributor
timestamp: February 23, 2015, 03:16:05 pm
content: I have testedvariance of internal noise(s)of STM32L152RBT6 and it was about 0.5bit when converting at 12bit resolution and max speed. No missing codes observed although the linearity was not the scope of my testing.

author: diyaudio
author_rank: Frequent Contributor
timestamp: February 23, 2015, 04:06:06 pm
content: Quote from: splin on February 22, 2015, 10:07:36 pmThanks for the lengthy response.I did want to stay clear from specifics as I know how broad data convector topics can become, its more of a general DC characteristic test without source meters, they are really expensive instruments...

author: mikerj
author_rank: Super Contributor
timestamp: February 24, 2015, 10:20:53 am
content: Quote from: Brutte on February 23, 2015, 03:16:05 pmIt was the DAC that had missing codes which was a problem for the application it was intended for. The ADC wasn't too bad for the price of the device. Ended up using an Analog Devices part which blows the STM out of the water in terms of analog performance, but then again it costs about 3 times more!

author: free_electron
author_rank: Super Contributor
timestamp: February 24, 2015, 05:14:34 pm
content: that is typically done by having the adc digitize, at a fixed sample rate, a spectrally pure sine wave.you can then take the digitized output and look at the distortion