Designing ES982x-based ADC - feedback wanted

After looking at all the existing options I can find for adding an audio ADC to a RPi, I've decided to go ahead with making (or at least, trying to make) a RPi hat based around the ES982x. It will be pretty similar to the datasheet circuit, using ESS's own ES9311 regulator to power the ADC chip. The ESS datasheets use OPA1612 op-amps for the input stage, and I allowed for them, however the first prototypes will use ES9820 + NE5532. The main design requirements are:

1. Single-ended connectors onboard, with headers for diff. input
2. Use I2S, not USB
3. Hopefully >100dB THD+N - significantly better than other options available
4. Parts available (not that easy)

It's really for people who want a high(er)-quality I2S input to their Pi, because there are high-quality USB ADCs (Cosmos) and ~90dB THD+N hats available (e.g. HiFiBerry ADC+DAC and this open source WM8731-based one). I also think that a Linux driver for the ESS chips could be useful for someone else.

There will be a few parts of this project that are new for me (especially the driver). Here is the first version of the schematic... I welcome feedback and suggestions. For example, one thing I'm not sure about is whether the resistor values can be left the same when substituting the NE5532 instead of OPA1612.

FYI, my own use-case is to provide analog input for a RPi DSP+xover for 3-way active speakers. Analog input selection is done on a relay board inside the case and the RPi USB ports will be exposed through the back panel, so a USB interface is not gonna work.
 

Attachments

  • es9820_hat.pdf
    285.2 KB · Views: 154
One potential problem is that RPi is very electrically noisy, both conducted and radiated. Any thoughts on how will you determine how much of a problem it is during testing? SMPS are tricky to use well, it can take a lot more engineering effort to get clean power than if using a linear supply. THD+N is not a very good measure of performance so why use it? Are you planning on making the ADC I2S master? Why haven't you put a damping resistor between the clock and ADC MCLK input? We could probably make a longer list if that's the sort of feedback you are interested in.

Overall the impression is that you might get it to convert analog to digital, but it might not sound very good and THD+N may not give you much insight into why. Maybe someone else will have a more optimistic opinion, don't know.
 
Thanks @Markw4 - yeah i know that the Rpi is super noisy.

I am certainly open to suggestions on generating the op-amp supplies in a different way, but I do not want to add the requirement for a 9V or 12V DC supply. But perhaps there's some idea that I missed. Here are some thoughts that I took into account:
  • The Cosmos has a dual switching regulator (TPS65130) with two inductors really close to it - I am guessing this is for the op-amp supplies (although I could be wrong) so I kind of guessed it will be OK :)
  • TPS65130 is not available at Mouser until 2023, otherwise I would use that. The one I chose is in stock, and has a nice high switching frequency (2.1MHz) - even higher than TPS65130.
  • The layout will have the SMPS well away from the op-amps.
  • SMPS is only used for powering the op-amps - not the actual ADC - so it should not be working very hard. The ADC is powered by the ESS ES9311 regulator - it is well worth reading the data sheet for that one, as it specifically mentions that "this chip allows the ES9038PRO DAC to achieve its full 140dB DNR".
  • I have a solid metal case for my Pi - I could perhaps put that on to reduce emissions and then connect this ADC hat outsidethat.
  • I did not yet put any ferrite beads but this probably can't hurt on the +5V coming from the Pi, even though that is fed to the ESS regulator (the 3V3 lines from the Pi only power the SMPS and the EEPROM).
I am just using THD+N as a rough guide, with the assumption that something with 10dB better THD+N (i.e. one third of the distortion & noise in absolute terms) is quite unlikely to be worse, but if I'm wrong I'd be happy to hear why. I can certainly believe that a system with slightly worse THD+N might be significantly better when taking everything into account, because we don't spend our time listening to 1kHz sine waves.

Regarding the damping resistor for the clock, the datasheet shows an ESD protection resistor on the ES9820 clock input. Or do you mean something different? And yes, that is exactly the type of feedback I'm interested in. There are inevitably some things I did not consider or am simply not aware of, which is why I posted it here.

Edit: Oh, and yes this will be the I2S master.
 
I would suggest more or less what bohrok suggested. Leave yourself some options for testing. Populate only the dac part first. Allow for initial testing with external linear power supplies. Initial testing for I2S either with a good USB board or using something like Iancanada StationPi/Isolator to shield the ADC board from RPi noise. Either way would give you a chance to see how the ADC is doing in a cleaner EMI/RFI environment. Yes, such things add to cost, but nobody said that development of a new diy device is lower cost than buying a commercial product.
https://github.com/iancanada/DocumentDownload
https://www.audiophonics.fr/en/sing...i-and-hat-boards-adapter-station-p-16550.html
https://www.audiophonics.fr/en/single-board-computers-et-hats/ian-canada-isolator-ii-galvanic-insulation-module-for-raspberry-pi-odroid-p-13824.html?search_query=isolator pi&fast_search=fs
https://www.audiophonics.fr/en/rasp...68.html?search_query=stationpi&fast_search=fs
http://jlsounds.com/i2soverusb.html

Regarding clocks and other CMOS digital devices signals (including I2S), source series damping/termination resistors are commonly used to control transmission like reflections. Typical values tend to be around 33R, although for DACs sometimes 100R ends up producing better sound. https://www.analog.com/media/en/training-seminars/tutorials/mt-097.pdf

Its also better to have two clocks, one for 44kHz family sample rates and one for 48kHz family. They need clean power BTW, not RFI/EMI polluted power.

