Ground Questions

Hi,

I’m working on a pretty complex layout, and it’s basically my first time doing something like this, any suggestions would be much appreciated. I know it looks a bit messy, but I really tried my best.

My biggest concern right now is the ground connections. What would be the best practice to ensure a good ground flow? Is it okay to add some tracks with vias into the middle of the board(haven`t fully finished yet), like I did in this picture? Or would it be better to connect all ground pins together directly?

I also came across something called “star grounding”, but I read that it might not be ideal, since interference from one component could affect others when everything is routed through a single point.

What would you recommend as the best grounding strategy in my case?

Thanks a lot!

Maybe a little explanation, the 2x40pin header on top are connected to a raspberry pi and another device. Everything comes through the 2x40pin headers. So I guess that`s where ground mainly has to flow back.



You can add a ground filled zone to the bottom and/or top copper layer.

image

oh yea I did that. Maybe I should add those pictures. but its still hard to see if some ground pins will be blocked or will have a too long distance to travel

Looks like there are plenty of ground connections. All the through hole connections to ground should be enough unless you have some specific requirements with lots of high frequency connections which it doesn’t look like.

Yea, there is basically one light matrix with about 100 LED lights connected, which causes the most connections, rest is buttons and endless encoders, and 3 potentiometer

I am designing all 2 layer boards with one layer 100% destined to GND to have continuous GND plane ensuring the best return current path for each current.
My example of such PCB:

For your PCB I would strongly reccomend switching to 4 layer PCB with both internal layers being GND or one GND and second VCC.

Hey Piotr.

This link is very helpful. Thank you so much.
I was planning to avoid using a 4-layer PCB, since that’s probably a whole other level I’d have to learn about, and I assume it’s also fairly expensive?

Looking at my layout, what would make you suggest going with 4 layers?
Or maybe the better question is: what fixes would you recommend as a minimum if I want to stick with 2 layers?

You’re basically saying that when using a 2-layer board, you don’t route anything on the back layer so you can keep it as a solid ground plane, is that right?

I guess you are right. It seems like a 4 layer is the safer option. Maybe more expensive, but probably worth it and no surprises, and at least there won’t be any surprises with ground.

Note, @Piotr is using SMD not THT as your project shows.

I turned the board into a 4-layer PCB: the 2nd layer is for power, and the 3rd layer is for ground. I filled both layers across the entire board.

I can’t seem to solve one issue though. For some components, the pad color doesn’t change to the expected power or ground color, it just stays red (top layer), or when I check the bottom layer, it turns blue.
This only happens with certain components, and I’m not sure if it’s because I placed them on the backside of the PCB ( they’re flipped).

The “green arrow in the picture” shows how I would expect a ground pin to appear. The “red arrow” shows the issue I’m having on some components.

KiCad also still asks me to connect all the power and ground pins manually, but I thought that shouldn’t be necessary if I’ve filled one layer entirely with power and another with ground?

I am having the same issue with the power layer:

You need to spend some time in the Pad Properties to see what is available to Edit/Change. Double Left click or hover then Hotkey E on a pad and up will show the below:

THT pads are on all layers if Copper Layers is set to All (cyan arrow). Open the list available and select the layers you want the pads (watch the green symbol change).
If you want different pads on different layers, see the yellow box.
If you decide to change some individual pads, it is a good idea to tick only “Pads” (untick the rest) in the Selection Filter (magenta arrow) otherwise it can be difficult to select only a pad in a footprint.

If you want to change many/all pads in a footprint, this needs to be done in the Footprint Editor where you have the ability to “Push pad properties to other pads” (hotkey E on the pad in the Footprint Editor then see list).

Finally, take note that there are three pages of Pad Properties: General, Connections & Clearance Overrides.

Happy experimenting.

Hey jmk. Thank you very much for your help.

I checked that already and its set to all copper layer, the settings are identical to the one with the green arrow.

Edit: I figured it out. A simple restart fixed this issue. I have no idea why though :roll_eyes:

Hi, my point was maybe not to leave the “All copper Layers” selected.
If you use, say, “Connected layers only”, you will find the below is shown:

The pads are now only on their connected layer. You will notice there is a fine red circle in the pad. This shows that the layer currently selected is the Front Layer. If I changer the layer to Back, all those red circles will change to blue, or Int2, will give orange circles but all the pads will remain their current color.

Oh I see. I was wondering about this.
Lets say I have GROUND selected, in theory pins like SDA or 3.3V PWR shouldn’t be orange. Does it cause issues if I design the board this way? Or is it mainly just for better visualisation? Also would I need to set Vias to “connected layers only” as well?
So basically I should set everything to connected Layers only?

With the GND planes on both sides, your PCB looks mostly OK-ish, because each footprint has a GND pin that stitches them together. But there are a few quite long sections of copper on the GND plane that are free floating, and that is not ideal. I recommend you add some extra stitching via’s to connect the GND plans together to remove those long sections that are only connected on one side. Something like in the screenshot below (I put some green dots as indications for via locations).

image

But for a keyboard design like this it’s not a huge issue, especially when the signal lines are slew-rate limited (And they should be).

Also, long rows of via’s are not ideal, as they create gaps in the GND planes. Avoid doing things like:
image

And you should also add a GND via close to where the signal changes the reference GND from the top layer to the bottom (or vise versa).

Also, long parallel tracks create a relatively strong coupling and thus also crosstalk between signal lines. A very simple way to reduce this is to change the signal order when changing layers. For example, if you number the red horizontal wires 1, 2, 3, 4, 5, 7, 8 from top to bottom, then use something like 1, 4, 7, 2, 5, 8, 3, 6 for the vertical blue tracks, and change the order to something different yet again when the tracks go to the front layer again. The idea is that a bit of coupling is harmless, but strong coupling can induce errors.

And last: Your via’s look very small, and this is a production issue. Thin drills break easily and thus have to be drilled slower. Often PCB manufacturers charge extra for very small (micro) via’s.

Hey paulvdh.

Thank you so much for your help and recommendation. If I use a 4 layer pcb I should probably avoid most of those issues? I might still fix it for 2 layer pcb though. Not sure what’s best yet.

About the vias. I have a via diameter of 0.6mm and a via hole of 0.3mm. I thought that would be quite standard, or is that too small?

I had a quick peek at the recommendations of PCB way:

Your annular ring width is now (0.6-0.3)/2 = 0.15mm and that is the minimum specified at the PCBway website. I’d rather go with 0.2mm, so that would be an outer diameter of 0.7mm.

4-layer PCB’s are easier to design, but are also more expensive (especially for prototypes, for batches >100 the price difference is relatively smaller). Some PCB designers always use 4-layer PCB’s because they find their own time more valuable then the PCB cost. But this PCB is still very easy to do on two layers. I would stay with 2 layers, but it’s your project, your choice.

Thank you so much, really appreciate your help. I’ll change the diameter to 0.7 mm, shouldn`t be hopefully a big issue and I am more on the safer side

At my PCBs (like the example I show) all vias are GND vias. Whenever possible I use 0.9/0.5 via. If there is no room I use 0.8/0.4. When at the end of design I just randomly add some vias at big top and bottom GND areas I use 1/0.6.
This example is several years old PCB and there are probably even bigger vias.
Vias with 0.3mm hole I use only at ICs thermal pads.
My conservative approach come from 80s when it happened (here) that via could have no connection or could lost it in few months. The bigger hole the less chance of problems.
When recently I asked my contract manufacturer (very small company) if I could use 0.25mm hole in vias (at thermal pad of very small IC) the answer was “Better not do that.”

Designing 4 layer is much simpler than 2 layer.
With 2 layer I assume I need not to route GND so I hide GND connection lines when trying to find element positions that will allow me to route everything at top.
With 4 layer (I started to use it recently) I assume that except no problems with GND I will also use bottom layer for all supply connections (I use both inner layers for GND). Having no supply at top helps me a lot.

Whatever you will do you will have GND consisting of lot small areas. Giving a return current chance to go along signal current reduces PCB emissions and sensitivity. It was not important in 80s, but is very important nowadays. Even ICs with the same symbol as manufactured in 80s can now have 10 times shorter slopes (die shrinking reduces costs but also internal capacitances). And about sensitivity. Now each of us have very strong source of high frequency disturbance - try to put cell-phone just on your working pcb and call someone.
You can read more here:

Exactly. But the reason is to let return current travel just along signal track. Return currents (I’m not interested in DC) not travel the shorter way but they prefer to go just under track and allowing for it reduces the area surrounded by current and field emission (reception) is proportional to this area.

From the post just before Paul entered:
Copper layers is set as “All copper layers” Default for THT pads, but select whatever you wish.

If I was looking for as large as possible Ground Plane on an internal layer, I would not have unconnected pads on the Gnd. Plane internal layer. Same goes for Vias.