I am currently designing a 2-layer PCB with a microcontroller and DAC over I2C at 100kHz. Can I route the I2C lines through vias in a 2-layer PCB?
Definitely. You don’t mention what else is on the board, but if you follow the standard routing guidelines (like don’t route it through your switching regulator) you should be fine!
Yes, typically, routing a 100 kHz signal like I2C is quite forgiving. Ensure that both the SDA and SCL lines are routed similarly and kept close together to minimize potential issues.
Also, consider the I2C total capacitance limit of 400 pF, especially if the traces are exceptionally long. Exceeding this limit could lead to potential issues.
It shouldn’t be an issue. We’ve been using Vias on I2C running up to 500 kHz without problems.
The only trouble we’ve encountered was due to a faulty via, which introduced a series resistance in the I2C line. This significantly impacted the board’s slew rate, causing I2C communication failure. However, this was observed only on a prototype board and has not occurred on any production boards thus far.
At I2C frequencies, routing through vias won’t cause you any significant problems in terms of resistance, capacitance, or inductance. However, when using a 2-layer PCB, it’s important to manage your ground and signal routing systematically to avoid creating issues with signal integrity. A common mistake is to start with a dedicated ground layer, only to cut it up by adding signal traces. This can result in a poorly performing ground that’s hard to repair later. Instead, consider a more structured approach:
One option is to use a ‘Manhattan’ style of routing, with horizontal traces on one layer and vertical traces on the other. You can also create a gridded ground by placing parallel tracks every 10mm or so and using vias at each intersection. This maintains good ground continuity without compromising performance at I2C speeds. Alternatively, you could maintain a full ground plane, but ensure that you don’t cut into it by using your signal layer for most of your traces. If necessary, cross signals by routing under components or using ‘zero ohm’ jumpers to avoid breaking the ground plane.