Ordering a PCB, these days, has become as easy as shopping online. Sites, like PCBWay.com make it extremely easy for the users to order their desired PCBs online. All you need to do is create a PCB layout and then send the Gerber files to the PCB manufacturer.
In this tutorial, I will teach you, how to build a PCB Layout and then order the PCB online, by sending the Gerber files to the manufacturer.
Though, Breadboards are an easy option for many embedded system projects where we need to assemble a lot of components together, however they aren’t very reliable .
Hence, the best way to make any project more robust or durable is to get it made into printed circuit board (PCB).
Here, in this article, we will discuss the process of designing a PCB layout and getting it printed by a custom PCB manufacturer.
The PCB layout is probably one of the most exciting and rewarding parts of PCB design as the performance of the circuit depends greatly on how it is laid out on the PCB .
Before going for PCB layout i.e., transforming the schematic into a physical board layout, there are some points you all should keep in our mind.Such as :
- Component orientation : While placing components on the board, you should make sure that similar components such as a set of resistors or LEDs should always face the same direction as this will make your board much easier to install, test, and inspect by your manufacturer.
- Placing of Components : You should always make sure to place smaller components in front of larger ones for a reliable soldering process. Because if you place taller components in front of smaller ones then the taller ones will block the smaller ones, then chances are there that you will get a board back with poorly connected solder joints.
- Routing : Many beginner designers make the mistake of placing the components too close to each other on the board so that there is no space left for routing. Hence, when placing components, you should always be careful to leave enough space between parts to make the routing process easy.
PCB Layout Process
Converting the Schematic into a PCB Layout
The first step of PCB Layout process is to draw a schematic of your desired circuit. This schematic will serve as a blueprint for laying out the traces and placing the components on the PCB.
In addition to this, the PCB editing software can import all of the components, footprints, and wires into the PCB file, which will later make the design process much more easier.
There are many PCB Design Software available now a days. Some of them are proprietary and paid while some are available for free with some restrictions. Depending on the requirement of the user and the project, one must select the software.
Now, you can start by drawing your schematic diagram into the software you have chosen.
It is always best practice to place all of your schematic symbols on the canvas before drawing any wires.
In most of the design software, you can find a lot of schematic symbols in “Libraries”. Though most of the common symbols are available in the library, you can also create your own symbol and keep it in “User Generated Libraries” .
Each schematic symbol has its own PCB footprint which define the component’s physical dimensions and placement of the copper pads or through holes.
The footprint of any schematic symbol can also be changed if you are using a different size or style.
After placing all of your symbols on the schematic and assigning footprints to each symbol, you can start drawing the wires.
After all the wiring is done, label the symbols. These labels will be transferred over to the PCB layout and eventually be printed o 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.
The next step is to place and rotate the components on the board space.
Placing and Rotating Your Components
In this step you need to drag and drop the components to the spots where you want them to be.
To do this, identify the part of the circuit and divide the circuit into sections according to function, such as power supply, audio input, audio output and all.
To make your PCB look clean, place all components with the same function next to each other, like resistors for example.
You should also make sure to leave some extra space between components, especially capacitors since the size may vary. Leaving some extra space also makes the soldering a lot easier, specially in case of SMD components.
The different sections of your circuit should be arranged so the path of the electrical current is as linear as possible.
The signals in your circuit should flow in a direct path from one section to another, which will keep the traces shorter.
To ensure that each section gets an equal supply voltage, each section of the circuit should be supplied power with separate traces of equal length. This is called a star configuration .
If sections are connected in a daisy-chain configuration, the current drawn from the sections closer to the supply will create a voltage drop and result in lower voltages at sections further from the supply.
Resizing Your PCB Shape
After getting all your components placed properly on the PCB, now it’s time to decide the shape of the PCB.
PCB can be of any shape, such as triangular, rectangular, square or other interesting shapes. Most PCBs are designed to be as small as possible, but that’s not necessary if your application doesn’t require it.
The dimensions of the PCB plays an important role if you plan on putting the PCB into an enclosure.
In such cases you will need to know the enclosure’s dimensions before laying out the PCB so that everything fits inside.
The components you use will also have an effect on the size of the finished PCB.
For example, surface mounted components are small in size, so you will be able to make the PCB smaller. Where as, through hole components are larger, so the PCB will be larger but they are often easier to find and easier to solder as compared to surface mounted components.
The location of components on the PCB also plays an important role in PCB layout.
For example, power connections, potentiometers, LEDs, and audio jacks in your finished project will affect your PCB layout.
Actually it all depends on your desired application.
For example, whether you need an LED near a power switch to indicate that it is on? Or do you need to put a volume potentiometer next to a gain potentiometer?
For the best user experience you might have to make some compromises and design the rest of your PCB around the locations of these components.
It is very difficult to design larger circuits on a single layer PCB as it is hard to route the traces without intersecting one another.
In such cases, PCBs having two copper layers with traces route on both sides of the PCB are used.
The 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 the top layer to the bottom layer.
You can also connect top and bottom traces at a component’s through hole.
Some double layer PCBs have a ground layer, and the entire bottom layer is covered with a copper plane connected to the ground.
The positive traces are routed on top and connections to ground are made with through holes or vias.
As the large area of copper act as a shield against electromagnetic fields, hence the ground layers are good for circuits that are prone to interference.
They also help dissipate the heat generated by the components.
Copper weight is the term used by the manufacturers to describe the layer thickness, and it is measured in ounces.
The thickness of a layer affects the amount of current flow through the circuit without damaging the traces.
Trace width is also another factor that affects how much current can safely flow through the circuit.
Most of the copper traces on the PCB are bent at 45° angle.
One reason for this is that as compared to 90° angles, 45° angles shorten the electrical path between the components.
Another reason is that high speed logic signals can get reflected off the back of the angle, causing interference.
The width of your traces also affect the amount of current that can flow through the circuit without damaging it.
The proximity of traces to components and adjacent traces will also determine the trace width .
While designing a small PCB with lots of traces and components, you might need to make the traces narrow for everything to fit.
Creating PCB Layout
Now, let’s see how to create a PCB layout. Here I am using Cadsoft EAGLE for your better understanding.
1.Drawing the Schematic
First you have to draw your schematic in the schematic editor of the PCB design software.
Then to get the associated board of that particular schematic, you can simply click on the “Board” button (or choose “Switch to board” from the “File” menu) to create a board for that particular schematic. This is only possible if the Board of that schematic already exist in the files.
If no board exists, you will get a warning status, asking you to create a new board.
Choose “Yes” and a new board will be created with all the components from the schematics.
2. Place Components
To place the components on your board, select the “Move” action from the toolbar (or the “Edit” menu) .
A good way to arrange the components is to place them similar to the placement in the schematics.
This makes it much easier to troubleshoot the circuit at a later stage if needed.
Click on “Rastnest” from the “Tools” menu to update the yellow airwires.
Ratsnest lines are the virtual wires that represent the connections between the components. And they show where you need to route the traces according to the wiring connections you created in your schematic.
Routing can be done manually or automatic.
For complicated circuits, it is always better to route traces manually. However, you can use the auto-router for simpler designs as you can always adjust individual traces later.
Choose “Route” from the toolbar (or from the “Edit” menu) and select the trace width and the drill size.
Normally wide traces are used for nets that draw a lot of current, for example power lines and thinner traces are used for other nets.
To simplify routing, a ground plane can be added.
After routing the traces, now it is time to define the size and shape of the PCB outline.
To do this you have to click on the board outline and drag each side until all of the components are inside.
Run ERC and DRC To Check For Errors
After finishing routing the PCB, the final step is to run ERC (Electrical Rule Check ) and DRC (Design Rule Check ) from the “Tools” menu to check for errors and then fix it .
A DRC will tell you if any components overlap or if traces are routed too close to each other. And an ERC verifies the correctness of power and ground connections.
If there are no more errors, then you have finished the PCB design part and the next step is to order the PCB.
How to Order the PCB ?
After finishing the design part now you can create the Gerber file that can be sent to a manufacturer for fabrication.
In Eagle, open Board view. Click the “CAM” button or choose “File->CAM Processor”. This will open the CAM Processor tool that is used to generate the files.
Here you can define the sections you want to create files for.
In order to simplify the process of creating Gerber files, Eagle comes with a predefined job that is called gerb274x.cam.
To open it in the CAM Processor click “File->Open->Job…”
Browse to your …/eagle/cam/ folder, and you should see a file called gerb274x.cam. Choose it and click “Open”.
You will now see five tabs in the CAM Processor. Each of these tabs will generate a Gerber file.
Select where you want to put the Gerber files by clicking on the “File” button and choosing a folder. Do this for all the tabs.
Then click “Process Job”. This creates your Gerber files.
Now, before sending the Gerber files to PCBWay, I would suggest you to check them on PCBWay’s Online Gerber Viewer. This will ensure that everything is perfect, before making the final order.
Now, that your Gerber files are ready, you can order your PCB right away.
Making your own custom PCB is a lot of fun, and the results can be very rewarding and self satisfying.
Hopefully this article will help you get your prototype circuit onto a PCB.