A while ago, it was her birthday. During that period, I was occupied with my practical examinations and couldn’t plan a celebration or even arrange a present for her. Time passed, and although she understood the situation completely, I still felt a sense of guilt for not being able to make her day special.
I knew she doesn’t prefer expensive or overly fancy gifts. Instead, she values thoughtful effort. So I decided that when I finally gave her something, it should reflect both my appreciation and the creativity I could contribute. I wanted a gift that combined personal effort with a touch of engineering and something handmade, custom, and beautifull.
The idea of using a ring-shaped PCB with a central battery cutout was inspired by the internal circuit design of Apple Airtags.
3. Version-1 Started at-Mid May3.1. Components Selection
3.1.1. MCU
The initial concept was straightforward: a tiny PCB populated with multiple RGB LEDs and a mode-select button to cycle through lighting patterns. However, achieving this in an ultra-compact form factor while maintaining stability, brightness, and runtime quickly became a design challenge.
The first decision point was selecting the microcontroller. I needed a device with at least two digital pins, compact packaging, and sufficient flash memory to store LED animation code. My initial thought was the ATtiny10 due to its very small footprint. However, the limitation became immediately clear — it provides only 1 KB of flash memory, which is insufficient to run even a basic FastLED animation example (typically requiring 3–4 KB at minimum).
To meet the memory requirements, I moved instead to the ATtiny85, which offers:
8 KB flash memorySmall 8-pin DIP/SOIC footprintTimings compatible with WS2812B signal requirements
Enough capacity for multiple animation modes, not just a single blink routine, With this selection, the project gained flexibility to implement more than simple LED blinking and allowed room for pattern sequencing, color transitions, and potential future enhancements.
3.1.2. Power Regulation Strategy: DC–DC Boost Conversion
Both the ATtiny85 and WS2812B LEDs require a stable operating voltage in the range of 4.2–5.0 V. A single lithium-ion coin cell or compact Li-ion source cannot deliver this voltage directly, especially under dynamic LED load conditions. Therefore, a boost conversion stage was necessary to elevate the battery voltage to a regulated 5 V.
To achieve this, I selected a miniature step-up converter capable of maintaining stable output while accommodating the limited form factor of the wearable PCB. The chosen device was the TPS613222A (VBR marking code) — a highly compact DC–DC boost converter that supports:
- Input range: 0.9 V to 5.5 V
- Fixed output: 5.0 V regulated
- Load capability: up to 500 mA when boosting from 3.0 V to 5.0 V
- Package: ultra-small footprint suitable for wearable electronics
This converter comfortably satisfies the transient current peaks required by WS2812B LEDs, particularly during full-brightness RGB or white output conditions, where current spikes are significant and fast regulation response is critical.
A reference design from the TI datasheet was used to implement the boost stage. The layout ensures minimal ripple, short routing for the switch node, and appropriate decoupling to avoid LED signal noise or flicker during rapid current draw.
This is what I designed in KiCad using the TI datasheet as a reference.
3.1.3 Choosing LED Pakage
For the LEDs, the choice was clear: the Adafruit Neopixel (WS2812B) series, which I have used previously with reliable performance and excellent visual output during animations. The WS2812B family is available in multiple package sizes, and while the smallest footprint would have been ideal for this design, it was not available from my supplier at the time.[Adafruit NeoPixel Addressable 1515 LEDs]
Therefore, I selected the WS2812B 2020 package — a compact addressable RGB LED format that provided the required brightness, color consistency, and spatial efficiency for this miniature wearable PCB.
Image from Adafruit Website [WS2812B-2020]
3.1.4. Switches
There are two switches used in this project:
- 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.)
- 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.
3.1.5. Final Bill of Materials Table.
Note: Because of incorrect inductor and decoupling capacitor placement, the circuit has large losses in delivering 5 V to the IC. I therefore chose to use a compact commercial boost converter to provide a stable 5 V supply.
Note: At this stage, I decided to pause the project.4. Version-2 Started at-Mid Dec4.1. Additions
I Found this Module by thisreddit post and this supporting Blog
For maintaining a stable 5 V supply on such a small wearable PCB, I needed a booster that was tiny but still able to handle the current spikes from WS2812 LEDs. After trying earlier designs, I selected the ME2108, which is a compact PFM step-up DC/DC converter. It supports a wide input range from around 0.9 V to 6.5 V and can boost to output voltages anywhere between 2.0 V and 7.0 V, depending on the version. In my case, I used the fixed 5 V variant to keep things simple.
Under normal operating conditions, the ME2108 can deliver up to ~400 mA when boosting from 3.0 V to 5.0 V, which is enough for short bursts of LED animations without dimming or flicker. The switching frequency is around 180 kHz, and efficiency stays roughly in the 80–85% range, depending on the load, which is acceptable for this tiny form factor.
In the next version, I will include this booster in my circuit because it works quite perfectly for the setup.
4.2. Schematic & LayoutBelow are the schematic and PCB layout images from my design. I’ve added clear screenshots here for quick reference, and the full Gerber files can be downloaded from the Files section below.
Dimensions for Circuit
The PCB is very small, so I panelized it into a set of four. This helps save a lot of cost.
The complete editable KiCad project is also available on GitHub — the repository link is provided at the end of this page.
I have included my YouTube channelname "Replica" as silkscreen branding on the PCB. If anyone wants to remove or replace the branding with their own name or logo, you can simply edit the KiCad file and regenerate the Gerber output.
4.3. Thickness of PCBIn the image, you can see two different PCB colors. These represent two iterations of the design. The black PCB was my first version and is 2.0 mm thick, while the green PCB is the later revision with a standard 1.6 mm FR4 thickness.
The difference in PCB thickness was intentional. It allowed me to experiment with LED positioning so the WS2812B LEDs could emit light from both faces of the board. This makes the glow visible from the front and back, improving the overall visual effect of the earring.
4.4. Creative StrategyUsing this strategy, I reduced the PCB size, and the design became more compact and aesthetic.
The black PCB failed mainly due to edge-soldering limitations. I initially chose a 2.0 mm thickness to match the WS2812B-2020 LED width, assuming clean edge-mount soldering was possible. Once the PCB arrived, I realized that soldering the LEDs on the edges was not practical at that thickness. I produced the same board design with standard 1.6 mm FR4 thickness, and the second iteration worked successfully.
4.5. Battery selectionThe battery I selected for the first version of the PCB was a 3V CR1226 coin cell. It did light up the circuit, but only for a very short period of time. The main issue was its low current capability—around 50 mA with 3 volt. After boosting from 3V to 5V, the available current drops even further, so the LEDs were not getting enough power.
Different animations draw different amounts of current, and with such a small battery, the voltage would dip and cause flickering or unstable behavior. To run the circuit properly and avoid these fluctuations, So I decided to upgrade the battery.
The 1254 Li-ion battery has the same 12 mm diameter as the CR1225 cell, with a voltage range of 3.7–4.2 V and a capacity of 70 mAh. This is enough to drive all the LEDs, and it removes the need for a step-up booster. As long as the battery remains above around 3.5 V, it can power the LEDs directly, making this Li-ion cell a suitable choice for this project.
5. Testing WS2812B LED on Circuit.Before testing the onboard LEDs with the ATtiny85, I must verify that all LEDs are correctly soldered to the PCB and that no pads are left unsoldered.
I tried two animations from the FastLED library.
Keep in mind that using the same animation will not always work on the ATtiny85, as it has only 8 KB of flash memory, while the Arduino Nano has 32 KB. Therefore, we need to program compressed versions of FastLED examples because most FastLED animations are high-definition and consume a large amount of flash memory.
As we plan to store more than one animation and toggle them with a mode button, we must write the program to use very little flash memory so we can fit more modes.
6. Programming At-tiny856.1. Program At-tiny85 form Digispark USB ModuleI initially thought it would be very easy to program the ATtiny85 using a Digispark USB module. My plan was to buy a Digispark board, plug it into the laptop, select the Digispark board manager, upload the code, and that’s it. It programmed successfully, and when I connected Pin 2 of the ATtiny85 as the data pin for the WS2812B LED rail, it worked—but only while the ATtiny was still on the Digispark board.
After this, I looked up the Digispark circuit diagram and realized it is completely different from what I had assumed.
the IC pin-2 is PB3 which is connected to WS2812b led data pin and IC pin-3 Is PB4 which is connected to mode button for changing mode of animation
The ATtiny85 does not work alone after removing it from the Digispark board because the board provides essential support: a 10k pull-up on the RESET pin, and the correct clock settings that the Micronucleus bootloader depends on. When the chip is programmed through Digispark, Micronucleus sets specific fuse and clock configurations (like 16.5 MHz PLL for USB). After removal, reset pull-up, and clock environment, the bootloader cannot start correctly and your blink code never runs.
If we want to program the IC using the Digispark USB module, it is necessary to include these components.
A tutorial showing how the ATtiny85 with the Digispark bootloader gets programmed and needs those USB components (pull-ups, zeners, etc.).
6.2. Program At-tiny85 with Arduino NanoI followed this tutorial for program the At-tiny85 from Arduino
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
Everything else remain same, thanks to DIY TECH BROS
6.3. Firmware Explanation (Code Walkthrough)This firmware controls 12 WS2812B LEDs using an ATtiny85, with a single button to switch between two animation modes.
Library & Definitions
#include <FastLED.h>FastLED is used to generate accurate WS2812B timing and manage color data efficiently on the ATtiny85,
#define NUM_LEDS 12
#define DATA_PIN 3
#define MODE_PIN 4
#define LED_TYPE WS2811
#define COLOR_ORDER GRB
#define BRIGHTNESS 60NUM_LEDS defines the number of LEDs on the PCBDATA_PIN is the WS2812B data lineMODE_PIN is connected to the tactile switchLED_TYPE WS2811 ensures compatible timing for WS2812BBRIGHTNESS limits current draw for wearable use
LED Buffer
CRGB leds[NUM_LEDS];This array stores RGB data for all LEDs and is passed to FastLED for output.
Shared Animation Variables
int pos = 0;
int dir = 1;
uint8_t hue = 0;These variables are used mainly by the Cylon animation:
pos tracks the active LEDdir controls direction of movementhue stores the current color value
Mode Control
uint8_t mode = 0;mode = 0 → Pride2015 animationmode = 1 → Cylon animation
Button Debounce Variables
bool lastButtonStable = HIGH;
bool lastButtonRead = HIGH;
unsigned long lastDebounceTime = 0;
const unsigned long debounceDelay = 30;These variables implement a non-blocking debounce using millis().
Setup Function
void setup() {
delay(500);A short delay ensures power stability before LED initialization.
FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS)
.setCorrection(TypicalLEDStrip)
.setDither(BRIGHTNESS < 255);Registers the LED arrayApplies standard color correctionEnables dithering at reduced brightness
FastLED.setBrightness(BRIGHTNESS);Sets global brightness to reduce peak current.
pinMode(MODE_PIN, INPUT_PULLUP);The button is wired to ground; a press pulls the pin LOW.
Button Handling in loop()
bool reading = digitalRead(MODE_PIN);Reads the current state of the mode button.
if (reading != lastButtonRead) {
lastDebounceTime = millis();
}
lastButtonRead = reading;Resets the debounce timer whenever the button state changes.
if ((millis() - lastDebounceTime) > debounceDelay) {Checks if the input has been stable long enough.
if (reading != lastButtonStable) {
lastButtonStable = reading;Updates the stable state of the button.
if (lastButtonStable == LOW) {
mode ^= 1;A valid press toggles the animation mode.
pos = 0;
dir = 1;
hue = 0;Resets animation variables so each mode starts cleanly.
Mode 0 – Pride2015 Animation
if (mode == 0) {
pride();
FastLED.show();
}Calls the pride() functionUpdates LEDs without blocking delaysTiming is handled internally using millis()Mode 1 – Cylon Animation
fill_solid(leds, NUM_LEDS, CRGB::Black);Clears all LEDs before drawing the next frame.
leds[pos] = CHSV(hue, 255, 255);
FastLED.show();
delay(35);Lights a single LED at position pos using HSV color space.
pos += dir;Moves the LED forward or backward.
if (pos >= NUM_LEDS - 1) {
dir = -1;
hue += 16;
} else if (pos <= 0) {
dir = 1;
hue += 16;
}Reverses direction and changes color when the LED hits either end.
Pride2015 Function
void pride() {This function generates a complex rainbow animation using:
beatsin88() for smooth oscillationSine-based brightness modulationGradual color blending via nblend()
CRGB newcolor = CHSV(hue8, sat8, bri8);
nblend(leds[pixelnumber], newcolor, 64);This ensures smooth transitions without harsh color jumps.
This firmware controls 12 WS2812B LEDs using an ATtiny85, with a single button to switch between two animation modes.
6.4. Power ConsumptionMode-1: Single moving LED (Cylon / Pride)
In this mode: Only one LED is ON at a time
Brightness is limited to 60 / 255 (~24%)
Current draw
One colored WS2812B @ brightness 60 → ~4–5 mA
Other 11 LEDs (idle logic) → ~1 mA total
ATtiny85 running continuously → ~6 mA
Total current:
5+1+6=12 mA5 + 1 + 6 = \mathbf{12\ mA}5+1+6=12 mARuntime
Real usable battery capacity ≈ 58 mAh
5812≈4.8 hours\frac{58}{12} \approx \mathbf{4.8\ hours}1258≈4.8 hoursMode-1 runs about 4.5–5 hours
Mode-0: Pride2015 rainbow animation
In this mode: All 12 LEDs are active
Brightness is constantly modulated
nblend() keeps LEDs partially ON all the time
Current draw
Average per LED ≈ 3 mA
12 LEDs → 36 mA
LED idle logic → ~1 mA
ATtiny85 → ~7 mA
Total current:
36+1+7=44 mA36 + 1 + 7 = \mathbf{44\ mA}36+1+7=44 mARuntime
5844≈1.3 hours\frac{58}{44} \approx \mathbf{1.3\ hours}4458≈1.3 hoursMode-0 runs about 1 hour 15 minutes
I used two animations from the FastLED library: the Pride 2025 effect and a compressed one-LED Cylon animation.
To make this PCB an earring, attach a French hook or Ear wire to the PCB.
Light up
Bye-Bye, Have a Nice day








_4YUDWziWQ8.png?auto=compress%2Cformat&w=48&h=48&fit=fill&bg=ffffff)






_Ujn5WoVOOu.png?auto=compress%2Cformat&w=40&h=40&fit=fillmax&bg=fff&dpr=2)



_3u05Tpwasz.png?auto=compress%2Cformat&w=40&h=40&fit=fillmax&bg=fff&dpr=2)


Comments