The purpose of this post is to make the design process of creating printed circuit boards (PCBs) a little less scary. Please note that, as with most of the hobby stuff on my website, I am self taught. This means that I use auto-routing, don’t worry about ground planes, and the most difficult thing I do is create my own custom component. So this post is geared towards beginners. More advanced users don’t need to read a post about creating PCBs anyway! This is also not a complete how-to guide, although I will link to some tutorials.
Do you even need a PCB?
The first step is to ask yourself if you even need to design a PCB. Unless you have your own etching setup (unlikely if you’re reading this post) you’re probably going to be paying for at least three prototype boards from the manufacturer, so creating a PCB is really only going to be a benefit if one or more of the following is true.
- You are going to need at least two of the completed boards
- Money is no object (you only want one board, but you don’t mind paying for several)
- There are so many interconnects on your project that soldering it to a prototyping board is untenable
- Your board is going to act as a shield for an Arduino and is too big to work with a blank protoshield (Adafruit sells them for the Uno and Mega)
My PCB with the most components is an unsigned 4-bit binary multiplier. This is the only one-off project I’ve made a PCB for, as you can imagine just how large this would be if it weren’t on a PCB. I actually did have it on an 8.5″x11″ breadboard for a year or so but was worried about accidentally pulling out some wires. A photograph of the multiplier is shown below.
Alternatives to PCBs
If I am building a demo of a lab circuit that I’ve assigned to my students, I generally do not use a PCB. I will instead lay out the project on a breadboard and then solder onto a prototyping board. My favorite prototyping boards are from Jameco and come in small, medium, and large sizes (as of 2024, the large size has been discontinued by Jameco). They have a lot of good power buses, can be easily connected to a barrel jack for charging (not great if you want to include a power regulator, however), and have the general layout of a breadboard so you don’t need to solder as many interconnects as you would if using perfboard.
Below is a picture of a shift register that I built as a demo for one of my digital systems lab circuits. I photographed it on top of my project notebook pages where I had designed the original schematics, wrote notes about how the project was going, then sketched an example layout (more or less to scale) to help me figure out where to place components on the board.
Another alternative is to just build a project on a breadboard and keep it there. I generally would not recommend this except if you cannot solder and are unwilling to learn how, or if you are not going to be interacting with the project once you’ve built it. If you are going to be interacting with the project (pushing buttons, flipping switches), then the unreliability of a breadboard is just not worth it. If even one wire is pulled out, your project may cease functioning. That’s not a risk you have to take in a soldered project or a PCB. I have one and only one demo board that uses a breadboard, and that’s only because I’m too lazy to update it and solder it onto its own board. (It also uses data buses, so the breadboard arrangement suits me just fine.)
Designing the circuit
The first step is to have a design verified and built on a breadboard. I would not feel comfortable designing a PCB for something that was only tested in simulation software such as Multisim. Usually my flow is to start with Multisim for a hardware-only project, then breadboard, then start designing a schematic and layout in the PCB software. For a microcontroller project, I start with the Arduino and a breadboard, then burn my program onto the actual microcontroller chip and lay it out on a breadboard and verify that it works. There are a lot of issues that can arise that simulations can’t pick up, and I have yet to find a simulation tool that adequately works for AVR microcontrollers. Below is a photograph of a universal logic chip tester that I have built on a breadboard. I made sure that everything worked before even dreaming about designing the PCB.
Schematic and board designing software
The software that I use, and highly recommend, is Eagle. There are so many reasons that I recommend it for hobbyists. Firstly, it’s free! Secondly, it’s created by AutoDesk, so it’s not some sketchy company that’s going to disappear tomorrow and stop supporting their software. It’s also good on both Windows AND Mac, which as a Mac user, is such a great feature.
Here’s another life hack: Eagle has a free educational version. This is great if your projects ever get too large or require four layers. If you have a valid educational e-mail address, you can create an account and get your version of Eagle converted to the educational version at no cost. I’ve done this because one of my PCBs was pretty huge at 4.5″ x 8.3″.
There are two major parts of every project: a schematic and a board. The schematic functions very similarly to what you would piece together in Multisim or any other simulation tool. The big difference is that this does not simulate your project, so you really have to be careful of the connections you make here, otherwise you might wind up with something that does not work. Once your schematic is complete, you go to the board editor, place all of the parts inside of the footprint (you can change the footprint size if you want), and then use the auto-router to do its magic and create the connections between components.
Note that you are probably going to be working with through-hole components. Personally, I have almost zero experience working with surface mount technology, and while it’s something I’m interested in, I really don’t find that there’s anything about through hole technology that’s holding me back from the types of simple hobby projects I’m working on. The only limitation I find is my current inability to solder an ATmega 2560 onto a board… so when I’m using a Mega I will build a shield onto an Arduino Mega board. (Inefficient, but I rarely use Megas in my projects.)
This post is not intended to be an Eagle tutorial – there are plenty of those already. Recommended would be the Autodesk website itself, Sparkfun (schematic and board views), or if you’re old school like me, I really like the book Designing Circuit Boards with EAGLE: Make High-Quality PCBs at Low Cost by Matthew Scarpino (which might be a little dated, but it’s how I learned how to design PCBs).
Libraries and custom parts
Most of the time, the parts libraries that are included with Eagle are going to cover all of the parts you will use. SparkFun also has a whole bunch of libraries that you can install in Eagle that cover a lot of common parts such as microcontrollers, LCD screens, pushbuttons, and so on. I have made custom parts before, and once you suffer through the process once, you’ll find it isn’t too bad. It’s been awhile since I first did this, but I’m guessing I used the Autodesk tutorials to help me through the process. Custom parts are great if it’s a piece you’re going to use more than once, or in more than one design. Otherwise, here are some other things you can do to get around making a custom part.
- If the “custom part” has DIP architecture, you can use the ic-package library and one of the DIL footprints. A 7-segment display might be a good candidate for this. Another good use for this would be a custom-programmed PAL/GAL.
- If the “custom part” has just a single row of pins, you can use the pinhead library and just treat the object as a pin header. I’ve used this before with LCD screens, keypads, and also when designing a shield for an Arduino Mega.
I’ve made a library of my custom parts, and it mostly consists of segmented displays that I can’t find in other libraries. There’s a screenshot below of my library, in case you are interested. Another important part for me to design was for binding posts, which are used to connect banana plugs. I wanted them to have a really large pad because the hex nut on the bottom is what makes an electrical connection. If the pad is too small, then the connection won’t be good (you can’t solder in a binding post, the hex nut tightens on a screw which is part of the post itself).
Validating your design before ordering
When you’re going the extra mile to make a PCB, it’s important to spend time on validating your design BEFORE ordering your board. I say this because I’ve made plenty of mistakes, and if you don’t find the mistake before ordering the boards, you’ve just wasted time and money.
Check footprint size — It’s important to check footprint size. What I do is print a 1:1 version of the board in Eagle. Then, I will physically place the actual components on top of the printout to make sure that they will all fit in their spots. It’s as easy as going to file > print in Eagle. The screenshot below shows what the print dialogue looks like. Make sure that the caption option is turned off, or the size will be less than 1:1 when you print! The scale factor should be set to 1.
The picture below shows this being done for a DAC interface I built for my circuit analysis class. The keyboard component isn’t shown because I used all of them in the PCBs I built and don’t have any left over to place on here. But I wrote in my notebook that I had shifted the keypad over to give clearance from the IC that’s to its right (which is a keypad encoder). Without placing the components on the printout first, I may not have known I would have a problem until trying to solder all the parts onto the board. Note that I don’t always place passive components, but I do verify that the resistors and capacitors will be the correct size before finalizing my layout.
Sometimes a part is larger than the footprint shape. In my most current project, I have a ZIF socket that I’m using, which is large. Not only is the ZIF socket larger than the footprint that I’m using (generic DIL-40), when the lever is in the “locked” position, it might interfere with other parts. The picture below shows the original layout that had two problems: the bottom part of the ZIF socket would have interfered with the headers for the Mega shield, and the locking lever would have interfered with the LCD screen. The good layout solved these problems. Note that I keep all of my layout printouts in my project notebook (even the bad ones!). I will write notes about what didn’t work, what I did to fix things, and other comments. You never know when you’re going to look back on old projects and remember an important detail, or you might get an idea about something to try in the future.
Check connections twice — I will check my connections at least twice. I zoom in heavily in board view and look at every connection. If the project is still on my breadboard, I physically trace the wires to their sources and verify with the board layout in Eagle. This is made easier by naming all of your connections when you’re in schematic view, then just looking at the net names will give you an idea of what you’re doing (but this assumes that you’ve named them correctly, so verify with your pinouts on Eagle schematic view!). When I say that I do this twice, I do it on two separate days so I don’t allow the bias of just having looked at it make me skim over when I “double check.” Checking on separate days makes me do a good job twice.
Route your connections — If you don’t route your connections you might be in for a surprise. I ordered boards once where I hadn’t actually hit save on the software after routing, and uploaded the board to the manufacturer’s website. I didn’t realize it until I got the boards back in the mail and nothing worked after soldering parts on one of the boards. I used a multimeter in continuity mode and realized that none of the pins were connected. When I contacted the manufacturer, they said it can be a common mistake. But it is a mistake I will never make again! Now I make sure that when I upload my board to the manufacturer, I visually check that the top and bottom layers have wires routed. Otherwise, I’ll go back to my Eagle file and fix things up.
Below are two screenshots from the ordering process on OSH Park (mentioned in more detail below). Note all of the wires you see on the top and bottom layers. If those are absent, then you probably haven’t routed the wires at all. There’s even a helpful paragraph about this in the text description on the right in both screenshots. Trust me, this is a step I will NEVER skip over again. (Note that your design may not use both the bottom and top layers if it is very simple or just uses a few parts… but at least one of the layers should have wires routed.)
Label your board
One thing I do with all of my PCBs is I write down what the board is, and also put a version number and date on the board. You might think that you’ll always just know what a board does, but if you’ve designed as many as I have, sometimes you can forget exactly what something is supposed to be. The version number is important if you’ve gone through any revisions on the board. (I’ve changed boards to add functionality or just because I’ve made a mistake on a previous version.) The date is useful just to keep an archive of what you’ve done. (Added in 2024: it’s also useful if you ever need to double-check or cross-reference some aspect of the board to your project notebook. Because you should always label your project notebook with the dates you worked on a project, the date on the board helps you figure out where to turn to in your project notebook!) It can be fun to go back and look at your oldest boards and ask yourself what you would do differently if you were to design them again.
On some boards, it can be useful to use the silkscreen layer to include important information. On a board I built of a constant current source, I have two sets of banana plug connectors (called binding posts). One of them is labeled with the circuit symbol for a DC power supply (that’s where you connect the power supply), and the other is labeled with a circuit symbol for a DC current source (that’s where the constant current source comes from). When students use this they can match up the symbols to their circuit diagram to see how to use it.
I built a 16-segment display breakout board. I took a screenshot of the datasheet, converted the layout to a BMP file, and imported it into Eagle to include as part of the silkscreen layer. This helps students figure out what segment corresponds to what letter so they can figure out how to wire it up. These two boards are shown in the photograph below. (Note that the current source is sitting in a 3D printed case so that the bottom components don’t short out. Also note that the 16-segment display breakout board isn’t completely finished as it’s missing one of the two pin headers.)
Ordering a board
My go-to company for ordering PCBs is OSH Park. They are located in the US, shipping is free, their turn-around time is relatively quick, their customer service is excellent and responsive, and the quality of their products is high. Their standard service for prototype boards is $5/square inch. It’s worth it to economize on space, but you also won’t break the bank if you have larger sized boards. Depending on how many boards I order most of my orders span between $50 – $100. I just purchased three boards for my universal logic chip tester and it ran me just under $50.
Use sockets
When designing a board meant to use ICs, use sockets rather than soldering an IC into place. Particularly for my boards, this is important. Most of my boards are used in active duty in labs every week and are manhandled and abused by students. Being able to replace a chip is much more economical than having to throw away a board and buy a new one. If the project uses a microcontroller and I want to update the firmware, I can easily remove the chip, program it, and then replace it. Note that I use sockets even in the designs I make on a soldered prototyping board.
Solder, then test, just one board
It’s important to solder and test one board before soldering them all. This goes without saying, but if there’s a problem with the board, you don’t want to have just soldered components onto, say, 12 PCBs before realizing that none of them work. Desoldering components is a waste of time at best and may destroy the components and/or the boards at worst. Once you’ve verified that the board works, solder all of the boards and test each one. (It’s important for me to test all of my boards, as I then give them to students to use in labs. If I don’t test them, students will not be happy if they don’t work!)
If you find a problem with a board, it’s important to diagnose what the problem is. It can be hard to do this as, unlike a breadboard, you don’t necessarily have places to stick a logic probe. Recently I made breakout boards for a 16-segment display. The first one I soldered had the S and T segments connected together. However, this was an issue with an older board I had made to get the non-standard pin pitch to fit into a breadboard. (Note in the picture above of this PCB, you can actually see a second PCB in between the display itself and the breakout board. If I had just built the breakout board in the first place, I would have skipped that extra PCB.) I soldered a second board and verified that it was not a problem with my design.
My multiplier circuit is actually version 2.0, which you might have noticed on the photograph I posted of it above. What happened to version 1.0? Unfortunately, I had swapped the order of the inputs on the adder, so A4 (MSB) was treated as the LSB, and so on. That was an expensive and very embarrassing mistake. Fortunately I had used sockets, so the only components that I wasted were the pushbutton, barrel jack, DIP switch, and passive components (resistors and capacitors).
Protect against shorts
When I was a grad student, I spent many semesters as a teaching assistant. One time I TA’d for the electrical engineering senior design course. This was a year-long class where students would get a project deliverable given to them by a local company or professor, they’d design the project, meet with their “client”, TAs, and professors weekly, and then build a prototype. At the end of the year they’d show off their project to the entire campus. One group made a project with Arduinos. They placed the Arduinos onto a breadboard that had a metal ground plane on the bottom. All of the Arduino pins were therefore shorted together and as you can imagine, the Arduinos were totally destroyed. I will never forget that, and am glad that I learned from the mistake of my students. I usually place nonconductive adhesive craft foam on the bottom of my PCBs. This is especially important as, again, most of my boards are going to be used and abused by students. My worst nightmare would be that students would plug the boards in, and place them on top of something metallic (like the chassis to their power supply) and watch all the magic blue smoke come out of the boards I spent lots of time and effort designing, soldering, and testing. The photograph below shows the backsides of my PCBs so you can see the foam. (Note: make sure you finish soldering your boards before you place the foam!)
Hopefully this post is helpful and encourages you to make a PCB for one of your projects. Once you do it once, it becomes less scary. Once you do it a few times, you get more comfortable with pushing your comfort zone and trying out new things.