Skip to content

4. Electronics Production

Group Assignment:

  • characterize the design rules for your in-house PCB production process

Individual Assignment:

  • make and test a microcontroller development board

  • extra credit: personalize the board

  • extra credit: make it with another process

Download Design Files

Click here to download my design files folder

Group Work Reflection

From my group work I learned the value of explaining/teaching concepts to others to better understand them yourself. One of my group members was absent the day we origionally worked on this week’s assignment so I helped him get back to speed and understand what we were doing. From explaining the component organization system and how to navigate and understand our given resouces to simply pointing out where the bits were stored, explaining the processes really helped cement the concepts in my mind.

Workflow for sending a printed circuit board (PCB) to a board house:

Link to whole-class workflow

Link to Group Work Page

Making and Testing a Microcontroller Development Board

Milling

To start the microcontroller production process, we first walked through the milling process. We then milled 4 boards at a time, taking turns setting up the file and observing the milling. I used our group workflow (can be found at this link.)

I later milled by myself doing the following:

I took a copper plate, applied tape evenly on the bottom of the plate, and stuck it in the bed of the milling machine.

After ensuring the file I wanted to mill was on the PC connected to the milling machine I was using, I opened Bantam Tools on the PC. In Bantam Tools, I setup the file for milling as follows:

MATERIAL SETUP

Under the “MATERIAL SETUP” tab I scrolled and opened the “MATERIAL PLACEMENT” dropdown. I then selected the following settings:

Material Offset Z

z: 0.01 mm

Material Offset X & Y

X: 4 mm

Y: 4 mm

Alignment

Left: selected

Front: selected

Under “INSTALL TOOL,” I clicked the “INSTALL TOOL” button and followed the prompts. To remove the bit already installed, I removed the front panel, took the two wrenches and turned them in opposite directions (the wrench on the nut higher up turning to the left and the wrench on the nut below the other turning to the right). I then took the bit out and put it away before inserting the bit I needed and tightening it by turning the wrenches towards each other (opposite directions as before). When milling you should start with the smallest bit, so I started with the 1/64” Flat End Mill (Note that you may need to select your milling tools under the “FILE SETUP” tab before installing your tool).

Under “MATERIAL SIZE” I selected the following settings:

X: 127 mm

Y: 102 mm

Z: 1.9 mm*

(*note that the Z value will change depending on the value determined by the milling machine when you probe the board)

We did not need to change or do anything with the “BRACKETS AND ACCESSORIES” dropdown.

FILE SETUP

Under the “FILE SETUP” tab I opened this file I was milling. I then clicked the dropdown to open the “MILLING TOOLS” section. I then selected the following three tools:

1/16” Flat End Mill

1/32” Flat End Mill

1/64” Flat End Mill

I then scrolled down to the “TOOLPATHS” section and selected the following settings:

Side to mill: Top

Traces: on

Holes: off

Outline: on

Trace Depth: 0.15 mm

Trace Clearance: 1.5 mm

Use Detail Tool Everywhere: off

Rotation: 0 degrees

Then I clicked the “GENERATE GCODE NOW” button.

PLAN SETUP

I checked to make sure everything looked good under the “PLAN SETUP” tab.

SUMMARY / RUN JOB

Under “SUMMARY / RUN JOB,” I looked over the “MACHINE SUMMARY” and “PLAN SUMMARY” details to ensure they were right. Under “PLAN SUMMARY,” “Select For Milling:” should be turned on. I then clicked “MILL SINGLE FILE” to start the mill.

Once the mill had finished, I clicked “jog” and “loading” to move the bed foward so that I could use the vaccum to clean the excess copper off the board and machine.

The Milled Board:

