Electronics Production

Printed Circuit Board Fabrication

The best way I learned was by doing things wrong. I had designed my board using a Xiao SAMD21, but those were out of stock, so I switched to an RP2040 instead and placed clear orange tinted tape under the board per Ceci's advice.

My first boards had several issues:

During my fourth attempt, I spent about 8 hours trying to understand why my button wasn't working. Everything checked out with the multimeter, so I was puzzled. Fortunately, Ben helped me identify the issue: I was missing a trace connecting my 10k resistor to the 3V3 line. While this connection was included in my schematic, I didn't notice the errors flagged in a different tab after I adjusted the design to move the USB port closer to the edge. We attempted to fix the problem with a wire, but it proved difficult, so I decided it was a good time to take a break.

My final assembly was definitely the fastest I had done. However, writing the code took the most time. I struggled to get the button to work; I even encountered this problem in the simulator. The code I ended up with was different from what I used in the simulator. I think because of the external 10kΩ resistor the code logic needed to check for LOW instead of HIGH.

INPUT_PULLUP is more common because most microcontrollers have built-in pull-up resistors, so I didn't need an external 10k resistor.

Useful Links
Carvera PCB Tutorial
gerber2img

Files
PCB Traces.png
PCB Edges.png

const int LED_PIN = A0;
const int BUTTON_PIN = A1;

void setup() {
  Serial.begin(115200);
  pinMode(LED_PIN, OUTPUT);
  pinMode(BUTTON_PIN, INPUT_PULLDOWN);
}

void loop() {
  int buttonState = digitalRead(BUTTON_PIN);
  
  Serial.print("Button: ");
  Serial.println(buttonState);
  
  if (buttonState == HIGH) {
    digitalWrite(LED_PIN, HIGH);
  } else {
    digitalWrite(LED_PIN, LOW);
  }
  
  delay(100);
}
First attempt

Attempt 1: Missing traces

Second attempt

Attempt 2: Edge cut overlap

Third attempt

Attempt 3: Pulled up traces during soldering

Fourth attempt

Attempt 4: Missing trace from 10k resistor to 3V3

Final working board

Final working board with functioning LED button