Week 8. Electronics Production¶
Group Assignment¶
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.
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.
- 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.
-
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.
-
Pin Headers – To easily and quickly use the pins with jumper wires.
- 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.
-
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.
Then, I exported the file as an SVG.
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.
- Setup 1, Making holes.
- Setup 2, Isolating traces.
- Setup2, Cutting contour of PCB.
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.
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.
Then, I imported the SVG into MODS.
Then, I selected Isolate Traces and chose Offset number 4, which means that the tool will mill 4 extra lines around each copper trace.
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.
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.
Then, after securing the table on the machine, I installed a 1/8-inch mill and began setting the X and Y zero coordinates.
)
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.
Here is a short description of the VPanel interface for the SRM-20.
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.
After setting up the machine, I started milling.
Here is the finished first setup.
Then I flipped the PCB and started milling the other side traces.
Here is what I got.
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.
Then I soldered the microcontroller, voltage regulator, screw terminals, and pin headers.
And finally, I added LEDs, resistors, and capacitors.
Programming Part¶
For programming the ATtiny, I used the Atmel ICE programmer with the UPDI protocol.
Here is the connection pinout for programmer.
For programming, I used Arduino IDE. I downloaded the board megaTinyCore from board manager.
Then I selected the board.
After selecting the board , I selected the chip to ATtiny1614.
And then I selected programmer to Atmel-Ice.
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.
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: