Need help desining ground traces/zones in PCB

Hi
I'm a hobbyist and don't have formal electronics training. I'm trying to design a simple PCB for my ESP8266 smart lights project. It's mainly power routing + decoupling capacitors + some filters + an opto coupler + a buzzer.

Regarding the PCB design I've read that when connecting components to GND you should go for a "star" design. So that:

1- There won't be any loops like this:

2- The GND from one IC doesn't go to the GND of another because this can create noise.

So I designed my PCB like this (I tried as much as I could manage to connect each component to GND via a separate route):

Trace colors explained:
Red: Signal
Cyan: 3v3
Yellow: 5v
Orange: GND

But I've heard that in multi-layer PCBs they have a whole layer dedicated to ground. Which means you can ground anything with a via and also it helps prevent EMI. Also in single layer PCBs I think the equivalent are ground "zones". Where you basically cover most of the empty spaces of the PCB with ground.

Now what I don't understand is, how come signals don't interfere in this ground zone or ground layer?
Imagine the first image. If the rectangle was filled with copper it would create a ground zone. Would this somehow eliminate the loop? Because to me it looks like a zone means infinite connections and hence infinite loops.

Concerning my own PCB, if I replace most ground traces with a ground zone like this:

Doesn't this basically connect all the grounds together and violate the "star" design?
Which design should I go for? First one or second one?

In a standard double layer PCB it's quite normal to use one side for a ground plane and the other side for a power plane.
Route the rest of the connections normally.

Are you using your EPS on a breakout board? Why not simply solder it onto the board? The 2 mm pitch is really easy to hand solder. Just remember to have no copper under the antenna! (no traces, no plane).

For digital and RF electronics star grounding is wrong, groundplane is right.

Only sensitive analog circuitry needs star-grounding, which is basically separating current paths so that IR
voltages on the traces don't invade a more sensitive part of the circuit.

To avoid inductive pick up the loop area must be minimal, star-grounding or not(*). Groundplanes are a
great way to do this, and they have the low-inductance desirable at high speed (logic, RF), resistance is
pretty much irrelevant compared to stray inductance for fast stuff, groundplane is lowest inductance.

(*) This means route ground-returns next to the outgoing current paths.

These are mostly just guidelines and ideal-goals and sometimes you have to violate or "fudge" the rules (and often it's not that critical).

Most ground-loop issues happen with the wiring between boards or between devices, etc.

You are more-likely to have an open, short, or other wrong/missing connection or a mechanical/dimensional problem on your 1st pass. :wink: Focus on getting the CONNECTIONS right!

I've worked in electronics a LONG time (not designing PCBs) and I think I've seen a "Rev 0" board come-out perfect ONE TIME! Usually there are "cuts & jumps" to make it work and those boards may not be sold to customers. And sometimes the first boards just have to be scrapped. I'm working on a "Rev 2" board now. (It is a rather old board/product and some changes may have been done for "other reasons", not necessarily because the board didn't work.) But the first prototype run would have used a different numbering system. The first production release would have been Rev 0, so this is the 3rd version after one or more prototypes.

...And, I've seen some disasters where the whole data bus (or address bus, I don't remember) got left-off of the layout! That's funny when it happens to someone else because they are put in a big rush! :smiling_imp: I think the company paid a rush-expedite fee to get the boards soldered & assembled in one day before they discovered the problem... When I worked at that (disorganized) company I used to always say sarcastically, "How could THAT happen?" :smiling_imp:

So... Be emotionally & financially prepared to revise the board, and leave time in your schedule (if you have a schedule/deadline).


