Reishan attempts How to Make [almost] Anything in 2024

About
Final Project
01
02
03
04
05
06
07
08
09
10
11
12
13
14

Week 06 — Electronics Production

PCB Design Update

This week, we moved into electronic board production! I went to the shop to gather all the supplies, but they were out of slide switches... So, I pivoted my design and swapped in a tactile button they had in the shop (Omron B3SN-3112).




Group Assignment

For our group assignment, we learned how to use the Modella SRM-20 in the shop, focusing on the care of the two mill bits and setting up the copper plate on the bed. We also practiced soldering techniques and the proper workflow for assembling board components.



Milling & Soldering the Board

A common issue we encountered was that the outline and trace PNG files were exporting at different sizes, which messed up the mills. Jacob suggested that when using GerberToImg software, software, we should convert the outline first, lock the origin and dimensions, and then convert the trace file. Thankfully, I was able to mill my board successfully (I think)! After that, I soldered the very tiny components onto the board. In the future, I plan to use female connectors for the microcontroller to make it easier to swap out if I mess up the board.



Coding & Debugging the Board

I wrote Python code to activate the LED and switch, then loaded it into my microcontroller using Thonny IDE. I referenced a previous fab academy student that a nice step by step tutorial to set up the firmware. To get the circuit to work, I had to use the internal pull-up resistor within the Xiao microcontroller. Of course, the button didn’t work at first, so I began debugging. First, I used a multimeter to check all the connections—everything was fine. I then tested the LED’s anode/cathode, which also worked. Finally, I realized I had used the wrong resistor (1k instead of 100 ohms), so I swapped it out. Desoldering turned out to be harder than expected, so I'll make sure to avoid mistakes next time. Even after fixing the resistor, the button still didn’t work!





Code for reference below:


from machine import Pin
import time

button = Pin(29, Pin.IN, Pin.PULL_UP)
led = Pin(28, Pin.OUT) 

while True:
    if button.value() == 0:  
        led.value(1)  
        print("Button pressed, LED ON")
    else:
        led.value(0)  
        print("Button not pressed, LED OFF")
    
    time.sleep(0.1)