Intro to PCBs

This article is copied from a document here.

By Chris Uustal - 6/30/22

### What is a PCB?

A Printed Circuit Board (PCB) is the most common physical form of an electrical circuit. These are physically constructed in a layered structure which changes back and forth between conducting and insulating layers. See some generic stock photos of PCBs below:

In particular, they are constructed of at least one layer of copper (which acts as the conductor) and one layer of FR4 fiberglass (which acts as the insulator). These conductive layers can be made into very particular shapes to make the desired connections between electrical components.

The actual green board itself is known as the PCB, and the full board with all the components soldered onto it is known as the Printed Circuit Board Assembly, or PCBA.

### Why Would You Make a PCB?

If you have one or more electrical components which need to interact with each other, usually the easiest way to do that is with a PCB. Since the electrical connections between these components can also be really really small, they’re also a great way to make an electrical circuit much smaller than it would be if you had to connect each component together through a more modular or interchangeable interface. Using a solderless breadboard is great for demonstrating a circuit functioning initially because of how quick and easy it is to set up and reconfigure, but once the design is finalized and is ready to get shrunk down, a PCB is the natural next step. Additionally, PCBs are much more robust and durable than solderless breadboards because all the components are soldered together rather than just being held together by the friction of the pins in the breadboard.

### How Do You Make a PCB?

Generally the process follows the steps below:

* Design how you want your system to function at a high level
* Pick component(s) for each of the blocks in your high level system design
* Using evaluation modules, build your whole circuit on a solderless breadboard to check it works like you expect
* Use that breadboard prototype to create an electrical schematic for your circuit
* Use that electrical schematic to design the layout of your PCB
* Check the PCB is compliant with all the manufacturing requirements of whatever PCB manufacturer you plan on using (probably PCBWay or JLCPCB)
* Generate the manufacturing files (probably Gerber files) to upload to the manufacturer
* Wait 1-3 weeks for the PCB to be manufacturer and shipped to you
* Solder all the components onto it
* Test it to make sure it behaves the same as the breadboarded prototype

I know that’s a lot of steps, but it really isn’t scary when someone can show you how to do it. You can either follow our own in-house tutorial for designing a PCB in Eagle (our PCB design software of choice), or you can use one of the hundreds of tutorials available online.

### Schematic vs Layout

If you read the section above and were confused about some of the terminology like “schematic” and “layout,” I’ll explain that here. Basically, the schematic is a simplified electrical representation of all the connections that should exist between different components. It doesn’t say anything about what those connections need to look like in the real world--it just says the connection exists at all. Here’s some random schematic I found on the internet as an example:

Here everything in green is called a net--those are just the connections between components. Everything in red is a component that is serving some function. It is worth noting that a component can be anything from a simple resistor to a super complicated microcontroller or anything else.

In contrast to a schematic, the layout is a representation of what the final physical design of the PCB should look like. This includes all sorts of information like how wide the copper connecting two components is, exactly where that copper should and shouldn’t be placed on the PCB, the actual dimensions of the PCB itself, and more. Here’s an example layout I found on Google:

In this image, everything in red is copper on the top layer of the PCB. This is a two layer PCB, meaning it has copper on the top and bottom with fiberglass in between. All the copper on the bottom of the board is in blue. It is worth noting here that just because two things are colored in red doesn’t mean they’re connected--in fact, most things that are the same color aren’t connected! If you look at any red pieces on the board above, only the red parts that are continuously connected to it are electrically connected--everything else is totally separate. Same thing with the bottom layer. There’s a lot more going on here as well that we’ll cover in the Basic PCB Terminology section.

### Basic PCB Terminology

Now that you have a basic understanding of what a PCB is, we can go over some of the most common parts to a PCB.

Schematics are fairly straightforward, so we won’t spend much time on them here. They’re basically just composed of components and nets--components are the actual parts you solder onto the PCB, and nets are the connections between them that exist in the copper of the PCB.