Milling Problems Encountered:

  • Shortage of some bits; ended up using a “PCB Engraving Bit 0.005 in” bit instead of the 1/64 bit others were using

  • Needed to turn off the holes option for the design

  • Machine would prompt me to change the bit, I would do so, click “resume,” and nothing would happen. To overcome this, I had to cancel the milling, go back into the file setup, delete the bit I was just using from the “milling tools” tab, re-download the g-code, and then click “mill single file” again.

  • Rubber bands broke on the milling machine, Mr. Durrett taught us how to replace them

  • Confusing with changing the bit… have to turn the bolt left to tighten it

Component Collection

Before we could begin soldering we needed to gather all necessary components. Mr. Dubick and Mr. Durrett helped me understand the Charlotte Latin Fab Lab’s component organization system and how to interpret the component names.

Necessary Components:

Component Collection Problems Encountered:

  • Origionally grabbed a larger header than needed, had to go back and get the correct one

  • Had trouble locating the headers in the lab organization system

  • Although the file we milled a board for was labeled as the “february” file (version of the Quentorres created by Dr. Taylor), the files were mislabeled and we actually milled the “january” file. I originally got a 0 ohm resistor as the “february” board needed them, however, the “january” board did not.

  • Figuring out how to read/interpret component names was rather difficult

  • Components were small and easy to lose; Mr. Dubick had us tape them down on a blank sheet of paper and write their names next to them so that we wouldn’t confuse or lose components

Soldering

For soldering the PCB board, I first taped the board down (ensuring I didn’t tape over any essential traces and risk damaging them). Next, I took my soldering iron and changed them temperature from 750 degrees fahrenheit to 650 by holding the “ENTER” button down until the temperature display was blinking, then clicking the “UP” button until the first digit reads “6,” and then clicking enter until the display lights return to a steady color. I then cleaned the tip of my soldering iron until it was shiny. I then put kapton tape on the bottom of my RP2040 and soldered it onto the board.

Next I plugged in the RP2040 to ensure that it worked before I soldered anything else; the lights turning on idicated that it worked.

Soldered on the Conn Header SMD R/A 6POS 2.54MM

Soldered on the Conn Header SMD 10POS 1.27MM

Soldered on the Tactile Switch SPST-NO Top Actuated Surface Mount (button)

Soldered on the RES 499 OHM 1% 1/4W 1206

Soldered on the RES 1k OHM 1% 1/4W 1206

Soldered on the 3 LEDs

Plugged it in – the LEDs all worked!!

Soldering Problems Encountered:

  • Needed to change soldering iron from 750 degrees fahrenheit to 650 degrees fahrenheit (thankfully realized this before starting)

  • I have shaky hands. To overcome this I taped the PCB board down (carefully so that I didn’t accidentally damage a trace)

  • Reading the fusion microcontroller schematic was difficult, needed a briefing on it (still had trouble visualizing how the pieces were supposed to lay out so I consulted with a friend and her board to help better understand how to relate the schematic to the physical product)

  • Had to figure out how the button should be oriented

  • Solder bridges and cold solders

  • Holding tiny components was hard, accidentally shot an LED across the room; tried a variety of different electrical tweezers to better grasp and manuver the pieces

  • Soldering iron I was using at first was old and not working well (a bad soldering iron can be identified if the tip is black/super dark or if, when you try to melt solder slone, it isn’t instant)

  • Orienting myself around the board so that I could access components and trace locations (determined it was easiest to move the stone slab I was soldering on instead of moving myself or moving and re-taping the board)

  • Had to figure out how to use the multimeter to measure continuity and how that would help me figure out which way the LED should lie (I used this pin output image for help as well)

  • Determining which side of the LED was positive and negative (green side is negative; can tell with multimeter: with negative probe on the negative side and positive probe on the positive side, the LED will light up)

  • Learning how to troubleshoot; ex. continuity test on multimeter (multimeter will beep to indicate a sturdy connection)

  • The LED connected to pin D0 of the RP2040 was not lighting up. There was a connection between the pin to the end of the trace and the pin to the button… determined that it was a bad LED so pulled it off and replaced it

  • Replaced the LED but it still didn’t work, a bad soldering job… pull it off and replace the LED again

  • When taking the LED off the second time, saw black around the trace pad… indicative of a risk for ripping a trace

  • Ripped a trace while trying to put the LED back on again (did check that this LED worked with the multimeter before putting it on)

  • Misunderstood how to properly fix a ripped trace and broke a trace again (soldered a wire to one side of the LED and the other side of the LED to the remaining pad… wire too stiff and short so that couldn’t maneuver it around to the other trace and ripped off the pad in the process)

  • After properly attempting to fix a ripped trace, continuity test showed a sturdy connection from the pin through the red (power) wire connecting to the LED, but not through the white (ground) wire. My soldering of the white wire missde the pads of the LED so had to re-solder it on

  • LED of the ripped trace section was so small and frail that it was not staying soldered to the wires. Used a through-hole LED instead and wrapped the positive wire around the positive lead and the negative wire around the negative lead

  • The circle traces connecting to the RP2040 were not completely milled and were touching a little, preventing the board from working. To fix this, I took a thin pair of electrical tweezers and scraped between the traces.

