Week 6: Electronics Design
Group Assignment (link): use the test equipment in your lab to observe the operation of a microcontroller circuit board.
Individual Assignment: use an EDA tool to design an embedded microcontroller system using parts from the inventory, checking its design rules for fabrication, and simulating its operation. Extra credit: try different languages &/or development environments.
KiCad 9.0 - ATTINY412 Microcontroller
We will use a progam called KiCad, recommended by Dr. Neil. Download and install. It has different options; we will use schematic editor.

But first we needed to find a 'fab' library of parts clone it using 'git'

Then we needed to import it to KiCad, from preferences tab.

Now we can start making circuits. This is the first example for LED
We find the list of components to include with the 'A' shortcut, and we may rotate with 'R' shortcut.

Now we added an LED to a microcontroller:

And also a switch. Additionally learned about labels, see "RX" and "TX"

Here we have added power flags to the power source and ground.

Here's the final schematic:

KiCad 9.0 - Seeed Studio XIAO RP2040 Microcontroller
Here is the simplified schematic, including a header so we can later place I/O devices.

Here is the PCB editor. Look at the placement of connectors and traces (created by toggling 'X' shortcut). The design became logical and beautiful, throught significant trial & error.

Our design passes the design rules, which will let us create this in our lab after a few weeks. For reference, design rules can be found (and edited) under "File"->"Board Setup..."

Finally, here is the 3D viewer. The components are not there yet, but they will be soon - in sha Allah.

Wallahi I'm pretty satisfied with it. There are enough components but not too many. There is some space to make soldering feasible. I like that I added a hole: it will go on a necklace or keychain to take it with me everywhere.
XIAO RP2040 - Placing the Components
There is more to say about placing the components to show the 3D model, so its a separate section now.
From the PCB editor, double click the component (or right click and select properties). From here find the component, also being sure to rotate correctly.

Actually it is not necessary to manually do it all, we can also configure path to connect the 3D models automatically

However, after doing this it wasn't perfect as not all components in the FAB library contained a 3D model.

To solve this issue we formed an account on GrabCAD to download those particular models - the RGB LED and the XIAO RP2040 board.

For each we then manually selected it from the library after double-clicking on the component.

HERO SHOT! Check this beautiful rendering! Excited to produce it...

KiCad 9.0 - Seeed Studio XIAO RP2040 - Design Files
Finally to note that we may use the board file here to create a gerber file; this will be helpful in creating our PCB.
Click here for Gerber file.
Addendum: some insights on Electronics
Actually I don't have a background in electronics. I mean like zero. Except for playing with Arduino years ago. So here are some things I learned:
1. LEDs consume different voltage:
Wallahi I thought that LEDs would take the same voltage, but some require more as seen in this table. Anyway, the amount an LED requires or consumes is called the 'Forward Voltage' and as a result, the Blue LED for example, which has higher voltage consumption, can be used with a smaller level resistor. Whereas a LED requiring less voltage, like the Red LED, should have a higher level resistor.

2. Calculator for V=IR: Of course the famous Ohm's law equations which link Voltage with Current and Resistance... Well sometimes we want to calculate that quickly and easily. There is online calculator here at digikey.in:

3. Transistors: Actually I never knew what was transistor, which is a shame... One tutorial put it on level with FIRE in terms of its importance in all of human history! Basically we may consider it analagous to a switch. The switch when pressed allows the flow of electricity in a circuit.. Similarly a transistor can allow the flow of electricity in a circuit by providing a small amount of voltage.

4. Logic Gates: logic gates and transistors together allow computing: This video blew my mind