• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Audio analyzer project

OP
syn08

syn08

Senior Member
Joined
Aug 9, 2019
Messages
376
Likes
461
Location
Toronto, Canada
Nothing major I see, except for just a few different things, but that is a matter of taste. :)
No, nothing major indeed. Lots of lessons learned about optimal layout (extremely important), distortion correction in the ESS chips (AKA "cheating"; I understand the underlying technical foundation, it is sound, but practically it's a useless design feature, probably marketing driven), the ESS 9822PRO chip performances consistency (or lack, thereof), ESS hump origins (mostly 3rd harmonic) and behavior, temperature effects, XMOS audio framework, etc...

I was wondering why you're using a 3rd order MFB after the DAC?
(well 4th if we take the I/V filter from the previous stage as well)
Attempting to fight the ESS hump. Yet another lost cause, I'm afraid, unless one decides to sacrifice some performances, to bury the hump in noise shit.

What bandwith are you aiming for? It's now around 300kHz or so.
Bandwidth of ADC+DAC is about 200KHz, intended to cover 384KHz sampling (which currently doesn't work, appears to be an XMOS issue/bug with 32bit ADC input at high sample rates).

Also there don't seem to be any input caps on the input section.
Doublecheck ANALYZER_ADC_IN.jpg, the input caps are there. Using non polarized electrolytics.

The input impedance is also rather low at 2k8 ohm?
2.8k is low, but it's a compromise between using inverting configuration (to avoid common mode distortions) and bandwidth. Doesn't really matter, since there will be a high impedance analog front end, next step in this project.

I usually start with 0603 or 0805.
If the whole concept works, I will make it smaller if the design really needs it.

So do I, and now the proof of concept works, so it's time to make it smaller. I can now imagine a pocket size analog APx555 :)
 
Last edited:

OWC

Active Member
Joined
Apr 14, 2019
Messages
204
Likes
154
No, nothing major indeed. Lots of lessons learned about optimal layout (extremely important), distortion correction in the ESS chips (AKA "cheating"; I understand the underlying technical foundation, it is sound, but practically it's a useless design feature, probably marketing driven), the ESS 9822PRO chip performances consistency (or lack, thereof), ESS hump origins (mostly 3rd harmonic) and behavior, temperature effects, XMOS audio framework, etc...


Attempting to fight the ESS hump. Yet another lost cause, I'm afraid, unless one decides to sacrifice some performances, to bury the hump in noise shit.


Bandwidth of ADC+DAC is about 200KHz, intended to cover 384KHz sampling (which currently doesn't work, appears to be an XMOS issue/bug with 32bit ADC input at high sample rates).


Doublecheck ANALYZER_ADC_IN.jpg, the input caps are there. Using non polarized electrolytics.


2.8k is low, but it's a compromise between using inverting configuration (to avoid common mode distortions) and bandwidth. Doesn't really matter, since there will be a high impedance analog front end, next step in this project.



So do I, and now the proof of concept works, so it's time to make it smaller. I can now imagine a pocket size analog APx555 :)
Right but do you really want that full bandwidth is what I mean?

For board design, I would HIGHLY recommend some videos Robert Feranec made about PCB design.
Especially the ones with Rick Hartley;

and the one with Eric Bogatin;

As for the input, what I find a really nice combination, is using just a regular buffer on the inputs, followed by a double diff to single ended stage.
I got the basic idea from a paper from THAT corp but changed it a little
Here is a very global schematic.

I think the beauty of this circuit, is that it gives a lot of flexibility.
The input buffers basically add nothing to the input signal, but you can pick and choice your input impedance.
With the following stage you can build in the attention, as well get a pretty high CMRR in combination with the inputs of the ADC.
The polarity can be change by flipping the connections after the buffers.

Although not really needed in your case I think, but in the 2nd stage also a MFB filter can be implemented as well.

TI now has a IC that does this all in one thing, but I don't think it will good enough for your needs.

edit; whoops, made a little mistake, changed the schematic
Values are not important obviously.
 

Attachments

  • Analyzer_input2.png
    Analyzer_input2.png
    10.2 KB · Views: 141
OP
syn08

syn08

Senior Member
Joined
Aug 9, 2019
Messages
376
Likes
461
Location
Toronto, Canada
About PCB design, I know a thing or two about :) and I don't think anything better could be done here, after all distortions are reaching -127dB without any DAC and/or ADC distortion compensation cheating. I'm sure the EBay chinese DAC manufacturers could learn a lesson or two from these videos, though :).

The schematic you posted has one major shortcoming: in an ideal world (read: simulation), U1 and U3 have identical distortion profiles (over input level and frequency), so they cancel out, even if the common mode distortions are rather high. Never happens in the real world, even for dual op amps, so a differential non inverting input stage, as shown, will still have significantly higher distortions compared to a non inverting configuration.
 

OWC

Active Member
Joined
Apr 14, 2019
Messages
204
Likes
154
About PCB design, I know a thing or two about :) and I don't think anything better could be done here, after all distortions are reaching -127dB without any DAC and/or ADC distortion compensation cheating. I'm sure the EBay chinese DAC manufacturers could learn a lesson or two from these videos, though :).

