Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MCLK signal. Can it be added? #140

Open
mirek76 opened this issue Jan 30, 2025 · 7 comments
Open

MCLK signal. Can it be added? #140

mirek76 opened this issue Jan 30, 2025 · 7 comments

Comments

@mirek76
Copy link

mirek76 commented Jan 30, 2025

Hello

I have this DAC model WM8805

Image

Can I add MCLK signal to make it work?

@trip5
Copy link
Contributor

trip5 commented Jan 30, 2025

Have you tried just tying it to ground? The PCM5102A has an SCK pin (probably the same... clock) and that's what it needs and works fine. If I recall, that just makes it use the default clock speed.

@mirek76
Copy link
Author

mirek76 commented Jan 30, 2025

Okay, I'll check it out

@mirek76
Copy link
Author

mirek76 commented Jan 30, 2025

Unfortunately, in my case it causes a short circuit.

@trip5
Copy link
Contributor

trip5 commented Jan 30, 2025

I did some searching around for WM8805. Most seem made for Raspberry Pi or... Cars? It seems to require 5V input... I'm wondering if the board's logic is also 5V, which can be a problem with ESP32s especially since logic shifters may not be able to be quick enough to keep up with audio decoding. If you have any spec sheets or more info, it would make it easier for folks to help you.

To be honest, I can't find anything about your particular board at all, except that it's 3-4x the price of the cheaper and smaller PCM5102A: https://www.aliexpress.com/item/1005007975998215.html

But I notice this board also has resistor settings instead of jumpers. You may need to change these... not sure what resistors are currently on your board. No one seems to have used your board in any Arduino project. But I'd guess you need 16 bit settings?

Here's the smaller, cheaper, confirmed working PCM5102A... By the way, notice the jumpers change how the board acts. The jumpers as shown are all confirmed working in typical ESP projects like yoradio:

Image

@mirek76
Copy link
Author

mirek76 commented Feb 1, 2025

Regarding the DAC selection, I wanted an S/PDIF output.
You are right, the board is configured with a combination of resistors.

Image

It works without any problems with the ESP32-MiniWebRadio project, unfortunately I don't know how to make the module work with yoradio

@trip5
Copy link
Contributor

trip5 commented Feb 1, 2025

I took a look over there for you and I see that project even uses the same spec I have (maybe I got it from there?):
image

They also have this pic:
image

Just like the first, only 3 pins are connected to the ESP32 and one is instead attached to 5V? Which means on this one MCLK is fulfilling the clock function while on the other it is LRCK. I did some more searching for you to see if I could find some wiring with the WM8805 and I did find this:

Image

Which I thought at first, once again, you only need 3 wires to put Data In (DOUT would be unused)

From here: http://rcl-radio.ru/?p=90769

I'm really wondered what got you using this as a DAC. It seems to be a transceiver - used more for encoding audio data rather than decoding it...! In any case, I'd recommend trying MCLK to something that keeps it high. Actually if you used it successfully with an ESP32 before, chances are that pin needs 3.3V logic. You know, most ESP pins are actually left high if unspecified? You could trying attaching it GPIO0 and see if it works. Try EN pin. Try just 3V3. If any or all work, test for things that might make it not work. Especially test sleep / bootup if on GPIO 0 or EN. I think 3V3 might be best though.

@Ryszard-wpl
Copy link

Ryszard-wpl commented Feb 22, 2025

I think there is need to add MCLK in setpinout in
player.cpp ? (not sure but yoRadio is base on Wolle library)
.....
setPinout(BCLK, LRC, DOUT, DIN) and add 4-th line for MCLK
setPinout(BCLK, LRC, DOUT, DIN, I2S_MCLK)

then we need to declare pin we need:
#define I2S_MCLK 0 // PIN zero like Wolle declare

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants