Switching Power Supply PCB: Layout Rules That Work
Why the Layout Decides the Supply
A switching supply is a schematic that almost never works as drawn. The circuit is simple, an inductor, a switch, a diode or a synchronous rectifier, a controller and a handful of capacitors, but the currents are large, they change direction in nanoseconds, and the wires between the components are not wires at all. They are inductance and resistance, and at the frequencies involved they dominate the behaviour.
The result is that two boards with the same bill of materials can differ by tens of millivolts of ripple, by tens of degrees of temperature rise and by a large margin on an electromagnetic compatibility test. The layout is the design.
The Critical Loops
Every switching topology has one or more loops in which the current changes abruptly. In a step down converter the input loop, formed by the input capacitor, the high side switch and the return to the capacitor, is the most important, because the current in it is chopped at the switching frequency. The output loop, formed by the inductor, the output capacitor and the load, carries a smoother current but still matters.
The rule is to minimise the area of every high di/dt loop. The input capacitor belongs immediately at the switch and the ground pin of the driver, not at the edge of the board, and the loop should be short, wide and, where the current is large, doubled on both sides of the board. Every millimetre of extra loop length adds inductance, and that inductance produces the voltage spike that stresses the switch and radiates the noise that fails the EMC test.
The switching node is the other object of attention. It is a small copper area that swings between the input voltage and ground at the switching frequency, and it is a good antenna. Keep the copper pad at the node as small as the thermal and current requirements allow, keep it away from the feedback network and the control signals, and do not run any other trace alongside it.
Grounding
A switching supply has three kinds of current in its ground: the large, pulsing current of the power stage, the small signal current of the controller and the feedback divider, and the return current of the load. They must not share a path.
The usual approach is a local power ground plane under the power stage, a separate quiet ground for the controller and the feedback network, and a single connection between them at the point where the controller senses the output. A four layer board makes this straightforward, because the power ground can be a large copper area on the top layer and the quiet ground can be part of the plane below. On a two layer board the discipline has to be maintained by routing, which is why current mode controllers with their own internal ramp are often preferred in cost sensitive designs.
The feedback divider is the most sensitive node on the board. Its ground must be the quiet ground, its sense point must be taken at the output capacitor terminals rather than somewhere along a trace, and the divider should be placed close to the controller.

Component Placement
The placement order follows the current. The input connector and its filter come first, then the input capacitor and the power stage, then the inductor and the output capacitors, then the load connector. The controller sits close to the devices it drives but outside the hot loop, and the feedback network sits at the output sense point with its own connection back to the controller.
The current sense element deserves particular attention. A sense resistor on the source of the switch carries a fast, noisy waveform, so the sense connection should be Kelvin, taken from the inside of the resistor pads, and routed as a tight differential pair back to the controller, away from the switch node. A sense trace that picks up a fraction of the switching edge turns a clean current limit into an unstable one.
The bootstrap capacitor, the gate resistors and the compensation network all belong within a few millimetres of their pins. A component placed at the wrong end of the board is not a component, it is a stub.
Thermal Design
The conduction losses are in the switch, the inductor and the copper. The layout answers them with copper area, and copper area on the top layer is more effective than copper buried inside the board. The switch and the diode or the synchronous rectifier should sit on a copper pad sized for the dissipation and connected to the plane below with a dense array of thermal vias, because the plane is the heatsink and the vias are the thermal path.
The inductor should be placed away from the controller and from the temperature sensitive components, and its own copper should be sized for the RMS current rather than the average. On a supply above a few watts, the thermal design and the electrical layout are the same exercise, because the copper that carries the current is also the copper that spreads the heat.
Electromagnetic Compatibility
The design controls its own emissions through the loop area, the switching speed and the filtering. Once the loops are tight, the remaining measures are an RC or RCD snubber across the switch to damp the ringing at the node, a small capacitor across the rectifier, and an input filter that keeps the switching current out of the supply cable, because the cable is the antenna that radiates it.
Where the product is isolated, the transformer and the opto-coupler create a barrier, and the Y capacitor that bridges it has to be placed so that the return current it carries does not travel through the control section. Shield windings, a grounded copper plane under the transformer and a defined barrier gap in the board all reduce the common mode noise that otherwise appears on the output.
Creepage and Clearance for Mains Supplies
A mains connected supply has requirements that the low voltage design does not. The distance between the live and neutral conductors and anything a user can touch is fixed by the safety standard, and it includes not only the board surface but also the gap through slots, under the transformer and around the opto-coupler. Copper has to be pulled back from the board edge, the barrier has to be continuous, and the isolation component has to have the right rating rather than being chosen for its pin pitch.
The spacing also has to survive the voltage transients the standard defines, which is why a slot in the board or a silicone fill is sometimes used where the required distance cannot be met by routing alone. Our notes on PCB design and layout cover these layout rules in more detail.

Layer Stack and Copper Weight
A two layer board can carry a modest, non isolated supply if the loops are kept small, but the ground return has to be routed deliberately and the thermal path is limited. A four layer board with a ground plane and a power plane is the practical minimum for a high current or a mains connected design, and it gives the control ground somewhere quiet to live.
Copper weight follows the current. Two ounces on the power layers is common for a supply above a few amps, and a heavy copper board is justified when the current is high enough that the resistive loss and the local heating become the limit. The laminate itself is normally standard FR-4 with a high glass transition temperature where the board runs warm. Our notes on PCB manufacturing describe how the copper weight and the stack are produced.
Bring Up and Test
A new supply should be brought up with the switching disabled, so that the control circuit and the feedback divider can be checked without any power in the switch. The first switching test is done at a reduced input voltage with a current limited supply, and the waveforms at the switch node, the inductor and the output are checked with a properly grounded probe.
The functional test on a production board covers the output voltage across the load range, the ripple, the efficiency, the current limit, the start up behaviour and the thermal performance at full load. A supply that is quiet at half load and unstable at full load has not passed. Our PCB assembly group builds these boards, and our notes on PCBA testing describe how the checks are structured.
FAQ
What is the single most important layout rule? Minimise the area of the input, or hot, loop. It sets the noise, the stress on the switch and the emissions more than anything else on the board.
How many layers does a switching supply need? Two layers can work for a low current, non isolated design. Four layers with a ground plane is the practical minimum for a high current or mains connected supply.
Where should the feedback divider sense the output? At the output capacitor terminals, with a trace that runs back to the controller away from the switch node and the inductor.
Why does the sense resistor need a Kelvin connection? Because the main current path has a voltage drop and switching noise on it. Sensing inside the pads removes both from the measurement.
Can a snubber fix a badly laid out supply? It can damp the ringing and reduce the emissions, but it does not remove the loop inductance that caused the problem, and it costs efficiency. It is a remedy, not a substitute for the layout.
Conclusion
A switching power supply PCB is a power circuit disguised as a control circuit. Keep the hot loops small, give the power stage and the control section separate grounds that meet at one point, place every component where its pin needs it, provide a real thermal path from the switch into the plane, and respect the isolation distances. A supply built that way is quiet, cool and stable, and it passes the EMC test without a redesign. Our notes on quality management describe how the process is controlled in production.



