This is the second blog of the series. If you have not gone through the first blog that is PCB Designing – Basics, then please read it first.
In this blog we will discuss various advanced techniques of PCB designing, component placement. As well as we discuss the design rules, certain aspects of designing, how to generate gerber files, other required production files.
For this we will use Kicad software, so make sure it is installed on your PC/Laptop or please download it from https://kicad.org/download/
So in the last blog we have discussed only single layer PCB as well as we created one PCB with only Through Hole components. But here we will discuss the Multilayer PCB concept in detail and then we will design a two layer PCB with one example.
Unlike a Single-Sided PCB which only has one conductive layer of material, all multilayer PCBs must have at least four layers of conductive material.
Here in the above image you can see the difference between Single and double layer PCB. A single layer PCB has only one copper layer whereas a double layer PCB has two copper layers.
Here you can see how the multilayer PCB is stacked up. Above image represents 4 layer pcb as follows:
1) Top Layer (MidLayer1)
2) GND Layer (MidLayer2)
3) VCC Layer (MidLayer3)
4) Bottom Layer (MidLayer4)
On the right side of the image you can see the actual construction of PCB. To produce a multi-layer PCB, alternating layers of epoxy-infused fiberglass sheet called prepreg and conductive core materials are laminated together under high temperature and pressure using a hydraulic press. The pressure and heat causes the prepreg to melt and join the layers together.
Now the question arises, why do you need a Multilayer PCB ?
Devices that are more complex and involve more circuits and components often require the use of a multi-layer PCB. If it needs more circuits than can fit on a single or double layer board, then you have no choice but to go for a multilayer PCB, to route your traces from inside the PCB by creating layers as you see in Fig.2.
Most main boards have between 2 to 8 layers, but PCBs with almost 100 layers can be made. In multilayer PCB, defining the layer type of each layer is the most important part. As you can see in Fig.2, the outermost layers are used for component placement and routing of tracks. Whereas the inner two layers are used for power and gnd.
Above image shows the layer stackup of an 8 layer PCB. Here you can see how the signal layers are sandwiched between ground layers.
Sometimes because of space constraints one has to reduce the size of PCB with the same circuitry. That time we have to go for a multilayer pcb. It is designed for complex and mixed signal circuitry and the critical signal traces were routed through inner signal layers, to reduce the EMI(electromagnetic interference) effect.
Sometimes the PCBs used in critical fields such as Medical, Aerospace science etc. are intentionally designed in multilayer architecture to encounter the EMI problem only.
One more important factor we have to consider is how we can connect particular signal traces(tracks) from one layer to another ?
So this is done using the Via. If we are designing a PCB with two or more layers, then Via is a very critical part of a design. A Via hole in a PCB consists of two pads in corresponding positions on different layers of the board, that are electrically connected by a hole through the board. The hole is made conductive by electroplating.
In the above image you can see how the via looks and its construction. These Vias have 3 types :
1) Through Hole Via
2) Blind Via
3) Bureid Via
Above image shows different types of via’s.
- Through hole via: starts from the top layer and ends at the bottom layer of pcb(irrespective of layer count).
- Blind via: It connects an outer layer to one or more inner layers but does not go through the entire board. If it starts from the top layer then it can not be visible from the bottom layer and vice versa.
- Buried via: It connects two or more inner layers but does not go through to an outer layer.
PCB component placement affects everything from testing and accessibility to functionality and performance. In short, all design decisions are impacted by the exact placement of components on a PCB.
Therefore, when designing a PCB, it is necessary that components fit together in a specific way. For example, your components need to be near their connected circuitry to provide electrical functionality. The placement of your components should be critically positioned for thermal and mechanical considerations. And finally, you should utilize correct component placement that provides smoothness to the manufacturing process as a whole.
Component placement good practices:
1) Do not place the Through hole and SMD components on the same side of the PCB. If you are placing Through hole components on the top side then place the SMD components on the bottom side of PCB.
2) Try to place the components as per the sections. Meaning do not place power section components into the controller section. For example, if you are starting the power section from the right side of the PCB, then do not place other section components in that area.
3) Keep the Analog and Digital section seperate.
4) Always try to keep the controller section in the middle of the PCB, avoid placing it on the edgeside.
5) Place the I/O or terminal section on any one side of the PCB. Avoid keeping terminals of multiple sides.
6) If there is any RF module in the circuit, then try to keep it away from the controller section.
7) Place protection components, such as Fuses, TVS, MOV etc on the outer edge of PCB.
PCB Designing Rules –
Before we start designing a PCB, we must have to know about PCB designing rules. Now whichever designing software you use, every software comes with its own set of rules, which we have to follow to obtain the errorless design. Sometimes we can alter these rules as per our requirements.
Now since we are using Kicad software for our understanding, we will talk about designing rules with the help of Kicad software.
- To check the Design rules, first open the software and click on the PCB layout editor.
- Then go to the setup tab.
- There you see the option Design Rules. Click on it to check or change the default rules.
- above figure shows the PCB design rules editor window, here in first tab i.e. Net class editor, you can see the default rules regarding track clearance, track size, via size etc. by clicking on that particular box you can change the value and the changed value will now become your default value for this particular project only.
Note : it is advisable to not change any default values, since these values are accepted worldwide.
Click on the next tab Global design rules
- Here you can change the given parameters values as per your design. Also if you are designing a multilayer PCB(4 or 4+), then you have to enable the allow blind/buried vias option.
In the below area you can add multiple sizes of vias and tracks as per your requirement.
- Do not route tracks by 90°, always keep the bending angle of tracks at 45°.
- If the design consists of a controller, then place its related components such as crystal, decoupling capacitors etc.
close to it and on the same side.
- Do not mix the Analog and Digital circuit components.
- Add copper planes on the Top and Bottom layer. As this could protect the sensitive components such as controller, sensor ICs from external noise or EMI.
Example for Practice
Here we will design a two layer PCB with Through hole as well as SMD components.
This is a basic circuit consisting of a PIC microcontroller and it is driving some LEDs through its port pins.
- So as discussed in the previous blog, create a KICAD project and then from the main window first go to the schematic page and add all the components as shown in above figure no.9.
- Here we have added all the components. Now we have to define the value of every component by right clicking on it.
- Now go to Tools > Annotate components.
Small window will open, just click on annotate.
This will automatically define the name of every component like C1, C2 etc.
- Next, go to Tools > Assign footprint. New window will open, here you can search for the respective component footprint and assign to it.
- In the above figure we can see the Footprints assigned to the different components.
- After that we have to generate the Netlist ( Tools > generate netlist file).
Now lets move to PCB LAYOUT EDITOR.
- So we will fit this circuit on the pcb size 55×45 mm.
- Follow the steps given in the first blog and create pcb of size 55×45 mm.
- Go to Tools > load netlist. This will load the all component footprints on your PCB.
- Next, place the footprints as per your convenience.
- In the above figure, the yellow rectangle is actually a PCB border and within it, I have placed components as per my convenience.
- Now the next task is to route the tracks.
- Here you can see, I have routed the tracks from both sides. Top side tracks are in Red and bottom side tracks are in Green colour. Also add mounting holes.
- Now the next task is to add a copper plane on both layers. For that go to Place > zones.
Here select the layer, then select the net of which you want to add a plane.(usually it is ground and VCC plane).
- Further we have to generate Gerber files of the PCB, as these files consist of all the data of that particular PCB. And PCB manufacturers use these files to manufacture the PCB.
- Go to File > Plot. then browse and select your destined file location on your computer. Next add or remove the layers of which you want a Gerber file And then press Plot. this will generate the selected layers Gerber files.
In the same window, at the bottom side you can see the tab “generate Drill files”. Just go to that tab, browse and select your same file location as the gerber files and then generate the Drill files.
And that’s how we have finished the designing process of two layer PCB.
In this blog we learn the concept of Multilayer PCB and its advantages. Also we discussed the good practices of component placement. Some PCB Designing Rules and and guidelines. Then we design one Two layer pcb for practice.
In the next blog we will discuss the designing techniques to protect PCBs or circuits from getting exploited..
Payatu is a research-powered cybersecurity service and training organization specialized in IoT, embedded, mobile, cloud, infrastructure security, and advanced security training. We offer a full IoT/IIoTT ecosystem security assessment, including hardware, firmware, middleware, and application interfaces. If you are looking for security testing services then let’s talk, share your requirements: https://payatu.com/#getstarted Payatu is at the front line of IoT security research, with a great team, and in house tools like expliot.io. In the last 8+ years, Payatu has performed security assessments of 100+ IoT/IIoT product ecosystems and we understand the IoT ecosystem inside out. Get in touch with us. Click on the get started button below.