Schematic review needed for Teensy4.1 + WM8731 audio codec

jowell88

Member
Hi ! :)

I’m designing a synth and I need some help for reviewing my schematic before starting the layout.

The things I’m not really sure about are :

Is the CODEC compatible ?

I’m not using any inputs (neither MIC nor LINEIN), only line out and headphone out, but the “AudioOutputI2S” object does not shows the WM8731 as a compatible CODEC chip, but it does with the “AudioInputI2S”. I think there is no problem but... I ask anyway.

Are my I2S connections OK ?

Pin 1 (MCLK) CODEC > PIN 23 (MLCLK1) Teensy
Pin 7 (BCLK) CODEC > PIN 21 (BCLK1) Teensy
PIN 9 (DACLRC) & 11 (ADCLRC) CODEC > PIN 20 (LRCLK1) Teensy
PIN 8 (DACDAT) CODEC > PIN 7 (RX2) Teensy
Pin 10 (ADCDAT) CODEC >PIN 8 (TX2) Teensy

I’m not using any audio inputs, so do I need to connect ADCLRC and ADCDAT ?

Do I have to connect the analog inputs I’m not using to ground as I did ?

About the 33R resistors

I based my design on the “TGA Pro” from Blackaddr who is using 33R resistors on several lines, but I don’t really know why he did this. I know this codec is really sensitive to ringing so I thought it is to prevent this but I don’t really know. MIKROE did the same with 27R resistors, but the datasheet does not mention this at all.

Last question, this one related to the layout

For the first time I want to layout a 4 layers board, with ground plane and power plans as inner layers. But I don’t understand one thing : a rule is to place decoupling capacitors close from IC’s power pin, but if there is no trace between them but a power plan (with the cap connected to the plan through a via), will the current goes straight from the cap to the IC's power pin ? When I try to figure it out I don’t understand, physically, why the current will go straight from pin to pin and why it will not find another path through the power plane as soon as there is no concrete trace connecting the two pins. I know that current always find the shortest path but I don’t know… it is like all the power signals will be mixed in a kind of “clusterfuck”. Same question goes with other power lines, not only decoupling caps and IC’s power pin.
 

Attachments

  • X6_WM8731_V1.pdf
    685 KB · Views: 115
Is the CODEC compatible ?

I’m not using any inputs (neither MIC nor LINEIN), only line out and headphone out, but the “AudioOutputI2S” object does not shows the WM8731 as a compatible CODEC chip, but it does with the “AudioInputI2S”. I think there is no problem but... I ask anyway.

Yes, it is compatible with the AudioOutputI2S object

Are my I2S connections OK ?

Pin 1 (MCLK) CODEC > PIN 23 (MLCLK1) Teensy
Pin 7 (BCLK) CODEC > PIN 21 (BCLK1) Teensy
PIN 9 (DACLRC) & 11 (ADCLRC) CODEC > PIN 20 (LRCLK1) Teensy
PIN 8 (DACDAT) CODEC > PIN 7 (RX2) Teensy
Pin 10 (ADCDAT) CODEC >PIN 8 (TX2) Teensy

They look fine

I’m not using any audio inputs, so do I need to connect ADCLRC and ADCDAT ?
I've alway connected them, can't imagine not connecting will be a problem but I've not tried that, perhaps someone with more experience and knowledge of I2S will answer or just connect them up.

Do I have to connect the analog inputs I’m not using to ground as I did ?

That is fine.

About the 33R resistors

I've always used R33s on these connections, not certain of purpose

Cheers, Paul
 
Small value series resistors damp ringing on high speed logic signals - a logic trace has inductance, a logic input
has capacitance, which forms a resonant circuit unless some resistance damps this it tends to ring on every edge
47 or 68 ohms is more commonly seen in my experience. These series resistances can also reduce EMI generation
by slew-limiting the logic waveforms, and this in turn can mean less risk of cross-talk between neighbouring signal
traces.

Accurately diagnosing this on a board requires a high bandwidth 'scope and the correct probe tips (very low inductance).

I've always used R33s on these connections
R33 means 0.33 ohms, its 33R for 33 ohms. The use of k, R, M etc in this context is as a replacement for the decimal
point.

This convention is often used in printing on components as a silk-screened decimal point can easily get scratched off components
as they are processed on the production line, whereas a whole letter is more likely to survive either intact or sufficiently
present to disambiguate the value.
 
R33 means 0.33 ohms, its 33R for 33 ohms. The use of k, R, M etc in this context is as a replacement for the decimal
point.

This convention is often used in printing on components as a silk-screened decimal point can easily get scratched off components
as they are processed on the production line, whereas a whole letter is more likely to survive either intact or sufficiently
present to disambiguate the value.

This is indeed an old convention, but not everyone follows it, especially people casually writing comments on the internet.
 
Indeed but they might like to get the right value resistors when they order them, and not realizing R33 != 33R puts them at
risk of that :)
 
Accurately diagnosing this on a board requires a high bandwidth 'scope and the correct probe tips (very low inductance).

So my 30MHz Digilent Analog Discovery 2 USB oscilloscope is totally useless for this ? I wanted to try different resistor values by soldering and desoldering until I get a good trace (no ringing, no overshoot, no undershoot).

Another question : I didn't connect CLKOUT as I will use the codec in slave mode. Is it OK ?

Last question : Do I place the serie resistor near the CODEC, the Teensy, or it makes absolutely no difference ?
 
Yes, 30MHz is no use for analyzing logic edges (which transition in a few nanoseconds). In fact most standard cheap 'scope probes aren't fast enough anyway and specialized probery is required.
 
Hey ! The board is working :). I add some stuff to the original schematic.

Now I have the codec, 24 pots + 1 for volume control, 1 rotary encoder for the menu, a ILI9341 display, line out and headphone, midi in, thru and out. The Teensy and the display are mounted on socket so it can be plug and unplugged.

Every SMD were assembled by JLCPCB excepted for the LDO. When I did the BOM it was in stock, and was not anymore when the layout was finished and ready for production... so I bought it on Mouser and soldered it by hand.

For now I tested the codec (line out and headphone), all the pots (there are 2 mux to manage them), the rotary encoder, the screen and touch and the midi in. I was so happy it all worked really good that I stopped the tests and started coding ^^. I still have to test midi thru and out and take some measurement. I put test points for bus lines and clocks. And I have to measure SNR. Also I made it compatible with Teensy 4.1 and 4.0 but I didn't test with the 4.0 yet.

I will share the schematic and the layout files (EAGLE PCB) as soon as all the tests are done.
 

Attachments

  • 20220515_012400.jpg
    20220515_012400.jpg
    81.4 KB · Views: 66
Hi @jowell88 how is your project going?
I'm currently designing my own synth, and I'm curious on how your experience with the WM8731 audio codec is?
And also wondering if you would like to share your latest schematics and layout files?
 
Hi @jowell88 how is your project going?
I'm currently designing my own synth, and I'm curious on how your experience with the WM8731 audio codec is?
And also wondering if you would like to share your latest schematics and layout files?

Hi,

I've had no issues with the codec so I suppose the codec, schematic and layout are ok.

For the files try this link

For now I don't use the board I'm working on something else.

Have you already started designing your synth or you are in the brainstorming phase ?
 
Back
Top