Earring for Her❤️

by vishal_soni88 in Circuits > Art

48 Views, 1 Favorites, 0 Comments

Earring for Her❤️

CAF8FCBB-7ED4-4227-9A33-F02EAFED77C5_1_201_a.jpeg

Sometimes decoration is not about expensive materials or big designs — it’s about adding a personal touch to something simple.

This project started with a small idea: to create a custom earring that is not only wearable but also decorative and unique.

I designed a tiny RGB LED earring using a custom PCB and addressable LEDs. Instead of buying a ready-made accessory, I wanted to create something handmade that mixes fashion, creativity, and a bit of electronics. The result is a glowing earring that adds a splash of color and personality to everyday wear.

This project fits perfectly into the idea of decorating what we wear. Turning a simple earring into something expressive 😊

To make this ATtiny85 LED earring, there are only a few simple steps. The project is built using a small ATtiny85 microcontroller and a group of WS2812B RGB LEDs. The process is straightforward and can be completed by following the steps below.

Supplies

B5CF6900-B251-4142-A418-FDF999769DF1_1_201_a.jpeg
AEA3DBA8-659A-4C05-A055-ED0439DF4949_1_201_a.jpeg
D0E70B09-DED4-4CCE-B537-5C45A31ECFB2_1_201_a.jpeg
attiny85_smd_ic_sop-8_pin_ic_avr.jpg
images.jpeg
066F4B89-EE5E-40D4-A122-E5FB935EA786_4_5005_c.jpeg
Screenshot 2026-01-19 at 7.58.18 PM.png

Designing the PCB

Screenshot 2026-01-20 at 8.15.01 AM.png
Screenshot 2026-01-20 at 8.15.26 AM.png

For designing the schematic and PCB layout, KiCad version 9 was used. The design is simple and beginner-friendly. It uses an ATtiny85 8-bit microcontroller, which can run independently after programming. A step-up booster circuit was also added to the schematic to convert the 3 V supply to 5 V, since both the ATtiny85 and WS2812B LEDs operate at 5 V.

Above, you can see the schematic and PCB layout images taken directly from KiCad. The editable design files are available in the GitHub repository linked below. This project is open source, so anyone can customize the design for example, by adding a loved one’s name to the PCB earring.

Soldering the PCB

4668C3C8-5196-498B-989D-DC51BAABD5CD_1_201_a.jpeg
7A1B6BE0-554D-491D-8B44-1BBCC1DE872D_1_201_a.jpeg
C6C0E31C-B690-44E0-89D2-4FB455EB9D46_1_201_a.jpeg
91337C2D-BA57-4757-89CE-CFC4D8E43AE8_1_105_c.jpeg

I designed the PCB in a creative way instead of placing all components on a single surface. Rather than using standard flat placement, I used a different approach that improves both aesthetics and compactness. The footprints were designed across both PCB layers, allowing components to be mounted along the edge of the board instead of on just one side.

This edge-mounted placement reduces the overall size of the circuit and also enhances the visual appeal. When the LEDs are soldered this way, they look more interesting and are visible from both sides of the PCB, which works especially well for a wearable earring design.

Selecting PCB Thickness

B06333D6-4589-4AF9-9EB0-FF22F9075BC1_1_201_a.jpeg
Screenshot 2026-01-20 at 8.40.01 AM.png
Screenshot 2026-01-20 at 8.46.44 AM.png
91337C2D-BA57-4757-89CE-CFC4D8E43AE8_1_105_c.jpeg

PCB thickness is very important for this project. I went through two iterations because of this mistake, and I don’t want others to repeat it. The final PCB uses standard 1.6 mm FR4, which works well for edge-mounted components.

In the first iteration (the black PCB), I ordered a 2.0 mm FR4 board because the WS2812B 2020 LEDs are about 2.0 mm thick. However, after the PCB arrived, I realized that soldering the LEDs on the edge of a 2.0 mm thick board was very difficult and impractical. Reducing the PCB thickness to 1.6 mm solved this issue and made edge soldering much easier.

Checking LED Array

Screenshot 2026-01-20 at 9.18.41 AM.png
Untitled.gif
AB178FEB-C18F-48EB-BCC4-05013A0CC8BE_1_201_a.jpeg
97B49613-AA3F-424F-BA7C-86AAF2D3DEEE_1_201_a.jpeg
2FAC16B3-F542-4D7B-BBA5-98907471B083_1_201_a.jpeg

After soldering the LEDs, it is very important to check that all the LED pins are soldered properly. This is the most time-consuming part of the project, but it is also the most important. On the PCB, I labeled the pins of one LED as GND, DOUT, DIN, and VCC. All other LEDs follow the same orientation based on this reference.

To verify the soldering, I used an Arduino Nano and ran a simple FastLED animation. This helped confirm that every LED was correctly connected and working before moving on to soldering the remaining components.

Solding Other Components

499C3E37-6FB8-47F5-BB20-CA4FEF00CB45_1_201_a.jpeg

After soldering the WS2812B LEDs, the next step is to solder the remaining components. This includes the ATtiny85 microcontroller, the required decoupling capacitors, the mode selection switch, and the main power switch.

Flashing the Code to At-tiny85

Program the ATTINY85 with Arduino 1.8.18 (2022)

Note this video is from youtube DIY TECH BRO

I have used arduino nano to program the at tiny 85, you can use any but consider the circuit diagram as shown in video

This is the link to be used in the preferences menu:

"https://drazzy.com/package_drazzy.com_index.json"

One thing to which is keep in mind while Programming the IC, Use 16 Mhz (PLL) Clock instead of 8Mhz, As the FastLED uses several math-heavy functions like sin, cos, pow, sqrt, color blending, and HSV calculations, which require more processing speed. At 8 MHz, the ATtiny85 often cannot perform these calculations also maintaining the strict timing required for WS2812/Neopixel LEDs, causing failure at Displaying Animation

Switch Function

Screenshot 2026-01-20 at 9.39.23 AM.png
MFG_TS18_Series_sml.jpg

There are two switches used in this project:

  1. Mode SwitchA small tactile switch is used to change the LED animation modes.The ATtiny85 can technically support around 4–5 modes with its 8 KB flash, but I am using only two because the animations I chose take more space in memory.(If someone wants more modes, they can use lighter animation effects that take less flash—check the firmware section below.)
  2. Power SwitchA tiny slide switch is used to turn the whole circuit on and off.It can handle around 80 mA, which is more than enough for this setup and fits well in the very limited space of the PCB.


Code for At-tiny85

#include <FastLED.h>

#define NUM_LEDS 12
#define DATA_PIN 3
#define MODE_PIN 4 // PB4 on ATtiny85 (if it doesn't work, try 4)
#define LED_TYPE WS2811
#define COLOR_ORDER GRB
#define BRIGHTNESS 60

CRGB leds[NUM_LEDS];

// ----- Shared for Cylon mode -----
int pos = 0;
int dir = 1;
uint8_t hue = 0; // rainbow hue 0–255

// ----- Mode handling -----
// 0 = Pride2015 rainbow
// 1 = Cylon, color change at BOTH ends (half revolution)
uint8_t mode = 0;

// ----- Button debounce -----
bool lastButtonStable = HIGH;
bool lastButtonRead = HIGH;
unsigned long lastDebounceTime = 0;
const unsigned long debounceDelay = 30; // ms

// Forward declaration
void pride();

void setup() {
delay(500); // small start-up delay

FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS)
.setCorrection(TypicalLEDStrip)
.setDither(BRIGHTNESS < 255);

FastLED.setBrightness(BRIGHTNESS);

pinMode(MODE_PIN, INPUT_PULLUP); // button between PB4 and GND
}

