CC Blog Sponsored

Designing a Printed Circuit Board

Printed circuit boards (PCBs) make most of the electrical connections in modern electronics. A PCB is an insulating material with copper glued to one or both sides. Some boards have inner copper layers, separated by the same insulating material. The copper connects the pins of the electronic components, making a complete circuit. Figure 1 shows a typical PCB. Back when I started in engineering, we had flat file cabinets that contained the artworks for the boards we used in our products. The artworks were printed on clear film and sent to the PCB vendor to get boards made.

Figure 1
Typical PCB (Photo courtesy PCBWay.com)

The world has changed since then. I’m not aware of any PCB manufacturers who take physical artworks anymore. In 1980, Gerber Systems released their Gerber file format and it became the industry standard for defining PCB files. Now you send computer-aided design (CAD) files to the vendor and you can often quote boards online by uploading a file. In this article, I’ll go through the steps involved in going from idea to PCB.

Since board manufacturers expect CAD files, you have to start with CAD software. This is typically a schematic capture program with an associated PCB layout program to create the PCB layout and generate the files needed by the PCB manufacturer. There are many options for CAD software, including Altium, Xpedition, and OrCAD for designers with a corporate budget, as well as Eagle from Autodesk. Proteus by Labcenter offers a graduated product—you can spend as much as the big-name providers, or spend under $300 for a basic package. I use Proteus at home. For the interested reader, PCBWay.com offers a variety of helpful primers on Proteus and other CAD software, including how to generate a Bill of Materials (BOM) and Pick and Place files in Proteus [1], how to generate Gerber files in Proteus [2], as well as PCB layout software lists and recommendations [3,4].
For free softwares, there is the open-source KiCAD. And at PCBWay.com, there are numerous comprehensive tutorials available that provide detailed guidance on the fundamental techniques for using it. Additionally, PCBWay.com offers a Kicad plug-in, so you can send your layout to PCBWay for instant production with just one click.[5]

Regardless of the CAD package you use, you’ll first use the schematic capture feature to draw the schematic. To make a PCB, every part in the schematic must have a footprint that describes the holes or pads, where they’re located, pin numbers, outline, and other information. The CAD package will have a library of footprints for common parts (such as an 8-pin SOIC, for example). You can also create your own if needed.

You will need to decide how many layers to use. For simple projects, I often use only two layers; many PCB manufacturers have inexpensive pricing on two-layer prototypes. I went to the PCBWay.com website and put in a 200mmx100mm two-layer board, quantity five, and it came back in seconds with a quote of $47 ($9.40 each) plus shipping (which is also fast, sometimes as little as one day).

For a more complicated board, you’ll usually want to have at least four layers—the top and bottom for circuit traces, and two inner layers which are usually for power and ground. Having two inner layers makes the layout easier since vias (through-holes) can be used to connect power and ground without running separate traces. If you’re using controlled-impedance traces, you’ll usually need power and ground planes because controlled-impedance traces require a ground plane to get the right impedance. You can create controlled-impedance traces with just two layers if one layer is a ground plane. The details of controlled-impedance traces are outside the scope of this article. But if you know you need them, then you know what they are.

Once you have a completed schematic, you’ll normally run a design rule check; the software may do that automatically. This will check for things like missing footprints, devices that have more pins than the footprint assigned to them, and other design rule violations. If there are errors, you’ll need to correct them before proceeding with the layout.

When design rule checks are complete, the software will produce a netlist. This is a list of all the pins and pads on the board and how they’re connected. Netlists are used by the layout portion of the software to define connectivity. Again, errors will be flagged and must be corrected.

Next, you’ll create the PCB layout. This will consist of four steps that may be manual, automatic, or a combination of both: board definition, parts placement, routing, and CAD file generation.

Board Definition: This is where you decide stackup, which defines how thick the board and internal layers will be, copper weight (thickness), and what each layer is used for. You might designate the top and bottom layers as signal layers (the layers where you route traces), the second layer as a power plane, and the third layer as a ground plane. Or you might put the power and ground planes on the top and bottom for better shielding. Board configuration is where you decide maximum and minimum trace widths and other routing-related design rules. You’ll also decide on the board outline here, typically. Although a couple of times when I didn’t have any space constraints, I’ve been known to lay out a board and then add the outline after it’s done. (Sort of like shooting at an old barn and then drawing the bullseyes around the holes afterward.)

