© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
F. FrigeniIndustrial Robotics Controlhttps://doi.org/10.1007/978-1-4842-8989-1_19

19. Fabrication

Fabrizio Frigeni1  
(1)
Shanghai, China
 

There is nothing more exciting than holding in your hands a piece of hardware that you personally designed, whether an electronic circuit board or a robotic mechanical joint. In this final chapter, we quickly go through the main steps required to produce electronics and mechanical components for a robot (or any other machine, for that matter) using widely available CAD software.

PCB Design

At this point, you have probably completed the schematic of an electronic circuit based on the designs described in the previous chapters. It is now time to turn it into a real printed circuit board (PCB) and make a final product out of it.

The process involves the following steps:
  • Component selection: This is a lengthy step where you need to choose each electronic component for the board and compile the bill of materials (BOM).

  • Layout design: You use a dedicated software to place all the electronic components of your circuit on a canvas and connect them with each other to generate the final design of the board.

  • Board manufacturing: You send your layout files to a professional manufacturer, who will build the board for you in a couple of days.

  • Components assembly: You send your BOM to the manufacturer, who typically purchases the components for you and solders them on the board.

Some hobbyists like to manufacture and/or assemble the board by themselves; however, outsourcing those tasks to a professional manufacturer is much easier, faster, and cheaper. If you plan to produce high-quality boards in high volumes, you practically have no other choice.

The first step consists in selecting the right components for the board. You might have six N-channel MOSFETs in that motor driving bridge you just designed, but once you actually go purchase those switches, you will literally find hundreds of different options from several manufacturers. Besides looking at the obvious electrical characteristics (e.g., rated voltage, current, resistance, etc.), you also need to filter the available options according to more practical factors: price (because your product needs to be affordable), inventory (because basing a production on rare components is risky), size (in case you have specific space limitations), mounting type (surface mount devices are much cheaper to solder than through hole components but are less resistant to mechanical stress), tolerance (tight tolerances against temperature variations are expensive but required in some cases: e.g., current sensing resistors), and operating temperature (e.g., some power boards are expected to work at much higher temperatures than simple logic boards).

In general, it is always a good idea to select two or three compatible options, so that if your main choice becomes unavailable at a later stage, you can quickly switch to another component without the need of redesigning the entire board. Components can be bought either directly from the original manufacturers (best when in large batches) or from large distributors (e.g., Digikey, LSCS, Mouser, etc.). The most convenient option is to have the PCB manufacturer purchase all the components for you and assemble them directly after fabrication.

Once you have chosen the components, the next step you need to accomplish is to produce a good layout design of your board. There are a number of software packages that you can use to turn a schematic circuit into a PCB layout. Some are free, while others are very expensive but probably offer more features and support. Some are web-based, while others need to be installed on your computer and come with a large number of libraries. A few common examples to choose from are Altium, Eagle, EasyEDA, KiCad, etc., the last one being my personal favorite.

Regardless of which software you use, the concept is similar for all of them. Each electronic component in the circuit schematic is transformed into its equivalent footprint, while each wire connecting two components is turned into a copper trace. Your job is to place the footprints on an initially empty canvas in a sensible way and then connect them using traces (see Figure 19-1 for a simple example).

A P C B layout board in which component footprints are placed and connected with copper traces.

Figure 19-1

A PCB layout consists in placing components footprints and connecting them with copper traces

Depending on the size and complexity of a board, traces can run on different layers across the board. The simplest boards only have two layers: one in the front and one in the back. The example shown in Figure 19-1, being a very small board with only a few components, only requires two copper layers: the top shown in red and the bottom in green.

However, when wiring larger boards with several components, you quickly run out of free paths, as the traces start clogging up the space on each layer. The solution is to add more internal copper layers in the structure of the PCB and use them to build more traces. Boards for common industrial products typically have four to ten layers. Figure 19-2 shows a zoomed-up detailed view of a four-layer board (top layer red, middle layers yellow and purple, bottom layer green). Wiring such boards with only two layers would have been impossible.