Regarding opamp power pins, they are inputs for RFI/EMI produced by SMPS. Please see attached document.

Regarding THD+N, first of all there are all kinds of N, and it doesn't all sound like resistor noise. Noise can be random in the frequency domain yet rather deterministic in the phase domain. Since typical audio FFTs discard phase information you have no clue about the noise crest factor. It could sound more like popcorn cooking instead of a little hisssss. Even worse, noise can be some kind of function of the audio signal which makes the noise much more audible. That is sometimes referred to as 'signal correlated noise.'

There are also all kinds of HD. 2nd harmonic is very different sounding verses 7th harmonic. THD+N is simply not a good metric.
 

Attachments

  • AN-1698 A Specification for EMI Hardened Operational Amplifiers - TI.pdf
    370.6 KB · Views: 70
Last edited:
Well implemented dual switching regulator should be sufficient for op-amp supplies. THD+N is a figure of merit used by all ADC chip manufacturers. No need to look for something else but I would set the goal to datasheet level (-117dB) as that should be well within reach.

The proper terminology for damping resistor is series termination resistor. It has nothing to do with ESD protection.
 
Quote from AES paper on distortion:
"In our next paper we will show that .01% THD of one type of nonlinear system can be perceived as unacceptable while 10% THD in another example is perceived as inaudible. Even one of these simple examples is sufficient to invalidate THD as a viable metric for discussion of the perception of distortion. Furthermore, 1% THD is not at all the same as 1% IM, but we will show that neither correlates with subjective perception."
http://gedlee.azurewebsites.net/Papers/Distortion_AES_I.pdf

The next paper, as referred to above:
https://gedlee.azurewebsites.net/Papers/Distortion_AES_II.pdf

Also from Dr. Geddes:
"THD and IMD have no correlation to the perception of the distortion that they are intended to represent."
https://gedlee.azurewebsites.net/Papers/The Perception of Distortion.pdf
 
True. It is that THD + N =THD+N. We know the THD part is as Dr. Geddes has described. The equivalent problem with N is that not all noise sounds like resistor thermal noise. Therefore the N part is also not very useful in terms of correlation with human perception. IMHO only, of course.

However, agree that THD+N is still in common usage.
 
As I said THD+N is the best available metric to judge implementation quality. That does not mean that it correlates with subjective sighted listening tests. But unless you can come up with some alternative objective metric it is best to use the commonly accepted metric.
 
I repeat: THD+N is the best available metric to judge implementation quality. The non-linearities are too low for Gedlee metric.

Of course THD+N alone is not sufficient metric. Jitter/phase noise measurements are also needed. Topping D90 is a prime example of bad implementation with good THD+N.
 
Last edited:
Good point that its not limited to SMPS, thank you. EMI/RFI ingress can happen in various ways. Still, seems like using decent quality linear bench supplies as primary regulators and local-on-the-PCB linear secondary regulators is easier to get clean on first go-around than SMPS on the same PCB. That's all. In keeping with the incremental test idea, hopefully.
 
Again @Markw4 - I cannot get 7V from 5V without a SMPS. I do plan to follow the approach @bohrok2610 mentioned - try the SMPS and see if it's good enough - if not, I need to figure out whether noise is coming from SMPS/conducted noise/radiated noise/something else.

Thanks for the pointer on series termination resistor for XO - I will add one. I only plan to support 48/96/192 kHz so only one oscillator. The oscillator is powered from the ESS regulator which is quoted as <1uVrms output noise from 100Hz-100kHz.

Also there is no DAC section - ADC only.
 
It is possible to get 7v from 5v without SMPS. Its been done before. However SMPS is the most efficient way. No need to go into more detail at this point. SMPS should be fine in principle. Let's assume you will be able to get it work okay, although maybe not with the first prototype.

Besides, my point is not to say there shouldn't be an SMPS. Its like this: bohrok likes and or trusts figure of merit measurements more than I do. IMHO nothing wrong with that if the audio device is to be used for measurements. Then it make perfect sense to me to optimize it for measurements. OTOH I am personally skeptical that 'figure of merit' measurements are sufficient if the device is to be used for music reproduction. In that case I feel that listening tests should be given substantial weight in judging performance. Why? For one example, some types of noise that can look innocuous on an FFT can sound pretty bad to a human. When someone looks at an FFT and decides the sound must be good, IMHO they are listening with their eyes instead of their ears. Its also important to understand blind testing has to play a part when judging by ear. It should be blind to FFTs and blind to otherwise knowing the state of DUT except by ear alone. If after that you find that your ears and THD+N don't agree, you might check to see of the Gedlee metric can explain why. If not that then maybe some other testing would be in order to better understand the cause.

My point here is only to suggest that you test with linear supplies first so that you can check perceived sound quality, not just figure of merit measurements, and do so in a clean EMI/RFI environment. Also in that case if there are problems, the troubleshooting space will hopefully be simpler to navigate given the fairly simple implementation. OTOH if everything checks out okay and you proceed to try it with the SMPS, then even if the FFT looks okay, if it doesn't sound the same anymore you may have a type of problem that doesn't happen to show up very well on an FFT. It can happen.

It should probably also be noted that problems can be had with external linear supplies too. Nothing is completely foolproof. If you decide to go that route we can talk about how you might do it in more detail.

Understood that bohrok has his own preferences for how he likes to do things and in this case he has suggested starting with SMPS. I'm not claiming there is anything wrong with that. Its just happens to be different in some ways as verses my preferred way. In any case, you have my reasoning outlined above for my particular recommendation. Up to you what you want to do.