Giter VIP home page Giter VIP logo

Comments (3)

quiknick avatar quiknick commented on May 23, 2024

Well looks like this may be a hardware design flaw. There is some really good info on the ES8388 in the comments section of this page. https://www.pschatzmann.ch/home/2021/12/15/the-ai-thinker-audiokit-audio-input-bug/
Here is the excerpt that explains it and a picture to resolve the issue.

I can get perfectly working stereo line in and stereo microphones by moving two capacitors on the AIThinker AudioKit board.
On my board (V2.2 A247 ES8388), LINEINL (pin 22) and MIC1N (pin18) are connected together on the A1S module. Similarly, LINEINR (pin 21) and MIC2N (pin 14) are also connected on the module. These two pairs are routed to LIN2 and RIN2 on the ES8388 respectively.
Some capacitors were already removed on the AI Thinker board that I received, but they appear to be the wrong ones. C17 was removed which connects the left microphone to the MIC1P (pin 17 on the A1S, LIN1 on the ES8388) and C19 was removed which connects the right microphone to MIC2P (pin 15 on the A1S). I think the intention was to make the microphones single ended and remove the negative input. However, the effect was to disconnect the microphones from the LIN1 / RIN1 input, and at the same time leave them connected to the LIN2 / RIN2 inputs (which are also connected to the line in circuit). This is why there is no input on Input Line 1 and mixed microphones / line in audio on Input Line 2.
I moved capacitor C18 to the C17 position and C20 to the C19 position. This connects the microphones to the left and right channels of Input Line 1 and isolates them from the Input Line 2 / line in path. The fix works well on my board, and I can now use either stereo microphones, stereo line in, or mix both in software. I have a picture of where the caps are on the board if anyone is interested.
ESP32-A1S cap mod

from esp32_multitrack_looper.

quiknick avatar quiknick commented on May 23, 2024

Doing the aforementioned mod moving C18 to the C17 position and C20 to the C19 position did not resolve the audio interference, but it did highlight that the issue is on the MIC2 side of the board and not MIC1. So this definitely is a hardware issue. Not sure what to say except to not use the AI ESP32 Audio Kit v2.2 with E8388 card. There are too many versions and they have too many issues from what I have read. Here is the core of the issue. MIC2 is linked to LIN2/RIN2 and is always listening. This is not desirable. The only way is to resolve is to completely remove the MIC2 from circuit.

I don’t know if by now you have found the reason yourself but I am currently also researching this board for my own project and I am fairly certain I have found the problem. After looking at both the schematic for the board as well as the (horrible) ones for the ESP32-A1S it is indeed a hardware issue but with the ES8388 A1S module itself or how it acts when placed on a board designed around the AC101 version.
The AC101 has two stereo inputs, one with differential mic preamps and one with single ended line-in. These are routed to MIC1N/MIC1P + MIC2N/MIC2P and LINEINL + LINEINR respectively on the A1S module and the names reflect those in the datasheet of the AC101.
However, the ES8388 only has two sets of single ended stereo inputs, LIN1 + RIN1 and LIN2 + RIN2. They can also be combined into two differential inputs consisting of LIN1/RIN1 and LIN2/RIN2, however that way you obviously only have one stereo input. When replacing the AC101 with the ES8388 they tried to keep it pin compatible (my best guess is to not have to get a new fcc id by selling it as the same thing), but the ES is just lacking inputs.
The MIC1N/MIC1P inputs are routed to LIN1/RIN1 and the MIC2N/MIC2P to RIN2/LIN2. The LINEINL/LINEINR inputs are routed to LIN2/RIN2, meaning they use the same pins as MIC2, thus you always get the signal of MIC2 when using line-in and it should be inverted on the right channel.
I’m not 100% sure if I got all the routing correct but it is certain that some mic inputs are internally connected with the line-in. If I am correct, the only way to fix this is taking MIC2 out of the circuit, simplest by removing the coupling caps C19 and C20, then you would be left with a working stereo line-in on LIN2/RIN2 and mono microphone on LIN1+RIN1.
Compare this the Lyrat board, which also uses the ES8388, but they use the microphones single ended on LIN1/RIN1 and line-in on LIN2/RIN2.

There is a similar hardware bug for the output, as the AC101 has a separate stereo headphone/line out and stereo differential speaker out while the ES8388 has only two stereo line outputs LOUT1/ROUT1 and LOUT2/ROUT2 (The wiring of the Lyrat board makes it look like LOUT1/2 and ROUT1/2 can be combined for differential output but i couldn’t find that in the datasheet). On the A1S LOUT1/ROUT1 are routed to SPOLN/SPORN and LOUT2/ROUT2 are routed to HPOUTL/LPOUTR, SPOLP and SPORP are internally open, which means the speaker amps on the board only get the inverted input. According to the datasheet it should still work but it’s not in ideal configuration.

from esp32_multitrack_looper.

marcel-licence avatar marcel-licence commented on May 23, 2024

I am not sure but it looked like that line in was somehow shorted with the microphones. Thank you for sharing!

from esp32_multitrack_looper.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.