National Week of Making Special - Make your own Printed Circuit Board (PCB) Part 1
06/174/2016 | 05:38 AM
I am writing this blog/book to help makers create a real product and introduce it to the market, with a focus on embedded firmware design. You should be able to read these lessons and have a good idea how to get things working in embedded firmware and understand the hardware and firmware development process.
This chapter will introduce you to the process and terminology that you will encounter as you develop your embedded hardware project and bring it to production. It is by no means an exhaustive coverage on this subject and is intended to give you an overview of what is possible. You will find a great deal of information out there on each of these topics if you look for it.
Product Development Process
It all starts with an idea. You found something that the market needs, or is just a super cool idea and it absolutely must be brought to market. I’ve been there. Most people would have no clue what to do next. Hardware engineering is HARD, and don’t let anyone convince you otherwise. But you might have a lot of experience in software, or perhaps you are good with your hands, or like me, you are just crazy enough to dive in and try to build this all by yourself. Good for you! You can do it if you never give up. Here is the general flow of how things should proceed.
Hacked prototype -- Optional
Part selection
Breadboard prototyping
PCB design (Schematics)
PCB development (Layout)
Manufacturing prototypes to production
Step 1: Hacked Prototype
When creating your own project from scratch, the first thing to do is to look around and see if you can find something similar. Tear it apart and figure out what makes it tick. Modify it however you want to get your point across. It can be ugly, and it’s OK at this stage to be really rough. When pitching your idea to others, it helps to have something that may be clunky but gets the point across. I see this all of the time. You can get an artist to render something awesome looking on paper or even with animations, then bring out your clunky hacked prototype with duct tape and glue and show your audience that your product is already in the process of becoming real. It’s not just an idea any more. This step is optional, but you will gain more insight into the problem that you are attempting to solve and gain feedback from others.
Accelerometer hacked into a pre-existing foam sword
Step 2: Part Selection
When you have shared the idea, gained valuable feedback, and feel that you are ready to move forward to creating a manufacturable product, the next step is to select your electronic components, also known simply as your parts. This is a very big step. This is the sole focus of another chapter; it’s that important. You should try to find support from the part distributors like Arrow and Avnet, as they have application engineers and connections to manufacturing representatives that can help you find the parts that you need for your application. There are millions of parts available from thousands of vendors and suppliers. There are also a million details that you have to get right so that all of your chosen parts will work together. Will they run on a common voltage? Can they talk to each other using the same types of communication interfaces? Can they perform quickly and efficiently enough? This step takes a while, and you might revisit this step after you have already begun your PCB development, because it is very tricky to get this step right the first time. But one way or another, you will need to pick parts and start moving forward with a design.
Step 3: Breadboard Prototyping
My book is aimed squarely at breadboard prototyping. This is the step in which you have already picked your parts, you have decided that you know how to use them, and now it is time to make sure that you really understand all of the implications of your particular part. It starts with dissecting the pinout and making sure that you understand the specs. Sometimes part specs are written in foreign countries and translated to English, making the intentions less than clear. Some part specs are hundreds of pages long. If you miss a footnote on a single page, it can bite you. It is best to learn exactly how to use the part when you are only using a breadboard. Prototype firmware doesn’t need to be pretty and maybe won’t be as well-performing as the production firmware. Your goal at this stage is to get basic communication and function from your chosen parts. Note that you don’t have to use an actual breadboard, either. I sometimes skip the breadboard entirely and make my connections right on the breakout board, then connect the breakout board to the pins on my Starter Kit.
SMT breakout board and jumpers to a Starter Kit
Step 4: PCB Design (Schematics)
Once you have real-world, first-hand experience in physically connecting your parts together on a bread board, the specs will make a lot more sense, and you should be very familiar with the part pinouts. You now have the experience necessary to enter your designs into a schematic capture program. You will most likely need to create your own schematicsymbols, which are little more than boxes that represent the part with pin names and numbers on them. Some tools include a library of schematic symbols, which is great if you can find your parts in there, but in my experience, they don’t ever seem to contain the majority of your parts.
Example Schematic symbol and connections for an RF component
You have a lot of options when it comes to schematic capture programs. Unfortunately, there is no industry-standard tool for makers. They are all inferior to the standard that exists in my mind. These are not easy programs to master! There are free tools, some inexpensive tools, and expensive tools. I will outline a few below that are popular, and you can download a demo or trial software until you find one that you like. All of the listed tools have schematic and layout tools integrated into one. Keep in mind that the tool that you choose for your schematics could heavily impact the type of tool that you choose for layout, especially if you plan on contracting the layout out to an expert.
Schematic Terminology:
Net – An electrical wire in your design.
Netlist – The pin-to-pin connection data for all nets in the design.
Layout – The part of board development that creates the board geometries.
Part Library – The collection of parts available to be used in your schematics. You can add your own parts as well, if the schematic software includes a library editor.
Reference Designator – Also known as REFDES, this is the identifying name of a component. Each refdes starts with a letter or a few letters, followed by numbers. For example, R123 is a resistor, and C123 is a capacitor.
BOM – Bill of Materials, which is nothing more than an itemized list of all components in the design. This is exported by your schematic capture software in a table format.
Step 5: PCB Development (Layout)
The process of placing your components on a Printed Circuit Board (PCB) and drawing the copper traces that connect the parts together is not for the faint of heart. Before I can even describe the process, I need to introduce the terminology...
Layout Terminology
Footprint – The area underneath an electronic component that makes contact with the board.
Pad – Also known as landing pads, this is the copper on the board that connects to the pins on your electronic components.
Trace – A connecting strip of copper that connects points on the board.
Breakout – The area around a component that “breaks out” the pins under the component and makes the traces available for connecting to other components.
Area Fill – A big fat trace, essentially, to create a large area of copper, generally used for power delivery.
Stackup – The board layers that are stacked on top of one another to make up your board.
Signal layer – A layer of the board dedicated to mostly signal traces and fills.
Via – A hole in the board that is filled with copper and connects different layers together.
Through-hole – Similar to a via, but larger to make room for an electrical components that have long leads that penetrate the board.
Anti-pad – A clearance in a plane to make way for a via or a through-hole so that they do not short against the plane.
Silkscreen – Paint that is added to the board to mark component locations and add text to the board.
Plane – A whole layer dedicated to mostly copper. There are ground planes and power planes.
Placement – The process of placing component footprints on the board.
Rats nest, or rats – The pin-to-pin connections of components that are without traces.
Routing – The process of turning rats into copper traces.
Routing Rules – Geometric relationships for trace-to-trace, trace-to-via, and other parameters.
DRC – A Design Rule Check (DRC) is used in layout software to indicate a violation of a routing rule.
Two-layer Board – A board that has a top side and a bottom side and no plane layers.
Four-layer Board – A board that has a top side and a bottom side and a power and ground layer sandwiched in between the signal layers, separated by dielectric
Autorouter – A tool that attempts to layout your board for you, like J.A.R.V.I.S in Iron Man. Don’t believe everything that you see in the movies!
Gerber Files – These are a standardized format and will be the output files of the layout process and will be sent to a board shop for quoting and manufacture. The files are usually zipped in a .zip file archive and uploaded to the vendor.
Whew! Now I can finally explain how to design the PCB using a layout editor.
Note: It is perfectly OK to outsource the layout of a PCB to a professional. This step can be very challenging for the novice. You must have an exportable netlist that is compatible to the layout tool that your contractor uses, so figure that out beforehand.
Example Layout Viewer
Most combination schematic and layout tools will integrate the process of laying out the board. However, it starts with the schematic connections. Once a few of those connections are completed, layout can begin. It is often necessary to create the footprint for your components yourself using a footprint editor and the mechanical drawings found in the part specs. The pins in these footprints are then mapped to the schematic symbol pins. Then, the components are placed on a board. Careful study of the pinouts of components are necessary to ensure that signals can breakout from the chip and connect to the other chips without creating impossible routes. This is the ultimate puzzle! If a trace is blocked in by traces in the area that are surrounding it, then you will have to “drop a via” to another layer and continue the routing on that other layer. You can see the potential for a big mess is very real if you fail to plan ahead.
When routing traces, the layout software uses routing rules as a guide to prevent you from inadvertently placing things too close together. If you don’t follow the rules, your board shop will reject your board with DRC checks and you will have to re-layout the board. Note that even with these rules, many layout tools will still violate the rules and either not warn you, or warn you later when you go to generate the Gerber files. Often, the board shop’s Gerber analysis software will find very small rule violations that are rounding errors, and it is up to you to haggle with the vendor to allow it, or go back into your tool and fix the rounding error. It’s a pain, and it feels like everything is stuck in the stone ages.
When routing your traces on the board, the pin-to-pin connections are shown as a rats nest; all you have to do to make the rats go away is provide a copper path between pins of components that are connected in the schematic. When all rats are gone and all DRC checks are clear, you can then export Gerber files and upload them to PCB board shops for quoting and manufacturing.
Schematic and Layout Tools:
Cadsoft Eagle – Most common tool used by makers, in my opinion. It is free up to a certain board size and number of nets and includes an integrated layout tool. I found the schematic editor a little bit unintuitive, but workable.
DipTrace – Also widely used by makers, this is an inexpensive tool for small projects with limitations on board size and number of nets. Still affordable for larger projects. I found this tool more intuitive for schematics than Eagle.
KiCad – Completely free and open source. It is currently going through a transition as it is being enhanced and revamped by the CERN organization, but it is completely capable of producing schematics, layout files, and BOMs. I have used this tool on a successful design.
PCB123 – I have built a board using this free software from a PCB manufacturer, Sunstone. It was easier than all of the other tools for both schematics and layout, at least to get started. However, your design is locked up in their tool, and they will charge a fee to release the design files to you. Some things that are free are not really free.
Cadence Orcad – Approaching professional quality. There is a free trial, but it is the most expensive tool on this list. This tool was acquired by Cadence, which is a huge Electronic Design Automation (EDA) company, and as such you need to contact a representative or dealer to buy it. But just because it is more expensive does not ensure that it will be any easier to use or be as intuitive as you would hope.
In the next section, we will finish the chapter with the overview of how to get that design built in the real world.
National Week of Making Special - Make your own Printed Circuit Board (PCB) Part 1
I am writing this blog/book to help makers create a real product and introduce it to the market, with a focus on embedded firmware design. You should be able to read these lessons and have a good idea how to get things working in embedded firmware and understand the hardware and firmware development process.
This chapter will introduce you to the process and terminology that you will encounter as you develop your embedded hardware project and bring it to production. It is by no means an exhaustive coverage on this subject and is intended to give you an overview of what is possible. You will find a great deal of information out there on each of these topics if you look for it.
Product Development Process
It all starts with an idea. You found something that the market needs, or is just a super cool idea and it absolutely must be brought to market. I’ve been there. Most people would have no clue what to do next. Hardware engineering is HARD, and don’t let anyone convince you otherwise. But you might have a lot of experience in software, or perhaps you are good with your hands, or like me, you are just crazy enough to dive in and try to build this all by yourself. Good for you! You can do it if you never give up. Here is the general flow of how things should proceed.
Step 1: Hacked Prototype
When creating your own project from scratch, the first thing to do is to look around and see if you can find something similar. Tear it apart and figure out what makes it tick. Modify it however you want to get your point across. It can be ugly, and it’s OK at this stage to be really rough. When pitching your idea to others, it helps to have something that may be clunky but gets the point across. I see this all of the time. You can get an artist to render something awesome looking on paper or even with animations, then bring out your clunky hacked prototype with duct tape and glue and show your audience that your product is already in the process of becoming real. It’s not just an idea any more. This step is optional, but you will gain more insight into the problem that you are attempting to solve and gain feedback from others.
Accelerometer hacked into a pre-existing foam sword
Step 2: Part Selection
When you have shared the idea, gained valuable feedback, and feel that you are ready to move forward to creating a manufacturable product, the next step is to select your electronic components, also known simply as your parts. This is a very big step. This is the sole focus of another chapter; it’s that important. You should try to find support from the part distributors like Arrow and Avnet, as they have application engineers and connections to manufacturing representatives that can help you find the parts that you need for your application. There are millions of parts available from thousands of vendors and suppliers. There are also a million details that you have to get right so that all of your chosen parts will work together. Will they run on a common voltage? Can they talk to each other using the same types of communication interfaces? Can they perform quickly and efficiently enough? This step takes a while, and you might revisit this step after you have already begun your PCB development, because it is very tricky to get this step right the first time. But one way or another, you will need to pick parts and start moving forward with a design.
Step 3: Breadboard Prototyping
My book is aimed squarely at breadboard prototyping. This is the step in which you have already picked your parts, you have decided that you know how to use them, and now it is time to make sure that you really understand all of the implications of your particular part. It starts with dissecting the pinout and making sure that you understand the specs. Sometimes part specs are written in foreign countries and translated to English, making the intentions less than clear. Some part specs are hundreds of pages long. If you miss a footnote on a single page, it can bite you. It is best to learn exactly how to use the part when you are only using a breadboard. Prototype firmware doesn’t need to be pretty and maybe won’t be as well-performing as the production firmware. Your goal at this stage is to get basic communication and function from your chosen parts. Note that you don’t have to use an actual breadboard, either. I sometimes skip the breadboard entirely and make my connections right on the breakout board, then connect the breakout board to the pins on my Starter Kit.
SMT breakout board and jumpers to a Starter Kit
Step 4: PCB Design (Schematics)
Once you have real-world, first-hand experience in physically connecting your parts together on a bread board, the specs will make a lot more sense, and you should be very familiar with the part pinouts. You now have the experience necessary to enter your designs into a schematic capture program. You will most likely need to create your own schematic symbols, which are little more than boxes that represent the part with pin names and numbers on them. Some tools include a library of schematic symbols, which is great if you can find your parts in there, but in my experience, they don’t ever seem to contain the majority of your parts.
Example Schematic symbol and connections for an RF component
You have a lot of options when it comes to schematic capture programs. Unfortunately, there is no industry-standard tool for makers. They are all inferior to the standard that exists in my mind. These are not easy programs to master! There are free tools, some inexpensive tools, and expensive tools. I will outline a few below that are popular, and you can download a demo or trial software until you find one that you like. All of the listed tools have schematic and layout tools integrated into one. Keep in mind that the tool that you choose for your schematics could heavily impact the type of tool that you choose for layout, especially if you plan on contracting the layout out to an expert.
Schematic Terminology:
Step 5: PCB Development (Layout)
The process of placing your components on a Printed Circuit Board (PCB) and drawing the copper traces that connect the parts together is not for the faint of heart. Before I can even describe the process, I need to introduce the terminology...
Layout Terminology
Whew! Now I can finally explain how to design the PCB using a layout editor.
Note: It is perfectly OK to outsource the layout of a PCB to a professional. This step can be very challenging for the novice. You must have an exportable netlist that is compatible to the layout tool that your contractor uses, so figure that out beforehand.
Example Layout Viewer
Most combination schematic and layout tools will integrate the process of laying out the board. However, it starts with the schematic connections. Once a few of those connections are completed, layout can begin. It is often necessary to create the footprint for your components yourself using a footprint editor and the mechanical drawings found in the part specs. The pins in these footprints are then mapped to the schematic symbol pins. Then, the components are placed on a board. Careful study of the pinouts of components are necessary to ensure that signals can breakout from the chip and connect to the other chips without creating impossible routes. This is the ultimate puzzle! If a trace is blocked in by traces in the area that are surrounding it, then you will have to “drop a via” to another layer and continue the routing on that other layer. You can see the potential for a big mess is very real if you fail to plan ahead.
When routing traces, the layout software uses routing rules as a guide to prevent you from inadvertently placing things too close together. If you don’t follow the rules, your board shop will reject your board with DRC checks and you will have to re-layout the board. Note that even with these rules, many layout tools will still violate the rules and either not warn you, or warn you later when you go to generate the Gerber files. Often, the board shop’s Gerber analysis software will find very small rule violations that are rounding errors, and it is up to you to haggle with the vendor to allow it, or go back into your tool and fix the rounding error. It’s a pain, and it feels like everything is stuck in the stone ages.
When routing your traces on the board, the pin-to-pin connections are shown as a rats nest; all you have to do to make the rats go away is provide a copper path between pins of components that are connected in the schematic. When all rats are gone and all DRC checks are clear, you can then export Gerber files and upload them to PCB board shops for quoting and manufacturing.
Schematic and Layout Tools:
In the next section, we will finish the chapter with the overview of how to get that design built in the real world.
PREVIOUS | NEXT