8. Electronics Production¶
This week I worked on milling my PCB board and making it work.
Weekly Objectives¶
- Group assignment:
-
characterize the design rules for your in-house PCB production process
- submit a PCB design to a board house
-
Individual assignment:
- make and test a microcontroller development board that you designed
- extra credit: make it with another process
Useful links¶
Group Assignment¶
In this week group assignment, I . You can find our full group documentation here.
Milling a PCB Board¶
In Week 6 Electronic Design, I designed a PCB Board with XIAO RP2040 using Kicad and milled it out. I tryed to make the board work. However, the board did not work when I finished soldering. During this week, I needed to make it work.
Workflow for PCB Milling¶
- 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.
- Open Bantam Tools Desktop Milling Machine Software.
- 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.
- In the Bantam software, import the milling file generated from Kicad in the Initial Setup.
- 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.
- 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.
- Choose the milling tools you need. Choose the correct bit size. I used 1/64 bit to mill my PCB board this time.
- 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.
- Preview the milling paths in the software. Ensure there are no issues or overlaps.
- Go to Jog and click Install tool and follow the prompts. Its purpose is to determine the z-height yourself.
- Begin milling. The software will guide the Othermill machine to carve out your dog tag design.
- Once complete, remove the PCB from the milling bed and carefully clean up any debris.
Post-milling:
- Inspect the PCB to ensure all traces and holes are milled correctly.Clean up the mess in the machine.
- You can now solder the through-hole components onto your freshly milled PCB.
- Test the board to ensure functional
Since this week is during our Spring Break and we are not allowed to come to the lab during break, I had to mill out the board the day before spring break.
I found the milling files I had in Week 6 and imported into Bantam Software.
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!
I milled two PCB boards so that if one was broken, I still have another chance to make it work at home.
Surface Mount Soldering¶
Components needed¶
Name | Amount |
---|---|
XIAO RP2040 | 1 |
Headers (Optional) | 2 |
LED (SMD) | 1 |
330 ohm Resistor (SMD) | 1 |
10K ohm resistor (SMD) | 1 |
Push Button (SMD) | 1 |
Before Soldering¶
Before soldering, I need to make sure if the PCB board itself is working.
I use the multimeter to test out all the tracks on the two PCB boards.
After making sure everything is okay on the PCB and I did not need to redesign it, I started soldering.
During Soldering¶
I decided to solder the XIAO RP2040 last because I did not want to waste a microcontroller if I soldered wrong. But first I put headers on the RP2040 since it is supposed to be through hole soldering and adding headers would have better contact with the copper on the PCB board.
I first started with the button. I first used the multimeter to confirm which position I need to put the button at. I soldered it well on the PCB board.
After soldering a 10k resistor and a 330 ohms resistor, I started to solder the LED. Since the LED has polarity, I first used the multimeter to test which side is positive and which side is negative. Unfortunately, I got confused which pen means positive and negative. So I soldered the LED in the wrong direction.
Notes: the side connected to the red pen of the multimeter means positive, vice versa. The electricity is like water, the positive side means higher end, so te electricity would flow from higher end (Positive) to the lower end (Negative).
I tried to save the board by removing the LED. However, when I was trying to remove it, I got the copper off. The first PCB board died.
Second Chance¶
The first soldering was too traumatizing so I waited til the next day to solder the second one. This time, I was extremely careful when I soldered the LED. I finally got the sides right (red pen –> positive; black pen –> negative) using multimeter.
Then I finished soldering all the components onto the board.
Then I uploaded the code I got from Week 4. I used Arduino IDE to upload the code.
C++ Code:
const int buttonPin = D1; // Button connected to pin D1
const int ledPin = D2; // LED connected to pin D2
void setup() {
pinMode(buttonPin, INPUT_PULLDOWN); // Set the button pin as input with pull-down resistor
pinMode(ledPin, OUTPUT); // Set the LED pin as output
}
void loop() {
if (digitalRead(buttonPin) == HIGH) { // If button is pressed (HIGH due to pull-down resistor)
digitalWrite(ledPin, HIGH); // Turn LED on
} else {
digitalWrite(ledPin, LOW); // Turn LED off
}
delay(100); // Small delay to avoid excessive CPU usage
}
Then when I tested, the LED lighted up when I pressed the button!
I finally succeded to make the board I designed work!:)
Reflection of the Week¶
This week is kind of relaxing since I already had the board designed and I just need to make it work. However, the soldering part was quite scary. The SMD components are so tiny that I needed to use a tweezer to hold them. The size made it really easy to mess up. I messed up the first board and I was really sacred when doing the second one. Eventually, I still managed to make it work using the second chance. This week made me practice mysoldering skill, which is really helpful for my final project which requires a lot of soldering on electronics.
File Download¶
You can download my file here.