Sunday, August 14, 2022
HomeElectronicsSimplify testing of embedded analog-to-digital converters

Simplify testing of embedded analog-to-digital converters

Just a few years again, I wanted a fast, low-frequency, but very low distortion supply to check an onboard micro-controller ADC to see if it had wherever close to the efficient variety of bits (ENOB) and linearity that the datasheet stated.

I knew in regards to the very low distortion, however considerably sophisticated design from Linear Know-how [1], however that appeared like overkill for my speedy want. So I ended up constructing a classical, three op amp, state variable oscillator with a little bit grain-of-wheat mild bulb because the amplitude stabilizing circuit based mostly on a circuit by Hein van den Heuvel [2].

After a day of fidgeting with the loading of varied levels of the op amps within the circuit, I managed to get the harmonic distortion merchandise down beneath -95 dBc degree, which was high-quality for my speedy want.

Whereas a discrete oscillator circuit might be constructed, it’s fiddly. There are temperature points, like amplitude drift, frequency drift, startup and stabilization time, and many others. Likewise, I believed that sooner or later it will be good to have a quick setup oscillator with a number of outputs from 2.5 to +/-10 volts in order that I may shortly measure any ADC with 16-bit accuracy.

The analog method is something however a quick setup, and this received me fascinated by how the skilled audio analyzers implement their sources. They need to both construct a precision, discrete DDS or use one of many high-resolution I2S audio DACs, I believed.

I then ran throughout the TI Software notice for his or her tackle the super-low-distortion take a look at oscillator and positive sufficient, it makes use of certainly one of their Burr-Brown I2S, audio DACs adopted by some high-performance low cross filters [3].

I purchased a couple of I2S DACs and hooked them as much as certainly one of my microcontroller demo boards and in a couple of day had the I2S operating and had some respectable indicators operating out of the setup. The beauty of I2S is that it may be hooked as much as the processor’s DMA to make 99% of the info switch clear to the processor. All of the processor has to do is to maintain the DMA pipe stuffed up each now and again.

This was a studying expertise and never economically advantageous as a result of TI sells their circuit for lower than $300, nevertheless, there is no such thing as a revealed API for controlling their resolution from your individual take a look at applications.

I then thought, “What a couple of USB sound card dongle? They have to be fairly respectable and low cost.”

A fast search revealed that Artistic Labs does certainly make a really low price however excessive efficiency 16/24-bit USB dongle, the impressively named “Artistic Labs Sound Blaster Play! 3.” This lower than $20.00 machine even has a 24-bit/96-kHz knowledge price [4]. I belief Artistic Labs to not make junk, so I purchased one to check out.

Preliminary exams with my 18-bit FFT analyzer [5] confirmed that not solely did the laptop computer “sound” higher to my ear, however that the efficiency was certainly on the 16-bit degree of distortion with a pleasant clear noise ground.

This method would certainly be a “Fast Setup” resolution for my common ADC take a look at bench as all of the software program may very well be run on my laboratory PCs; now I might have a ‘controllable’ supply, frequency and amplitude clever, and it was being run on my PC so I may have standalone purposes and even construct API’s for inclusion into automated take a look at suites if wanted later.

That’s a whole lot of work solved proper there, and by utilizing an exterior sound card the precise amplitude and identified high quality could be transferable between any take a look at bench, as my take a look at laptops inside sound playing cards differ everywhere on output amplitude and actual sound high quality.

One other advantage of utilizing a Laptop computer for the take a look at controller is you can pull the ability adapter and run on batteries thereby eliminating a whole lot of floor loop points that all the time crop up if you find yourself making an attempt to maneuver shortly and simply get the job executed.

Enter the BlasterAmp

All of the challenge required now was an analog interface board for the Sound Blaster dongle to get the specified outputs for my “common” take a look at setup.

I measured the Sound Blaster audio output into the desired headphone load of 300 ohms and with some take a look at tones, and full-scale outputs I measured a constant 0.37 volts peak, unbiased of what PC or working system I used.

