GERARDO MORA - FAB ACADEMY

Week 08: Electronics Production

This week, we were introduced to electronics production, which is the process of turning circuit schematics into physical electronic components. Specifically, this week we focused on manufacturing a microcontroller printed circuit board, which we designed in Week 6. For this week's group assignment, the design rules for the PCB fabrication processes available at FabLab Ibero Puebla were characterized along with their machine settings. Additionally, the workflow for sending a PCB to a boardhouse was also documented. Click here to check on this week's group assignment page.

Work log

Completed tasks

  • Described the process of tool-path generation, milling, and soldering.
  • Described the workflow used and identified potential issues.
  • Manufactured a microcontroller PCB.

1.What is a PCB?

A printed circuit board (PCB) serves as a physical base that supports and electrically connects the components of an electric circuit. Almost all modern consumer electronics, like phones, tablets, smartwatches, wireless chargers, and power supplies, use PCBs. A protoboard circuit and a PCB can implement the same schematic, but they differ in how the connections are made. In a protoboard, connections are made with jumpers, solder bridges, or point-to-point wiring, making them ideal for stages of experimentation when frequent changes are expected. In contrast, connections on PCBs are etched onto one or more layers according to a designed layout, which ensures reliability and efficiency.

A PCB is often made from a combination of strong, nonconductive materials that provide insulation, water resistance, and temperature stability. Common PCB materials include fire retardant 4 (FR4), metals, and polyimide (PI). When choosing materials for a PCB, it is important to consider factors such as cost savings, functional performance, eco-friendliness, and, perhaps most importantly, the tools available for manufacturing.Within a PCB, signals travel between points through thin etched pathways known as traces. These traces are typically composed of copper, a highly conductive material that enables electrons to move with minimal resistance between active and passive electronic components.

Active electronic components require electrical power to operate and perform functions such as switching, controlling, processing, or amplifying signals. Typical examples include transistors, operational amplifiers, and integrated circuits. In contrast, passive electronic components do not provide power gain or amplification; their main function is to store, dissipate, or transfer energy within the circuit. Common examples are resistors, capacitors, inductors, and transformers.

Early PCB designs relied on through-hole construction, which required electronic components to be inserted into holes on the circuit board. Through-hole components provide stronger mechanical attachment, are easier to prototype and hand-solder, and are often simpler to test and replace manually. However, these components take up more space and require drilled holes, which can increase PCB fabrication time and cost. Today, surface mount technology (SMT) has largely replaced through-hole components in PCB mass production. SMT components are significantly smaller, allow for higher component density, and have shorter leads that can reduce parasitic inductance and capacitance. However, SMT components can be more challenging to hand-solder and rework, and some packages are too small for easy manual probing.

2.EDA Software

For decades, circuits were drawn by hand, resulting in a slow and inflexible manufacturing process. However, with the introduction of computer-aided design (CAD), printed circuit boards (PCBs) could be designed similarly to mechanical components. This advancement accelerated production and allowed for easier error detection and updates. Electronic Design Automation (EDA) software suites provide tools for designing, simulating, verifying, and preparing PCBs for manufacturing.

The PCB design process encompasses:

  1. Schematic creation: Designers create a two-dimensional blueprint of the printed circuit board (PCB) using Electronic Design Automation (EDA) software, which allows them to identify components, their placement, and the connections between them.
  2. Material selection: Designers choose board materials based on the requirements of the final assembly, considering both performance needs and the malleability of the substrate. Substrates can be rigid, flexible, or a combination of both. Common material options include FR-4, polyimide laminates, composite epoxy materials (CEM), and liquid crystal polymer, among others.
  3. Design review:To proceed with production, simulation software is employed to test and validate the performance of the PCB under various conditions. These tests ensure that the design choices, such as the selection and placement of components as well as the length and shape of the traces, meet all specified requirements.

3.KiCad

I have worked on KiCad in the past, and I wish to deepen my knowledge of this tool. Additionally, the Fab Academy team shared with us a library with plenty of symbols and footprints for electronic components that we may use throughout the remainder of the course.

For starters, KiCad is an open-source software suite designed for creating electronic circuit schematics and printed circuit boards (PCBs). It features an integrated workflow that enables users to design a schematic in conjunction with its corresponding PCB. Additionally, KiCad offers various utilities to assist with circuit and PCB design. These include a PCB calculator for determining trace width, resistance, and current capacitance; a Gerber viewer for inspecting manufacturing files; and an integrated SPICE simulator to validate circuit behavior. KiCad is compatible with Windows, macOS, Linux, and Docker, and it supports PCBs with up to 32 copper layers, making it suitable for designs of varying complexities.

4. My PCB design