A four-layer P C B layout board with interconnecting traces on different layers through vertical interconnect access.

Figure 19-2

Details of four-layer PCB layout

Interconnecting traces on different layers is done using vias (vertical interconnect access), which are basically holes drilled in the PCB and plated with copper to allow for electrical (and thermal) connectivity between layers. Vias can be drilled from the top layer all the way through to the bottom layer (through vias), but they can also connect only one outer layer with one or more inner layers without exiting on the other side of the board (blind vias), or they can even be entirely invisible from the outside and only connect inner layers (buried vias). All three kinds of vias are shown in Figure 19-3. Buried vias allow for higher density of connectivity but are also more expensive to fabricate. Vias are normally empty inside but can also be filled with copper (at an extra cost) to increase thermal and electrical conductivity, as is often the requirements for power applications.

A model diagram represents the vertical interconnect access with four layers top, bottom, and two middle layers which contain through vias, blind vias, and buried vias.

Figure 19-3

Vias are used to connect traces running on different layers

The thickness of each copper layer can also be adjusted depending on the application. The standard size is 35μm, which works fine for low-power signals. However, if the traces are carrying large currents (e.g., to the motor windings), then a thicker copper layer is desirable to prevent overheating and damage to the board. Thicknesses of 70μm, 105μm, and more are common, although increasingly expensive. Given the chosen thickness, a simple trace calculator program can be used to determine the minimum required trace width to allow a certain maximum current to flow.

As often happens with power electronics, the ability to dissipate heat is critical. A PCB can quickly heat up if its components and traces need to carry high currents. The generated heat must be dissipated to prevent damage to the components and to the board itself. There are a few rules to keep in mind during the PCB design in order to optimize heat dissipation:
  • Smart layout: Avoid placing too many components that generate heat next to each other. A higher density makes the board more compact but also more difficult to keep cool.

  • Copper areas: Place large copper areas around and/or below critical components to allow the heat to sink away.

  • Thermal vias: Electrical connectivity between layers is not the only purpose of vias. Thermal conduction is also a strategic function, especially when the vias are placed directly under the component’s body (in-pad vias, shown in Figure 19-4). In that case, the vias are typically filled to avoid the solder paste flowing away during assembly. During operation, the heat generated by the component is quickly drawn away by the vias and dissipated through the other layers.

Three models illustrate the thermal vias that are placed directly under the body of the component to carry the heat away.

Figure 19-4

Thermal vias placed under a component help carry the heat away

  • Metal substrate: Power electronic boards are commonly built on a metal substrate, as shown in Figure 19-5, typically aluminum, although copper alloys are also possible. The resulting thermal conductivity is greatly enhanced if compared to standard boards built on fiberglass substrate. The metal board is also mechanically much more robust and can withstand stronger vibrations without bending or braking. The metal substrate can be mounted directly on the machine’s body for further heat sinking capability.

    A model illustrates a metal substrate with circuit layers and dielectric, where a metal substrate is directly mounted on the body of the machine for further heat-sinking capability.

    Figure 19-5

    A metal substrate can quickly conduct heat away from the PCB

Besides heat management, another important aspect of designing a PCB is electromagnetic compatibility (EMC). This is a complex topic with strict regulations for products to be released on the market. The goal is to prevent electromagnetic interference between our electronic circuit board and other devices operating nearby.

A PCB can emit radiation intentionally (e.g., from Wi-Fi or Bluetooth transmitters) but also unintentionally (e.g., from the high-frequency switching transistors of the servo drive). Also, high-speed signals (e.g., SPI communication lines) propagating through long traces with sharp bends generate electromagnetic waves. A general suggestion to minimize unwanted radiation is to keep the conductive traces as short as possible and their bending as smooth as possible. Long traces typically act as stray inductances and have the tendency to emit radiations and also pick up electromagnetic noise from external sources, which can cause interference. High-speed logic signals traveling through traces with sharp angles can easily reflect off the edges also generating significant interferences.

