Friday, June 24, 2022
HomeElectronicsSimplify testing of embedded analog-to-digital converters

Simplify testing of embedded analog-to-digital converters


A couple of 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 anyplace close to the efficient variety of bits (ENOB) and linearity that the datasheet mentioned.

I knew concerning the very low distortion, however considerably difficult design from Linear Expertise [1], however that appeared like overkill for my fast want. So I ended up constructing a classical, three op amp, state variable oscillator with just a little 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 assorted phases of the op amps within the circuit, I managed to get the harmonic distortion merchandise down beneath -95 dBc stage, which was effective for my fast want.

Whereas a discrete oscillator circuit will be constructed, it’s fiddly. There are temperature points, like amplitude drift, frequency drift, startup and stabilization time, and so on. Likewise, I assumed 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 might rapidly measure any ADC with 16-bit accuracy.

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

I then ran throughout the TI Software be aware for his or her tackle the super-low-distortion check oscillator and positive sufficient, it makes use of one in all their Burr-Brown I2S, audio DACs adopted by some high-performance low go filters [3].

I purchased a couple of I2S DACs and hooked them as much as one in all my microcontroller demo boards and in a few day had the I2S operating and had some respectable alerts 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 information switch clear to the processor. All of the processor has to do is to maintain the DMA pipe crammed 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 isn’t any printed API for controlling their resolution from your personal check packages.

I then thought, “What a few USB sound card dongle? They should be fairly respectable and low-cost.”

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

Preliminary assessments 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 stage of distortion with a pleasant clear noise ground.

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

That’s a number of work solved proper there, and by utilizing an exterior sound card the precise amplitude and recognized high quality can be transferable between any check bench, as my check laptops inner sound playing cards differ all over on output amplitude and actual sound high quality.

One other benefit of utilizing a Laptop computer for the check controller is that you would be able to pull the ability adapter and run on batteries thereby eliminating a number of floor loop points that at all times crop up if you find yourself making an attempt to maneuver rapidly and simply get the job performed.

Enter the BlasterAmp

All of the venture required now was an analog interface board for the Sound Blaster dongle to get the specified outputs for my “common” check setup.

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

An inventory was made from the standard ADC enter ranges (Desk 1). I figured that If I cowl the frequent ADC enter ranges, something in between might be measured by utilizing the amount management to regulate the amplitude, this is able to in the end decrease the achievable sign to noise ratio (SNR) however the Sound Blaster has greater than sufficient SNR for the purposes I’m trying 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 features and offsets can 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, primary designs, which might be principally 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 features 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 frequent 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 concerning the unipolar ranges: these are at all times “rail to rail” now, and whereas we are saying “rail to rail” there may be nearly at all times 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 this may result in extreme distortion that may stop 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 exhibits one channel of the completed BlasterAmp. Shorting jumpers had been used to permit the offset and achieve adjustments as wanted to accommodate the varied wanted output ranges.

Determine 1 One channel of the stereo BlasterAmp. The achieve and offset vary are set with movable jumpers, after which effective 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 should be movie or COG ceramic sorts to remove 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 check 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 de facto 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 in every single 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 finest I might. 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 duvet on, as this is able to enable for simple altering of the varied 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 equipped from my HP6234A linear bench provide by way of the wire connector on the center proper of the PCB. The entire design is offered, see reference 10.

Common maxim: {Hardware} wants software program

Utilizing the Sound Blaster dongle definitely simplified the design vastly and saved improvement time, however I nonetheless wanted a approach to play excessive dynamic vary check alerts into the Sound Blaster. I attempted in all probability a dozen audio check tone software program options and most of them had been solely on the 60-dBc distortion stage or much less, which is okay for listening assessments, however not OK for my software, I wanted to get the distortion right down to the 16-bit stage.

There are a number of audiophile websites on the web that present very low distortion information 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 selection [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 check information have a hard and fast frequency, however the amplitude will be fine-tuned as wanted by the BlasterAmp trimpots or the PC’s quantity management.

As for with 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 to play this straight from the Python script [10]. This has confirmed to provide very low distortion alerts as will 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 total scale distortion merchandise will be seen to be on the 16 bit stage of -96 dBc beneath full scale.

Care should be taken in producing any check tone, nevertheless. You’ll both need to make a file that’s steady and lengthy sufficient in your check, or you’ll have to constantly loop. When looping simply guarantee that the beginning and the endpoints of your waveform line up precisely or there shall be a discontinuity that may add distortion on the loop level.

As a remaining be aware on utilizing the Sound Blaster dongle for precision tone technology, remember to flip off any audio equalizers or management packages on the PC that the sound technology is being performed on simply to guarantee that 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 check elements for distortion.

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

References:

[1] Jim Williams, Man Hoover, “Constancy Testing for A→D Converters”, Linear Expertise AN132:
https://www.analog.com/media/en/technical-documentation/application-notes/an132f.pdf
https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/dc1858a.html

[2] Hein van den Heuvel, “Reference Sine Wave Generator”, Elektor Submit, Mission No. 53 – https://www.elektormagazine.com/index.php/information/attachment/326

[3] Precision Sign Injector (PSI) Analysis Module for Testing ADC Efficiency, Texas Devices – https://www.ti.com/software/PSIEVM

[4]  Inventive Labs Sound Blaster Play! 3 – https://us.artistic.com/p/sound-blaster/sound-blaster-play-3

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

[6] Hammond Manufacturing, Extruded Enclosures – https://www.hammfg.com/electronics/small-case/extruded/1455

[7] These check tones are of excellent high quality:
https://www.mediacollege.com/audio/tone/obtain/
https://www.audiocheck.internet/testtones_thd.php

[8] “foobar2000” looping audio playback program – https://www.foobar2000.org/obtain

[9] The PyAudio installer is damaged as of Could 2022, a hard and fast model will be downloaded from – https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio

[10] The entire BlasterAmp design and the Python Scripts will be discovered at – https://github.com/Hagtronics/BlasterAmp

Steve Hageman has been a confirmed “Analog-Loopy” since concerning 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 check gear for digital wi-fi merchandise. Steve is aware of that every one trendy designs can’t be performed with Rs, Ls, and Cs, so he dabbles with programming PCs and embedded methods simply sufficient to get the job performed.

Associated Content material




RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments