Electronics Design
Research
This week, I designed my first ever PCB. To do that, it recuired some researc on what a PCB is, what components I should add, and how to connect them using some physics equations.
What is a PCB?
A Printed Circuit Board (PCB) is a board used to mechanically support and electrically connect electronic components using conductive tracks, pads, and other features etched from copper sheets laminated onto a non-conductive substrate. It is widely used in almost all electronic devices to organize circuits efficiently and reliably.
Essential PCB Design Equations
- Trace Resistance: R = ρ × (L / (W × T))
- Current Capacity (IPC-2221): I = k × ΔT0.44 × (W × T)0.725
- Microstrip Impedance: Z0 ≈ (87/√(εr+1.41)) × ln(5.98H/(0.8W+T))
- Stripline Impedance: Z0 ≈ (60/√εr) × ln(4H/(0.67π(0.8W+T)))
- Propagation Delay: tpd = 1.017√εr ns/ft (stripline)
- Critical Length: Lcrit = trise/(2 × tpd)
Mining for Electronics
For this PCB, I tried to make it with many pin outs that will be useful. When it come to the electronics components, I looked for what is available in our Fab Lab storage, and I found the following:
x1 Button Switch
x1 Thermistor RTD
x1 LED
x1 MotorDriver FullBridge A4953
x1 Seeed XIAO RP2040
Now it is time to research each of them, the recuired added components to them [resistors & capacipors] so I can work on the schematics. Note that all the components I am planning to use are SMD. The values here are from my research on what is recuired for each of those components.
Seeed XIAO RP2040
XIAO Seeed RP2040 is a tiny, powerful microcontroller board based on the Raspberry Pi RP2040 chip. It features a dual-core ARM Cortex-M0+ processor running at 133 MHz, 264 KB SRAM, and 2 MB flash. The board has 11 GPIO pins, USB Type-C, and supports I2C, SPI, UART, PWM, and ADC. Thanks to its small size and low power consumption, it’s great for wearables, DIY electronics, and IoT projects.
- Processor: Dual-core ARM Cortex-M0+, 133 MHz
- Memory: 264 KB SRAM, 2 MB flash
- GPIO: 11 multifunctional pins (I2C, SPI, UART, PWM, ADC)
- USB: USB Type-C for power and programming
- Size: Ultra-compact 20 x 17.5 mm form factor
- Power: Low power consumption, 3.3 V logic
- Applications: Wearables, DIY projects, IoT devices, and rapid prototyping
Button Switch
- Pull-down resistor 470 to ground
- Connection to microcontroller pin
- Connection to 3V (supply voltage)
Thermistor RTD
- Series resistor ~10 kΩ
- One side connected to microcontroller pin (for analog reading)
- Other side connected to 3V and ground
LED
- Current-limiting resistor ~1 kΩ in series
- One side to microcontroller pin
- Other side to ground
Motor Driver A4953
- Ground pin connected to ground
- Decoupling capacitors: 100 nF ceramic and 0.22 μF (near power pins)
- Resistor: 0.25 Ω
- Motor driver output connected to the motor through a pin header
The motor driver was a bit tricky. I found resources here for the module I am using.
These diagrams and data helped me with figuring out how the schematics should be.
Group Assignment
In the group assignment, we tested using the multimeter, the oscilloscope, and Picoscope.
My Real-World Electronics Lessons
Okay, so here's what actually sunk in after all that time poking at circuits:
-
Tools lie (but in different ways)
That moment when your multimeter says 3.27V but the datasheet promised 3.3V? Yeah,
electronics have commitment issues. And oscilloscopes? Each one tells the story
differently.
-
Noise is the ultimate party crasher
I learned that circuits are like bad phone calls - half the battle is fighting
interference. Ground loops buzz, power supplies whine, and suddenly your clean
signal looks like a toddler's scribble.
-
Oscilloscopes have personalities
The chunky lab scope acted like a grumpy old professor ("This signal is noisy and
I don't like it!"), while the PicoScope was the chill TA who cleans up your
mess with digital magic.
Bottom line? Electronics are alive, they have moods, and nothing ever works perfectly
the first time. And that's actually what makes it fun.
Group Assignment Page
Crafting Time: KiCAD Design
Theory is over, time to craft. After understanding and reading about the lectronics that I will use in my design, now it is time to purt them on my crafting table.
Bill of Material
Component |
Footprint / Type |
Quantity |
Value |
Pin Header 1x04 Horizontal |
PinHeader_1x04_P2.54mm_Horizontal |
1 |
— |
Pin Header 1x02 Horizontal |
PinHeader_1x02_P2.54mm_Horizontal |
1 |
— |
Pin Header 2x02 Vertical |
PinHeader_2x02_P2.54mm_Vertical |
1 |
— |
LED |
1206 |
1 |
— |
Resistor |
1206 |
1 |
470 Ω |
Seeed Studio XIAO Socket |
Module_XIAO-RP2040_Socket |
1 |
— |
Motor Driver |
SOIC-8 A4953 |
1 |
— |
Pin Header 1x08 Horizontal |
PinHeader_1x08_P2.54mm_Horizontal |
1 |
— |
Resistor |
1206 |
1 |
0.25 Ω |
Resistor |
1206 |
1 |
1 kΩ |
Capacitor |
1206 |
1 |
100 µF |
Capacitor |
1206 |
1 |
0.22 µF |
Tactile Button |
Omron B3SN 6x6 mm |
1 |
— |
Resistor |
1206 |
1 |
10 kΩ |
Thermistor |
RTD |
1 |
— |
- The amazing KiCAD, once you open it you can create a new project. When the project is created, it generates schematics file and pcb file for it.
- Before designing anything, I installed the fab library which includes schematics and footprints for electronics available in the inventory.
- I downloaded the library from gitlab, then go to Prefrences > Manage Symbol Library > Folder Icon.
- Then do the same with Footprint Library.
- In the schematics file, the cooking starts.
- I started by adding the modules in the schematics page.
- Some ingrediants are missing, which are the resistors, capacitors, and the powers [GND & VN].
- Okay let's cook the switch, I added them to the switch and labeled where the PIN should be connected.
- Make sure the PIN that the PCB will be connected to is labeled with the same global label.
- Did the same for the LED.
- And for the motor driver.
- I then added two types of headers, after making sure they are avilable in our inventory. And made sure everything is labeled on the microcontroller.
Electrical Rule Checker
- Time for teh truth, Let's check if the crafting will work or not by applying built-in Electrical Rules Checker
Obstacle
- Well, We got few errors and A LOT of warnings, let's dive into them.
- The arrows shows the placement in which there is an error or a warning.
- After checking the errors, and fixibng them, I ran the ERC again, and happily, no erroes apeared.
From Schematics to PCB
- Let's draw! After checking all is good with schematics, I then started working on the PCB.
- I mean, why not make it a pixelated heart? It looks cute with the red blinking LED in it.
Design Rule Checker
- Just like what we did in ERC, now it si time for DRC. I ran the built-in DRC to check for errors.
- However, the errors that appeared don't look concerning.
- As a final touch, I made sure that all the track width is 0.4mm.
Download
- Download the Schematics from Here
- Download the full project in kiCADHere