@Anatolii_A and @phofman
I will only play audio with 48KHz sampling frequency.
But I want to make sure if I understud correctly one thing: the MCLK XO signal can be of ANY frequency, as long it is 192x greater than Fs ?
I will only play audio with 48KHz sampling frequency.
But I want to make sure if I understud correctly one thing: the MCLK XO signal can be of ANY frequency, as long it is 192x greater than Fs ?
ESP32's internal MCLK will be generated by PLL, more jittery than external clock. This discussion looks relevant - generating I2S with external MCLK for ESP32-S2+ https://esp32.com/viewtopic.php?t=16290
IMO the external clock and async-mode ESS is by far the easiest.
IMO the external clock and async-mode ESS is by far the easiest.
it is words from datasheet. bigger than 192x and read that link about clocksbe of ANY frequency, as long it is 192x greater than Fs ?
Ok guys, I decided to use a 27MHz XO on MCLK pin. It is not multiple of Fs and it work in asynchronous mode.
So, I will connect the XO output to the DAC MCLK pin and those three I2S signal lines to ESP32 as usual ?
The ESP32 will be WROVER-E and I plan to use the A2DP library to take the data from bluetooth and output it to DAC.
So, I will connect the XO output to the DAC MCLK pin and those three I2S signal lines to ESP32 as usual ?
The ESP32 will be WROVER-E and I plan to use the A2DP library to take the data from bluetooth and output it to DAC.
If you want to use an ESP32 and a ES9023, here's an example of what Dimdim user did :Hi !
Has anyone worked with ES9023 DAC ? I want to build one for myself and I have a few questions about it.
https://www.mouser.com/datasheet/2/1082/ES9023_Datasheet_v0_72-3074267.pdf
Can I send the audio data with an ESP32 over I2S ? The main problem is that I don't know what should I do with the MCLK pin. As far as I understand, it is said that this DAC can work in 2 modes: Asynchronous and Synchronous. But there is no information on how to implement this. I asked the AI and it says that in Synchronous mode the DAC can generate a master clock form the I2S clock signals. Is this true ? If this is possible, what should I do with the MCLK pin from the DAC ? I let it floating ?
https://www.dimdim.gr/2024/01/esp32-based-internet-radio-streamer/
I've done a similar thing with a PCM5102 which is easier to implement than a ES9023 as the high speed clock for internal usage is generated by a PLL.
Nice, thanks. 50MHz XO.If you want to use an ESP32 and a ES9023, here's an example of what Dimdim user did :
https://www.dimdim.gr/2024/01/esp32-based-internet-radio-streamer/
I've got 100k pullup resistor at GPIO0 and then it goes to MCLK (ESS9023), programmer is connected externally, so it won't introduce noise when not used.@elektryk But ESP32 GPIO0 is used for Boot button...
Ok, this popular A2DP lib gives only 44.1k https://github.com/pschatzmann/ESP32-A2DPHigher frequency - more phase noise, if it will not play 192K it is more profitable to put here lower freq oscillator.
Yes. Far, far lower jitter. At least that would be expected if you implement the crystal clock module well, including its power source.Is there any advantage of external XO instead of MCLK generated by ESP32?
This is the first sketch of the bluetooth audio system with DAC and amplifier included...
I also started designing the PCB and I want to understand how would it be better to make the connections of the modules to the ground. I had initially thought that the layer under the PCB should be a massive ground plane, to which I would connect all the components that need a ground reference. But is it ok for the digital signals (ESP32, DC-converter, class D amplifier) to share the same GND with the analog part (DAC output / amplifier input) ? Could I somehow make a separation between them ? The DAC is ES9023P and the amplifier is TPA3136. Which grounds from the DAC and from the Amplifier should be connected to an analog GND island ?
I also started designing the PCB and I want to understand how would it be better to make the connections of the modules to the ground. I had initially thought that the layer under the PCB should be a massive ground plane, to which I would connect all the components that need a ground reference. But is it ok for the digital signals (ESP32, DC-converter, class D amplifier) to share the same GND with the analog part (DAC output / amplifier input) ? Could I somehow make a separation between them ? The DAC is ES9023P and the amplifier is TPA3136. Which grounds from the DAC and from the Amplifier should be connected to an analog GND island ?
You might want to avoid C-II ceramic caps in the audio path, otherwise distortion can be significant. For small values C0G/NPO are good, and little the green bipolar electrolytics are pretty good if larger values are needed, but they are T/H.
Can we talk a little about analog and digital ground ?
Should I use the entire bottom layer as a masive ground reference for all circuits on the PCB ? Or I need to separate analog and digital GND paths ?
Here is a link to a schematic posted by @JarekC:
I see that there are 2 grounds in the schematic, but I don't understand how cand I implement this on PCB... Do you have an ideea if the AGND and DGND pins of the ES9023 chip are internaly connected together or they are independent ?
And why the power supply LDO for the AVCC use the digital ground ?
Should I use the entire bottom layer as a masive ground reference for all circuits on the PCB ? Or I need to separate analog and digital GND paths ?
Here is a link to a schematic posted by @JarekC:
Those 50MHz as suggested above is a rather standard frequency for ESS chips. Also 50MHz in https://www.diyaudio.com/community/threads/es9023-dac-usb-asynchronous-input-tas1020b.231049/
I see that there are 2 grounds in the schematic, but I don't understand how cand I implement this on PCB... Do you have an ideea if the AGND and DGND pins of the ES9023 chip are internaly connected together or they are independent ?
And why the power supply LDO for the AVCC use the digital ground ?
When split ground planes are used, they have to be connected at/beneath the dac chip. The alternative is to use only one ground plane and try to arrange the layout so that digital ground return currents don't tend to flow under sensitive analog circuitry (such as clock oscillators). The thing is that a ground plane is supposed to have a very low impedance, which keeps voltage drops across the ground plane to a minimum. However, ground currents still flow as they must. Thus most of the unwanted stray coupling is magnetic, not electrostatic.
To understand better, I made you this schematic with the arangement of the components on my PCB.
The big red dot is the point where I will connect the GND wire of my power supply. The yellow zone is the analog area. And the blue lines are the the main ground curent paths from all those components. As you can see, I put the central GND about in the middle so that every component has direct gnd path in the ground plane.
Do you think that, with this arangement, it's ok to leave it as it is, with just one big ground plane ?
Because, I don't think I have the knowledge and understanding of how things works, to separate the analog and the digital in 2 ground planes. I'm afraid I'll ruin it even worse... If someone could help me understand how the separation is done, I'll do it.
The big red dot is the point where I will connect the GND wire of my power supply. The yellow zone is the analog area. And the blue lines are the the main ground curent paths from all those components. As you can see, I put the central GND about in the middle so that every component has direct gnd path in the ground plane.
Do you think that, with this arangement, it's ok to leave it as it is, with just one big ground plane ?
Because, I don't think I have the knowledge and understanding of how things works, to separate the analog and the digital in 2 ground planes. I'm afraid I'll ruin it even worse... If someone could help me understand how the separation is done, I'll do it.
Well, its hard to say without trying things. Sometimes it takes multiple PCB layouts to figure out what works best.
For what you have now, I don't like ground currents from ESP32 flowing under the analog section. You could try moving the ground point. Or, maybe you could try slotting the ground plane between analog components and ESP32 in order to force ground currents from ESP32 to take a longer path away from the analog part. The risk of doing that is you can create a slot antenna which makes the board into a noise source that wouldn't pass strict emissions testing. If its just for personal use then maybe okay. Or, another option might be to reconsider the layout strategy to see if there is a better way to optimize for ground current flow.
Yet another thing to consider is what I sometimes try to do, which involves trying to at least keep impulsive bypass cap currents on the surface layer, then segment areas of surface fill to further control bypass current paths.
Also, some people will put any DC/DC converter on the back side of the PCB, way off in a far corner. The idea is to minimize any stray coupling from that noisy circuitry. Then maybe put the most sensitive analog circuitry on the top side of the PCB in the opposite corner, as far away from the noisy stuff as possible.
For what you have now, I don't like ground currents from ESP32 flowing under the analog section. You could try moving the ground point. Or, maybe you could try slotting the ground plane between analog components and ESP32 in order to force ground currents from ESP32 to take a longer path away from the analog part. The risk of doing that is you can create a slot antenna which makes the board into a noise source that wouldn't pass strict emissions testing. If its just for personal use then maybe okay. Or, another option might be to reconsider the layout strategy to see if there is a better way to optimize for ground current flow.
Yet another thing to consider is what I sometimes try to do, which involves trying to at least keep impulsive bypass cap currents on the surface layer, then segment areas of surface fill to further control bypass current paths.
Also, some people will put any DC/DC converter on the back side of the PCB, way off in a far corner. The idea is to minimize any stray coupling from that noisy circuitry. Then maybe put the most sensitive analog circuitry on the top side of the PCB in the opposite corner, as far away from the noisy stuff as possible.
Last edited:
Or, maybe you could try slotting the ground plane between analog components and ESP32 in order to force ground currents from ESP32 to take a longer path away from the analog part.
You mean to cut the ground plane like this (the black line) to force digital curents away from the analog ground ?
That looks a little drastic, but I guess you could try it. That said, there is a path around both sides of it. Not sure that is a good idea. You might take at least a line of it to the edge of the board. It also depends exactly how to you do it. If the ground plane is layer 2 of a 4 layer board, then what about surface ground fill on layer 1? is it going to close the gap you created on layer 2? What ground current might be then flowing through vias between layer 1 and layer 2? IOW, you need to think it through as carefully as you can. Quick shortcut approaches may bring unexpected problems.
Ideally, you should be thinking about this stuff before you start routing traces. Like back when you were unscrambling the rat's nest.
Ideally, you should be thinking about this stuff before you start routing traces. Like back when you were unscrambling the rat's nest.
- Home
- Source & Line
- Digital Source
- ES9023P Audio DAC