Geoffrey Makes Anything

# Week 3 ## Overview of Embedded Architectures ### Group Project Portion > Demonstrate and compare the toolchains and development workflows for available embedded architectures I met in a group to discuss these topics and starting a new page on the architecture website titled [Week 2](https://fab.cba.mit.edu/classes/863.25/Architecture/week-2.html), which students in our section added to using git. There are two types of boards available with Quentin Bolsee's QPad Kit. The main difference between them is the two microprocessors they support: the XIAO and the ATSAMD21E. The XIAO kit requires less soldering (just the microprocessor, screen and two resistors), while the SAMD chip requires more external circuits to run (like a powersource, led, capacitors, resistors), and therefore more soldering! The XIAO can support micropython, which is great if you like coding in python, though you need to be careful since it has less guardrails than the C-based code it also supports. The SAMD kit comes in two versions, one with a USB C and another with a USB micro because of sourcing issues. Funily enough, one of the hardest parts of assembling the kit is these connectors. To me it seems that USB micro is harder because at least the USB C connections are not blocked by the sleeve of the connector itself, but I did USB C and not micro. The programming enviroment for both using C is in the Arduino IDE. ### Individual Project Portion The convention for numbering the pins on a chip is counterclockwise from where the dot on it is located: ![Pin Naming Convention on Chip](images/250922-pin-naming-pattern-chip.jpg) > browse through the data sheet for your microcontroller ## Soldering the Hardware ### Soldering Demo Some key takeaways from the demo: - Use gloves with paste, use ventalation for flux fumes (lead isn't the issue in this case) - Spools with Green Solder are **Lead Free**, Spools with White Solder have **Lead** - Soldering Iron Temp should be 720 - 800 F / 270 - 330 C ### ATSAMD21E with USB C The soldering tutorial showed how to use solder paste and a heat gun to solder a the tiny pins on the ATSAMD21E chip. | ![Apply Solder Paste](images/250919-Samd-Solder-1.jpg) | ![Place Chip](images/250919-Samd-Solder-2.jpg) | ![Use Heatgun to Transform Paste](images/250919-Samd-Solder-4.jpg) | |:---------:|:---------:|:---------:| | *Apply Solder Paste* | *Place Chip* | *Use Heatgun to Transform Paste* | I then assembled all the parts of the kit together and tried to give it a shot myself: | ![Applying Paste Myself](images/250919-Samd-Solder-6.jpg) | ![Place Chip](images/250919-Samd-Solder-10.jpg) | ![Use Heatgun to Transform Paste](images/250919-Samd-Solder-11.jpg) | |:---------:|:---------:|:---------:| | *I Apply Too Much Paste* | *I Place The Chip* | *I Use Heatgun and Get Lots of Short Circuits* | It was really cool to see how the chip placed itself well on all the contacts with this process. Notice how there is way too much paste, which resulted in a lot of short circuits. Thankfully this isn't very hard to fix, with copper mesh I can absorb a lot of the shorts. After a lot of debugging the hardware, we got a completed board! ![Hello World on the SAMD Board](images/250922-Samd-Debug-Solder-21.jpg) Key things I learned: - Use flux to get solder to flow - Be extremely sparing with soldering paste ## Coding the Microcontrollers > write and test a program for an embedded system using a microcontroller to interact (with local input &/or output devices) and communicate (with remote wired or wireless connections). Here is running a simple version of DOOM on the board. I used AI to write the code for me. [Here is the prompt I used.](https://claude.ai/share/5fc32c48-cca8-4809-a6e2-1e812f44a5b0) Here's a bit more gameplay where I defeat some enemies: > extra credit: try different languages &/or development environments