Electronic production

cncelectronicproduction

Here we go again… Yes, this is the part I fear the most: electronic production! A mysterious black box that I’ve always carefully avoided opening – and honestly, never wanted to mess with. But Fab Academy has other plans: stepping out of the comfort zone, diving headfirst into the unknown! Losing, failing, trying again – and realizing that things can actually get better if you keep at it.

I just hope that by the end of Fab Academy, I’m not only less afraid but also finally know what I love, what I hate – and most importantly, that I am not afraid anymore! 💪⚡

And if you want to see all the fails I make and what you should probably avoid, keep reading!

Software i used in this week:

kicad

KiCAD for Platine Design

lpkfsoftwarelogo

LPKF CircuitPro PM click here for information

Adjustments to the PCB Design in KiCad

I already explained how to design a PCB in KiCad in Week 6 Electronic Design. This week, I continued working on my PCB and made some improvements.

Modifications in KiCad

On my first board, the pin headers were facing upwards, which was unsuitable for my CO₂ sensor. So, I replaced them with horizontal pin headers. The corresponding footprint is already available in KiCad’s basic components.

Additionally, I set the trace width to 0.4 mm to make it compatible with the milling machine. As a result, I had to reroute all traces manually – there is probably a faster way, but I couldn’t find one.

Finally, I added flags for 3.3V and GND to indicate that the power supply and ground are handled differently.

finishboard

First Milling Attempts and Adjustments

During my first milling attempt, I noticed that the ground pads were not properly milled, making soldering the components very difficult. To fix this, I adjusted the ground plane in my KiCad file. So choose in the properties of the ground plane (right click) that the pad connection are thermal reliefs.

The ground plane can be updated by pressing “B”. After that, a final check should be performed.

Once everything looks good, I save the project and run a simulation before exporting the files.

GNDpadsconnection

simulation

Exporting Gerber Files for the LPKF CNC

For the CNC milling machine, we need Gerber files. These can be exported in KiCad as follows:

  1. Click on FilePlot.
  2. Select Gerber as the output format.
  3. Disable the Gerber Job option.
  4. Choose a location to save the files.
  5. Select only the layers you worked on. In my case, I used F.Mask and Edge.Cuts, so I selected only these two.
  6. Instead of saving directly, click Plot.

exportinggerber

After a short wait, the Gerber files are generated. I then transferred them to a USB stick and moved to the milling machine’s PC.

We have a dedicated milling PC, as the milling software requires precise settings for each tool. There are a few special considerations for milling, which I will explain in my next Fail & Try post.

LPKF CNC Milling Machine

LPKFmachine

In our lab, we use an automated PCB milling machine. It automatically changes the milling bits during the process. Additionally, it supports double-sided milling and vias using drill holes, but for starters, I worked with a single-sided PCB.

Important: Always check that the milling machine is turned on before opening the software!

onbutton onmachine

I also verified that the ventilation was set to automatic and turned on. The vacuum table holds the PCB in place by suction, so it should be free of dust and debris. The foam mat underneath is a consumable that gets milled during the process, so it should still be relatively even.

automaticventilation

Once the machine was ready, I opened LPKF CircuitPro PM. The machine performs an automatic reference run, so make sure there are no objects inside the milling area.

calibartionsteps


Setting Up the Milling Process

The software workflow is straightforward, following these steps:

stepsworkflowcnc

  1. Selecting PCB and Template

The first step is selecting a PCB type and a template using the magic wand icon. I chose Single-Sided because I was using a single copper layer.

⚠️ Mistake Alert!
On my first attempt, I mistakenly selected Bottom Layer instead of Top Layer, which resulted in a mirrored board.

platechoose

pcb

  1. Importing Gerber Files

importgerber

Next, I imported the Gerber files. Since KiCad uses different layer names, I manually assigned them:

  • Edge.CutBoard Outline
  • F.CuTop Layer

templates

The preview should display the correct files before importing.

preview

  1. Setting Up Rubout

I selected Rubout for Top Layer and defined the areas that should be precisely milled. Since the tool only supports rectangular rubout areas, I had to carefully piece them together until all polygons were selected. Finally, I clicked Close (not Apply!).