An inventory was product of the standard ADC enter ranges (Desk 1). I figured that If I cowl the widespread ADC enter ranges, something in between may very well be measured by utilizing the amount management to regulate the amplitude, this might finally decrease the achievable sign to noise ratio (SNR) however the Sound Blaster has greater than sufficient SNR for the purposes I’m seeking to measure.

Desk 1 These ranges cowl nearly the entire ADC inputs that I’ve come throughout within the final 10 years. This desk was used as the premise for determining what beneficial properties and offsets could be wanted for an amplifier on the output of the Sound Blaster dongle.

The three.3 volt peak vary is an oddball, however nonetheless comes up in decrease decision, fundamental designs, which are largely 10- or 12-bit ADCs anyway, so the choice was made to simply use the amount management and 0-5 volt vary for these purposes, with solely a small lack of sign to noise ratio.

I then designed what I name the “BlasterAmp” with the wanted beneficial properties and offsets to have the ability to convert the 0.37 volts peak, the full-scale output of the Sound Blaster Dongle to match Desk 2.

Desk 2 The BlasterAmp was designed to cowl the widespread voltages of desk 1 with solely 4 achieve steps and three offset settings. The unipolar ranges require three offset voltages for use.

One factor to notice in regards to the unipolar ranges: these are all the time “rail to rail” now, and whereas we are saying “rail to rail” there’s nearly all the time some offset from the “rail.” This may play havoc with any ADC/buffer testing as a result of if the “rail” isn’t precisely at zero or full scale, then the ADC will clip and it will result in extreme distortion that can forestall any significant measurements from being made. Additionally, there are occasions when the ADC reference voltage is 2.048 or 4.096 volts as a substitute of two.5 and 5 volts. To account for these conditions I used precision, 25-turn trimpots to permit for slight tweaks to the achieve and offset to be made when wanted. The trimpots additionally enable for any slight variations in Sound Blaster dongles, resistor tolerances, and op amp offset voltages.

Determine 1 reveals one channel of the completed BlasterAmp. Shorting jumpers had been used to permit the offset and achieve adjustments as wanted to accommodate the assorted wanted output ranges.

Determine 1 One channel of the stereo BlasterAmp. The achieve and offset vary are set with movable jumpers, after which high-quality tuned with the help of precision, 25 flip trimpots. The resistor community round U101 is a 1 k-ohm, matched community from Vishay (OSOPTC1001AT0). All the opposite resistors are 0.1%, 0805 sized to reduce resistor heating and subsequent distortion. C100 and C101 have to be movie or COG ceramic sorts to eradicate distortion.

For the amplifiers, I used the tried and true Burr-Brown OPA1611, an ultra-low-distortion audio op amp and so they carried out as per the datasheet, which is to say excellently.

For the offset reference voltage, I used the TI REF5050, which is a precision 5-volt reference.

For the reason that circuit is predicted for use on my bench in a take a look at setup association, I designed it to be powered by +/-15-volt rails, and used one other tried and true element, particularly the HP6234A twin linear energy provide that I carry on my bench for such events. Using a linear energy provide just like the HP6234A is actually helpful due to its low noise, low IO capacitance design, and the truth that it isn’t spewing common-mode currents from a switching energy provide all over the place. If I had to make use of a switcher to energy the design I might have used some linear, low-dropout regulators and hefty common-mode choking within the circuit to maintain the switching noise off the board as greatest I may. The trusty HP6234A eliminates all these points.

I laid the ultimate, two-channel BlasterAmp PCB out to slot in a small-sized Hammond Enclosure [6] that I didn’t put the quilt on, as this might enable for straightforward altering of the assorted jumpers and trimpot adjustment (Determine 2).

Determine 2 The finished BlasterAmp. I mounted the PCB in an extruded enclosure for defense. The audio from the sound card is the black cable on the high proper of the PCB. Energy is provided from my HP6234A linear bench provide by way of the wire connector on the center proper of the PCB. The entire design is accessible, see reference 10.