The schematic you posted has one major shortcoming: in an ideal world (read: simulation), U1 and U3 have identical distortion profiles (over input level and frequency), so they cancel out, even if the common mode distortions are rather high. Never happens in the real world, even for dual op amps, so a differential non inverting input stage will still have significantly higher distortions over a non inverting configuration.
Oh yeah, sorry I know. Same here. That was not my point.
Still found those videos extremely interesting to watch! :)
fyi, they are definitely NOT only for Chinese DAC manufacturers!
There are some very good points in those videos that even a lot of well respected companies make mistakes with.
It's certainly not your average PCB chitchat.

True about the distortion part.
But you will win a little more, because there is some cancellation, not none.
Looking at the OPA1612, it does have a more even distortion response as an inverted amplifier.
On the other hand the distortion below say 10kHz is lower with the non-inverting one.
Although full cancellation would not occur, but let's say about half is a decent guess.
In that case the distortion above 10kHz would be the same as the inverting one, while the distortion below those frequencies will be even lower.

So that seems like a win to me, especially when it's possible to change input impedance to a much better value as well as a much higher CMRR.

I assume that you're already aware that there is a pocket size APx555 available?

That's on paper, but I think it's definetely worth a try.
 
OP
syn08

syn08

Senior Member
Joined
Aug 9, 2019
Messages
376
Likes
461
Location
Toronto, Canada
True about the distortion part.
But you will win a little more, because there is some cancellation, not none.
Looking at the OPA1612, it does have a more even distortion response as an inverted amplifier.
On the other hand the distortion below say 10kHz is lower with the non-inverting one.
Although full cancellation would not occur, but let's say about half is a decent guess.
In that case the distortion above 10kHz would be the same as the inverting one, while the distortion below those frequencies will be even lower.

Also look in the OPA1611 datasheet the distortions vs. source resistance, in an non inverting unity gain buffer. Doesn't look that great for an input stage with an attenuator in front. Such a stage calls for a JFET op amp, but which of course has another set of challenges and constraints. That's why designing the analog I/O is a difficult process (that I am full ahead into).
 

bok

Member
Joined
Sep 26, 2022
Messages
46
Likes
8
Barring some licensing fine print, the NXP source code could be a good starting point for developing an open source, portable, UAC2 stack. As I said, nobody seems to have the appettite for such, at least because UAC3 is around the corner.
I doubt it is possible to develop a portable UAC2 stack as the MCU firmware (third-party) varies between MCU manufacturers. My STM32F7(H7) UAC2 relies heavily on the firmware available on STM32s whereas NXP source code is quite a bit different.

STM32F723 UAC2 is able to do 768k full-duplex play&record with small buffers and low power consumption. Only problem I've faced so far is that BCK setting is a bit inflexible. This is fixed in H7 firmware. But try finding STM32F7 or H7 from any trusted supplier. I have not even got a shipping estimate for a Mouser order I made half a year ago.
 
OP
syn08

syn08

Senior Member
Joined
Aug 9, 2019
Messages
376
Likes
461
Location
Toronto, Canada
No need for separate LDOs, good local decoupling (everywhere, there are over 100 pcs. of 1uF ceramic caps, some combined with ferrite beads) is good enough.
 
OP
syn08

syn08

Senior Member
Joined
Aug 9, 2019
Messages
376
Likes
461
Location
Toronto, Canada
It’s not a matter of an op amp model, but a matter of configuration; nihtila uses a non inverting configuration, which has, as shown, much higher distortion due to common mode distortion (intuitively, think about the non inverting input swing vs the non inverting configuration).

What you see in the schematics is not the final input stage, that will be an auto ranging, high input impedance stage. Stay tuned, the involved non inverting configuration can be built to avoid the common mode distortion, but that’s far from trivial or anywhere simple to implement.
 

nomograf

Member
Joined
Oct 7, 2021
Messages
24
Likes
12
I just want to leave a note of encouragement here, thanks for sharing the journey!

I'm a former AP Sys One owner and current Prism Sound dScope owner.
 

bok

Member
Joined
Sep 26, 2022
Messages
46
Likes
8
- ES9311 (low noise power supply, Imax=150mA) has some serious reliability issues. I've destroyed about 20 chips while experimenting, they simply die at power on (or power off) without exceeding any spec in the data sheet. Never seen such before with a linear chip, and I am 100% sure no voltage spikes were involved in the crashes. The only correlation I was able to identify is with the noise filtering capacitors, anything over 10uF (either ceramic or tantalum polymer) almost guarantee, sooner or later, the chip destruction. I completely gave up using these chips, they are cheap compared to other very low noise regulators (LT3045, ADM7154) but way to fragile, unless somebody specifies further maximum ratings in the datasheet. Don't expect this IC to be your next low cost plug and play low noise regulator.
I made the same mistake with my ES9822PRO ADC. My first version uses 3x LT3042s for AVCC/AVCC_R/AVCC_L. But I decided to try the much cheaper ES9311 so I made a new version with LT3042 on AVCC and ES9311 on AVCC_R/AVCC_L.