rubout

  1. Skipping Fiducials (for Single-Sided Boards)

Fiducials are alignment holes for double-sided PCBs, but since I wasn’t using them, I skipped this step.

fiducials

  1. Configuring Milling Technology

In the Technology Dialog, I configured the milling depth and isolation settings:

  • Partial Rubout for isolation
  • Rubout All Layers in the dropdown menu
  • Copper Layer Thickness: 70 µm (common values are 35, 50, or 70 µm)

technologydialogisolation

I also clicked Contour Routing to select how many holding tabs should remain. For my small PCB, two tabs were enough.

contouring

Once everything was set, I clicked Start. The software then calculated the milling paths and board outline. Some warnings appeared, but they were related to Fiducials, VIAs, and Pockets, which I didn’t need, so I ignored them and clicked Close.

start

Preparing the Milling Machine

Now, the software listed the required milling bits and checked if they were available. I carefully verified this, both in the software and directly on the machine. I also checked the wear level of the bits (displayed as a percentage).

millingbitchoose

Then, I moved on to preparing the machine:

  1. Insert the copper board, securing it with masking tape.
  2. Cover all unused vacuum holes to ensure proper suction.
  3. Align the PCB using the guide markings.
  4. Leave ~1 cm of tape on the PCB edges for better adhesion.
  5. Use thinner tape on the milling side to minimize material waste.

prepairsetting

plate

lineposition

tapeing

  1. Material setting check a second time. I didn´t change there anything.

materialseetingcheckup

Positioning the Milling Head

The Move/Not Move function determines whether the PCB or milling head moves:

  • Move = Adjust PCB position
  • Not Move = Move milling head

Since the machine doesn’t have an automatic frame detection like a laser cutter, I manually positioned the milling head by selecting Not Move and clicking around the object.

Once I was sure everything was correctly aligned, I clicked Continue.

⚠️ Important: The milling cover must be closed for the machine to start!

Now, the milling process began. I could monitor the progress on the screen, seeing which areas were being milled.

moveobject

movemachine

So be carful now because next continue it will be start the milling process:

millingprocess

uimachinemillingprocess

First Milling Results & Adjustments

The milling process took less than 20 minutes. However, I had to make several adjustments:

  1. Rubout Area Issue: Initially, I only applied rubout in the center, leaving copper traces between tracks visible under a microscope. There was no short circuit, but to be safe, I re-milled the board with rubout over the entire surface. But also I tested the board with the multimeter to check out. There was no problems on the board.

microscope

firstboard

multimetertesting

  1. Mirrored Board Issue: As mentioned earlier, my first PCB was mirrored, so I corrected the layer selection.

mirrorboards

  1. Unnecessary Objects Under the Xiao Module: I removed these in my final design to improve the layout.

lastboard

Post-Processing the PCB

Once milling was complete, I carefully removed the PCB:

  1. Vacuum the copper dust before removing the tape.
  2. Tilt the board in both directions until it comes loose.
  3. File down the excess holding tabs using a metal file.

file metall

  1. Polish the PCB surface with steel wool or bimsstone until it shines and shows no milling marks (always do this outside with an FFP2 mask!).

bimsstone

  1. Remove dust with a brush (outside) and clean the surface with isopropanol to remove fingerprints.
  2. Apply a layer of PCB lacquer for protection.

laquerspray

  1. Use a fiberglass pen to expose the soldering areas.

lastboardfiberglaspen

prepairpcbsforsoldering

Here are my files of my first PCB Board:

click here for gerber-file outline

click here for gerber-file toplayer

Now, the PCB is ready for soldering! 🔥

Soldering

Soldering Equipment:

Soldering Flux Paste
Solder Wire
Anti-Static Tweezers
Soldering Mat
Third Hand Tool
Soldering Tip Cleaner
Multimeter
Desoldering Tool

Board Equipment:

Xiao ESP32-C6
WS2812B RGB LED
PCB Board

Okay, and this was my list at the beginning of soldering. But I made a big, big mistake. My first board looked like this:

