The purpose of this article is to share with the growing hardware startup community my learning about printed circuit board design. It is addressed to you whether you are:
This article also introduces a PCB design tutorial for every question and concern you might have on that topic! It should be released within a few days at pcb.rocks.
Before going further, I want to mention the major contribution of my friend, Frédéric Boivin, who shared his knowledge and passion for electronic design. This article would be a lot shorter without his participation.
But since Fred helped a lot, this is a long article so I suggest you bookmark it for future references.
If you want to learn about a specific topic, always start with its basic vocabulary! For electronic design, I assembled a lexicon on pcb.rocks that contains the main terms and acronyms to understand.
Note that if you don’t have basic notions of electrical physic (voltage, current, Kirchhoff laws, etc.), you should probably start by reading and completing a few exercises. Otherwise, you won’t go far. One of the best free resources on the Web to learn is Khan Academy.
By clicking on the link below, you will get free access to four short lessons to learn the basics in electrical engineering:
This series of lessons is part of the Electrical engineering subject in the Khan Academy, which is also very interesting for any aspiring PCB designer!
Another great source of knowledge you can use is the MIT Open Courseware. Many of their courses are recorded and shared on their website. You don’t get MIT’s prestigious diploma but you can still learn A LOT! I suggest you start with this one:
Once you are comfortable enough with the basics, the first acronym you absolutely need to understand for the rest of this article is PCB, which means Printed Circuit Board.
Definition: A PCB is a manufactured board on which electrical components are assembled to form an electrical circuit. Sometimes people refer to the circuit with its components on it as a PCB.
To learn more about what is a PCB, visit the PCB Basics Tutorial by Sparkfun.
Also, if you are part of a team, make sure that your partners also understand this basic language. Otherwise, you might be in for a couple of unpleasant surprises such as being unable to share your progress with them, and that is very frustrating.
Designing an electrical circuit is very time and money consuming. So if you are an entrepreneur, your first reflex should be to stop and ask yourself a few questions to make sure that you are not wasting your resources.
Personally, I’m convinced that most hardware projects can be designed in-house. But since each startup and project has its own restrictions, my colleague Julien and I are working on a small online tool to help you take the best decision regarding your hardware project. It will be available soon on pcb.rocks so don’t forget to subscribe to get informed!
In the meantime, answer the following questions in regard to your project:
By answering these questions, you will have a better idea of where you should start (the future tool will be a guide in that reflection process). Depending on your answers, here are the possible outcomes:
Know that not every project actually need their electrical circuit mounted on a PCB. If you are only making one copy of your product, you should consider using a prototyping board. This will give you more flexibility to modify your design and you won’t need to pay high manufacturing or assembling costs. Sparkfun has a good catalog of prototyping boards of all types:
Otherwise, once it is clear that you need to produce a relatively large number of your product, you are ready to start the PCB design process!
If you want to design a PCB yourself and don’t really know where to start, don’t worry, you are at the right place!
The rest of this article is a beginner’s step-by-step PCB design tutorial. It can be applied to many projects, but it is mostly written with a focus on Internet of Things (IoT) projects.
Like for everything else, nothing beats practice! You won’t become a true expert unless you actually try and fail a few times. So, keep this in mind while reading the guide.
I also included illustrations and external references to make sure you don’t miss anything crucial. Additional resources can also be found in an organized way on pcb.rocks.
The guide structure goes as follow:
So, let’s start with step one!
First, you need to know what you want to make. To what need your product is providing a solution? What are its core features? Who is going to use it? How big or small will it be? Find as much information as possible on the topic and on the technologies required to make it work. You can use tools like Basecamp or Google Drive to gather all your notes and documents in one place.
Also, remember that this is an iterative process: as you dig deeper in the design of your product and as you get customer feedback, you will refine your design.
As a general guideline, almost every IoT project will need components from these three following families to interact with the outside world: sensors, wireless interfaces (ex: a Wi-Fi module) and wired interfaces (ex: an audio jack).
In addition to these three families of components, you also need to consider the following elements of your circuit:
I won’t go into the details since these components are more often filling a support function (making things work) than a core functional role (enabling additional functions of the final product).
For example, the Triangle speaker we designed at Nepsu has a power supply circuit with two main voltage outputs (5V and 3.3V). The product could not work without this part of the circuit, but 99% of the time, it is not something that makes the product unique. If for some reason, your power supply circuit can be considered as a unique asset of your product, then you should follow the same process as for the other elements above.
To make a quick analogy, it’s like saying that someone is special because of his lungs. Unless this person is capable of winning the Boston Marathon because he has bigger lungs, you won’t be talking about this part of his body often.
So, it does not mean that these support functions are less important, but you will have to worry about them when you start the schematic design in step 3.
While planning the general architecture of your electrical circuit, you will probably ask yourself whether you should manage a specific function by adding hardware components or lines of code in the software. If you are not familiar with those terms, here is a short list that resumes very well the difference:
For example, when I designed the Triangle speaker’s first circuit iteration, I had to route audio signals coming from the Bluetooth and Wi-Fi modules and from the audio connector through different stages of signal processing. I had to choose between (1) doing the signal processing within a single chip (a DSP or an audio-compatible MCU) or (2) routing the analog audio signal through a MUX and a series of op-amps, resistors and capacitors to split high and low frequencies.
The first solution is the “software method”, and the second one, the “hardware method”. While both methods work, you need to understand the advantages of each one and then choose the best way to implement the specific function needed on your circuit.
Here are some advantages listed for both methods:
Tip: With the latest technological progress, it is often preferred to choose a few large programmable components than to use many discrete components to achieve a function on a circuit. Why? Because it’s easier to update if there are some bugs to fix or new features to implement. Also, it usually takes less space on your board and fewer components to assemble (so it’s usually cheaper).
Once you know approximately what key functions you need to process with your firmware, you can start looking at the different microcontrollers on the market to find the best fit for your product.
Tip: If you are not 100% sure that the MCU you chose for your circuit is the most suitable for what you want to do, start with something slightly bigger than necessary and adjust later if needed.
Once you know what your main components are going to be, you can already create a first handmade prototype with development boards sold by the manufacturers of these components. Some manufacturers also have online tools to run simulations of their ICs in controlled environments. This can become handy at this point for some applications.
This step will likely be the most time consuming along with the layout design (step 4), especially if you didn’t take the necessary time to choose your core components and connectors correctly in the previous steps. If you already made those choices, this should be the execution part.
From this point going forward, if this is your first PCB design attempt, you must find resources to help you go through this process. Blog articles are great, but every project is a specific case so make sure to have it reviewed periodically by a more advanced PCB designer or engineer. You probably have an old friend who will be more than happy to give you a hand. In any cases, you can search on LinkedIn and reach out to a member of your larger network using Email Hunter!
You will also need to choose an EDA software platform to design your circuit. Some are accessible within a web browser while others need to be installed on your computer.
This platform usually has three main purposes:
To make a choice, many websites published different comparisons but they don’t seem to agree on one or two winners. So, I gathered that information into a section of pcb.rocks to save you some time searching on Google. I also strongly suggest you ask your PCB expert what EDA software platform he/she is using and if he/she recommends you to use the same. This, along with license price, community support and available documentation, can influence your final choice of EDA software platform.
Once you have found a PCB expert and a platform to work with, start by reading the whole datasheet of the microcontroller and the transceiver(s) you chose. It will tell you key information that you need to understand before working on other parts of the circuit.
Tool: D. Grover, from MSU (Michigan State University), created a short guide which explains the main sections of a typical electronic device datasheet. It is not meant to cover every existing parts, but it will accelerate your learning curve so that you make an efficient use of your time.
During your reading of these first datasheets, you will see two representations of the component (the MCU for example). One of them is a schematic representation, and the other one is the actual part with physical dimensions.
With these two representations provided by the datasheet, you have enough information to create your first part in your library of components. The EDA software platform you are using should come with some tutorials to teach you how to do so. Otherwise, the Learning section of pcb.rocks regroups the main free online resources for the major EDA software platforms on the market.
Once you have created your first component library and your first part in it, you can now create a schematic sheet to insert your part in your design.
Besides your core components, you will need to choose many secondary parts. These includes resistors, capacitors, but also a few inductors, and other small ICs to ensure that the circuit can work properly. At first, you might think that this is where your nightmares start but don’t worry, most of the work has already been done and documented by senior engineers within the datasheets and application notes.
As you saw in the datasheet reading guide, they often present at least one schematic of the main component with every other small component you need to add around it to make it work in the best conditions (see page 7 of MSU’s guide). Make sure to read the text that goes with these schematics as well!
When choosing secondary components, there are many criteria to consider besides the nominal value. I will keep it short by listing my top 5 criteria and then referring you to a few good resources who elaborate on that topic.
Bonus: Always choose Lead-Free / RoHS components for products meant for commercial use. Here is why.
So, these are the main general criteria, but for each type of component there are a lot of specific criteria to check and it can get complicated quite fast. A good reference for component properties is the IEC Common Database Directory. The user interface may look a bit retro, but IEC is the commission that officially wrote the technical definition of every specific term like Capacitance Tolerance, Terminal Diameter or Power Consumption and the way it should be measured and tested.
Also, a good place to start searching for electrical components is Octopart. You may have heard of DigiKey, Mouser, Arrow and other online distributors. Well, Octopart and Parts.io are basically merging the data from all those sites into bigger databases with user-friendly interfaces to interact with it (slightly more complex interface on Parts.io).
Octopart even partnered with a dozen PCB assemblers to create what they called the Common Parts Library. This is a good place to start for beginners particularly:
This step of the process can take many days of work and would require a whole blog to fully cover it. I won’t go into much more details, but keep in mind the tips given above:
This is not a standalone task in the design process of a PCB. I simply put it here because while you are working on the circuit schematic, there might be someone else in your team (an industrial designer for example) working on the 3D model of your product.
Tool: I suggest you go take a look at 3D4U.co, a newly created hub that regroup all the ressources you need to do 3D design and 3D printing. Check it out!
Make sure that this person is aware of the electrical requirements (connectors, PCB fixture, clearances, etc.). You also both need to agree on the space reserved to receive the circuit.
Tip: At this point, you don’t need the final version of the product in 3D, but by the end of the circuit schematic design phase, you need to know approximately the volume available for the PCB as well as the position of each connector (Power, USB, audio, ethernet, or whatever they might be).
In addition to physical restrictions, you will also eventually need to find a PCB “maker”. If your electronic project requires high precision tooling, or if the available space for the circuit is small it is even more important to think about that question earlier than later.
In the PCB production world, there are two main types of companies if you sort them according to what they do in-house: manufacturers and turnkey assemblers.
I assume that some large manufacturers can also assemble your board, but since each activity require different large machines and specific expertise, it is more businesswise to focus on only one.
It is the company producing the board itself. For projects of small to medium size, you can usually order your boards on internet. Note that if you do that, you will probably have to panelize your PCB design. This process consists of taking one PCB and copying it in order to fit as many copies as possible within a standard size of PCB panel (which vary depending on the manufacturer).
Eurocircuits is a PCB manufacturer that can give you an instant quote online. They made a nice short video on how a circuit board is made.
When ordering directly from the PCB manufacturer, you will receive a package of boards with no components. With a few tools and some motivation, you can go one step further and assemble your entire circuit by yourself (with the exception of BGA and other very fine pitch components). PCB.ROCKS also has a page with resources on that topic.
If, on the other hand, you don’t want to panelize your board and order it by yourself, you can find a PCB turnkey assembler instead. This second type of company is the one operating the pick-and-place machines. They also have ovens for the soldering and automated test equipment.
A PCB turnkey assembler usually develops long term business relations with board manufacturers and they are used to the panelizing process. So, if you are dealing with a PCB turnkey assembler and you don’t mind the small extra cost they might charge you for panelizing your design and ordering the boards, then it is the easiest way to do it. They can even order components on DigiKey and Mouser for you so you don’t have to ship them.
Whether you choose one type or the other, it is good to do it sooner than later because you will need to ask them their tooling limitations. Those are mainly the minimum sizes you can define on your board (electrical traces width, via/holes diameters, electrical pad spacing, etc.).
The vast majority of consumer electronics products currently on the market are equipped with a PCB with the following characteristics:
With this in mind, you can refer to the following table to find PCB design restrictions supported by most manufacturers. Note that for traces’ width and clearance, it is recommended to target slightly larger dimensions (e.g. 8mil instead of 6mil).
Keep in mind that these numbers may vary with the advance of technology and from one manufacturer to another. I looked at the following ones to create the table:
For more manufacturers options, see pcb.rocks’ dedicated page.
Once you have completed and reviewed many times your electrical schematic and your components library, it’s time take the schematic and transform it into an actual circuit with dimensions, layers, traces, components, etc. This result is called the PCB layout. All the EDA software platforms presented on pcb.rocks offer an interface to create PCB layouts.
But before you open that section of the platform, start by drawing on paper your PCB and add each main component on it. You should already see some logical sections taking form. If you have a wireless module, start with this part as the antenna(s) usually needs to be on one edge of the board.
Make sure to regroup your components on the board by functionality. For example, if you are building a Bluetooth thermostat with an integrated LED driver to control light strips, you could have the following configuration:
Once you have a clear idea of the configuration of your PCB, you can open the layout builder or whatever they call it.
Now, depending on your software, there might be some specific operations you need to do to create your project, import your schematic design, etc. I won’t go into these details but here is a list of guidelines you definitely need to follow regarding the design process itself.
“Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.” ― Ernst F. Schumacher
Key takeaway: “To implement a ground plane, one side of a double-sided PCB (or one layer of a multilayer one) is made of continuous copper and used as ground. The theory behind this is that the large amount of metal will have as low a resistance as is possible. Because of the large flattened conductor pattern, it will also have as low an inductance as possible. It then offers the best possible conduction, in terms of minimizing spurious ground difference voltages, across the conducting plane.”
As for the schematic design step, there are so many notions to learn on electrical layout design. You can find additional resources at pcb.rocks.
CONGRATULATION! Once your schematic and layout are completed, you’re almost done! The next steps are a lot shorter in their execution time but still crucial to the success of your project.
Prototyping a circuit can be very expensive, but it is a necessary step. To minimize the time and money spent, make sure to review your electrical design many times.
Here is a checklist of elements to verify before sending for prototyping.
Also, make sure that someone else (your expert helper for example) go through your design one more time to see if anything is missing. You want to reduce your chances of failure as much as possible to minimize the number of iterations you will have to make. Step 9. Iterate will give you more details on that.
Once you reviewed your final layout many times and asked for at least one additional person to review and challenge your design choices, you can now generate the manufacturing files which are going to be needed to create the prototype: the Gerber files.
These files can be regrouped into three categories based on their function.
The first category is the one with the most files. In fact, your manufacturer will need one file for each layer composing your board that needs to be customized. It usually includes:
The second category regroups files related to drilling. Usually, you will only get two files during the export process:
Finally, the third category will only be needed by your PCB assembler. If you have SMD components on both sides of your PCB, you will get two files for the paste (to create a metal stencil). You can also generate a .csv or .txt file which is used by the pick and place machine to determine which component is placed where and in which order.
Note that some PCB assemblers prefer not to use automated machines for small production runs since it can be longer to do the setup than to just assemble the whole board manually. In these cases, they won’t need the pick and place file.
Sparkfun published a short tutorial on how to generate Gerber files in EAGLE. Even if you are not using the same software, you can refer to it as an example since most EDA software platforms present similar interfaces for this step:
Once you have ordered you first prototypes, it will be like a countdown before Christmas! When you get the box at your door, you will be impatient to unwrap and plug your new toy like if it was 100% guaranteed to work the first shot.
First, even before receiving the prototype, you can start preparing the testing phase. If you don’t have the tools to test and debug your PCB (like me 2 years ago), you can refer to the equipment page on pcb.rocks to find suggestions. A good option for small budgets is also to buy used equipment!
With these tools in your home lab, you can now start the testing phase!
Before plugging the board, though, it is best practice to examine the circuit. Take a few minutes to look at each part to make sure everything is well soldered to the good pad and that there is no short-circuit.
Once everything looks OK, you can plug the power connector (ideally connected to a “Current Limited Power Supply” like the BK Precision 1550 (in two of the recommended kits) to limit eventual damages.
No explosion? No smoke? Good!
Does the power supply provide a reasonable quantity of current? If it’s a yes, then you beat the odds! Otherwise, if you are having trouble with a potential short-circuit at this point. A thermal camera like the FLIR One will become your best friend!
See what it looks like on a similar device:
You can also probe a few test points to make sure that your voltages are within the tolerances you fixed in the design steps.
When you know that your circuit is powering up properly, there is still some testing work to do. A very important part of the testing phase is to test and characterize each function of your circuit to make sure it works as intended. In other words, it’s great that the circuit does not explode, but you need to test it to make sure that:
Then you need to test its limits:
For example, in the Triangle speaker, we need some large capacitors to supply current to power amplifiers. When we tested the product, we needed to make sure that these capacitors would last for a long time. Components manufacturers will give you a standard lifetime when the component is used at its peak operating temperature.
In our case, we chose polymer capacitors because they are more reliable (but more expensive) than traditional aluminum electrolytic capacitors. A standard lifetime for these components is 2000 hours when used at 105°C. To estimate the lifetime at lower temperature, we can use the following formula:
In words, we simply have to multiply by 10 the initial 2,000 hours for each drop of 20°C under the maximum temperature. So for a peak operating temperature of 65°C, these polymer capacitors are supposed to be functional within specified values for about 200,000 hours (22 years and 10 months!).
To make sure that this lifetime will be reached, we need to measure the temperature of the capacitors after at least a few hours of operation in the final product operated at the most demanding state for this particular component.
In our example, we needed to test the product with low-frequency sounds (bass) playing at high volume because this is the state during which the capacitors are solicited the most. We used the thermal camera mentioned above to make our tests.
You may have to run several tests in order to validate that each of your components with higher risk of failure is well chosen. If you don’t feel like you have enough knowledge to identify them, don’t hesitate to ask for help once again.
When your first series of tests in the lab is completed, it’s time to get your prototype(s) on the field!
This is the real test for your product, at least if you are making a product with the intent of commercializing it like in the case of a startup company.
You could have done it earlier with the first handmade prototype mentioned at the end of step 2, but otherwise, it is now time to put your prototype in the hands of your target customers to get their feedback.
Which features do they like? Which one is their favorite?
What should be reworked and improved?
Is there any missing function to make it a commercial success?
This is not really part of the PCB design itself, but as the designer of the electrical circuit, you can definitely learn a lot by having access to these comments received from early customers. This can tell you for example if your target audience likes the interaction with the product (buttons and sensors, wireless connection configuration, connectors’ disposition, etc.).
If you are part of a startup, you must read The Lean Startup by Eric Ries. He is considered as the first author who clearly explained the importance of the (customer) feedback loop.
If you are part of a startup in the process of putting a product on the market, you need to know what the market want. I referred to The Lean Startup approach in the previous step because this is exactly what this approach is all about.
I said earlier that you want to reduce your number of iterations to save on prototyping costs. It is still true, BUT…
If you have a prototype, I see two reasons why you would want to create a new version:
The ideal case would be that your product will work perfectly at the first attempt, will fulfill all of its functions without bugs and glitches, and will answer a real need that your target customer has. Obviously, this doesn’t happen often, so be prepared to iterate!
The number of iterations varies depending on the complexity of the product, certifications needed, etc., the industry’s average being around 3 iterations.
This step does not apply to every project. For example, if you are making a product for your own use only or working on something for a client who will only need a few copies of it, you still need to do it right but you usually have more latitude regarding the cost. For example, a 5$ difference in the unit cost of a DIY project is not a deal-breaker, but it can easily be one for a project with a 100,000 units production run.
The optimization of your project for mass-production could be the topic of a whole blog article like this one. Since we are still working on this part for the Triangle speaker project, I might write this article in a near future. In the meantime, the EEVblog posted two very interesting videos about DFM principles (Design for manufacturing) a few years ago. Dave also explains in details what is the panelization process I referred to earlier. Check it out!
Well, that’s pretty much it. I hope this article as well as the PCB.ROCKS website will guide a lot of newcomers in the field of electronic design. I took a fair amount of time writing it so if you think this is good content, please give us some feedback. It is much appreciated!
Thanks for reading!
If you enjoyed this article, recommend it to your friends.
Want to know more about Nepsu? Joins us on our journey to create the perfect speaker