This week, I designed the PCB that I will use in my upcoming electronics assignments and to get acquainted with a microcontroller that I will use for my final project. The PCB I designed is based on the Xiao ESP32C6 board, as I aim to utilize its connectivity options and processing power to assist with debugging during indoor testing and to serve as the brain of my robot. Furthermore, the Xiao ESP32C6 can host RTK rover firmware and instructions for relaying commands to other microcontrollers. This capacity will be useful since an RTK module like the UM982 can interface with the Xiao ESP32C6, perform positioning operations, and relay that information to the Xiao without overloading it. Another design consideration I took into account when designing this board was the tools available for fabrication. FabLab Puebla is currently equipped with CNC3018 and monoFab SRM-20 milling machines, which are ideal for manufacturing one-layer PCBs. However, manufacturing double-sided PCBs with these machines can be a daunting challenge; as such, I decided to make my design a one-layer PCB. Another design consideration was the surface-mount package size; our local instructor advised us to use 1206 SMT components. That number is based on the component's dimensions in inches: 12 = 0.12 inches long and 06 = 0.06 inches wide, which is approximately 3.2 mm x 1.6 mm; those dimensions are still comfortable for manual soldering.

4.1. Getting started with KiCad

CNC3018

Before I began designing my PCB, I first installed the component library provided by the Fab Academy team to ensure compliance with the necessary component packages and sizes. There are two methods to install a library. The first method involves clicking on the icon for the "Plugin and Content Management" menu, which opens the plugin and content management interface. This interface features a search bar for locating specific add-ons organized into four categories: Plugins, Fabrication Plugins, Libraries, and Color Themes. To find the Fab Academy Library, I entered "KiCad FabLib" into the search bar. I chose to download the top option on the list because its description included links to the repository maintained and updated by its users. After clicking "Install" and then "Apply pending changes," a window titled "Applying Package Changes" will pop up, showing two progress bars along with details such as the download URL and operation status. Once the progress bars are complete, we can click "Close."

Preparation for fabrication
KiCad library installation
Sujetadores
Placa en CNC lista

Once the folders containing each type of file are decompressed, if the download proceeds without any problems, our folders should include one file with the .kicad_sym extension. This file contains all the symbols from the boards currently offered by Seeed Studio. A second folder should contain several files with the .kicad_mod extension, which correspond to the footprint files for each board currently available from Seeed Studio. A third folder should contain the .step file, which represents the 3D model.

File with the .kicad_sym extension:

Herramienta de cortes

Files with the .kicad_mod extension:

Bloque a sustituir

Adding an electronic component's footprint is almost the same as adding a symbol. The major difference is that the process starts by selecting the "Manage Footprint Libraries" option under the Preferences menu. Additionally, the .kicad_mod file may not be visible when trying to add its path while viewing it through our file browser opened from KiCad. In this case, the program will focus on localizing the folder containing the file rather than the file itself.

Buscador de bloques
Enlace de bloques
Bloques enlazados
SVG-Selection Compressed
SVG Cargado
SVG Invertido
Seleccion de herramientas
Raster-Offset Compressed

Offset number was changed from 4 to 1

Calculate Mill Raster

Clicking the footprint cell will open the Footprint Chooser. Footprints are also sorted by libraries and can be filtered using the search bar on top.

3D Simulation

After placing the Xiao ESP32C6 board, I began designing the power supply section of the breakout board. I started by adding a couple of SMD horizontal pin header connectors to accommodate the voltage and ground terminals of a power supply. I also included a voltage regulator to adjust the input voltage to a level that would safely power the Xiao board, along with a couple of capacitors. My intention was to power the Xiao with a 5-volt signal. I selected a regulator from the fab library and included the capacitors according to the recommendations outlined in the regulator's library. It is advised to place a 0.47 µF capacitor between the unregulated voltage and the regulator's input pin, as well as a second capacitor at the output of the regulator, with a minimum value of 22 µF to maintain stability. The suggested values indicate that the input capacitor should be ceramic (without polarity), while the output capacitor should be electrolytic (polarized). A small input capacitor is usually placed to handle fast, high-frequency noise and spikes coming from the supply line, acting like a nearby fast reservoir. A larger capacitor is usually placed at the output of a regulator to handle larger changes in load current while keeping the regulator's output stable.

On-Off File Generation
Candle Interface

One method for connecting components in KiCad involves clicking on a terminal of one component and dragging the cursor until it reaches the terminal of another component. Once you have identified the terminal you wish to connect, simply click on the other terminal to finalize the connection.

CNC Settings
File Loaded

Symbols that represent a power output and ground terminal can be added by accessing the Choose Power symbol menu, which can be opened by clicking on the fourth icon of the bar on the right side of the interface.

Candle Locked and Loaded
Candle Locked and Loaded
Audio Protection

Another way to connect components in KiCad is by using global labels. These labels can be created and accessed by clicking on the thirteenth icon in the bar on the right side of the interface. To ensure they function correctly, one component should have a label designated as an input, while the other component should use the same label as an output.

Wireless Terminals

