Week 4

Week 4: Electronics Design

October 6 - October 13


[0] Overview
Time to make our own chips! This week, we learned how to use Fusion and KiCAD, and mill new PCB boards.
This week's assignments:
(1.) redraw an echo hello-world board
(2.) add a button and LED

My circuit I'll be using is based off the ATtiny 1614, based off of Rob's suggestions.



The benefit of the ATtinys is that you don't need to load a separate bootloader program onto the chip, which (in theory) requires less work and you don't have to desolder pins. The UPDI pin can be used for the programming of the chip to be recognized by arduino software.

[2] Group Assignment


The group assignment can be found here.


Here's a brief summary of what he taught us! First, multimeters measure resistance, current, and the voltage in circuits. The ohms setting is for resistnace, the milliamps are for current, and voltage settings are for voltage. It can measure DC or AC, but the majority of the time will be DC current for this class. Oscilloscopes visualize the real-time changes in voltage and display it in a graph formation. This can be used to test the serial communication as well for debugging. Lastly, you can calculate the baud rate using one by tracking the time it takes to send a bit of a ASCII character.

This was how I tested my circuits for the last few weeks, and I did this by powering the boards and checking each portion of the project.. In the future, I want to use it for serial communication as well as other electronics. Before this week, I never fully understood a multimeter, but seeing how useful it is, I'll be sure to utilize it more often for my future circuits.


Quick tip 1! Always keep a multimeter handy when you're making these boards, especially the first few times. Just checking the voltage between ground and VCC oftentimes shows where the initial problems are within the circuit.

[3] Designing the Board
For the echo-boards, I used the same software shown in the recitation - KICAD. Making the PCB took a little bit of researching, and I used previous guides as an example of how to connect the board as well as practiced with the recitation board. However, this was where I lost a lot of time since KiCAD on MacOS didn't download the correct global libraries.

Quick tip 2! For future students taking this course, I'd strongly suggest reading through the ATTINY or SAMD chip pinout, and keep that printed. I found it very helpful moving forward, and it could have helped prevent silly mistakes such as soldeirng the wrong pinout that doesn't work, or failing to get the UPDI working.




Above is my initial PCB layout for the board, which I ended up modifying because I forgot to put the separate connection for the J2 and UDPI, which I mistook for a connection at the 1 and 2 pins. After redrawing it three times on two computers, (since my Mac had issues connecting to the global libary) I think I can explain what each part does - which I'm proud of, and I could make the circuit from memory at this point.


Quick tip 3! One item that I want to note is that I could have done a slightly better job of routing these. Looking at this from a first glance, it's partly unreadable since the wires just tangle everywhere! Instead, I should have used pointers to clean up the diagram.


This would also help save time to learn, even if it seems unnecessary. When you go back to your diagram after a couple of weeks, you'll be wasting your time just figuring out what you meant to connect. Trying to export it to the PCB layout did not work at all, both manually and going through the software guides. I spent three hours trying to redownload KiCAD, but luckily I had a desktop computer which was able to download the repositories I needed. This was a serious hassle, but I was able to make traces at 0.5m for the board. This is a useful skill however to master, so I made sure to get familiar with KiCAD. Once I set up the 1/64 bit, I started to mill the PCB as normal.

[4] Tracing and Milling the Board



Or so I thought... turns out that changing the traces after you draw the lines does NOT actually update the board. I only realized this after I struggled with milling for an hour and inevitably having to scrap it. So make sure to update the traces BEFORE!




This time however, I ran into several issues that I didn't before with the premade trace files.




Uh oh! The first issue was that when I exported the file, I didn't use a large enough trace, and made it too thin, which broke. Shown below, it sort of worked, but since the drill was also going bad it just made everything worse. The second mistake I made is that I didn't invert it on mods, where the background has to be black while the part that you want the copper to be attached to has to remain white. Note: it does't matter when you invert the file, whether it be on InkScape or on the mods - it'll work the exact same.

Quick tip 4! Once you have your file on KICAD, export it as an SVG. Bring it to inkscape, and then select only that portion of the


Lastly, when I went to cut the outsides with the 1/32 bit drill, I didn't leave enough white space for the mods to recognize I was trying to cut a square (instead of nothing). I had to offset it since I offset the original file, but that took an additional ten minutes of figuring out Inkscape and layers with Ben's help. I'd strongly watch the recitation on KICAD/inkscape at the very end for 2021.

Future me: So by now, you can see the several mishaps this week within the milling process - and I want to emphasize on how frustrating this can be yet also important. This struggle is something I look back on, especially after milling dozens of boards now.

With very few good drill bits left at the time, and a long queue for the PCB miller, I had a really uneven PCB board. I'll come back next week to clean it up, but you can tell the drill's quality based on how curved some of the lines are, and even the straight lines didn't cut out properly.
[5] Soldering the Board
Compared to week 2, the soldering of everything took me 10 minutes! Last time it took me more than an hour to get used to soldering. As an ad-hoc solution, I found some copper wires and just connected them to traces that ended up broken due to the drill bit inaccuracies, which worked and was much easier than redrilling with the time I had this week (it still isn't the best soldering, but works temporarily).


[6] Conclusions, Takeaways, and Updates
This week was one of the most difficult weeks for me, especially since I lost so much time hassling with KiCAD. What I should have done is tried it on another computer earlier, which is how I ended up fixing it, or asking someone way earlier so that I could look for alternatives.

Another thing I learned is to plan to take 2-4 times the amount of time you initially expect for a project. I planned for a bit of extra time, but I was nowhere ready to be stuck on the parts I thought would be easy. When I presented this, I initially got confused with the UPDI programming and the SAMD chips, so I would make sure to brush up on which types of programming methods are for which. Take a bit of time to do so and you'll save the rest of the semester's confusion.

I'll be revisiting this week shortly, with the help of Rob, and will revise this then. Update 1: I found the issue with the programming of this. While the wiring was correct, you can tell that I failed to solder a jumper wire between the broken UPDI cable and the actual UPDI FTDI-header pin. This is the main cause of failure, otherwise the multimeter was recording correctly. Update 2: I eventually got an ATTINY working in the future weeks!