Adding large areas of copper to the PCB design strongly helps shielding against electromagnetic fields. Sometimes entire layers of the board are dedicated to that purpose (ground layers); incidentally, they help with heat dissipation as well.

Electromagnetic interference (EMI) does not only travel through air: power lines can also carry a considerable amount of interference. EMI filters are often placed at the input of a board to reduce the amount of external noise making its way into the circuit. Additionally, decoupling capacitors should be placed next to each IC to protect them from glitches on the power lines (see Figure 19-6). In general, when placing components during the design phase, make sure to search the datasheets for specific layout requirements from the manufacturer.

A photograph of a P C B contains some I Cs, along with some decoupling capacitors placed next to each I C to protect from glitches on the power lines.

Figure 19-6

Decoupling capacitors help protecting ICs from glitches on the power lines

The footprints for each component must carefully match the physical size and pin pattern specified on the datasheet. Some manufacturers provide footprints; most do not. You can quickly draw them out yourself and build your own library of favorite components. Alternatively, you can search on third-party libraries (e.g., Ultra Librarian, SnapEDA, etc.), though you should carefully double-check the footprints you download because some of them are incorrect. A mistake found during the design phase is much cheaper and quicker to fix than when it is found after the board is manufactured.

Once you have completed the design, the last thing to do is to run a rule check. That is an automated software check that will tell you if the design contains fabrication mistakes: traces too thin or too close together, components overlapping each other, etc. If all works out fine, you can now enjoy a final 3D preview of the board: for example, Figure 19-7 shows the preview of the same board whose layout design was previously shown in Figure 19-1.

A model illustrates a three-dimensional computer-generated P C B design, in which component footprints are placed and connected with copper traces.

Figure 19-7

Computer-generated preview of the board after completing the layout

At this point, the board is ready for fabrication. You need to export the fabrication files (also known as Gerber files) and send them to your favorite manufacturer. There are plenty of options around for quick-turn prototyping as well as high-volume production: a couple I have used very often and found reliable is PCBWay and JLCPCB. Before submitting your project to them, you should always check their manufacturing capabilities and make sure that they can deliver what you need (e.g., minimum trace width and spacing, copper thickness, drill sizes, surface finishing, vias filling, etc.). More demanding requirements are usually available at extra cost. The manufacturing of a small size board in low volumes normally takes only a couple of days to complete (see Figure 19-8).

A photo of a P C B before assembly, and the pads where the components will be soldered.

Figure 19-8

Manufactured board before assembling. The exposed pads where the components will be soldered are clearly visible

The last step is assembly, i.e., soldering the components on the board. This is something many hobbyists like to do on their own, but again, nothing beats the convenience, speed, and accuracy of having the board manufacturer take care of the assembly phase for you. When dealing with large production batches and tiny BGA (ball grid array) components, then automatic assembly is a must.

Electronic components are placed on the board by a high-speed CNC machine and soldered together using a process called reflow soldering. First, solder paste (a mixture of powdered solder and flux) is applied to the board using a mask so that only the pads are exposed; then the components are placed on the board where they held in place by the paste; finally, the board is heated up to melt the solder and ensure permanent connection between the components and the pads.

The board is then optically inspected for soldering mistakes; optionally, an automated X-ray inspection and a customized functional test are also offered. Finally, the board is washed to remove all flux and dirt from the manufacturing process, then dried, packaged, and shipped to your address.

A photo of a P C B after components assembly, where the board is washed to remove all flux and dirt, then dried, packaged, and shipped.

Figure 19-9

Final board after components assembly

When you receive the board (see Figure 19-9), you should carefully check the most important connections with a multimeter, and when you are ready to apply power, do so with a current-limited supply to prevent nasty surprises. It goes without saying that all the hardware and software functions must be thoroughly tested before using the product in a real application setting.

Mechanics

We have focused throughout this book on the control of robots with the perspective of an automation engineer, who is typically more involved in the mathematical modeling, programming, and electronics design. The mechanics of a robot are usually designed and built by machine constructors and provided to the automation department as finished parts.

