Electronics > Projects, Designs, and Technical Stuff
OSH Audio THD instrument and live BOM
<< < (3/8) > >>
asgard:
Here is an updated BOM worksheet.  Two things are different.  First the main board is now a 100x100mm 4 layer design, with much better notated clearances for the modules.  Second is a classic "trap for young players"  You will now not be required to pay yourself sales tax for inhouse constructed sub-assemblies.  There is a little bit more transparency as to the cost outlay for the board fab.  The consumer margin calculation now reaches my desireable price point of $200 per unit, which sets the marginal profit per unit at 0.4.  Your mileage may vary on what marginal profit a product requires.  As long as that number is greater than one you will not have to make up losses in volume sales L)
rhb:

--- Quote from: asgard on February 07, 2019, 07:26:58 pm ---For much the same reason as for any bench instrument, I want to minimize any multi-MHz signals flapping around.  To get 0.005% accuracy even the noise level in the 4-layer example Dave recently demonstrated is too much.

--- End quote ---

The Cirrus Logic WM8860 32 bit digital audio codec datasheet specifies THD at 18 ppm which is slightly better than your 50 ppm.  Most of the codecs I looked at were around 25-30 ppm THD+N.

It's important to understand that the noise that Dave showed is *radiated* noise.   It is not noise on the signal traces.

You can correct for THD in the ADC and DAC.  If you generate a WAV file with a pure sine wave, play it back through each  DAC and record it with both ADCs, you can correct the codec THD.  Random noise can be suppressed by averaging many FFTs from a long recording.  It's also the easiest way to solve the calibration problem in the bargain.

All modern music production is digital unless someone is making direct to disk vinyl again.  I can assure you that all that equipment would show similar levels of radiated EMI to what Dave demonstrated.  The sole exception would be the direct to disk gear.

In the 70's everyone competed for the lowest THD rating amplifiers.  The fundamental problem is that the speakers and microphones are several percent THD.  So even if the  amplifier THD were zero, the result would not change noticeably.

Aging and temperature will cause an analog THD meter to vary in a manner which is difficult to correct.  A DSP approach can be recalibrated every time it is used.  And at ~$150 for a 2x2 24 bit 192 KSa/S  USB interface, it's certainly cheap enough.

As your computer almost certainly already has a sound card, I suggest you start by writing the calibration code for that and then see if you can beat it with an analog design.  As it is not studio recording gear, you probably can by a small margin.  I doubt that you can beat the studio gear, but I could be wrong.

I'm a retired reflection seismic research scientist/programmer.  DSP does not get more complex than reflection seismology.  With wells that run $200+ million to drill, no one bats an eyelash about spending a few million on DSP, *if* they are convinced it will improve the results.  We have to deal with waves, tides, changing water temperatures and currents, changing sediment velocities, noise no one is quite sure where it comes from though marine life are a prominent source and all manner of other strange things which have to be analyzed, characterized and removed.

BTW My Tek 485 is entirely analog.  I'd bet that probing it would show similar levels of EMI to Dave's example.  The horizontal sweep has to go from max to zero as fast as possible to get ready for the next sweep.  That falling edge generates lots of high frequency harmonics.

At a bare minimum, implementing a sound card based THD meter will help you build the Wein bridge oscillators you need and teach you a lot about measuring THD.

I won't write the code for you, but I will give you a detailed description and answer questions.  This is the sort of thing I did for 30+ years at PhD level for major and super-major oil companies. For extraneous reasons I did not get my PhD.  But most of my clients did, many of them from Stanford.  If any of us had a problem, the first step was to go across the hall, which either got an answer or a "go talk to Joe, he mentioned something about that over lunch a few weeks ago."

I do *not* like being retired.  It is not even close to the level of fun I had going to work.  But along with many friends, I'm too old to get a job again.  I ran an "orphan home for lost problems", so lots of strange and interesting things would walk in my office or appear in my Inbox.
asgard:
Actually I appreciate that.  I don't need any code written for me, as in my previous life I developed microcore logic and code to implement beamforming hearing aid devices.  In order to accurately compensate for head-related transfer functions (look that one up if you want to be sleepy) I had to use some hefty DSP in 40-core multiprocessors.  One can appreciate the code density when you have to have a 42-bit accumulator for IIR functions in a 15-bit processor, with a budget of 192 words of memory for code and data.  Anyway, after all that noise I wanted to see how "simple" I can make an accurate bench instrument, and I think a quad op-amp is quite robust for an accurate oscillator or filter.  I am compromising enough to require a good (Rigol-class) oscilloscope to collect and integrate the THD measurements outside of this unit.
rhb:
Actually, I've  been thinking about writing the code, though obviously you don't need it.

After reading the datasheets I got to wondering how much improvement in THD one could achieve by running a calibration routine.  I've always admired the Jim Williams essay I cited earlier.    Building a super low distortion Wein bridge oscillator  seems like a fun project and naturally I'd need some way to characterize it.

If you've not read it, it's pp 7-19 of:    web.mit.edu/6.101/www/s2017/handouts/williams.pdf 

Jim's final version had a THD of 3 ppm!

Current notion is sweeping across both frequency and amplitude :

Frequency
   Start
   Stop
   Step (linear or log)

Amplitude
    Start
    Stop
    Step (weighting??)

 FFT
     Length
     Repetitions to average
asgard:
It seems to me two more corrections would have to be done - first to characterize the inevitable non-linearity of the converters, and second to account for drift in the sample clock because after all, Nyquist uber alles.
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod