Re: Which pcb layout is better for capacitor ?
Hi,
It depends.
If you want to filter a signal, then I'd prefer 1
But these are very thin wires...and with an SMPS you may expect high current peaks. Then every piece of (thin) wire adds ESR and L.
In picture 3 you show a second layer. If you have a second layer (and SMPS) ... I'd place the capacitor as close as possibke to the switching device and make both layers as "+" and "GND" planes.
Any electrical signal follows a path...a closed loop.
The DC path usually is less critical and needs to be cared about only because of trace power dissipation. But the AC (HF) path is more critical. If you don't care, then
* ringing may occur because of additional trace inductance
* EMI may be bad because the loop may act as transmitting antenna
* in filters the attenuation may be bad because of voltage drop across the traces.
Therefore it's a good idea to review the PCB layout by considering the HF loop(s).
Check
* loop trace length
* enclosed area
* trace width
Klaus