void loop() {
// ---------- Button handling with debounce ----------
bool reading = digitalRead(MODE_PIN);

if (reading != lastButtonRead) {
lastDebounceTime = millis(); // reset debounce timer
}
lastButtonRead = reading;

if ((millis() - lastDebounceTime) > debounceDelay) {
// Stable state now
if (reading != lastButtonStable) {
lastButtonStable = reading;

// Detect button press (HIGH -> LOW)
if (lastButtonStable == LOW) {
mode ^= 1; // toggle between 0 and 1

// Optional: reset animation when switching modes
pos = 0;
dir = 1;
hue = 0;
}
}
}

// ---------- Modes ----------
if (mode == 0) {
// ==================================
// MODE 0: Pride2015 animated rainbow
// ==================================
pride();
FastLED.show();
// no delay; pride() has internal timing based on millis()

} else {
// ==================================
// MODE 1: Cylon, color change at BOTH ends
// (half revolution color change)
// ==================================
// clear all LEDs
fill_solid(leds, NUM_LEDS, CRGB::Black);

// draw current LED in current rainbow color
leds[pos] = CHSV(hue, 255, 255);

FastLED.show();
delay(35); // movement speed

// move the dot
pos += dir;

// bounce + change color at BOTH ends (half revolution)
if (pos >= NUM_LEDS - 1) {
pos = NUM_LEDS - 1;
dir = -1;
hue += 16; // next color at right end
} else if (pos <= 0) {
pos = 0;
dir = 1;
hue += 16; // next color at left end
}
}
}

// =============================
// Pride2015 effect (unchanged)
// =============================
void pride() {
static uint16_t sPseudotime = 0;
static uint16_t sLastMillis = 0;
static uint16_t sHue16 = 0;

uint8_t sat8 = beatsin88(87, 220, 250);
uint8_t brightdepth = beatsin88(341, 96, 224);
uint16_t brightnessthetainc16 = beatsin88(203, (25 * 256), (40 * 256));
uint8_t msmultiplier = beatsin88(147, 23, 60);

uint16_t hue16 = sHue16;
uint16_t hueinc16 = beatsin88(113, 1, 3000);

uint16_t ms = millis();
uint16_t deltams = ms - sLastMillis;
sLastMillis = ms;
sPseudotime += deltams * msmultiplier;
sHue16 += deltams * beatsin88(400, 5, 9);
uint16_t brightnesstheta16 = sPseudotime;

for (uint16_t i = 0; i < NUM_LEDS; i++) {
hue16 += hueinc16;
uint8_t hue8 = hue16 / 256;

brightnesstheta16 += brightnessthetainc16;
uint16_t b16 = sin16(brightnesstheta16) + 32768;

uint16_t bri16 = (uint32_t)((uint32_t)b16 * (uint32_t)b16) / 65536;
uint8_t bri8 = (uint32_t)(((uint32_t)bri16) * brightdepth) / 65536;
bri8 += (255 - brightdepth);

CRGB newcolor = CHSV(hue8, sat8, bri8);

uint16_t pixelnumber = i;
pixelnumber = (NUM_LEDS - 1) - pixelnumber;

nblend(leds[pixelnumber], newcolor, 64);
}
}


Result

EEEDE7B0-C1C1-4C60-944B-E844A55A7B51_1_201_a.jpeg
6749447D-E2EE-4340-90AB-3CA75E92324C_1_201_a.jpeg
2F2AC805-93C9-48E7-A6CA-3FECCB81F098_1_201_a.jpeg

To make this PCB an earring, attach a French hook or Ear wire to the PCB.

Light Up

86810E43-8314-40F1-83C3-594678D8CBAE_1_201_a.jpeg
7C172E54-04ED-42CA-8D21-4A598FADDAB2_1_105_c.jpeg
0892F6BC-2A0A-4D63-BBF0-54A08CA257CD_1_105_c.jpeg
B40F4F55-7AC4-443D-A0C0-F30553ED4940_1_201_a.jpeg
A7B5C28E-AFD8-44B5-9E89-3ECF640DCB41_1_105_c.jpeg
D304CD84-1C56-4E04-9D7E-E5955514AF1C_1_105_c.jpeg

Mesmerizing 🙂‍↔️

Youtube VIDEO

At-tiny85_Earring

Bye-Bye, Have a Nice day


Github Repository for PCB Files & Code