Skip to content

6. Electronics design

This week I worked on designing PCB board using Kicad and milled my PCB board.

Weekly Objectives

  • Group assignment:
  • use the test equipment in your lab to observe the operation of a microcontroller circuit board
  • Individual assignment:
  • use an EDA tool to design a development board that uses parts from the inventory to interact and communicate with an embedded microcontroller
    • extra credit: try another design workflow
    • extra credit: simulate your design
    • extra credit: design a case around your design

Group Assignment

In this week group assignment, I used the Analog Discovery 2 to measure the pulse in our circuit board. You can find our full group documentation here.

Electronic Design – Kicad

Since we need to design a PCB board this week, I chose to use Kicad 9.0 for designing. I looked over Angelina’s documentation and wanted to try Eagle. However, after I downloaded it and opened it, I found that my laptop did not cooperate very well with it. So I gave up on Eagle and switched to my familiar Kicad.

About Kicad: I only learned a little bit in Electrical Engineering. That’s it. Kicad 9.0 released just several days ago at this time (3/5/2025), but it worked well. So don’t be afraid to update:)

Bill of Materials

Name Amount
XIAO RP2040 1
LED 1
330 ohm Resistor 1
10K ohm resistor 1
Push Button 1

Step 1: Download Kicad 9.0 and install Fab Library

I got Kicad download from Mr.Dubick. But you can also download it from its official website. Then I downloaded Fab Library from here. Then I made a big mistake: I did not see the instructions down below in the repo, so I did in my own way.

I installed the symbol library and the 3D library pretty well. However, when I nstalled footprint library, I did it from PCB file –> FIle –> Add Library. Later I figured out this method does NOT work.

ATTENTION: ABOVE IS THE WRONG INSTALLING PROCESS FOR FOOTPRINT LIBRARY. FOLLOW THE INSTRUCTIONS IN THE REPO

When I almost finished designing my schematic, I found that my footprint did not work in pcb file. I asked my dear partner Cooper Cumbus and he told me to follow the instructions in the repo. That was the first time I saw the instructions. Unfortunately, I had to redo the whole installing library stuff.

Right Steps for Installing Libraries in Kicad

  • Symbol Library: General Panel –> Preference –> Manage Symbol Libraries
  • Footprint Library: General Panel/PCB Editor –> Preference –> Manage Footprint Libraries
  • 3D Library: PCB Editor/Schematic Editor –> Preference –> Configure Path –> paste the path where you locate the library folder

Because of my carelessness, I had to started my whole design from scratch again. It was really not that fun.

Correct Footprint Library:

When you assign the footprints, the panel should look like this:

It should have a list of footprints on the right for you to choose. If you installed the library incorrectly, not a single footprint would came out on the right.

When you do the symbol in schematic design, you would also see both the symbol and the footprint when you select it.

Step 2: Designing in Schematic

I followed this series of tutorials first because it was a long time ago since I touched Kicad.

1. Select symbols for components

Go to Schematic Editor –> Place Editor –> select the symbols of the coponents you want.

2. Wiring

Following the circuit I built earlier in week 4, I wired the compnents with the right pins.

Then Andrew Puky told me I sould use the “Switch_Tactile_Omron” for my switch, so I did.

Then you are ready to move on to the PCB Editor Part!

Step 3: Designing in PCB editor

I clicked “Update PCB From the Schematic Designer” and the footprints of the components are gonna appear on the pcb editor. You need to fix te errors if it told you there is one. Usually it was about footprints. Then you need to check if the libraries work or assign footprints again.

Then I switch to “F.Cu” layer and add tracks for the PCB board. The PCB Editor would tell you which pin to connect based on the wiring you did in schematic editor. Then I switched to “Edge.Cuts” Layer and added a rectangle around the whole circuit. The rectangle represented the outline of the PCB Board.

Then I changed the trace width since they were too thin and the cooper may fall off from the real PCb board. I decided to increase the width from 0.2mm to 0.5mm.

First, select the traces and then right click –> Properties

Then change the Track Width in Properties.

3D View of the Board

You can check how the PCB Board would look like in 3D Viewer.

Board Improvement

I went to GOT for week 6. During the meeting, Rico told us that it would be better to add two more additional LEDs on the board: one for testing if the PCB board works, the other for debugging. However, I already milled my board at that time so I did not change the deesign. But I am going to add the LEDs on my folowing boards.

He also told us to make the traces connected to 5V and GND wider but keep other traces thin because the electromagnetic field of the tracks may affect each other. Here’s an example of the board.

PCB Milling

This week, we did not need to mill our PCB board. But in order to get familiar with the CNC Machine in advance, I decided to mill my board for fun.

Step 1: Exporting the Files – Kicad

1. Go to File in PCB Editor –> Plot

2. Go to “Browse” and slect the right folder, then click “Plot” and “Generate Drill Files”

Notes: Make sure it is Gerber file!

Plot: create the layer files as output files use .gbr files.

Generate Drill Files: files for creating holes on PCB.

It would end up giving you a lot of files. but we only need the Edge_Cuts and F_Cu files and also the PTH files for holes. The NPTH file is for holes of screws etc.

Step 2: Using Bantam Software to set up OtherMill CNC machine

1. In Materil Setup, I chnaged the z-value to 0.01mm

2. Import the files into Bantam Software in File Setup

3. Select the correct bits you are using and then click Generate G-Code

I got a warning saying I need smaller bits when I did 1/32 flat end bits, so I switched to 1/32 flat end bits.

4. Change the Plan Offset if needed

Then clicked “Drill Files” and you are all set!

During Milling

The Bantam Software would tell you when to switch bits, so just follow the instructions on the screen.

Don’t forget to clean up after milling!

Reflection

I milled my board twice. The first the OtherMill did a great job milling. However, when I tried to scraped my pcb off, I accidentally scraped the copper off:(

The second time I took off my pcb board completely from the machine!

Soldering Components

I tested the pcb board using a multimeter before soldering and every single track worked.

Then I started soldering components onto the PCB board. It was very tough. The LEDs and the resistors were so tiny that I had to use a solder paste to fix the position. However, I put too much solder paste onto my board that it eneded up forming bridges under my resistors and LEDs. Unfortunately, because of the bridges, my PCb board did not work. But I learned how to mill PCB boards which was already a big gain from this week.

Summary Worflow for PCB Milling

  1. Turn on the Othermill milling machine. If the machine doesn’t beep or invite you to home, make sure the read e-stop button is popped out.
  2. Open Bantam Tools Desktop Milling Machine Software.
  3. Load your material onto the Othermill machine bed. Put tape onto the back of the material. Make sure the tapes are not crossing each other. Use alcohol to clean the platform and wait until the alcohol evaporates. Use the ditto tape to secure the board. Put the taped side of the material stick to the platform. Ensure the material is secured.
  4. In the Bantam software, import the milling file generated from Kicad in the Initial Setup.
  5. In the Material Setup, put in the size of the material. Use a caliper to measure the dimensions of the material. Be sure to include the tape thickness in the dimensions of the material.
  6. Define your milling tool and set the required parameters like feed rate, plunge rate, etc. based on the material you’re using and the intricacies of your design.
  7. Choose the milling tools you need. Choose the correct bit size. I used 1/64 bit to mill my PCB board this time.
  8. Use a wrench to change the milling tools on the machine. Make sure to tighten the bits. If there’s a spindle fan, you can install it so that it will clear chips away.
  9. Preview the milling paths in the software. Ensure there are no issues or overlaps.
  10. Go to Jog and click Install tool and follow the prompts. Its purpose is to determine the z-height yourself.
  11. Begin milling. The software will guide the Othermill machine to carve out your dog tag design.
  12. Once complete, remove the PCB from the milling bed and carefully clean up any debris.

Post-milling:

  1. Inspect the PCB to ensure all traces and holes are milled correctly.Clean up the mess in the machine.
  2. You can now solder the through-hole components onto your freshly milled PCB.
  3. Test the board to ensure functional

Reflection of the Week

This week was pretty fun and intense because I got another project going on. I did not spend too much time on thi week since we learned how to use Kicad previously. Milling a PCB was scary, but it was really fun once you know how to set up and everything. Sadly, my board did not work. But I believed it was my soldering issue not my wiring problem, so technically the designing of the board was successful! I wuld make my board work when we get to electronic production:)

File Download

You can download my file here.


Last update: March 22, 2025