How to route addressable LED bypass capacitor with via-in-pad?
I am designing a PCB for an addressable LED matrix with the following design requirements:
1. Only LEDs may be placed on the top side of the PCB, other components such as bypass capacitors must be placed on the bottom side
2. No vias may be visible on the top surface of the PCB. Vias must be placed underneath the LEDs
The manufacturer offers via-in-pad for free, so I am not too concerned with additional cost. In any case, they are needed to meet the design requirements anyways. In this revision of my design the matrix is a module separate from the main microcontroller board, so I don't mind failing fast and taking some risks with my design. I am planning to make several variations of matrix for testing.
I came up with two possible design variations and attached examples of each. I have highlighted the bypass capacitor in the left led in each example to better demonstrate.
In the first variation the design is laid out so that the +5V pad of the led and one of the pads of the bypass capacitor overlap, with the capacitor on the opposite side of the board as the led. A via-in-pad connects these two pads. A via is also present in the center of the led, not in a pad but in the middle of the 4 led pads. This is the only via permitted by the DRC aside from the via-in-pads. A short trace connects the GND pad of the led to this via. Another short trace on the opposite side of the board connects the other pad of the capacitor to the GND via.
In the second variation, the grounds of the bypass capacitor and the led are separated. The capacitor retains a short trace to the via in the center of the led. A new via is placed in the ground pad of the led. This seems to better meet the layout guidelines I have read, but still "looks wrong" to me.
I have done some reading on bypass capacitor layout, and as I understand, it is preferable not to have the capacitor and component connected to the same via. However, I would like to minimize the amount of vias on the board if possible, especially those in pads. My design requirements are pretty stringent, so I believe a tradeoff will have to be made somewhere unfortunately.
What is the best way to handle this? Are either of my variations preferable, or is there another way to lay this out that I haven't thought of?