Breadboards are great for prototyping circuits, but they aren’t very reliable if you plan on actually using the thing you’re building. At some point, you’re going to want to make it more permanent. The best way to make your project more durable is to get it made into printed circuit board (PCB).
In this tutorial, I’ll walk you through the process of designing a PCB and getting it printed by a custom PCB manufacturer. Since good PCB design can mean the difference between a broken circuit and a great one, I’ll give you lots of tips on how to optimize your design.
You can etch PCBs at home using a process that resembles developing prints from photographic film. However, this method is messy and uses a lot of chemicals. It’s a lot easier (and cheaper) to send your design to a PCB manufacturer to get the board made. I’ll be using a manufacturing service called EasyEDA to manufacture the example PCB in this article. Their free online design software is easy to use and the rates are very affordable.
It All Starts With a Schematic
Before you start designing the PCB, it’s important to make a schematic. The schematic will serve as the blueprint when you layout the PCB. It’s not absolutely essential to make a schematic first, but it makes the design process much easier. The PCB editing software will automatically import all of the components, footprints, and wiring connections into the PCB file (more on this later).
Start by logging in to EasyEDA, and create a new project:
Once you’re on the Start page, click on the “new Schematic” tab:
You’ll see a blank canvas that you can populate with the symbols for your schematic:
It’s best to put all of the schematic symbols on the canvas before drawing the wires. In EasyEDA, schematic symbols are located in “Libraries”. The default EasyEDA library has most of the common symbols, but there are also “User Generated Libraries” with symbols for many other components:
Each schematic symbol needs to have a PCB footprint associated with it. The PCB footprint defines the component’s physical dimensions and placement of the copper pads or through holes on the PCB. Now is a good time to decide which types of components you will be using. The PCB footprints are different for surface mount and through hole components, so you might need to change a symbol’s footprint to match the component you will be using.
Schematic symbols in the EasyEDA library already have the footprints for most of the common through hole and surface mount components:
To change the footprint for a schematic symbol, search for the component in the “User Generated” libraries. Once you find the right footprint, click on the heart icon to “Favorite” it:
Then copy the name of the component:
Now click on the symbol in the schematic editor, and paste the name of the new footprint into the “package” field in the right sidebar menu (watch the video below for a demonstration):
Once all of the symbols are placed on the schematic it’s time to start wiring the circuit. Rather than explain the details of wiring in this article, I’ve made a video so you can watch me make the schematic for an LM386 audio amplifier circuit:
After all the wiring is done, it’s a good idea to label the symbols. The labels will be transferred over to the PCB layout and eventually printed on the finished PCB. Each symbol has a name (R1, R2, C1, C2 etc.) and value (10 μF, 100 Ω, etc.) that can be edited by clicking on the label.
When you’re ready, save the project by clicking the folder icon in the top menu and selecting “Save”. Then save again to save the schematic.
The next step is to import the schematic symbols and wires into the PCB editor. Before we do that though, lets talk about how to optimize your PCB design.
PCB Design Optimization
The performance of your circuit will depend greatly on how it’s laid out on the PCB. A poorly designed PCB will function erratically at best and may not work at all. A well designed PCB will perform reliably and be easy to use. You might want to draw some diagrams of your circuit to help you visualize the design before you start laying out the PCB.
General PCB Layout
Think about what each part of your circuit does, and divide it into sections according to function. For example, an LM386 audio amplifier circuit has four main sections: a power supply, an audio input, the LM386, and an audio output.
You’ll want to group the components in each section together in the same area of the PCB to keep the conductive traces short. Long traces can pick up electromagnetic radiation from other sources, so this will reduce interference and noise.
Sections should be arranged on the PCB so that the path of electrical current is as linear as possible. The signals in your circuit should flow in a direct path from one section to another. This will also keep the conductive traces shorter to reduce interference.
The power supply section should be located centrally to the sections that need power. Each section is supplied power with separate traces of near equal distance. This is called a star configuration, and it ensures that each section will get an equal supply voltage. When sections are connected to the power supply in a daisy-chain configuration, the current drawn from sections closer to the supply will create a voltage drop and result in lower voltages at sections further from the supply.
PCB Shape and Size
You can make your PCB practically any size and shape you want. It’s not uncommon to see round, triangular, or other interesting shapes. Most PCBs are designed to be as small as possible, but it’s not necessary if your application doesn’t require it.
The dimensions of your PCB may be limited if you plan on putting it into an enclosure. If you’re thinking about using a housing, you’ll need to know its dimensions before laying out the PCB so that it fits inside the housing.
The components you use will also affect the size of the PCB. For instance, surface mount (SMD) components are small and have a low profile on the PCB, so you’ll be able to make the PCB smaller. Through hole components are larger, but they are often easier to find and much easier to solder.
The location of components like power connectors, potentiometers, LEDs, and audio jacks in your finished project will affect the layout of your PCB. Do you need an LED near a power switch to indicate that the device is on? Or a volume potentiometer next to a gain potentiometer? To provide the best user experience, you might have to make some compromises and design the rest of your PCB around the locations of these components.
In a single layer PCB, the conductive traces are on one side of the board. Larger circuits are difficult to design on single layer PCBs because the traces must be routed without intersecting one another. One solution is to use two copper layers and route traces on both sides of the PCB.
Traces on one layer can be connected to the other layer with a via. A via is a copper plated hole in the PCB that electrically connects layers in the PCB. You can also connect top and bottom traces at a component’s through hole:
With double layer PCBs, sometimes the entire bottom layer is covered with a copper layer connected to ground. This is called a ground layer. All of the positive (Vcc) traces are routed on the top layer and connections to ground are made with through holes or vias. Ground layers are used in circuits that are prone to interference. The large area of copper acts as a shield to prevent radio frequency interference and also helps to dissipate heat.
Most PCB manufacturers let you specify the thickness of the copper layers. The layer thickness will affect how much current can flow through the circuit without damaging the traces. Trace width is another factor that affects how much current can safely flow through the circuit (discussed below). Copper weight is the term manufacturers use to describe the layer thickness, and it is measured in ounces. To determine safe values for width and thickness, you need to know the amperage that will flow through the trace in question. Use an online trace width calculator to determine the ideal trace thickness and width for a given amperage.
If you look at a professionally designed PCB, you’ll probably notice that most of the copper traces bend at 45° angles. One reason for this is that 45° angles shorten the electrical path between components compared to 90° angles. Another reason is that high speed logic signals can get reflected off the back of the angle, causing interference:
If your project uses digital logic or high speed communication protocols above 200 MHz, you should probably avoid 90° angles and vias in your traces. For slower speed circuits, 90° traces won’t have an effect on the performance of your circuit.
Another thing to consider is the width of your traces. Like layer thickness, the width of your traces will affect how much current can flow through your circuit without damaging the circuit.
The proximity of the traces to components and adjacent traces may also determine how wide your traces should be. If you’re designing a small PCB with lots of traces and components, you might need to make the traces narrow for everything to fit.
Creating the PCB Layout
Now that we’ve discussed some ways to optimize your PCB design, let’s start laying out the PCB in EasyEDA.
Starting from the schematic editor, click on the “Convert Project To PCB” button:
You’ll see that the footprints will be automatically transferred to the PCB editor:
You’ll probably notice thin blue lines connecting the components. These are the ratsnest lines. Ratsnest lines are virtual wires that represent the connections between components. They show you where you need to route the copper traces according to the wiring connections you created in your schematic:
Now you can place the components on the PCB outline, keeping in mind the design optimization tips above. Also, some circuits perform better with certain components in specific locations. You might want to do some research to find out if there are any particular design requirements for your circuit. For example, the audio decoupling capacitors in the LM386 amplifier circuit need to be placed close to the IC to reduce noise.
After you’ve arranged all of the components on the PCB, it’s time to start drawing the traces. Use the ratsnest wires as a rough guide for routing each trace. The ratsnest wires won’t always show you the best way to route the traces, so it’s a good idea to refer back to your schematic to verify the correct connections for each trace.
Routing can also be done automatically using the software’s auto-router. For complicated circuits, it’s generally better to route traces manually, but try the auto-router on simpler designs and see what it comes up with. You can always adjust individual traces later.
The video below will show you how to draw traces in EasyEDA’s PCB editor:
Once your components are placed on the PCB and the traces are drawn, it’s time to adjust the size and shape of the board. Click on the board outline and drag each side so the components fit inside:
The last thing to do before ordering your PCBs is to run a design rule check. A design rule check will tell you if any components overlap, or if traces are routed close enough to cause a short circuit after the PCB is manufactured. It can be found by clicking the “Design Manager” button in the right side window:
Items that have failed the design rule check will be listed below the “DRC Errors” folder. If you click on one of the errors, the problem trace or component will be highlighted in the PCB view:
You can specify your own settings for the design rule check by clicking the drop down menu in the upper right hand corner and going to Miscellaneous > Design Rule Settings:
This will bring up a window where you can set design rules for trace width, separation between traces (track to track), separation between traces and pads (track to pad), and other useful parameters:
At this point it’s a good idea to double check your PCB layout against your schematic to make sure that everything is connected properly. If you’re satisfied with the result, the next step is to order the PCB. EasyEDA makes this part really easy…
Ordering the PCB
From here, you could export your PCB design to a PDF file, print it, and etch the PCB yourself. But that’s a messy and time consuming process. It’s a lot easier (and cheaper) to order it from a professional manufacturer.
Start by clicking the “Fabrication Output” button in the top menu of the PCB editor:
This will take you to another screen where you can select the options for your PCB order:
Here you can select the number of PCBs you want to order, how many copper layers you need, the PCB thickness, copper weight, and even the PCB color. After you’ve selected all of the options, click “Save to Cart” and you will be taken to a page where you can enter your shipping address and billing information.
You could also export the Gerber files of your PCB and send them to a different manufacturer. Gerber files can be downloaded from the “PCB Order” page:
Gerber files are a set of image files that contain the patterns used to manufacture your PCB. Separate files define the copper traces, silk screen, and locations of drill holes and vias. The Gerber files are compressed into a .zip file:
I ordered 15 of the LM386 audio amplifier PCBs from EasyEDA for $15 USD, and they arrived at my door two weeks later. After an inspection, I could see that the PCBs were well made, and no defects could be found on any of the boards. Electrically, the PCBs work perfectly. I soldered three of the LM386 amplifiers and they all sound great. If you want, you can clone my LM386 Amplifier Schematic and PCB here.
Making your own custom PCB is a lot of fun, and the results can be very rewarding. Hopefully this article will help you make a PCB from your prototype circuit. Let us know in the comments if you have any questions, and feel free to let us know what circuits you plan on converting to a PCB!
Need an easy-to-use way to design circuits and layout PCBs?
Try EasyEDA, a free circuit design software that also offers low cost, high quality PCB manufacturing.