Today let's talk about PCB layout. So you know
after the schematic is confirmed the components and the Bill of Materials are all set and right,
it's time to do the routing. Now i have often heard people say that PCB layout is a creative work, very
zen-like. And given the same schematic even for a blinky project no PCB layout will be the same.
Now I highly recommend the getting to blinky series by Contextual Electronics by Chris Gamell
where he goes through the basics of a PCB layout with KiCad. I did that myself a few years back and
learned a lot. But you know as I was going through more and more pcb designs and my schematic
had more components, I realized that by the time I came to the PCB layout, my routing just got
messier and messier. In fact, I even scrapped all of the PCB layout and started again. So in today's
video, I want to share 10 steps that I learned in how to take from a complete rat's nest with no
routes to a complete PCB layout using my current project, which is a LoRa GPS tracker. Okay, so the
first step is to start with a schematic. Now I didn't realize how important it was to split
it up into functional logical blocks such as power, microcontroller, LiPo charge management and
various sensors. But this will also come in very handy when we do the component placement in the
PCB layout. So ensure the Electrical Rules Check is passing with no errors. And finally, export
the Netlist so that the PCB layout editor can import the latest version of the schematic.
So in step number two, we will set the grid size and then we will import the Netlist into the PCB
layout editor. Now a note about the grid settings. I used to think the finer the grid, the
smaller the grid the better. But I ended up with a PCB layout where all my components were
misaligned and it didn't really look that pretty. So start with the coarsest grid such as 50 mils.
And then import the components by updating the PCB from the schematic. Now when we move and place
the components they will look very nicely aligned because they will snap to the coarse grid. Step
number three. We have to set up the net classes in KiCad. And we can put the traces and wires
for different connections in net classes. And the dimensions will be according to manufacturability.
So be sure to check with your PCB manufacturer for their capabilities. For example, the minimum
trace width for PCBWay is 0.1mm. And in KiCad I have to ensure that my track widths
are bigger than this. So I also have a group of Net Class called Power where I include nets like 3.3V,
maybe 5V, ground as well as VBAT, VBUS, etc. All right! Somewhere on the Internet I heard
about this enlightened saying that "PCB design is 90% placement and only 10% routing." Now just
do a simple search. And that will lead you to so many informative articles about PCB layout.
And I wish I knew about this earlier. So we start by referring to the schematic that is
already divided into functional logical blocks and its corresponding components that are all
clumped together in a rat's nest. Then we separate all the components into logical blocks. For example,
this is the LiPo charge management logical block and this is its corresponding components in a
group in the PCB layout. Now within each group I try to place say the decoupling capacitors close
to the components and also ensure the routes are as short as possible. I also made notes on
the long routes such as say VBUS or VBAT that are connected to other logical blocks. I had
another note on LEDs or connectors that need to be considered in the physical layout of the final PCB.
Okay so now that I have put all the components in the logical groups in the PCB layout editor notice
that I have done, I have not done a single routing, now I will move them according to some physical
considerations. So I might disable the rat's nest view to have a clearer picture. The first big
decision that I take is what logical blocks are on the front layer and the back layer. For example,
I have put this large battery 18650 in the back layer. I also ensure that connectors such as say,
antennas, switch, micro USB, side tactile pushbuttons are roughly at the edges and not in the middle of
all the components so that you know I can easily place them at the PCB edge once I draw it. Finally,
a little check on some critical parts such as the USB differential pairs as well as ensure the
non-plated through-holes have enough space. In step 6, we finally make the PCB outline say in
the edge cuts layer. And we move all the components to fit within this outline. Once again, it's good
to check with the manufacturing capabilities to ensure the PCB size is correct. Now I have placed
all the components within the edges of the PCB. I go around on the front layer and ensure the
connected components whose positions are pretty fixed cannot be changed by locking the footprint.
The back layer has that big 18650 battery holder that I lock as well. And finally, I put some
information about the project name, version, date, and website on the silkscreen layer. I also import
a new footprint logo which is the open-source hardware logo. And ensure that it is also locked
so that if i ever need to re-import the netlist for an updated schematic this footprint will not
disappear. I said 10 steps right and this is step 7 and I have not made a single route but when
I do everything will finally fall in place. So I just want to make sure the silkscreen notes are
fine. I ensure that the text are all the same size and same direction. I have some power markings
by noting it is a 3.3V for this project. I also have some polarity markings like on this
LED as well as some component placement markings such as a tiny circle on the first pin. Finally, in
step 8 I come to routing. Well, sort of! In terms of filled zones. So I start with the filled zones. The
power plane of 3.3V is on the top layer and the ground is on the bottom layer. With the layers
fixed I start by dropping vias to the ground for every ground pin. I also ensure I connect all
the tiny routes within the logical blocks that are made easy with the component placement that
I already did. At the end of the filled zones and connections of all the power and ground pins I
ensure i run my DRC, design rules check just to ensure that there are no errors and only long
rat's nest of unconnected traces. Finally, the second last step. The step nine and this is where
I finally start routing those long unconnected traces. But I feel by this time the bulk of the
work is done. And this is where I truly can sit and relax and feel the zen routing. As I go through
you know just nudging a little bit of the other components which are unlocked and then laying out
the traces on my PCB. I will start with the coarse grid size of say 25 mils just so that everything
looks symmetrical. And then if required I drop to a lower grid. Otherwise i will use a single
track snapped to the center of the components bending only at 45 degrees. I really find this
step very relaxing. I can spend hours doing this. One by one the traces were routed and each time
I checked the DRC to ensure I did not introduce new errors. And soon all the routes were connected
leaving zero errors and zero unconnected items. I have to mention the last step which is not really
routing but I think it's important. It makes us all come into a full circle for PCB manufacturing. And
that is generating the Gerbers. This time though be sure to check the steps, the exact steps for
generating the Gerbers with the manufacturer of your choice. And they might have a KiCad, Eagle,
Altium, I mean your choice of the software to make the PCB routing on the exact option. So follow it. I
made that mistake before of not following and then I had to redo the PCB. I also make it a point to check
all the layers with the GerbView available. And also use the 3D Viewer to have a look and feel of
the entire PCB in 3D to check for any last changes. You know this is my, only my 5th pcb that
I'm manufacturing. Not a lot. I'm still a newbie, learning a lot, but I feel a lot more confident
to move on to bigger and more complicated designs for my future projects knowing that component
placement and doing those nine steps that I did at first before the actual routing. Uh yeah, I mean
I've done a lot of like messy work and then I had to really scrap the entire layout and restart
with a brand new rat's nest. So I hope you got something out of this video. I would love to know
your tips in doing PCB layout and routing and leave them in the comments below this video.
So thanks for watching. And see you next time!