However, it is always interesting to be able to work interdisciplinary and at least have a sense of what is involved in the design and fabrication of mechanical parts. Whether you want to play with a hobby robotic arm, or test a simple prototype for research purposes, or even design an entirely new product for your startup, you will need to get your hands dirty and build something by yourself.

The first step is choosing appropriate materials, depending on the complexity of the design, the requirements of the final product, and the skills you have available. Over time, I have built several hobby robots using a number of different materials: in my beginner years, I started with simple wood or even LEGO blocks, since they are easy to work with and do not require any complex or costly manufacturing processes. Their flexibility, however, is quite limited. Later, I evolved to more advanced materials, plastic, aluminum, and steel, using a combination of CNC machining and 3D printing manufacturing processes.

Aluminum is cheap and easy to machine, arguably offers the best strength to weight ratio, and looks very attractive indeed when anodized. Steel is more expensive but much stronger. The most common stainless steel is type 304. For some critical parts, where mechanical stress is expected to be particularly high, you can consider using steel type 45, which is reinforced with additional carbon and offers increased strength. In general, a combination of different materials can be used for different parts, according to their needs, always keeping in mind the optimization of weight and cost. As for plastics, nylon is a black, good-looking material, which I typically use for the outside cover of machines and for electronic cases.

The fabrication process is similar to what we described for PCBs: you first use a CAD software to design the part and then submit the files to your favorite manufacturer who will produce the component and ship it to you within a couple of days. There is a large variety of software packages, within different price and functionality ranges, that can be used for to design 3D objects. I personally use Fusion360 (see Figure 19-10), but any other option is equally valid. Besides exporting the fabrication files for the manufacturer, you can also export object meshes and use them in Unity for simulation purposes (see Section on Importing CAD Models in Chapter 12).

A screenshot of a three-dimensional object designed with the use of software for the fabrication process.

Figure 19-10

Motorized machine joint designed by the author

Most manufacturers provide a convenient online interface to select detailed parameters about the process: material, tolerances, surface finishing, and color, plus many other customized requirements (often at extra cost).

Plastic processing is usually either 3D additive manufacturing (i.e., 3D printing) or injection molding. The first works best for prototyping and small batches, while the second becomes convenient with very large production volumes due to the cost of the mold.

Metal processing, on the other hand, is mostly a subtractive process: it starts with a raw piece of metal, which gets machined (e.g., milling, turning, cutting, bending) to remove the unwanted volume and generate the final part. There are, however, complex components that cannot be realized with standard machining processes. In those cases, additive manufacturing is also used for metal parts: 3D metal printing allows the creation of small complex components in short times (see Figure 19-11).

Two three-dimensional metal printing on the left and right generates complex parts and the creation of small complex components in a short time.

Figure 19-11

3D metal printing can quickly generate complex parts that would be difficult or impossible to produce with standard subtractive manufacturing

When designing mechanical components, special attentions is required to optimize their physical characteristics (least material use, lowest weight and cost) within the strength and torsion constraints imposed by the application. The optimization algorithm often takes a reinforced learning approach (see Machine Learning Section in Chapter 12) to generate parts with complex shapes, curved surfaces, and several holes to achieve massive weight reductions. For example, the component shown in Figure 19-11 on the right side was produced using this optimization technique (known as generative design) and then 3D printed.

Robotic arms can take great advantage from generative design, because weight reduction on the links allows for better movement speed and accuracy and possibly for smaller and cheaper motors.

Summary

The final step of a product generating process is the transformation of an abstract design into a tangible object. In robotics, we mainly deal with the fabrication of electronic boards and mechanical parts. In this chapter, we described the steps required to design a PCB, from its electronic layout to its actual manufacturing process, with attention to practical tips to optimize stability and performance of the board. Also, we briefly introduced some possible materials you can use to build the physical robot, from plastic to metal.

With this final chapter we conclude the book. I hope you have learned a few basic concepts and some helpful tricks on how to design, program, and build your own robotics controller. Good luck and have fun!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.161.225