Diamond Shaped PCB Necklace

2.0K120

Intro: Diamond Shaped PCB Necklace

Hey Everyone how's it going.

Here's something super cool, a Diamond-shaped PCB Necklace powered by an Attiny13A.

The goal here was to make a Wearable Necklace or jewelry by using a PCB and a few LEDs to make a combination of Electronics and Wearable Jewellery.

The heart of this Project is an Attiny13A that controls all the LEDs present onboard, also this pendant or necklace is powered by a CR2032 Coin Cell that is on the bottom side of the board.

This Instructables is gonna be about the whole built Process of this Necklace so let's get started.

STEP 1: Schematic

The schematic of this PCB was pretty simple, I've placed a total of 12 LEDs on this board, and 3 LEDs are connected with a single Mosfet, to drive 12 LEDs, I used 4 Mosfets. Attiny13 Controls the gate of each Mosfet and we can change the state of Attiny13 by using the toggle switch.

I've also added a CON6 Header Pin for flashing the Attiny13A, I will later use my Arduino as ISP Setup to connect through this CON6 Pin and flash the Microcontroller.

STEP 2: PCB Design

I prepared a Diamond Shaped PCB Board with a hole in the top for mounting the chain with this setup. I placed 3 LED Pairs on one side, I did this with the remaining 3 LED Pair and then put the attiny13A at the center part of the board.

I tried to keep this PCB as Small as possible as it's a wearable device that one will wear all day so by reducing its size, we are reducing the overall weight as well.

STEP 3: PCBWAY

After completing the design, I uploaded the Gerber data on PCBWAY's quote page, selected the solder mask color which was White, and placed the order.

After placing the order, I received the PCBs in a week and the PCB quality was pretty great.

This shape is completely random so it's pretty hard to make but they did an awesome job of making this PCB with no error whatsoever.

You guys can check out PCBWAY If you want Great PCB Service at an Affordable rate and low price.

STEP 4: Error in the Design

Here's a small mistake I made while designing the board, I forgot to double-check the Mosfet PAD that I made for this project, I made the pad of Mosfet a little smaller than my existing footprint as this PCB was small and so I reduce the side of Mosfet Pad to save space.

I forgot to add a soldermask layer on the Pad of Mosfet that I created and this resulted in a PCB that doesnt have any Soldermask opening for soldering Mosfet with the PCB.

Wire traces were all in their place so I used a tweezer to scratch the solder mask in place of mosfet Pads and this revealed copper terminals that I can solder mosfet with.

STEP 5: PCB Assembly

the PCB Assembly Process will have the following steps.

  • Solder Paste Dispensing
  • Pick & Place Process
  • Hotplate Reflow
  • LED Testing
  • Programming the Attiny13A
  • Adding Coin Cell holder

STEP 6: Solder Paste

The first step is to apply solder paste to each component pad.

I used a normal Sn-Pb solder paste which has a melting temp from 140 to 270 °C.

After Adding solder paste, we move on to the next process which is the "PICK & Place Process"

STEP 7: Pick & Place

I then used an ESD Tweeaser to carefully pick and place each component in their assigned place one by one which took like 30 Seconds tops but the result was a perfect PCB with all the components placed in their location.

STEP 8: Hotplate Reflow

After the "PICK & Place Process", I carefully lifted the whole circuit board and place it on my DIY SMT Hotplate which is also homemade just like this project.

After a Few mins when the hotplate reaches the Solderpaste melting TEMP, all the components will get soldered by this Hot Reflow process.

We then remove the PCB from the Hotplate to cool down all componenets and board surface.

STEP 9: Testing LEDs Continuity

Because we are using LEDs here, it's crucial to check whether LEDs are soldered properly or not.

I used a normal Multimeter set in Diode checking mode, we connect the probe of the multimeter to the Anode and Cathode of leds in the right polarity.

If LEDs are soldered properly, all LEDs will glow. If there's any soldering error they won't glow.

STEP 10: Flashing the Attiny13 With Arduino As ISP

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.

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. Three pins connect MISO, MOSI, and SCK between the programming micro and the target micro, and the fourth pin from the programming micro goes to the reset pin of the target.

I will use my DIY Attiny Programmer which I made for flashing the Attiny or Atmega MCUs.

which you can check out here-  https://www.instructables.com/Multiple-ATtiny8513A-Programmer/

  • 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 a few seconds, you will get done burning the bootloader message.
  • Now Open the sketch that you want to upload to this Attiny
  • Go to the Sketch menu and select Upload using the programmer.
  • and your Sketch will get uploaded onto the attiny13.


STEP 11: Code 01

int pinsCount=4;                        // declaring the integer variable pinsCount
int pins[] = {0,1,2,3};          // declaring the array pins[]


void setup() {
  pinMode(0, OUTPUT);
  pinMode(1, OUTPUT);
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
                  
}

 
void loop() {
  for (int i=0; i<pinsCount; i=i+1){    // chasing right
    digitalWrite(pins[i], HIGH);         // switching the LED at index i on
    delay(70);                          // stopping the program for 100 milliseconds
    digitalWrite(pins[i], LOW);          // switching the LED at index i off
  }
  for (int i=pinsCount-1; i>0; i=i-1){   // chasing left (except the outer leds)
    digitalWrite(pins[i], HIGH);         // switching the LED at index i on
    delay(70);                          // stopping the program for 100 milliseconds
    digitalWrite(pins[i], LOW);          // switching the LED at index i off
  }

} 


This is a simple chaser sketch that I used before the Main Code just for checking if the board was working or not.

STEP 12: Main Code 02

const int switchPin = 4; 
int pinsCount=4;                        // declaring the integer variable pinsCount
int pins[] = {0,1,2,3};   
int lightMode = 1; 

void setup() 
{
    pinMode(0, OUTPUT);
    pinMode(1, OUTPUT);
    pinMode(2, OUTPUT);
    pinMode(3, OUTPUT);
    pinMode(switchPin, INPUT_PULLUP);
   digitalWrite(0, LOW);
   digitalWrite(1, LOW);
   digitalWrite(2, LOW);
   digitalWrite(3, LOW);
     
}
void loop()
{ 
    if (digitalRead(switchPin) ==LOW) 
    { 
        lightMode = lightMode + 1;
        if (lightMode == 3)
        {
            lightMode = 1;
        }
    }
    if (lightMode == 1)
    {
        digitalWrite(pins[0,1,2,3], LOW);
        delay(200);
    }
    else if (lightMode == 2)
    {
      for (int i=0; i<pinsCount; i=i+1){    // chasing right
      digitalWrite(pins[i], HIGH);         // switching the LED at index i on
      delay(70);                          // stopping the program for 100 milliseconds
      digitalWrite(pins[i], LOW);          // switching the LED at index i off
    }
      for (int i=pinsCount-1; i>0; i=i-1){   // chasing left (except the outer leds)
      digitalWrite(pins[i], HIGH);         // switching the LED at index i on
      delay(70);                          // stopping the program for 100 milliseconds
      digitalWrite(pins[i], LOW);          // switching the LED at index i off
     }
    }
        
    //delay(200); // see text
} 


This is the code that I have used in this project, it's a simple Chaser sketch that toggles each Mosfet in a chaser sequence when we press the button. (Pretty simple stuff)

STEP 13: Adding Coin Cell Holder

As for the Powersource, I used a CR2032 Coin Cell that is being attached to this PCB via its THT Holder.

After Programming the Attiny13A, we add this Coin cell holder in its place as it covers the programming Pins so that's why I added it at last.

We then put the CR2032 Coin cell in its holder and press the button present in front.

This will initiate the Chasing sequence and the LEDs will glow.

STEP 14: Cleaning the PCB With IPA

After manual soldering, there was some leftover flux near the Coin cell Positive and negative terminals from the TOP Side so I used IPA to clean the TOP Layer by using a Qtip dipped in IPA.

STEP 15: Adding Chain

Last, I added a chain to this board so we can wear it like a proper wearable necklace.

Also, we can add an earring hook to this setup and use it as a wearable earring.

STEP 16: Result


By Pressing the button again, it turns off the Chasing Sequence and the Circuit Stops working.

This method of using an SMD Tactile button eliminated the THT Slide switch.

This is it for today folks, thanks for reading this post.

And I'll be back with a new project pretty soon!