Advanced PCB Design

This article is copied from a document here.

By Chris Uustal - 6/30/22

### Purpose

The purpose of this article is to explain some more advanced considerations or recommendations when designing more complex PCBs.

### Multi-Layer PCBs

Most people start out with a 2-layer PCB, and that’s perfectly sufficient for most applications. However, PCBs can come in any number of layers, usually with the conductive layers coming in multiples of 2 (eg. 2, 4, 6, 8, etc.).

The general recommendation is to use the minimum number of layers necessary to be able to complete the design while following good design principles with a moderate level of effort. Eg. if a PCB could probably be designed feasibly with a 2 layer board but would be a lot easier and better quality with a 4 layer board, then you should probably use a 4 layer board. I highly doubt anyone reading this will ever have to design more than a 6 layer PCB since anything higher usually is only necessary with highly dense PCB designs, frequently using BGA (ball grid array) components or HDIs (high density interconnects), neither of which we use due to manufacturing cost and difficulty to modify.

PCBs also get significantly more expensive as you add more layers, so if you’re really concerned about keeping cost low, sticking to a really complicated 2 layer board might be your best bet.

##### Plane Considerations

2 layer PCBs don’t offer much in the way of flexibility, so the general best practice is just to have a power plane on one layer and a ground plane on the other, then run whatever traces are necessary to make the board function. It’s generally best practice to avoid cutting up the power and ground planes as much as possible, but pay particular attention to any sources or sinks of high current that may be restricted by a very thin connection in the plane somewhere.

4 layer PCBs greatly increase our flexibility and generally should follow the structure of a signal plane on the top and bottom with a power and ground plane on the middle two layers. These planes on the middle layers act as shields for the negative effects that can come from high speed or high current signals. Generally here it’s also a very common practice to just place vias wherever necessary to provide power and ground to components. Signals can still be routed on these middle layers if necessary, but it’s generally recommended to try to avoid cutting into these middle layers significantly.

6 layer PCBs are the most common and generally meet the vast majority of complex PCB needs. Their recommended structure is signals on layers 1, 3, 4, 6 and power/ground on layers 2, 5. The planes on layers 2 and 5 protect 1, 3 and 4, 6 from affecting each other negatively. To avoid these effects between layers 3 and 4, it’s best practice to run all signals on layer 3 to be perpendicular to all the signals on layer 4. For example, let’s say all the signals on layer 3 are running vertically, then all the signals on layer 4 should run horizontally. This minimizes cross talking between the signals due to electromagnetic fields having minimal effects on each other at 90 degrees. Layers 1 and 6 are not limited by these vertical/horizontal limitations since they are shielded by 2 and 5. In these designs, no signals should ever be routed on the 2, 5 plane layers due to the significant importance of the shielding they are providing. Also, if you are finding yourself crowded for space in a 6 layer board such that you feel you need to use layers 2 and 5 then, first of all, congrats for designing a super complicated board, and second of all, you should probably move to an 8+ layer board where this scheme of signal/plane/signal/plane continues.

### High Speed Signals

Basically, the faster and more prone to noise a signal is, try to make the traces as short and direct as possible.

For signals in the same protocol (eg. I2C, SPI), try to generally make the trace lengths as similar as possible to avoid the delay signals take to propagate through the length of the trace too different. If the traces are wildly different lengths, the rest of the system will perceive the signals as being skewed from each other which may cause errors or degraded performance.

Avoid running different high speed signals near each other. This can generate a lot of “cross talk” (basically the magnetic fields generated by the changing signals interfere with each other and make the signals funky). If they need to cross over each other, then do it at a right angle as briefly as possible.

Also avoid placing high speed signals near very high current traces as the magnetic fields they generate can sometimes affect the performance of the signals.

### High Density Interconnects (HDIs)

HDIs are vias that don’t go all the way through the PCB. Here are a few types below:

They’re super useful if you have a PCB that doesn’t have the space to let you do layers every time. The main issue with HDIs is that they’re super fucking expensive. Basically, they will nearly 10x increase the cost of your PCB if you even have one HDI, so basically stick to through hole vias if at all possible. Basically the same recommendation as the 8+ layer boards: you probably won’t need to do it in your time on the team, so don’t worry about it. If you do need it, then it’s probably for a project that’s important enough that budget isn’t really an issue. Super useful for chips that are BGA.

### Ball Grid Array (BGA)

Should you use it? Probably not. They are a pain in the ass to service. What is it? This:

Those are literal balls of solder that it uses to make electrical contact--hence “ball” grid array. They’re great for systems that have surface area at an absolute premium since they can get you way more contacts with the same surface area as the equivalent QFL package. However, since all the solder joints are hidden on the bottom side of the package, you have no way of checking if any of them are shorted without a super fancy x-ray machine--big pain. Also, most of those connections are super close together such that most cheap PCB manufacturers usually don’t even support manufacturing with BGA components since the contact pads are smaller than their tolerances when you consider you actually have to run traces to these pads to make contact in the first place.