I am starting my first PCB layout, so my questions are very basic.
How to determine how many layers I need?
My project is an add-on board for a Raspberry Pi Zero W. I am using the SPI interface, so there are some digital signals. There are some high current 15.5V lines (3-5 A), and a fair amount of 3.3V analog signals. There are a total of 98 components, 7 DIPs, 7 transistors, 2 12V relays, and the rest are caps, and resistors.
Do I need to pick a PCB manufacturer before I start the layout, or can I enter the fabricator’s design rules later?
Any tutorials I should read before I embark on this adventure?
Thanks!
PS A moderator has informed me that my questions are not appropriate for this forum. Can you recommend another forum on the web where I can ask questions that a person laying out a board for the first time can ask without being shut down?
The second half of the second question and the third question are more about KiCad, so I’ll reopen this. (I read the second half of the second question hastily and interpreted the third as pertaining to electronics in general.)
How many copper layers are needed doesn’t depend on the software.
I guess eelik was a bit overzealous or tired when reading and closing your thread, It is sort of policy to close off-topic (not KiCad) threads but at other times generic electronic questions (not even PCB design related) do get answered.
While looking at my monitor, I can not know how many layers you would need. You can only determine that yourself, and for that you need experience. So it’s a chicken and egg problem. A lot of "professionals’ don’t bother with 2 layer PCB’s anymore, because the price difference between 2 and 4 layers is not very big when you go to medium production volumes (500+ PCB’s), but for hobbyists and prototyping the price difference between 2 or 4 layers is quite significant.
4-layer PCB’s are much easier to design properly, because you can easily assign one of the complete inner layers to a GND plane (important if your PCB has to pass EMC testing), while on a 2-layer PCB it is often difficult to design in an even half-decent GND plane by stitching parts together.
A 2-layer PCB often also has to be bigger to have enough room left to make a half decent GND plane.
But everything put together. You do not have to decide first hand. I recommend you start with a 2-layer design, so you can make use of the quite cheap pooling services of many PCB manufacturers. If it turns out it’s difficult to fully route your PCB and keep a decent GND plane at the same time, then it is just a few mouse clicks to go to a 4-layer PCB. And in the mean time, you will have gained a bit of experience in routing PCB’s, and that experience is valuable too.
Tough question, there’s no “closed-loop” answer. It comes down to experience.
But for a board using DIP ICs, I cannot imagine that you’ll need more than two layers of copper.
BGAs etc. is where you run into 4- or more layer boards.
For design rules (DRC), the defaults are very good for this type of design. Compare them with eg, JLCPBCs rules and they’re very similar. I’d stay with the defaults for a start.
A general tip: don’t be skimpy on the track widths. There’s no reason to use a 0.3 mm track if you have space for 0.8 mm or larger.
And your high current tracks will need 3 mm or more.
Edit: it seems @paulvdh and I pretty much agree when posting simultaneously.
One more thing to think about: testing and measuring on a 2-layer board is simple, but on 4- and more layers it can be hell, unless you include good test points in the layout. Also something to take into consideration.
Do I need to have a 15V layer because of the high current? Like a ground plane, but for power? Which would mean a 4 layer board - ground, 2 signal, and 15V.
Nah. Don’t overthink it. KiCAD’s track calculator says 3 mm for 5 A. If you have space, make it wider.
More important is separating the high-current tracks from the small-signal circuitry (“star”-earth, “star”-power).
No, but confine this high voltage/current to one section of the board.
If you are using relays, chances are the ones you source are not in the Kicad libraries, so don’t forget: imported and created footprints need to be placed in personal libraries. Kicad libraries are Read Only.
You can set them so relaxed – or tight, depending on the viewpoint – that no manufacturer can do them. For example, you can set the minimum clearance and track width to zero. However, this is not necessarily bad. In the layout design phase KiCad uses net classes for many things:
Each net belongs to a net class, if not as explicitly set to some other, at least to the Default net class. There you can se so large values that any manufacturer can handle them.
That way you can set some “hard” values in the constraints later.
Then the non-KiCad related part.
You should probably find at least some candidates for manufacturing and find their “lowest common denominator” capabilities with some safety margin. Use them in the constraints and you can choose the manufacturer later.
I really appreciate everyone’s comments. They have been very helpful!
I am proceeding with the layout (rev 4 so far…lol) and have hit a snag. I am using a 4 mm trace for the high current line and I need to connect it to the drain of a MOSFET. However, the drain is in between the Gate and Source of the MOSFET, and the 4 mm trace is too wide. The MOSFET is in a TO-220 case. How do I connect the Drain, and for that matter, the Source, to the high current 4 mm trace?
For what it is worth, I have attached a screen shot of my layout so far with the high current traces going through a fuse, switch, 2 relays and headed to the MOSFET. All critiques are welcome!
After this, I know I won’t be looking for a job as a PCB designer…lol
I suppose we’re talking about U1?
It seems you already have an unfinished track there. Simply complete the last part of the track (say, 2…3 mm) with 1.5 mm width.
BTW, only Drain and Source need fat tracks, not the Gate.
A general “quality” question. How much of a cheat is it to use some 0R resistors to help get the last 8 or so paths joined together? Is it good practice, a necessary evil, or the last refuge of the incompetent to use them?
My problem is I am trying to shoe horn everything into a 2 layer board. My +3.3V power lines and some signal lines are blocking the last few signals from getting where they need to go. If I went to a 4 layer board and put +3.3V on its own layer, I probably would not need them, or maybe just one. I have all 100 components placed and connected…just need the last 8 or so to jump some traces to get them home. The board has grown to 149mm x 122 mm.
Completely legitimate if necessary. Sometimes rotating a couple of the ICs will also help.
The Ratsnest is there to help you sort such things out before starting layout. Best functionality ever invented!
You might consider going to Eurocard format instead (100 mm x 160 mm). Much easier to find fitting enclosures.
EDIT: here’s an older design of mine (not done with KiCAD) that shows you what’s possible when routing leaded-component PCBs. It does not contain a single via or 0-ohm resistor.
The thick traces are power lines, the hatched areas are copper fills. It’s a mix of analog, 74HC logic, discretes. For this kind of thing, it’s a good idea to stick to an east-west (top), north-south (bottom) pattern for the first basic layout. Later optimization will shatter that.