The circuit design features an LED connected in parallel to the Xiao board, functioning as an indicator. When the board is powered on, the LED illuminates, indicating that the board is energized. To prevent excessive current draw, I placed a 1000-ohm resistor in series with the LED. This resistor takes in the extra voltage and keeps the current at a safer level. Since my regulator provides 5V and a typical red LED requires 2V, the voltage across the resistor is calculated as 5V - 2V = 3V. Using Ohm's law, I can determine the current: I = V/R; thus, I = 3V/1000 ohms = 0.003 A, which is equivalent to 3 mA. The resulting current value still results in an LED with notable brightness.

I also included an additional LED connected to a pin from the Xiao board and a pull-down button. I included these elements to help me figure out if the board gets damaged. In case I suspect the board is no longer working properly, I could program the LED to start blinking following some pattern; if the LED does not respond, that means the board may be damaged or needs a hard reset. A similar logic applies to the button; when pressed, it will send a high logic value to its corresponding pin. If the Xiao can get that read, it means the board is still functioning.

Peripherals

The schematic is complete. The pins on the Xiao board that can be soldered with through-hole pins have been connected to an SMT pin header, except for the two used for the LED indicator and the push button.

Schematic completed

Before proceeding with the PCB design, I ran the Electronic Rule Checker (ERC) from the Inspection menu. This tool detects potential mistakes that could lead to circuit failure. However, it is important to understand what the ERC considers a mistake. For instance, in my circuit, I did not connect anything to the pins on the back of the Xiao board because I do not need them for the deliverables I am preparing for the upcoming assignments. Nevertheless, the ERC flagged these unconnected pins as potential issues.

ERC Checker

I would like to evaluate KiCad's simulation capabilities prior to reviewing my PCB design. KiCad can simulate electronic components if their SPICE models, which are standardized descriptions of electronic circuits, are available. While KiCad may not be the first choice for simulation among some users, it is essential to acknowledge this functionality offered by the EDA software.

Simulations in KiCad are performed using the schematic editor. To start, you need to place SPICE-compatible components and set their values by double-clicking on each symbol to edit their properties. In this simulation, I connected a resistor in series with a capacitor, along with a DC power supply.

Circuit for simulation

To initiate the simulator, click on the fifth icon from the right in the top bar. This will open the simulation tab, where you can select the type of analysis you wish to conduct. In this section, you will also need to specify the source, starting value, final value, and increment step. After completing these fields and clicking "OK," the simulator will present a screen that allows you to visualize various graphs related to the simulation. To view specific data, the final step is to place a probe on the circuit at the point where you want to measure a value. Once the probe is placed, the window will display a graph representing the requested data. In this instance, I requested information on the voltage stored by the capacitor and its relationship with the current.

Simulation tab
Simulator screen
Simulation results

4.3 PCB Design

To translate our schematic to a PCB, we can open the PCB editor either from the schematic editor or from KiCad's main interface. Before proceeding with my design, I opened the Board Setup menu by clicking the icon resembling a PCB with a gear. I only changed the values for minimum clearance between traces and the minimum track width. I chose a minimum track of 0.8 mm, as that is the diameter of the V-tools used for engraving PCBs at FabLab Ibero Puebla, and as such, the minimum clearance is equal to the tool's radius, 0.4 mm.

PCB editor
Board Preferences

We can update our PCB from the schematic by clicking the fifth icon on the right side of the top toolbar. This operation imports the connections between components and can be performed whenever there are changes to the schematic.

Update PCB
PCB components

I determined the track width using the calculator tool offered by KiCad on its main interface. As I expect my board to run at 1 ampere, the calculated trace width for this current falls well within the 0.8 mm limit set by the V-tool. This parameter can be applied to the connection lines by double- clicking on them and changing their width value.

Calculator tool
PCB connections

An important step in determining the shape of a PCB is drafting the edge-cut layer. After switching to this layer, I outlined my PCB shape using lines that are 2mm wide. This measurement corresponds to the cutting tool commonly used during the outline milling process at FabLab Ibero Puebla.

PCB edgecuts

I also applied a copper pour to this PCB by using the copper zone tools. A copper pour is a large area of copper connected to a net like GND, creating a low-impedance return path. Copper pours can also assist with heat dissipation and noise reduction, and, in my personal experience, they can also reduce milling time. KiCad requires the user to repeat a similar shape to that of the edge-cuts layer to effectively apply the copper pour.

Copper pour menu

I executed the Electronic Rules Checker in conjunction with my schematic design. This time, I did not encounter any mistakes, only warnings. This indicates that my board can be manufactured as originally designed.

ERC PCB

3D model of my PCB design

STEP Model

5. Files

Here are the downloadable files for this week:

KiCad schematic and PCB layout

Reflection

While some ideas must initially be drafted by hand, such as circuit designs, it is advantageous to live in the era of EDA (Electronic Design Automation) software. I was previously unaware of the compatibility between EDA software and 3D CAD files; this capability can assist designers in more effectively sizing the spaces for housing electronics within a product.

Back to Weekly Assignments