I2S, match the Lengths of PCB Traces. - Page 1
Forum section: electronics / general

author: luiHS
author_rank: Frequent Contributor
timestamp: December 21, 2023, 09:09:51 pm
content: HiI am designing some boards that use I2S, my question is whether it is necessary for the PCB tracks of these signals to all have the same length, whether or not to add meanders in the shorter tracks to equal the same length in all of them.I have applied the technique of adjusting the length of tracks on PCB using meanders with Eagle for MIPI or RAM memory access signals, since they are very fast, but it is the first time that I use I2S in a PCB design.

author: tszaboo
author_rank: Super Contributor
timestamp: December 21, 2023, 11:03:47 pm
content: I2S is a slow digital signal, and it is sampled half a clock cycle away from where it's changed. So no, you don't need to match the length.Signals like DDR memory needs it, because it has rules, like "this two signal needs to be within 10ps from each other".

author: SiliconWizard
author_rank: Super Contributor
timestamp: December 21, 2023, 11:53:01 pm
content: I2S is some variant of SPI at max a few MHz, matched lengths are not needed here. Really.

author: Siwastaja
author_rank: Super Contributor
timestamp: December 28, 2023, 07:30:52 am
content: Instead of hand-waving, put it in numbers. Decide the clock speed and calculate period. Because SPI/I2S samples at halfway, half of that period is available for settling. Add some safety margin, google "speed of electricity" and calculate the actual length difference you can handle.The fact it's "SPI" or "I2S" doesn't matter, let's put it in numbers instead of adjectives. I have done some length matching on SPI, because that SPI ran at 50MHz on a large board with many multiplexers. But sure, it's not about fraction of millimeters.

author: tszaboo
author_rank: Super Contributor
timestamp: December 28, 2023, 11:12:07 am
content: Quote from: Siwastaja on December 28, 2023, 07:30:52 amI2S can be anywhere between 16khz mono 16 bit, and 6 channel 24 bit 192khz. Probably even more. And the highest speeds are still even slower than to worry about length matching on the ps levels. I would argue, it would take a lot of deliberate effort to make it not work anymore. Jitter is a bigger issue for such audio signal.So what do you want us to calculate exactly?

author: ejeffrey
author_rank: Super Contributor
timestamp: December 28, 2023, 02:49:35 pm
content: I'm assuming that the clock and data lines will be run along the same general path, not something silly like running one clockwise and the other anticlockwise around a very large PCB, or running them in separate board to board cables. If that's the case then no, you don't have to worry about fine scale length matching. The timing margin is several nanoseconds or 10s of nanoseconds, which is at least meter propagation in a PCB.If you have very long traces and high data rates you might need to worry about termination. I2S does not require impedance control but with long traces reflections could be a problem. In that case series termination at the source is probably the easiest approach.

author: Siwastaja
author_rank: Super Contributor
timestamp: December 28, 2023, 04:54:46 pm
content: Quote from: tszaboo on December 28, 2023, 11:12:07 am... just... calculate something that is pretty easy to calculate, instead of always hand-waving. Like, I really and actually calculate series resistor for LED current limiting, instead of always slapping 470 ohms. Isn't this normal? Why is this a bad thing?I mean, we can babble "no need to length match I2S" until cows come home, but how close of not needing it we actually are? By doing a simple calculation, we can put these adjectives to numbers. It's called engineering.Example calculation:I2S clock = 12.288MHz -> period = 80nsAllow for 5% drift from optimal middle point sampling -> 4nsSpeed of electric signal in copper = 200M m/s200M m/s * 4ns = 800 millimetersLook, it took less time than writing a handwaving reply. If you never calculate this, how do you know how close or far you are?

author: tszaboo
author_rank: Super Contributor
timestamp: December 29, 2023, 08:14:44 pm
content: When you worked with these signals in the past, you have a very good ballpark estimates about them. I also gave a lower estimate for speeds when you have to worry about it. Not every question needs a wall of text to answer.

author: Siwastaja
author_rank: Super Contributor
timestamp: December 30, 2023, 08:52:42 am
content: Quote from: tszaboo on December 29, 2023, 08:14:44 pmAnd how do you think this experience is first gained? Should I just trust one random guy on the Internet saying something without giving zero proof, no numbers, nothing but fluff, when I can calculate it in 2 minutes and buildunderstandingwhich lasts for a lifetime?QuoteI mean, you have already written more wall of text to rationalize the avoidance of engineering, than the actual engineering job would have been. What a joke.

author: tszaboo
author_rank: Super Contributor
timestamp: December 30, 2023, 11:33:14 am
content: Quote from: Siwastaja on December 30, 2023, 08:52:42 amYou are being unreasonable, I don't know why, maybe forgot to take your meds. If that's the case, this is the reminder. Let's move on.

author: Psi
author_rank: Super Contributor
timestamp: December 30, 2023, 11:44:47 am
content: No real need to do it, but you could still do it just to learn how (if you've never done so before on a PCB).Also if this is a hobby/DIY project it's good to have PCBs to show others your PCB skills, like in job interviews etc...Ya never know, having an example of matched length traces to show someone might be the difference between getting a job and not getting it.

author: Siwastaja
author_rank: Super Contributor
timestamp: December 30, 2023, 11:45:04 am
content: I think the only unreasonable thing is to fight back so hard against such simple napkin calculation. They are normal practice in engineering for me and many others. You can choose to assume instead of calculation, but I'm surprised an engineering calculation gets so much backlash in an engineering forum, to the point of having to go ad hominem. What a weird place.

author: DavidAlfa
author_rank: Super Contributor
timestamp: December 30, 2023, 01:18:55 pm
content: Quote from: Siwastaja on December 28, 2023, 04:54:46 pmQuote from: tszaboo on December 29, 2023, 08:14:44 pmMaybe you're not very good at reading, do your eyes hurt with anything longer than single-worded answers?OP was overthinking, probably has little experience with layouts and high speed signals (Or he's too used to DDR routing and now got the habit).Guys telling "nah it's ok" doesn't show anything, people makes mistakes all the time so it could be wrong.He actually showed it with simple numbers and you laughted at him.Are you going to roast the next one calculating the resistor for a led?

author: luiHS
author_rank: Frequent Contributor
timestamp: December 30, 2023, 03:35:25 pm
content: Thanks for the answers and calculations, it is always interesting to understand why things happen. Until now I had only made track length adjustments in designs with MIPI signals and parallel RAM, as these are high speed.I had my doubts about I2S, for an audio design of a Raspberry and a TAS5805 amplifier. I have not used I2S before, I looked for information to configure the Raspberry and also for testing I bought a board with a TAS5713, so I could test everything before making my own board.What made me doubt the need to adjust the length of tracks with I2S is that this board that I bought already assembled with the TAS5713 does have meanders for signal adjustment and they seem to come from the I2S lines of the Raspberry connector to the TAS5713, quite short tracks given the size of the board. I attach images of the board.

author: DavidAlfa
author_rank: Super Contributor
timestamp: December 30, 2023, 05:06:22 pm
content: It won't cause any harm, but the end result will be the same, thus causing extra effort for nothing.