About Me Assignments Projects

Week 8 Assignment

ELECTRONICS DESIGN

This week the individual assignment is to design and fabricate our own PCB (Printed Circuit Board), while our group's task revolves around collaboratively testing various electronic testing equipment. It's an exciting opportunity to apply my skills in PCB design and fabrication while also contributing to the group effort in ensuring the efficiency and accuracy of our testing instruments

Group Assignment Week 8

Sample Image Group Assignment

KEYCHAIN DEVLOPMENT BOARD

"Keychain Development Board" - This is my brainchild, my vision to create a versatile and compact tool for electronic prototyping. Picture this: a tiny, lightweight board that fits snugly on your keychain, ready to unleash your creativity anytime, anywhere. With this innovative device, you can bring your electronics projects to life on the fly.

Sample Image

STARTING WITH COMPONENTS SELECTION

Starting the PCB design process with selecting a microcontroller is a solid approach. The SAMD11 is a great choice, known for its versatility and performance. Reading through the datasheet is crucial for understanding its specifications and capabilities, which will inform the design decisions moving forward. With the SAMD11 as the cornerstone of the project, we can tailor the PCB layout and components to optimize performance and functionality. This meticulous approach ensures that our final design meets our project requirements and delivers the desired results. Sample Image samd11 datasheet

OTHER COMPONENTS

Starting with the essentials like LEDs, switches, and the WS2812 LED, I also incorporated additional output device pinouts and power rails and switch as a input device . To guarantee optimal performance, I integrated a voltage regulator circuit into the schematic. This regulator would stabilize the input voltage, ensuring a consistent 3.3 volts supply to all components. This step is crucial for enhancing the reliability and overall performance of the development board. Moreover, I utilized an online resistor calculator to determine the appropriate resistor values for the LEDs, ensuring they receive the correct current for optimal brightness while preventing damage. With these crucial components and calculations in place, my schematic is taking shape, laying the foundation for the subsequent stages of PCB layout design and fabrication.

Sample Image

KICAD

After downloading KiCad, I began the assessment of designing the schematic for my keychain-style development board. I first ensured to add the necessary parts library and supplemented it with components specific to the fablab's dedicated parts. Starting with the basics, I incorporated essential elements like LEDs, switches, and the WS2812 LED. Additionally, I integrated a voltage regulator circuit into the schematic to regulate the input voltage to a stable 3.3 volts. This step is crucial for ensuring that all components receive the appropriate power supply, enhancing the reliability and performance of the development board.

Sample Image download the schematic

DRC SETTINGS

Setting the Design Rule Check (DRC) values in the board setup is a crucial step in ensuring the integrity and manufacturability of the PCB design. By specifying parameters such as minimum trace width, minimum clearance between traces, minimum annular ring size for vias, and other relevant constraints, I'm able to enforce design guidelines and prevent potential errors or violations during the layout process.

Sample Image

PCB ROUTING

Before proceeding further with the PCB design, it's crucial to perform a Design Rule Check (DRC) to ensure that the layout adheres to the defined design rules and parameters. This step helps identify any potential issues or violations that could affect the functionality or manufacturability of the board.

Sample Image

DRC CHECK

Using the DRC feature in KiCad, I meticulously reviewed the design for compliance with the established rules, including track widths, clearances, hole sizes, and other parameters. Any discrepancies or violations were promptly flagged for correction.

Sample Image

GERBER EXPORTING

After completing the PCB design and ensuring its compliance with design rules through rigorous checks, the next crucial step is to export the design files in Gerber format. Gerber files are the industry-standard file format used for PCB fabrication, allowing manufacturers to precisely fabricate the PCB according to the design specifications. In KiCad, exporting Gerber files is straightforward. I navigated to the "File" menu and selected "Plot" to open the Plot dialog. Here, I specified the layers and settings needed for fabrication, such as copper layers, silkscreen, solder mask, and drill files. Once the settings were configured, I clicked "Plot" to generate the Gerber files. After plotting, I reviewed the generated Gerber files to ensure accuracy and completeness. Once satisfied, I compressed the files into a single ZIP archive and labeled them appropriately. Sample Image

