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.
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...
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.