Introduction: Majin Vegeta on a PCB

About: Hello world;

Hey Everyone What's up!

So this is my Majin Vegeta PCB Badge or PCB Art (actually I'm not sure what to call this thing I made)

It's basically a Blinky Board powered by an Attiny13A Microcontroller, 12 LEDs constantly Fades IN and OUT in this setup with the help of 8205S Mosfet Driver IC.

In a nutshell, it's an Over-Engineered Blinky Board with lots of LEDs and an anime character printed on the TOP silkscreen.

Pretty sick right?!

In this Instructables, I'm gonna show you guys how I made this Blinky Board in few easy steps.

Let's get started.

Supplies

Following are the things I used in this built

  • Custom PCB
  • Attiny13A SOIC8 MCU
  • SMD LEDs RED 0603
  • 8205S Mosfet IC
  • 10K 0603 Resistor
  • 1K 0603 Resistor
  • SMD Button
  • THT Switch
  • Solder paste
  • 3D Printed Frame
  • Header Pins
  • USB Micro THT Port
  • Coin Cell holder
  • Coin Cell, CR2032

Step 1: Prologue

So recently I've been making these cool-looking PCB badges of nerdy stuff from movies and anime!

Like for example, Previously I made a Goku Badge, in which the famous character Goku is doing his Kamehameha chi blast attack, so added LEDs in Kamehameha place and drive those LEDs in a chasing sequence to create an illusion of the Kamehameha and I also made a Flux Capacitor Badge.

https://www.instructables.com/Flux-Capacitor-PCB-B...

https://www.instructables.com/Goku-PCB-Badge/

My point here is that we can make anything into PCB, just visualize and get creative with the idea.

But why make PCB Badge when you can prepare a 3D Printed body of that character?

You see, it's more convenient to make a PCB Badge than making a whole 3D Printed body of XYZ stuff, let me explain why.

Badge shape can be made in PCB Cad software, we can add our character's drawing on the PCB Silkscreen, then place components like LEDs around the drawing. In the end, we generate Gerber data and send it to a PCB manufacturer. That PCB Manucature will produce the Badge professionally and we don't have to do anything except for the unboxing and the assembly process.

By the way, I used PCBWay Service for this PCB Badge this time! more about that in few mins!

Step 2: Schematic of the PCB

Here's the main schematic of the whole PCB which is actually pretty simple.

Attiny13A is connected with an SMT Button and a con6 Header pin which is for programming the microcontroller.

Mosfet IC 8205S Drives all the 12 LEDs and the Attiny13A Controls the Mosfet IC's Gate.

Attachments

Step 3: PCB Designing Process

To Design this Majin Vegeta PCB

  • I first think about ways that I could add Vegita's face in the PCB and add LEDs on it.
  • I Google-searched a few images and finally choose the image in which a huge M was written on his forehead.

My goal here is to add RED LEDs in this M Shape.

  • we convert this image into a BMP image as my software only imports logos in BMP format which is a standard format for importing image but other software include adding PNG so you can skip this converting process and import your image into the PCB Cad software. (how to do that? well in my OrCAD software, I have to make a logo file first and then add the image into this logo file, later then I can import the logo file into my PCB design. this process is long and your software probably can directly import the image so search around for any imported image option or just google how you can do that in your PCB cad software)
  • Next, we place all the components around the logo or on the logo like in my case, LEDs are on this character's forehead.

  • then we connect tracks and do the general thing which is required in a PCB Designing process. which is to connect tracks one by one.

  • then we have to import the Gerber data and our PCB-making Process is complete!

  • But before sending the PCB File to the manufacturer, open the Gerber data in any PCB Rendering software, your software already has this feature so just see how your PCB will look after getting manufactured.

  • after making sure that everything is fine, we send it to any PCB manufacturer that we like. In my case, I send the Gerber data to PCBWay for samples!

Step 4: Getting PCBs Ready

I will be using a White PCB Soldermask color with a Black Silkscreen. Why? because it will look like a Manga Panel and also, white PCBs look great with black silkscreen.

To get the PCBs Ready, I send the Gerber data to PCBWay for samples!

I received PCBs in a week and the PCBs were nice as expected.

I really like the quality of the white solder mask, also it was a tough job as the silkscreen that I have laid out o this board was not completely symmetrical but PCBWAY did an excellent job of manufacturing this PCB with no error whatsoever.

PCBWay you guys rock, check out PCBWay service for getting great PCB service at less cost.

By the way, yes I have included that famous line in this PCB!

"It's over 9000" haha.

Step 5: ​Assembly Process

The Assembly process of this badge includes four different processes, which are-

  • Solder paste Dispensing
  • Pick and Place Process
  • Hotplate Reflow
  • Adding THT Components

Step 6: #1 Solderpaste Dispensing

The First Step of the assembly process is to dispense or apply solder paste to the pads of each component.

Solder paste if you don't know is basically a semi-liquid mixture of very small solder balls and flux.

I added solder paste to each components pad with help of a solder paste dispensing syringe.

but the right way to do this process is to use a stencil.

Step 7: #2 Pick and Place Process

Next, we carefully pick all the components with an ESD tweezer and place them in their assigned place one by one.

this one is a manual process so you have to do this properly, check the alignment and polarity of components so shorting can be avoided in the next process.

Step 8: #3 Hotplate Reflow Process

After this, I carefully lift the PCB and place it on a reflow hotplate for SMT REFLOW.

Hotplate SMT Reflow is a process of heating the PCB up to the solder paste melting temperature which is usually 170-250°C depending on solder paste Sn-Pb Ratio.

I'm using my DIY Hotplate for this project though, it doesn't have a temperature control feature but it works.

https://www.instructables.com/DIY-SMT-Hotplate-Project/

After a few mins when the solder paste completely melts, we remove the PCB and let it cool down for a moment.

Step 9: #4 Adding THT Component

Next, we add THT Components to the PCB which are USB Port, Coin Cell holder, Header pins, and THT Switch with a soldering iron.

After this, we remove any shorting that might occur during the Hotplate process and that's pretty much the assembly process of this whole board.

Now we flash code into the attiny13 and see the result!

Step 10: CODE and Flashing Process

This is the code that I have used in this project, it's a Switch-based Sketch that has few modes in it.

On the first button press, LEDs will start their fading sequence.

On Second Tap, LEDs will stay in HIGH Mode.

And on Third Tap, LEDs will turn OFF.

Then this whole process will loop.

int switchPin = 4;     //4         
int led1Pin = 0;        //0

int brightness = 0;    // how bright the LED is
int fadeAmount = 5;    // how many points to fade the LED by


int val;                        
int val2;                       
int buttonState;                
int Mode ; //= 0;              

void setup() 
{
pinMode(switchPin, INPUT_PULLUP);    
pinMode(led1Pin, OUTPUT);
buttonState = digitalRead(switchPin); 
}

void loop(){
 
      val = digitalRead(switchPin);      // read input value and store it in val
      delay(10);                         // 10 milliseconds is a good amount of time
      val2 = digitalRead(switchPin);     // read the input again to check for bounces
      
      if (val == val2) {                 // make sure we got 2 consistant readings!
        if (val != buttonState) {          // the button state has changed!
          if (val == HIGH) {                // check if the button is pressed
            if (Mode == 0) {         
              Mode = 1;               
            } else {
                if (Mode == 1) {       
                Mode = 2;           
            } else {
                if (Mode == 2) {     
                Mode = 0;           
            } 
           }
          }
         }
        } 
        buttonState = val;                 // save the new state in our variable
      }

      // Now do whatever the lightMode indicates
      if (Mode == 0) {                       // FLIP FLOP
        digitalWrite(led1Pin, LOW);
      }

      if (Mode == 1) {
        analogWrite(led1Pin, brightness);
        brightness = brightness + fadeAmount;
        if (brightness <= 0 || brightness >= 255) {
    fadeAmount = -fadeAmount;
  }
      }

      if (Mode == 2) {
        digitalWrite(led1Pin, HIGH);
      }
}
      
       <br>

Step 11: Getting Attiny13 Core Installed on Arduino IDE

As for the Flashing Process, we cannot directly program ATTINY13 through any USB, I mean there's a method for programming the Attiny straight from the USB port but I'm not doing that.

Instead, I'll be using the ISP flashing method which will utilize the SPI Pins of attiny13A to burn the bootloader in it and then Flash.

But Before starting the Flashing process, we first need to download and install the Attiny13 Core files in Arduino IDE.
https://github.com/MCUdude/MicroCore

Step 12: Preparing the Arduino As ISP Setup and Final Flashing!

AVRs chips usually come blank, they need to be set up to be Arduino IDE compatible but to do that you need an AVR programmer do to that, for example, a USBASP.

Fun Fact, you could make your own AVR Programer with an Arduino Uno or a Nano board in a very easy step.

  • Connect your Arduino board with com port and select the following sketch
  • Example>ArduinoISP upload this sketch onto your board
  • After uploading, go to the tools menu and choose the Arduino as ISP option in the programmer section.
  • Now for flashing Attiny13A, we can select the Attiny13A in the Board section.

The programming process uses VCC, GND, and four data pins.

Wire the Attiny13 with Arduino in this way.

  • VCC to VCC
  • GND to GND
  • D10 of Arduino Nano to RST Pin of Attiny13A
  • D11 of Arduino Nano to MOSI
  • D12 of Arduino Nano to MISO
  • D13 of Arduino Nano to SCK of Attiny13A

also right after uploading ISP Sketch to your Arduino, do not forget to add a 10uf Cap between Reset and GND pins of your Arduino board.

Instead of using an Arduino UNO and a breadboard for this job, I will use my DIY Attiny Programmer which I made for flashing the Attiny or Atmega MCUs. which you can check out from here- https://www.instructables.com/Multiple-ATtiny8513...

  • connect the Board to the Arduino as ISP Setup in the above wiring config.
  • choose the right port, right programmer (Arduino as ISP), and hit Burn Bootloader wait for few seconds, you will get done burning the bootloader message.
  • Now Open the sketch that you want to upload to this AttinyGo to the Sketch menu and select Upload using the programmer.
  • And your Sketch will get uploaded onto the attiny13.

Step 13: 3D Printed Frame

Now, this PCB itself cannot be mount anywhere, so I design a wall mounting frame.

For Designing the frame, I used Fusion360.

  • I First took measurements of the PCB and the THT components location and their size so I could model the PCB first.
  • then I designed a Base Frame around the PCB that I modeled.
  • In the end, I exported its mesh file (STL FILE) and then 3D Printed it on my ENDER 3 with Black PLA at 10% Infill with a 0.5mm Nozzle.
  • I used Three Truss head 2.8mm Screws to mount the PCB onto the 3D Printed Frame and the project was completed.

As for the Power Source to run this PCB, we can power it directly from USB Port or we can add Coin Cell to this setup. (CR2032 Cell)

Step 14: Result

This PCB Badge or Frame is working nicely, Fading is working and the normal ON and OFF feature is working as well.

And I'm pretty happy with the results overall.

With the 3D Printed Frame, I mounted this Setup on a wall with two nails.

Step 15: Features, Conclusion and Further Improvements

Here's what I learned so far by making a few of these Fancy PCBs.

  • Silkscreen is not just for labeling parts, it can be used to improve the artistic aspect of any boring PCBs just by adding few shapes or random polka dots or something similar. (geometrical shapes or stuff)
  • White Soldermask with Black Silkscreen is the best combination ever to design great looking PCBs
  • Complex Shapes can be made with PCBs but it's better to design them first in Fusion360 and then use the DWG file or other format to model the PCB shape.
  • try to use less complex images for silkscreen printing, Image should be a black and white image with high details.
  • Double-check the electrical setup before exporting the Netlist for PCB Editor. (because I missed a ground line for two LEDs)

Changes/ alteration and improvements list-

Now, I made one mistake in this PCB, I forget to add a connection between the Negative terminal of two LEDs to the drain of mosfet. because of this, two LEDs didn't turn ON, solution here was simple, I added a small wire to both of the Led's negative terminals and connect them with a nearby drain line.

this corrected the problem but I will be editing this on the PCB Directly in revision 2 of this project.

Anyways, Comment if you need any help! Peace out

Fandom Contest

Participated in the
Fandom Contest