Depending on the CAD software you’re using, you may be able to put some signals on the plane layers if needed; the routing software will make clearance on the plane for the traces.

Parts Placement: This is where you place the parts on the board, as the name suggests. You will normally place cable connectors at the edges of the board and place other parts to minimize the length of traces or to make it easy to connect them. Some CAD software will do auto-placement of the parts. But when I’ve used that feature, I always end up moving things around manually.

Routing: This is where everything gets connected. You will run traces between pins (and pads) to connect the circuit so that it matches the schematic. Each time a trace changes layers, a via is created to connect the two segments. At manufacture, vias will be plated through-holes.

Figure 2
Schematic of simple transistor circuit

Normally the CAD software will show a “ratsnest” which shows all the connections that need to be made. Figure 2 is a simple circuit, part of a direct conversion receiver project I did. Figure 3 is the ratsnest. You can see the connections between the pins and pads; the circuit is a mix of surface mount and through-hole parts. As a track is created, the associated ratsnest line will disappear. This is generally true whether you route the board manually or use autorouting. Figure 4 is the completed layout.

Figure 3
Ratsnest view of the simple transistor circuit
Figure 4
Completed layout of the simple transistor circuit

CAD files: After routing the board, you’ll generate the output files for the PCB vendor. Gerber is the most common format; the most recent version is RS-274X. Gerber files define the pads and traces. In most cases the vendor will want other files such as an Excellon NC drill file and a fabrication drawing. You’ll need a file that tells the vendor what the stackup is—the order of the layers, the thickness, and the material if it’s not standard FR-4. The CAD package can create this, or it can be a text file (unless it’s very complicated). Some vendors want a more comprehensive file such as IPC-2581. This is all for a bare PCB only. If you want the vendor to provide a completed PCBA with all the parts on it, obviously additional files would be needed.

Fabrication: After you’ve got CAD files, you need to select a vendor. You’ll want to be sure the vendor can supply what you need such as controlled-impedance traces, the stackup you selected if you are building a multilayer board, and special materials. Figure 5 is a cropped screenshot of the form I filled in on the PCBway website to get a quick quote on the simple 200x100mm, two-layer PCB that I mentioned earlier. This is what to look for when selecting a vendor: As you can see, the form is comprehensive in PCB design details, and they handle special surface finishes as well as other requirements—such as HDI, high-frequency, thick copper, and rigid-flex PCBs—which I consider a bonus. Anyway, check with the vendor to see what CAD files they need; you may need to create a specific format of drill file or fabrication file in the CAD package to match their requirements.

Figure 5
Cropped screenshot of information needed for quoting a PCB from PCBWay.com

Conclusion: Having PCBs fabricated is a little more complex than it used to be because PCBs are not as simple as they once were. But the results are better. CAD software and standard file formats reduce the chance of error, meaning there is less chance of having to re-make your PCB.

Resources
PCBWay | www.PCBWay.com

References not for print:
[1] How to generate BOM and Pick and Place files in Proteus (PCBWay): https://www.pcbway.com/blog/PCB_Layout_Software/How_to_generate_BOM_and_Pick_and_Place_File_in_Proteus_92f4eea0.html
[2] How to generate Gerber files from Proteus (PCBWay): https://www.pcbway.es/helpcenter/technical_support/How_to_generate_Gerber_files_from_Proteus.html
[3] PCB Layouts Software (PCBWay): https://www.pcbway.com/blog/PCB_Layout_Software/PCB_Layouts_Software.html
[4] Top 10 Free PCB Design Software That You Can Use (PCBWay): https://www.pcbway.com/blog/News/Top_10_Free_PCB_Design_Software_That_You_Can_Use.html
[5] PCBWay Plug in for Kicad: https://www.pcbway.com/blog/News/PCBWay_Plug_In_for_KiCad_3ea6219c.html

Keep up-to-date with our FREE Weekly Newsletter!

Don't miss out on upcoming issues of Circuit Cellar.


Note: We’ve made the Dec 2022 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.

Would you like to write for Circuit Cellar? We are always accepting articles/posts from the technical community. Get in touch with us and let's discuss your ideas.

Supporting Companies

Upcoming Events


Copyright © KCK Media Corp.
All Rights Reserved

Copyright © 2024 KCK Media Corp.

Designing a Printed Circuit Board

by Advertorial time to read: 7 min