Week 8: Electronics Production

Assignments

Group Assignments:

Individual assignments

Group Assignment

Group Assignment – Computer-Controlled Machining

What I Learned from the Group Assignment

From the group assignment, I reinforced my understanding of different PCB fabrication methods by comparing mechanical milling and laser processing. Using the SRM-20, I observed how parameters such as tool diameter, cutting depth, and feed rate directly affect the resolution and quality of the traces. I also learned that even though machines have theoretical precision, the actual limits depend on the tool and configuration used. Through the clearance and width test, I was able to see how to determine the minimum trace width and spacing, which are essential for defining reliable design rules. Additionally, I understood the differences between milling and laser-based fabrication, especially in terms of materials, speed, and safety considerations. Overall, this assignment helped me better understand how to choose the right process and parameters to ensure successful PCB production.

Individual Assignment

KiCad Setup

The first step was to download and install the libraries required for Fab Academy. To download them, click here.


KiCad Schematic

After setting up the libraries, I started designing the schematic. I created a new project, which automatically generated a schematic file. Then I placed the components and connected them according to the design.

The Components: You can click the symbol shown in the video or just press A to open the component window. From there, you can search for the component you need. In that same window, you can also see the footprint, which shows how the component will look on the actual PCB. For Fab Academy, it’s important to use SMD components. You can confirm this if the footprint doesn’t include through-hole pads.

Power and GND: You can add power and ground symbols to ensure proper connections. You can also just press P to open the power symbol menu.

Connections: There are two ways to connect components in KiCad: using wires or using net labels. The method you choose depends on your design and how clean you want your schematic to be.

Proceso 1

ERC: The Electrical Rules Check (ERC) helps identify potential issues in your schematic before moving to the PCB layout. It detects problems such as unconnected pins or incorrect power connections.


KiCad PCB

Add footprints: Before switching to the PCB editor, it’s important to check that all components have an assigned footprint. If not, you need to assign them manually. This tool also lets you preview the footprint before selecting it.

After that, you can move to the PCB editor to place the components. Before routing, it’s important to define the design rules for your board.

These rules depend on the machine you are using. In my case, since I used the MonoFab, I set a clearance of 0.4 mm and a minimum trace width of 0.8 mm.

KiCad helps you by showing thin blue lines that indicate which components need to be connected.

I also discovered that you can add a GND plane, which helped reduce the number of traces and made routing easier. To do this, you select the area you want to fill and then press B.

Margin: To define the board outline, you need to draw it on the Edge.Cuts layer. I used a margin width of 0.8 mm based on the machine I was using.

DRC: The Design Rule Check (DRC) helps identify issues in your PCB before manufacturing, such as clearance violations or disconnected traces.


Gerber2png and Modsproject

First, you need to export the Gerber files from KiCad. Then upload them to gerber2png. You can access it by clicking here.

With the generated images, go to modsproject.org. You can access it here.

You need to click calculate before changing the PNG file. This generates the file used for machining. In the preview, you can see both the final PCB and the toolpath.


Cutting and soldering the PCB

Once all the files were ready, I proceeded to cut the PCB and solder the components.

I used the MonoFab machine for cutting. The origin is set at the bottom-left corner of the board. To calibrate the Z axis, I used a sheet of paper, similar to how you level a 3D printer.

Proceso 1

After cutting, I started soldering the components. At first, it was a bit challenging since I had never soldered SMD components before, but after some practice it became much easier.

Note: To solder the components, I used a simple method: first, I applied solder to one pad. Then I fixed one side of the component to that pad. Finally, I soldered the other side by applying solder to the joint between the pad and the component.


Testing the PCB

Since this week's focus was on making the PCB rather than programming, I used ChatGPT to generate a simple code where the LED changes its brightness depending on the ambient light.

#include <avr/io.h>
            const int ldrPin = D0;
            const int ledPin = D6;

            int minLuz = 178;  // mucha luz
            int maxLuz = 182;  // oscuridad

            float brilloSuave = 0;

            void setup() {
            Serial.begin(115200);
            pinMode(ledPin, OUTPUT);
            }

            void loop() {

            int ldrValue = analogRead(ldrPin);

            float normalizado = (float)(ldrValue - minLuz) / (maxLuz - minLuz);
            normalizado = constrain(normalizado, 0.0, 1.0);

            float brillo = 50 + (1.0 - normalizado) * 205;

            brilloSuave = brilloSuave * 0.9 + brillo * 0.1;

            analogWrite(ledPin, (int)brilloSuave);

            Serial.print("Luz: ");
            Serial.print(ldrValue);
            Serial.print(" | Brillo: ");
            Serial.println((int)brilloSuave);

            delay(20);
            }
        

Mistakes and How I Solved Them

The holes in the PCB were not properly milled

I solved this by adjusting the cutting speed of the machine.

Traces were too thin

I fixed this by increasing the trace width in KiCad.

Downloadable Files

Zip with all the files I used this week