GND LED. My Ground for the LED was really bad.

But I told myself I could make another one with a better soldering plate. So I used all my equipment. And this was the result:

Board2.

YES, it was not perfect, but okay. So I tested the board with a simple code—you can see it in my programming section. The board worked very well, but the LED was damaged. It didn’t work.

solderingtable

My guess was that the LED got too much heat and stopped working. So I removed the LED and replaced it with a classic green LED. One pad tore off while desoldering, so I had to solder directly onto the thin trace. Risky, but before connecting it, I tested it with the multimeter.

I tested it, and it worked very well!

GreenLEDwithoutblinking

GreenLEDblinking

So, a reminder for me and everyone else this week: Test the LED before you solder it onto your board and be careful with the heat!

It was a rainy week—without rain outside, but definitely on my soldering table. And because of this, my first soldering week ended with a normal LED instead of an RGB one.

I programmed a small piece of code for it, and in the end, you can see that my LED is blinking!

A little bit of frustration, but in the end, my first own board—with sooo many ugly soldering pads and so many mistakes I learned from.

Next week: new weather, new luck!

Programming LED for Xiao ESP32-C6

For the first Board idea you need:

  • Arduino IDE
  • XIAO ESP32C6 on-board package to the Arduino IDE
  • Adafruit NeoPixeL Library
  • 1 x USB Type-C cable
  • Board with components


1. Download Arduino IDE

click here for Arduino IDE Software


2. Add the XIAO-C6 Board to Arduino

click here for the xiao constraction

** Or copy this link: “https://espressif.github.io/arduino-esp32/package_esp32_index.json”

and past this link in Arduino>Preferences>Additional boards manager URL´s **

menuforboardmanager

Click on Tools>Board>Board manager: Install esp32 by espressif systems 3.0.4

installboard

Go to Tools > Board > ESP32C6 Series > Seeed Studio XIAO ESP32C6.

selectboard

Port dosen´t work so i install the driver for USB-Port of xiao ESP32-C6 click here for the driver

driverinstall


3. Install the Adafruit NeoPixel Library

Tools>manage libraries> search for Adafruit NeoPixel and install liabrarie.

installlibrary

installlibrary2

For the Code i used a easy LED Blink Code:


#include 

#define LED_PIN 1  // Pin D1 which I use  
#define NUM_LEDS 1 // How many LEDs 

Adafruit_NeoPixel strip(NUM_LEDS, LED_PIN, NEO_GRB + NEO_KHZ800);

void setup() {
    strip.begin();
    strip.show();  // all LEDs off
}

void loop() {
    strip.setPixelColor(0, strip.Color(255, 0, 0)); // Red LED
    strip.show();
    delay(500);

    strip.setPixelColor(0, strip.Color(0, 0, 0)); // LED off
    strip.show();
    delay(500);
}

Alongside these steps, I was able to see the board connected to my notebook. I verified the code using the check symbol and uploaded it with the arrow. Then, I watched to see if it worked… spoiler alert—it didn’t.

So, I tested it using the reset button and checked it with a simple LED by holding it between GND and Pin 1. And guess what? It worked perfectly with a regular LED! So here is the Code for the a normal green LED.

Second Board with a green LED:

You need no specific library only the Arduino IDE and the Example of a Blink LED Code. You can find this at file>example>Blink Check out it is the right Pin mode (1) for the Xiao. So verify and upload it. It will be compiling and work without RTS.

 
// Pin-Number, where the LED is
"const int ledPin = 1;

void setup() {
  pinMode(ledPin, OUTPUT); 
}

void loop() {
  digitalWrite(ledPin, HIGH); 
  delay(1000); 
  digitalWrite(ledPin, LOW);
  delay(1000); 
}"

Here are my files of my first PCB Board:

click here for gerber-file outline

click here for gerber-file toplayer

Group assignment

As part of our group assignment, I learned the basics of our CNC machine and how its operation differs from a CNC machine designed for woodworking. Unlike a wood CNC machine, this one requires manual positioning from point to point before securing the board. Additionally, there are more preparatory steps needed before starting the machining process.

Check out the details of our group assignment here: Click here