Programming the Board

Software

To code the RP2040, I first downloaded Arduino IDE for macOS from this link. I then opened Arduino IDE and clicked on the “Boards Manager” sidebar. I searched and installed “Raspberry Pi Pico/RP2040” by Earle F. Philhower, III. I then changed my board to “Seeed XIAO RP2040” under Tools > Board > Raspberry Pi Pico/RP2040 > Seeed XIAO RP2040.

Then I changed the port to the one my chip was plugged into under Tools > Port (after clicking “Port” I selected “/dev/cu.usbmodem101 Serial Port (USB)” but this will not always work depending on the chip, computer, etc.).

Code

Richard Shan wrote and shared a simple program to test the circuit board by blinking the 3 LEDs. I started by uploading his code to test my board (the LEDs are connected to pins 0, 1, and 26)

Richard’s Code:

  void setup() {

  pinMode(1, OUTPUT); //bottom right LED

  pinMode(26, OUTPUT); //top left LED

  pinMode(0, OUTPUT); //bottom left LED

}


  void loop() {

  digitalWrite(1, HIGH); //turns bottom right LED on

  digitalWrite(26, HIGH); //turns top left LED on

  digitalWrite(0, HIGH); //turns bottom left LED on


  delay(1000); //waits for 1 second


  digitalWrite(1, LOW); //turns bottom right LED off

  digitalWrite(26, LOW); //turns top left LED off

  digitalWrite(0, LOW); //turns bottom left LED off


  delay(1000); //waits for 1 second

}

Next, I uploaded the following code so that the LEDs would light up when the button is pressed, and turn off when the button is not:

void setup() {


  pinMode(1, OUTPUT);

  pinMode(26, OUTPUT);

  pinMode(0, OUTPUT);


  pinMode(27, INPUT_PULLUP);

}


void loop() {

  int buttonState = digitalRead(27);

  if (buttonState == LOW) {

  digitalWrite(1, LOW);

  digitalWrite(26, LOW);

  digitalWrite(0, LOW);

  }

  else {

  digitalWrite(1, HIGH);

  digitalWrite(26, HIGH);

  digitalWrite(0, HIGH);

  }

}

Reflection

This week really showed me to trust the process. So many things went wrong, but in the end it all worked out and it felt so so good when it did. Yes, it was an emotional rollercoaster, but I feel I learned so much through this week and really had to understand what I was doing to succeed.

References

Quentorres. swd+uart adapter+hello board - xiao rp2040

Chloé Laurent Fab Academy 2022

Fab Lab XIAO RP2040 Links

XIAO RP2040 Microcontroller

Instructor Bootcamp 2024

Richard Shan Fab Academy 2024

Connor Cruz Fab Academy 2024

Seeed Studio XIAO RP2040 information and pinout


Last update: March 25, 2024