Now that we’re actually onto the PCB itself:

##### Traces

A trace is the name of those pieces of copper I’ve been pointing out on the PCBs up until now. In particular, a trace is a piece of copper which connects to at least one electrical component with some standard width (you’ll see why we add this part once we get to planes). Here, everything you see in blue and red is either a trace or a contact pad that a component can be soldered to:

The widths of traces are determined based on how much current they need to handle. Most PCBs don’t move a lot of current, so the widths of their traces should be the minimum trace width supported by the PCB manufacturer (usually 6mil).

##### Pads

As we mentioned above, a pad is the name for the area of a PCB where you solder a component on. While these can sometimes exist alone, there are usually a bunch of pads near each other in a pattern that allows all the contact points for the component to be soldered to the PCB. I zoomed in on one from the schematic to demonstrate:

The vast majority of the time you cannot design the pads yourself. Instead, the manufacturer of a component usually will either provide a library with the pad layout already inside it or they will provide information on what the pad layout should look like in the datasheet for the part.

##### Planes

A plane is essentially massive polygons of copper on a PCB that allow for lots of electrical connections to be made by a shared piece of copper. The most common use of this is to provide ground or power to lots of components on a PCB at once, since this lets you avoid running dozens or hundreds of traces all around the board to get power and ground to all your components. Here’s an example of two planes on a PCB below:

In the above example, you can see there are a few individual traces on the top layer (red), but the top layer is mostly composed of a singular polygon that places copper everywhere. This place is probably connected to power or ground. There is another similar plane on the other side of the PCB in blue. You can see how the plane automatically fills in all the available space in its area and connects to everything it is allowed to connect to according to the schematic. However, it will go around other traces that aren’t connected to it.

##### Vias

If you need to get a signal from one side of the board to another, you can use a via. These are literally holes drilled through the board that are then plated in a conductive material. You can then run a trace or a plane to that conductive material on either side and it will let the signal pass through as well. All the green things in the image above are actually vias!

##### Solder Mask

We already learned that pads are where components are supposed to be soldered onto our PCBs, but what about everything else? All the traces and the planes? What stops us from soldering things onto those by accident? Solder mask! Specifically, solder mask is a thin layer of epoxy (kind of) that PCB manufacturers put on the surface of your PCB everywhere you don’t want to solder on components. It acts as an insulating barrier to stop you from getting solder or components in places where they shouldn’t be, and it also provides protection from electrical shorts of some other conductive material that makes contact with the surface of the PCB. You can modify where the solder mask does and doesn’t exist on your design, but that’s something you shouldn’t have to worry about until you’re much more comfortable working with PCBs. See the Advanced PCB Design tutorial for that.

##### Airwires

An airwire is an indicator on a PCB layout which is inherited from a schematic to indicate that an electrical connection should be made. PCB design tools are here to help you, so most let you pair a schematic and PCB layout together and will even show you which connections need to be made on the layout based on the schematic. Here’s an example of a PCB that doesn’t have any of the traces laid out yet and only has airwires:

It’s also worth noting that most PCB layout tools won’t even let you connect the wrong connections together. In Eagle (the tool we use most often), it you try to connect two pads together with a trace that shouldn’t be connected, it will just route the trace as close as it can to that pad then stop before they touch. Similarly, if you’re trying to connect two pads with a trace, the software will intentionally try to move the trace around to avoid touching pads or other traces it isn’t supposed to.

##### Silkscreen

This is literally just text that can be printed on the PCB. Technically it isn’t just text since you can print anything you want, but people mostly use it for text. Here everything you see in white is silkscreen:

You can see how it’s mostly being used as labels for values or component (eg. 10k, R10, U12, etc.)

If you’re designing a PCB, you should always put on your name and the approximate date you designed it so (assuming you get it manufactured) you can distinguish different versions of PCB designs apart (because are you really going to do it right on your first try).