Most of the boards where I work are 4-layer (with internal power & ground planes). Often there is more than one positive voltage so the voltage-layer is "shared". They are mostly more complicated than yours (and more complicated than anything I've ever done as a hobby) but they are not super-complicated or super high-density like a cell phone or anything like that.

As a hobbyist, I'd go with 2-layer if possible. Mostly because of the cost, but also because you can't "fix" and internal short with cuts & jumps.

And another piece of advice - when you've finished the layout, take a break, cup of tea, whatever, then
come back and double check absolutely everything on the board afresh. Yes its boring, but not as boring
as finding out you got something wrong that would have been spotted by a double-check.

And run those ERC and DRC's....

DVDdoug:
You are more-likely to have an open, short, or other wrong/missing connection or a mechanical/dimensional problem on your 1st pass. :wink:

I'm always designing with KiCAD and as long as I have the schematic right the connections on the PCB will be right. That's enforced by the software.
I did once have a TRIAC the wrong way around, another time a missing power in connection to a linear regulator (don't know how that happened), otherwise never wrong/missing connections. Dimensional issues can be caught 99% by the 3D view of KiCAD.
Anyway, so far never had a board that comes out perfect the first time around. Gotten close, though! Recently I had a board that was basically perfect the first time around until we decided we had to change functionality a bit... so back to the drawing board it was.

So far I never needed more than two layers. Sure some traces need 4, 5 vias to get to their destination, make sure those are for simple on/off type signals instead of e.g. I2C or (worse) SPI, and some routing creativity is needed, but there's also a lot you can do with swapping around connections on the MCU (after all most I/O pins are equivalent).

wvmarle:
I'm always designing with KiCAD and as long as I have the schematic right the connections on the PCB will be right. That's enforced by the software.

That's absolutely no excuse for not rechecking carefully - did you specify the right package footprint / size / lead spacing for every component? Is there a big void in the ground plane that can be fixed with an extra trace? Did you check the orientation of each connector? Does every chip have a decoupling capacitor next to it? Is every power trace low inductance? Is every high current route using wide enough traces? Did you remember to add mounting holes? Did you remember a connector for incoming power (I missed that out once!). Is every resistor of adequate power rating? Every capacitor of adequate voltage rating? (these last two affect the footprint / lead spacing requirements). Have you left any CMOS inputs floating by mistake? Did you check the power supply voltage requirements of every chip are as you thought?

There are so many things you have to get right.

Thanks a lot everyone. I'm going with the "ground zone" design then. Since I currently only have 1-layer PCB.

And thanks for sharing your experiences. Makes me realize I'm not the only one who messes things up sometimes.
I'll definitely double check everything.

And the silkscreen! Don't forget the silkscreen.

Markings for the components at a sensible place (so it's unambiguous which they belong to); markings at the connectors; + and - markings at the power connectors (I once managed to get those swapped...), a nice spark image & warning at the 220V part of the PCB, name & version number at the back, OSH logo, ...

pourduino:
Thanks a lot everyone. I'm going with the "ground zone" design then. Since I currently only have 1-layer PCB.

In most PCB houses you get the second layer for free, and it makes the PCB design a lot easier.

wvmarle:
And the silkscreen! Don't forget the silkscreen.

Markings for the components at a sensible place (so it's unambiguous which they belong to); markings at the connectors; + and - markings at the power connectors (I once managed to get those swapped...), a nice spark image & warning at the 220V part of the PCB, name & version number at the back, OSH logo, ...

Ohhh the pretty things! Fortunately I have access to Proteus so it does a lot of the silkscreen stuff for me. But I'm gonna add some versions and logos and cool looking things now :slight_smile: .

In most PCB houses you get the second layer for free, and it makes the PCB design a lot easier.

I'm etching myself. (I've done it before).

pourduino:
I'm etching myself. (I've done it before).

Thought of that myself, but considering having a PCB made across the border costs me just 5 USD plus a bit more for the stencil and a bit for shipping and a week later I have it done... not worth the effort.

wvmarle:
Thought of that myself, but considering having a PCB made across the border costs me just 5 USD plus a bit more for the stencil and a bit for shipping and a week later I have it done... not worth the effort.

Where I live it's absurdly more expensive that etching yourself.

Order from China like everybody else does...

Pourdino,
I saw this while I was on holiday and thought 2 things:
I will learn something from the answers (I have, thanks everyone :slight_smile: )
You sir, deserve some Karma as a new member because you have thought through your question carefully, done some proper research then posted well thought out questions. I wish all new posters put this much effort in. I would give you 10 Karma points, but the web site only allows 1 Karma point at a time. So, from me, ++Karma;

PerryBebbington:
Pourdino,
I saw this while I was on holiday and thought 2 things:
I will learn something from the answers (I have, thanks everyone :slight_smile: )
You sir, deserve some Karma as a new member because you have thought through your question carefully, done some proper research then posted well thought out questions. I wish all new posters put this much effort in. I would give you 10 Karma points, but the web site only allows 1 Karma point at a time. So, from me, ++Karma;

Oh, thank you very much :slight_smile: