Skip to content

Week 8. Electronics Production

alt text

Group Assignment

alt text

This week, I was fully involved in both parts of the group assignment. Although I’ve used the SRM-20 many times before, it was useful to go through the full process again and focus on precision—especially in aligning and taping the PCB blank correctly. I also explored the difference between using a 1/64” endmill and a V-bit, which gave me a better understanding of their performance. Submitting the board to JLCPCB was also a new experience for me, particularly using the KiCad plugin, which made the process much easier and faster than I expected.

Schematic Part

So, since in the Electronics Design week I made a not-so-good design, and I didn’t like it, I decided to create a new schematic and design.

Here is my new Schematic.

alt text

Here are the components I used: 1. Resistors – For each LED color, different resistors need to be used because they operate at different voltages and have different power consumption.

  1. Voltage Regulator – Since the ATtiny1614 gets very hot when powered with 5V, I decided to add a voltage regulator to ensure I get 3.3V at the output to safely power the microcontroller.
  2. Capacitors – They are very important components in a PCB. In my case, I placed capacitors:

    • Between input and GND and output and GND of the voltage regulator to minimize voltage spikes.
    • Between VCC and GND of the microcontroller to ensure stable power.
  3. Pin Headers – To easily and quickly use the pins with jumper wires.

  4. ATtiny1614 Microcontroller – The main thing I didn’t like about the design I made during Electronics Design week was that I created a board just for the sake of making a board. Since the ESP32 is already a complete board, I wanted to learn how to design a PCB specifically for a microcontroller. I also wanted to study datasheets, work with SMD components, and gain deeper knowledge in this area. That’s why I decided to create a new schematic and integrate the ATtiny microcontroller.
  5. LEDs – I placed different colored LEDs on the pins:

    • On RXD, TXD – To visually monitor serial input and output, I added LEDs that blink when data is transmitted and received.
    • On PA3 – I placed one LED here to create LED blinks for testing.
    • On Voltage Regulator – I placed an LED after the 3.3V output to always know that the voltage regulator is working and that the board has power.

      Then, in the PCB editor, I imported my submarine vector and placed all the components there. Using the Freerouting plugin, I generated the traces.

alt text

Then, I exported the file as an SVG.

alt text

After exporting, I opened it in CorelDRAW to check the footprints and tracks.

Here are the output SVGs from which I will create the toolpaths.

  • Setup 1, Isolating traces.

    alt text

  • Setup 1, Making holes.

    alt text

  • Setup 2, Isolating traces.

    alt text

  • Setup2, Cutting contour of PCB.

    alt text

PCB Milling Part

For PCB milling, we have the Roland SRM-20 machine in our lab. It’s a very reliable and practically indestructible machine that offers very good precision.

alt text

Generating Toolpaths

For generating toolpaths, I used mods😎. It’s a very multifunctional and easy-to-use G-code generator for PCBs.

To create the toolpath, you need to right-click > Programs > Open Program, and in the G-code section, click Mill 2D PCB.

alt text

Then, I imported the SVG into MODS.

alt text

Then, I selected Isolate Traces and chose Offset number 4, which means that the tool will mill 4 extra lines around each copper trace.

alt text

After clicking the Calculate button, the G-code is automatically generated, and the file is downloaded.

Milling PCB

For attaching the PCB, I used double-sided tape.

alt text

Since I will be making a double-sided PCB, I fixed the previously cut board at a 90-degree angle. This will serve as a fixture so that during the second setup, I can flip the board and continue milling.

So, I attached the board and clamped it for 20 minutes.

alt text

Then, after securing the table on the machine, I installed a 1/8-inch mill and began setting the X and Y zero coordinates.

alt text)

For setting zero, I use a hex wrench. I loosen the mounting bolt, and the mill touches the PCB. After that, I tighten the bolt and set the Z zero.

alt text

Here is a short description of the VPanel interface for the SRM-20.

alt text

The Roland SRM-20 uses G54 as the default origin point. This is where the machine starts cutting. The origin is set by moving the tool to the correct position and pressing “Set Origin.”

There are also other coordinate systems like G55, G56, G57, G58, and G59. These can be used for different setups or jobs. For example, G54 can be used for one PCB, and G55 for another.

For isolating traces I used a 1/64 mill and a 1/32 mill for making holes and cutting the contour.

alt text

After setting up the machine, I started milling.

alt text

Here is the finished first setup.

alt text

Then I flipped the PCB and started milling the other side traces.

alt text

Here is what I got.

alt text

Soldering Components

I cleaned the PCB with very fine sandpaper, washed it well with soap, and started soldering the vias. Since we don’t have regular vias, I used simple SMD pin headers to have connection between 2 faces.

alt text

Then I soldered the microcontroller, voltage regulator, screw terminals, and pin headers.

alt text

And finally, I added LEDs, resistors, and capacitors.

alt text

Programming Part

For programming the ATtiny, I used the Atmel ICE programmer with the UPDI protocol.

alt text

Here is the connection pinout for programmer.

alt text

For programming, I used Arduino IDE. I downloaded the board megaTinyCore from board manager.

alt text

Then I selected the board.

alt text

After selecting the board , I selected the chip to ATtiny1614.

alt text

And then I selected programmer to Atmel-Ice.

alt text

I wrote a simple code where the loop will check the pins from 0 to 10, specifically sending signals with a 0.3-second delay.

alt text

Code:

void setup() {

    for (int pin = 0; pin <= 10; pin++) {
        pinMode(pin, OUTPUT);
    }
}

void loop() {

    for (int pin = 0; pin <= 10; pin++) {
        digitalWrite(pin, HIGH);
    }
    delay(300);

    for (int pin = 0; pin <= 10; pin++) {
        digitalWrite(pin, LOW);
    }
    delay(300)
    }

Here is the Result:

Files of this Week

Kicad Project(SubMarine)


Last update: May 1, 2025