Week 8: PCB Design & Milling
Group Assignment
This weeks group assignment was to characterize the design rules for your in-house PCB production process: document feeds, speeds, plunge rate, depth of cut (traces and outline) and tooling.
Looking at the past work we got an idea of what is to be done. We found the reference for the clearance net that people use to find the design rules of their machine.
Designing
We made this file in Adobe Illustrator
This file was then exported in the svg format. Test file
EasyEDA
Opened up this file in EasyEDA to get the gerber file for this test.
PCB layout view, importing the SVG that we created.
Hero shot
EasyEDA file
Milling & Output
Milling it out!
Milled tracks
Milled output
Hero shot
Circuit Design & Customization ✈️⚡
I already had my schematic in place from the circuit design week, but a few minor tweaks were needed. Since I wanted to use a custom circuit design, I took inspiration from the Northrop stealth jet and designed a PCB outline based on it.
Designing the PCB 🖥️
- Imported the custom outline into EasyEDA.
-
Laid out components to fit within the stealth-inspired shape.
2nd itteration of the design for board outline
-
Used the autoroute function to handle basic routing.
-
Set design rules to ensure proper clearances and trace widths.
Troubleshooting & Learning 🔧
My friends Sohan & Devanshi tried milling their PCBs first, only to discover that our original design rules weren’t compatible with the milling process. This was a valuable learning moment! We had to: - Update our design rules based on their experience.
- Adjust trace widths, clearance settings, and pad sizes.
- Move a few components around for better routing.
- Manually route some connections where autoroute wasn’t optimal.
After some tinkering, adjustments, and manual routing, my board was finally ready! 🎉
Personal Touches 🎨
Since this board is mine, I wanted to make it unique. So, I added: - My favorite emojis 😎🔥
- My custom logo 🛠️
PCB Milling Process 🏗️
Exporting & Setup 🖨️
I exported the Gerber file of my PCB from EasyEDA and imported it onto the FabLab laptop, which had Control Panel Software and CopperCAM preloaded onto it. First, with the help of Akhilesh Sir, I installed a 0.2 mm engraver bit into the PCB milling machine.
We stuck the copper-clad onto the machine bed.
I set the XY origin first and then, with some complex maneuvers, adjusted the Z-axis.
Roland panel Interface
XY origin setting
Setting the Z-axis gets a little tricky because I had to change the bit twice in one cycle. The 0.2mm engraving mil is very delicate and needs to be handled lightly so that it doesnt go blunt. The process for setting the Z-axis is intricate but can be done with patience. Firstly, i took the spindle to the maximum height possible and then changed the bit to a 0.8 drilling bit. Then, I made sure not to mess with the XY origin that I had set initially. Then I reduced the height slowly till it was under 0.5 cm off the copper plate surface. Then I loosened the bit a little so that gravity does the job of making sure the end of the bit is in perfect contact with the copper, making sure neither the bit nor the plate is damaged. All while holding a finger to the bit so that it doesn't get fall damage ;).
Hovering above the XY origin
Dropping the bit down
Setting Z-axis
Once this was done, I moved on to CopperCAM.
CopperCAM Workflow ⚙️
- Imported the top layer file (engraving) into CopperCAM.
- Added the drill file, but the drill holes were misaligned.
- Set one pad as a reference and aligned the drill holes accordingly.
- Traced the track contours and set the board outline as the card contour.
- Set the origin to (0,0) so it aligned with the machine's origin.
- Hit OK, and my very own PCB started materializing! 🚀
Milling & Drilling 🛠️
Once the engraving was done, I changed the bit to a 0.8 mm end mill. Then:
- Queued the drill file to create the necessary holes in the board.
- Queued the cutout file to cut the board out from the stock.
- After each cutting cycle, I opened the lid and used a vacuum to remove the dust.
Soldering & Final Adjustments 🔩
Now came the soldering part.
Initially, I had designed the USB-C port to face the bottom edge, but I soon realized there wasn’t enough clearance for the cable to move in and out properly. On top of that, the LED bulb was also in the way. ❌
If I soldered it the way I had planned, it wouldn’t work. Instead of forcing a bad design, I remilled the circuit board with a new XIAO RP2040, which had drill holes in it. This allowed me to use headers and mount it from the back side.
Trying solder paste
Heating the paste
I know this is just a workaround, and I will have to make a new board for future explorations. But for now, I have the new board milled, and I will complete the soldering part ASAP.
Board.exe crashed!!!
After I was done admiring my creation I realised a mojor problem that I had overlooked neigh wasn't even aware of. My board was supposed to be top layer only, which is why the through hole header pins would have to be mounted upside down, which means I would have to access them from below the board.
Bottom mounted pins
You think thats where the nightmare stops? Nope!
Because my RP2040 module was placed away from the edge of the PCB, my mentors informed me that there would be major clearance issues when it came to attaching and dettaching the USB cable. Moreover, it would also make it structurely weaker everytime I tried to wiggle it in. Not the mention the LED light at the nose of the board.
To solve this I soldered female headers on both sides- inverted ofcourse. Then I soldered male header pins on the RP2040 itself! I have now made a modular breakout board, wherein I can replace the RP2040 if I eve short it out :), but more realistically I have the liberty to dettach it and use it elsewhere momentarily before its placed back in its Fighter plane inpsired home.
Bottom mounted RP2040
My mentor Pranav Sir told me that making a SMD board was imperative which is why I also fabricated and soldered a SMD board using the RP2040 which will be used in controlling the electronics in Machine building week.
Et voilà
My board lit up to life and is functional
Test code for checking my board:
Got this code from Jesal Sir's documentation.
``` cpp title="Blink"
include
int numpixels = 1; int pixelpower = 11; int pixelpin = 12; int swtPin = D0; int swtStatus;
Adafruit_NeoPixel pixel(numpixels, pixelpin, NEO_GRB + NEO_KHZ800);
void setup() { Serial.begin(9600); pinMode(swtPin, INPUT); swtStatus = 0;
pixel.begin(); pinMode(pixelpower, OUTPUT); digitalWrite(pixelpower, HIGH); }
void loop() { swtStatus = digitalRead(swtPin); if (swtStatus == 1) { pixel.setPixelColor(0, pixel.Color(0, 255, 0)); pixel.show(); delay(2000); } else { pixel.setPixelColor(0, pixel.Color(0, 0, 0)); pixel.show(); } }```
Wrapping Up 🎯
That was Week 8—so many learnings from mistakes made along the way, a super fun process, and a newfound love for soldering! 🔥⚡