Electronics Production

Manufacturing a Microcontroller Development Board

Group Assignment Page

This week’s group assignment covers the PCB milling process for the Roland SRM-20.

This page includes documentation of work completed during Fab Academy Academic Overlay 2023 at Aalto University New Media MA Program. Due to the academic overlay's structure, electronics design week was preceding electronics production week. This week's documentation starts from where electronics design left off. To see the earlier parts of the process, you can read more at the page linked down below.

Electronics Design Week

Coppercam Workflow

In order to create toolpaths to mill our circuit board, we use a software called Coppercam.

Initially, I downloaded it to my own computer and followed this tutorial for PCB milling with Roland SRM-20.

After going through all the steps outlined in the tutorial, I got an error that said “demonstration version”.

coppercam error

It turned out that this error was probably caused because Coppercam is a paid program and I had the free version. So I re-did the same process in the computer at the FabLab that we use with the Roland SRM-20.

It ran without errors and I got two “.egx” files, one for Tool 1 (engraving) and one for Tool 2 (cutting).

Milling with Roland SRM-20

After I got my toolpaths, I moved on to milling with the Roland SRM-20. Again, I continued following the same tutorial.

At first when I tried to open VPenel for SRM-20, I got this error message:

vpenel error

The reason for this was because I left the cover of the machine open. If the cover is open, you cannot interact with it using VPenel.

After going through the tutorial and setting up the toolpaths, I started milling.

Milling first iteration

Problems with the First Iteration

The first board that I milled had several issues. Firstly, the engravings on the left side and the right side were not equal in depth. Secondly, the hole that was supposed to be cut in the middle was not there.

Also, some connections were too close to each other for comfort. There were some unnecessary turns and corners as well.

first iteration errors first iteration errors

I first cleaned up the connections in KiCad. I got rid of unnecessary twists & turns, and routes that were too close to each other were split farther apart.

cleaning up in KiCad

After exporting, I started changing some settings in Coppercam. I realized that I set the Z thickness as 1.9mm, when my board was only 1.5mm. I changed this to 1.6mm (adding a 0.1mm clearance).

I also set the cutting and drilling depths as 1.7mm. The final working tool settings are down below.

z thickness correction final tool settings

And for the uncut hole in the middle, I learned that I had to specifically set it as a contour inside Coppercam.

fixing the uncut hole fixing the uncut hole

In the first iteration, I had taken the measurement for the Z-height from the side of the board. This time, I made sure to take it from the middle of my cutting area.

Z height measurement

I started milling the second iteration

Milling second iteration

Problems with the Second Iteration

Even after the troubleshooting, the second iteration’s engraving was still very shallow.

shallow engraving

To fix this, we tried changing the engraving tool in case it was damaged. After the change we did not change any other settings about the job other than re-calibrating the Z-height.

This worked really well. The new engraving tool cut as deep as I wanted.

with changed tool

Here is a comparison of the first iteration and second iteration

comparison

Soldering

After succesfully milling, I moved on to soldering. Using a 240 sandpaper, I gently sanded the copper layer first.

I first applied flux to the area I wanted to solder.

applying flux

Then, I started soldering the surface mount components. It was my first time soldering surface mounts. At first, I was using a really thick solder wire. This resulted in really bad quality solders and was very hard to control.

soldering with thick solder wire soldering with thick solder wire

When I moved onto thinner solder wire, everything was much easier. Here is the steps I followed for soldering surface mount components:

  1. Apply a small amount of solder to one of the pads. First heat the pad with the iron a bit, then touch the solder wire and let it melt.
  2. With the tweezers, grab the component. While heating up the solder with the iron, push the component down onto the solder.
  3. After one side is secure, solder the other pads.
  4. After all the pads are securely soldered, we can return back to our first solder and re-do it properly.

steps of soldering surface mounts steps of soldering surface mounts steps of soldering surface mounts

I soldered all the components but the headers for the Xiao board. I couldn’t solder that yet because we didn’t have it in stock at the moment.

soldered all components

After this, I realized that I had some solder bridges and sloppy solders at some points. I tried cleaning them up as much as I could.

fixing solder bridges fixing solder bridges

To connect the XIAO to the circuit board, I soldered the headers first. After mounting the XIAO to the headers, I tested the connections with a multimeter to avoid any short circuits. Most importantly, I checked if there was a short between 3.3V-Ground and 5V-Ground.

mounting the xiao checking the multimeter

Testing

In order to run tests on the board, I connected the Xiao to my computer and opened up Arduino IDE. We have to add the board definition to Arduino IDE first, which I did by following the tutorial on the Seeed Studio Wiki.

Turning on LEDs with Button Press

Firstly, I tested the button press code to see if the board was registering button presses. It worked. Also don’t forget to add input_pullup to the pinMode to use the internal resistor.

Testing button press

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
int btnPin = D4;
int btnState;

void setup() {
  Serial.begin(19200);
  pinMode(btnPin, INPUT_PULLUP); 
}

void loop() {
  if (digitalRead(btnPin)==1){
    Serial.println("no press");
  }else{
    Serial.println("press!");
  }
  delay(10);
}

Then I started testing with the LED’s. However, the LED’s were turned ON when I set them as HIGH. This was not the case with the built in LED’s of the XIAO board. So I changed the HIGH’s with LOW’s and re-ran the code. It worked this time.

LOW and HIGH reversed

LOW and HIGH correct order

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
int btnPin = D4;
int btnState;
int ledPinA = D0;
int ledPinB = D1;

void setup() {
  Serial.begin(19200);

  pinMode(btnPin, INPUT_PULLUP); 
  pinMode(ledPinA, OUTPUT);
  pinMode(ledPinB, OUTPUT);

  digitalWrite(ledPinA, LOW);
  digitalWrite(ledPinB, LOW);
}

void loop() {

  if (digitalRead(btnPin)==1){
    Serial.println("no press");
    digitalWrite(ledPinA, LOW);
  }else{
    Serial.println("press!");
    digitalWrite(ledPinA, HIGH);
  }

  delay(10);
}

After this, I experimented with turning the LED’s on and off with a single button press. After messing around a bit, I found the solution to make an increasing counter and then check if the number is even or odd. The method of increasing the counter with each button press is the same one I used in the Embedded Programming week. I added the odd/ even number checker to this code by using the “modulus operator”. Which is a fancy name for division in Arduino IDE.

Turning on LED with single button press

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
int btnPin = D4;
int btnState = 1; //1 means not pressed
int prevBtnState = 1;
int counter = 1;

int ledPinA = D0;
int ledPinB = D1;

void setup() {
  Serial.begin(19200);

  pinMode(btnPin, INPUT_PULLUP); 
  pinMode(ledPinA, OUTPUT);
  pinMode(ledPinB, OUTPUT);

  digitalWrite(ledPinA, LOW);
  digitalWrite(ledPinB, LOW);
}

void loop() {

  btnState = digitalRead(btnPin);

  if (btnState != prevBtnState){
    if(btnState == 0){
      counter ++; //with every press of the button, counter goes up by one
      switch(counter % 2){ //checks if counter is even or odd
        case 0:
          Serial.println("LED ON");
          digitalWrite(ledPinA, HIGH);
          digitalWrite(ledPinB, HIGH);
          break;
        case 1:
          Serial.println("LED OFF");
          digitalWrite(ledPinA, LOW);
          digitalWrite(ledPinB, LOW);
          break;
      }
    }
  }

  prevBtnState = btnState;

  delay(10);
}

Source Files

Week 4- Electronics Production