GERBER TO PNG

Using the Gerber2PNG tool developed by our fab lab streamlines the process of converting Gerber files to PNG format, facilitating the milling of the PCB. With this tool, I can effortlessly convert the Gerber files, including designated layers for double-sided PCBs, into PNG images. Once the conversion is complete, the tool automatically provides me with the necessary files for aligning the PCB, flipping it, and milling both the top and bottom parts. This streamlined workflow not only saves time but also ensures accuracy and precision in the fabrication process. With the PNG files generated by Gerber2PNG, I can proceed confidently to align and mill the PCB, knowing that the tool has provided all the necessary resources for a successful fabrication process. This seamless integration of technology into our workflow exemplifies the efficiency and innovation fostered by our fab lab.

Sample Image GERBER2PNG Sample Image

MILLING

I milled the pcb using the modola milling machine an d using the fab mods just like in the pervious weeks but the difference was i was doing a 2 layer pcb after milling the top layer and drilling the holes i run the inverting file and it cut the outer then i flipped the board and proceed to mill the bottom part and Sample Image

ASSEMBLY

just like the previous assignment i used our labs inventory management software to get the parts from the inventory based on the bom i generated from the kicad, and i cleaned the board after inspection with emery paper and started the assembly staring with via i cut opened a copper cable that has thin strands which i used to route the via

Sample Image

then i proceed with the Assembly of the board with the rest of the components starting from inside to outwards,and cleaned the pcb with ip solution

Sample Image

BURNING BOOTLOADER

I started with quentorres to use as the programmer i set the board in bootloder mode and put the downloaded bootloder on there then i moved to downloading the it via the board manger url and selected the board and set the programer the clicked on the burn bootloder tab it was flashed with the bootloder

Sample Image Sample Image Sample Image

FIRST CODE

then i wrote a simple blink code and then assigned the dedicated pins of the samd 11 that is connected with the led and volla it worked well then i procced with the ws2812 led as well

LED BLINK WITH SAMD

this is the sketch that i used for the blink

    
  void setup() {
    // initialize digital pin 2 as an output.
    pinMode(2, OUTPUT);
  }
  
  // the loop function runs over and over again forever
  void loop() {
    digitalWrite(2, HIGH);  // turn the LED on (HIGH is the voltage level)
    delay(1000);                      // wait for a second
    digitalWrite(2, LOW);   // turn the LED off by making the voltage LOW
    delay(1000);                      // wait for a second
  }
  

  

WS2812B WITH SAMD

this is the sketch that i used for the WS2812B individual addressable led

    
    #include Adafruit_NeoPixel.h

      // Pin connected to the NeoPixels (WS2812B)
      #define LED_PIN 15
      
      // Number of NeoPixels
      #define LED_COUNT 1
      
      // Create NeoPixel object
      Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
      
      void setup() {
        // Initialize NeoPixel strip
        strip.begin();
        strip.show(); // Initialize all pixels to 'off'
      }
      
      void loop() {
        // Cycle through different colors
        rainbow(20); // Change colors every 20ms
      }
      
      // Function to cycle through rainbow colors
      void rainbow(uint8_t wait) {
        for (uint16_t i = 0; i < 256; i++) {
          uint32_t color = Wheel((i + strip.numPixels()) & 255);
          for (int j = 0; j < strip.numPixels(); j++) {
            strip.setPixelColor(j, color);
          }
          strip.show();
          delay(wait);
        }
      }
      
      // Input a value 0 to 255 to get a color value.
      // The colors are a transition r - g - b - back to r.
      uint32_t Wheel(byte WheelPos) {
        WheelPos = 255 - WheelPos;
        if (WheelPos < 85) {
          return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
        }
        if (WheelPos < 170) {
          WheelPos -= 85;
          return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
        }
        WheelPos -= 170;
        return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
      }
      

  

THE KEY CHAIN TEST

hears is how it looks with my keys

special thanks to nihal for donating the keychain

Sample Image