Here is the AVCC_L noise with ES9311. ADC is recording 1kHz 0dBFS. 50Hz multiples are due to mains noise from the enviroment.

ES9822PRO_ES9311+LT3042_AVCC_noise.PNG


And here the same with LT3042 on AVCC_L.

ES9822PRO_3xLT3042_AVCC_noise.PNG


So total noise of ES9311 is not that bad but LF noise is much worse than with LT3042.

Ok. So what does that added LF noise mean for ADC.

Here is my first ES9822PRO board with 3x LT3042 recording 1kHz 0dBFS. DAC is my dual AK4493S.

ES9822PRO_3xLT3042.PNG


And here is the other ES9822PRO board using ES9311.

ES9822PRO_ES9311+LT3042_2.PNG


Noise skirts are much wider and noise floor slightly higher.

So no more ES9311 in my boards.
 
OP
syn08

syn08

Senior Member
Joined
Aug 9, 2019
Messages
376
Likes
461
Location
Toronto, Canada
Yes, LF noise is the reason why I tried to push up the reference filtering caps in the ES9311 schematic (to 10uF and beyond) - and ran into the reliability issues with these chips.
 

bok

Member
Joined
Sep 26, 2022
Messages
46
Likes
8
Yes, LF noise is the reason why I tried to push up the reference filtering caps in the ES9311 schematic (to 10uF and beyond) - and ran into the reliability issues with these chips.
I measured lowest noise with 10uF ref caps with no output cap. I did try larger caps but LF noise did not improve much. In the process I managed to break only half of one chip. BTW the mousebites on my batch of ES9311s were yet again at the wrong corner.
 

dsmartboxat

Member
Joined
Dec 18, 2022
Messages
10
Likes
12
Just wanted to pitch in. I'm an EE designing tablet computers that enable disabled people to communicate. One of the issues I encountered is audio is a low priority for many companies, and tools such as audio analyzers are very expensive and specialised.

REW has been an absolute blessing, especially the latest few versions allowed me to do a number of advanced acoustics measurements that have dramatically improved the quality of the products I work on.

The lack of an affordable option for an audio analyzer is still bothering me. I use audio cards, LPF filters for class-D measurements, and re-calibrate everything every time, but it's all a very time consuming and unreliable process.


My compliments to you and your design, it's looking great. Please continue with your great work, and let me know if I can help.

Some feedback so far:
- UAC2 is definitely the way to go. I've researched this extensively. There is a UAC2 class in some NXP chips, but it is pretty hard to work with. https://github.com/hathach/tinyusb as you know has recently added a UAC2 class. it's meant to work on STM32G7/H7 if I remember correctly, but it's not ready. I had some meetings with the guy who wrote the code to see if I could hire him for some improvements. One thing I love about the STM32 is they come with a license to run AudioWeaver, which is a pretty amazing DSP platform. Now, unfortunately I don't think UAC3 will go anywhere... The only adopters have been dialog and some other manufacturers of USB-C headphone-dongle ICs. The professional audio market seems to have zero interest in it. Indeed, the company who wrote the UAC2 driver for Microsoft (Thesicon) seems to have better things to do. So I don't think it will be coming, at all.
- I'm super curious to know more about what you plan to do with the inputs! please do share!
- I love the Idea of those SMA coax. So handy.
 

Spkrdctr

Major Contributor
Joined
Apr 22, 2021
Messages
2,212
Likes
2,934
I did not expect to be looking at cable porn at 9:00am today. The PCB board gave me PTSD in less than 10 seconds. It was a thing of beauty, but the soldering made me wince. I couldn't do that if I had two years! Awesome job.
 
  • Like
Reactions: MCH
OP
syn08

syn08

Senior Member
Joined
Aug 9, 2019
Messages
376
Likes
461
Location
Toronto, Canada
I don't have much contribution to soldering, other than, say, a rather steady hand and patience. The rest is SMD tooling: Metcal soldering station with assorted cartridges, titanium fine tweezers, AmScope stereo zoom microscope with ring illuminator. And a Hakko hot air station with assorted nozzles for rework. With a little practice, almost everybody can do it manually. Digikey has lots of low quality thick film resistors, in all formats from 0402, for $1/100 pcs, to practice on.

If one chooses to order stencils, then the skills required are those of an pick and place machine. A hot skillet will do the rest.
 

Spkrdctr

Major Contributor
Joined
Apr 22, 2021
Messages
2,212
Likes
2,934
I had to do it with tweezers back when SMD first came out. Tweezers a magnifying glass and hopefully a steady hand on the regular (old school) soldering station. I got off the repair bench when that was the norm!
 

dsmartboxat

Member
Joined
Dec 18, 2022
Messages
10
Likes
12
It can get pretty wild sometimes... here are 6 wires soldered on a sensor for an experimental medical device.
 

Attachments

  • Screenshot 2022-12-20 at 17.56.22.png
    Screenshot 2022-12-20 at 17.56.22.png
    1.3 MB · Views: 90
Top Bottom