Common maxim: {Hardware} wants software program

Utilizing the Sound Blaster dongle definitely simplified the design significantly and saved improvement time, however I nonetheless wanted a option to play excessive dynamic vary take a look at indicators into the Sound Blaster. I attempted most likely a dozen audio take a look at tone software program options and most of them had been solely on the 60-dBc distortion degree or much less, which is okay for listening exams, however not OK for my utility, I wanted to get the distortion all the way down to the 16-bit degree.

There are a number of audiophile websites on the web that present very low distortion recordsdata for testing [7]. For playback you want a WAV or MP3 file participant that has zero useless time when looping. I’ve discovered that the stupidly named program “foobar2000” is a superb alternative [8]. I initially used this system to play white noise on my laptop computer when I’m touring to drown out extraneous sounds when making an attempt to sleep, and you may’t have any clicks or pops when looping a white noise file both, or you’ll instantly get up. The foobar2000 program works splendidly for the BlasterAmp and for sleeping.

These canned take a look at recordsdata have a set frequency, however the amplitude might be fine-tuned as wanted by the BlasterAmp trimpots or the PC’s quantity management.

As for having the ability to programmatically set the frequency and quantity, I discovered a Python library referred to as PyAudio [9] that permits me to generate a precision sine wave sign of a given amplitude after which be capable of play this immediately from the Python script [10]. This has confirmed to provide very low distortion indicators as might be seen in Determine 3.

Determine 3 Outcomes of the BlasterAmp when set to the +/-10V vary as measured on my DMT9000 FFT analyzer [5]. The complete scale distortion merchandise might be seen to be on the 16 bit degree of -96 dBc beneath full scale.

Care have to be taken in producing any take a look at tone, nevertheless. You’ll both should make a file that’s steady and lengthy sufficient to your take a look at, or you’ll have to repeatedly loop. When looping simply make it possible for the beginning and the endpoints of your waveform line up precisely or there shall be a discontinuity that can add distortion on the loop level.

As a closing notice on utilizing the Sound Blaster dongle for precision tone technology, you should definitely flip off any audio equalizers or management applications on the PC that the sound technology is being performed on simply to make it possible for there aren’t any unexpected points.

Subsequent time

Within the subsequent article, I’ll present strategies for utilizing the BlasterAmp to measure some precise ADCs and take a look at parts for distortion.

The entire supply code for the Python scripts and the total schematic for the BlasterAmp might be discovered on Github [10].


[1] Jim Williams, Man Hoover, “Constancy Testing for A→D Converters”, Linear Know-how AN132:

[2] Hein van den Heuvel, “Reference Sine Wave Generator”, Elektor Submit, Mission No. 53 –

[3] Precision Sign Injector (PSI) Analysis Module for Testing ADC Efficiency, Texas Devices –

[4]  Artistic Labs Sound Blaster Play! 3 –

[5] A future design article will element my DMT9000 18 Bit FFT Analyzer Instrument.

[6] Hammond Manufacturing, Extruded Enclosures –

[7] These take a look at tones are of excellent high quality:

[8] “foobar2000” looping audio playback program –

[9] The PyAudio installer is damaged as of Could 2022, a set model might be downloaded from –

[10] The entire BlasterAmp design and the Python Scripts might be discovered at –

Steve Hageman has been a confirmed “Analog-Loopy” since in regards to the fifth grade. He has had the pleasure of designing op-amps, switched-mode energy provides, gigahertz-sampling oscilloscopes, Lock In Amplifiers, Radio Receivers, RF Circuits to 50 GHz and take a look at tools for digital wi-fi merchandise. Steve is aware of that each one trendy designs can’t be executed with Rs, Ls, and Cs, so he dabbles with programming PCs and embedded methods simply sufficient to get the job executed.

Associated Content material



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments