I made the first one for a friend's desk. Nano, 0.96" blue OLED, USB cable permanently plugged into a power bank. On boot the name rains in. Then it just sits there. You'll see people poke it every time they walk past.
You don't need a custom PCB. You need clean wiring, a short animation that fits in flash, and a name that isn't fifteen syllables long. These are my full build notes: parts, pins, animation export, power, and the mistakes I made on version one. You can skip mine.
What you'll end up with
- A small Arduino + OLED that plays your name intro on power-up
- An optional idle screen after the intro (your static name or a dim icon)
- A sketch you can re-export when you gift the badge to someone else
Parts list (what I buy)
- An Arduino Nano or Uno (a Nano fits your badge case better)
- A 0.96" SSD1306 128×64 I²C OLED
- Dupont wires, or a short soldered harness if you like
- USB power, or a small LiPo + boost if you want it untethered
- Optional: a 3D-printed stand or a business-card holder you've got lying around
Blue OLEDs are cheap and common. White looks a bit sharper for thin fonts. You don't change the animation code either way.
Wiring that doesn't fight you
| OLED | Nano / Uno | ESP32 |
|---|---|---|
| GND | GND | GND |
| VCC | 5V | 3.3V |
| SDA | A4 | GPIO 21 |
| SCL | A5 | GPIO 22 |
You'll find full pin tables and Hello World here: I2C OLED tutorial. If your badge boots blank, fix address / wiring before you touch animation code. Here's the blank screen checklist.
Make the name animation
Open Assemble Studio, type your name, and pick a style you like. For badges I like Outside Random or Top→Bottom. Heavy 3D styles chew flash, so I'd skip them.
- Keep your name under ~10 characters on Uno, or use two lines
- Preview on the mockup until the spacing looks right to you
- Export Adafruit SSD1306 (or U8g2 if that's your habit), whichever you use
- Set your board and I²C address in the tool header
- Upload once, leave USB plugged in, and call it done
Want a logo instead of letters? Import your PNG on the Import tab and assemble every lit pixel. Same Get Code button. My logo-focused notes are here: OLED logo splash.
If you want more background on how name frames work, here's name animation guide.
Bill of materials with approximate cost (India hobby market, 2026)
Prices move, but this is what students usually spend on one desk badge, and you can compare it with your own:
| Item | Notes | Ballpark |
|---|---|---|
| Arduino Nano clone | CH340 is fine for USB power toys | low |
| 0.96" SSD1306 I²C | Confirm 4-pin I²C, not SPI-only | low |
| Dupont wires / header | Soldered harness lasts longer | very low |
| USB cable + phone charger | I'd skip LiPo on version one | you probably own this already |
| Optional stand | Print or cardboard | optional |
If your module has seven pins, it may be SPI. This tutorial assumes four-pin I²C, so check yours. SPI works for animations too, but wiring and library setup differ, I'd stick to I²C for the badge.
Build order that avoids half-finished messes
- Breadboard your Hello World (static name), with no case yet
- Export a short Assemble Studio intro and confirm you can upload it
- Add your idle screen after the intro
- Only then hot-glue or print your stand
- Change the name last when you gift it (re-export and flash)
I used to case first. Then a dry joint meant I had to open everything again. You'll save time if you do the electronics first.
Idle screen ideas for after your intro
- Your static name at text size 2, centered
- Your name plus a small "Hello" subtitle
- Dimmer contrast via
display.ssd1306_command(SSD1306_SETCONTRAST); display.ssd1306_command(0x20); - Display off after 10 minutes, and you wake it with a button to GND
void showIdleName() {
display.clearDisplay();
display.setTextSize(2);
display.setTextColor(SSD1306_WHITE);
display.setCursor(16, 24);
display.print(F("ASHISH"));
display.display();
}
My classroom / workshop variant
For a 90-minute lab I pre-cut wires and keep one "golden" Nano that already shows Hello World. Students copy that wiring, then each of you types your own name in Assemble Studio on a shared laptop, downloads the .ino, and flashes. The win condition isn't a perfect case. It's your name assembling on your own OLED.
Safety and honesty notes
- Don't leave your LiPo packs charging unattended in a school bag
- USB desk power is enough for almost every gift badge you'll make
- Cheap OLED flex cables tear, so support the glass when you plug in Duponts
The sketch structure I use for badges
void setup() {
initDisplay();
playIntroOnce(); // Assemble Studio export
showIdleName(); // static or dim
}
void loop() {
// optional: button to replay intro
// optional: DISPLAYOFF after 10 minutes
}
Version one looped the intro forever. Cool for five minutes. Annoying by dinner. Replay-on-button is a nicer compromise, and I'd go with it.
Power and burn-in habits
OLEDs can leave ghosts if you park the same bright pixels for weeks. For a desk toy that stays on all day, I either:
- Play the intro once, then show your dimmer static layout, or
- Call display-off after a timeout and wake it on a button
More on contrast and sleep: OLED power & battery life.
USB from a wall cube or power bank is the path of least drama for you. LiPo + boost works for a wearable, but you own charging, a switch, and a case that doesn't short the module. I'd tell most people to stay on USB for v1.
Case and mounting ideas
- Hot-glue the OLED bezel to a small 3D stand, with your Nano underneath
- Slide the sandwich into a clear business-card box
- For workshops: leave it on a breadboard so students can rewire it themselves, and you can fix mistakes fast
Don't stress the OLED flex cable. I cracked one bending it "just a little" to fit a case.
A gift tip for you
You change the name in Assemble Studio, re-export, and flash. It takes five minutes. That's why I stopped hand-editing hex for birthday badges.
Generate your badge animation
Type your name, pick a style, and download your sketch.
Open Assemble Studio →Frequently asked questions
Can I wear this as a badge on a lanyard?
You can, with a LiPo and a tiny case. Most people leave it on the desk, USB-powered, since it's safer and simpler.
Blue or white OLED?
Blue is common and cheap. White looks sharper for thin fonts. Your animation code is the same.
Will a long surname fit?
On 128×64, maybe at a small font or on two lines. Preview in Assemble Studio before you solder a gift.
Uno sketch too big?
Shorten your style or use Nano/ESP32. See PROGMEM limits.
How do I replay the intro without looping it forever?
Wire a momentary button from D2 to GND, use INPUT_PULLUP, and call the Assemble Studio player once when you read LOW on the pin. Debounce with millis() so one press doesn't restart the intro five times. Leave loop() on the idle name the rest of the time.
My badge is black on a Mega and fine on a Nano. Same sketch. Why?
Nano I2C is A4 and A5. Mega 2560 is pins 20 and 21. On ESP32 you'll use GPIO21 and GPIO22 with the OLED on 3.3 V. ESP8266 NodeMCU uses D2 and D1. Your name frames don't change when you change boards, but the four wires do.
Hello World works at 0x3C and the badge export stays black. What should I edit?
Edit the exported begin() address. Some modules are 0x3D, and the tool header sometimes still says 0x3C. Match what your scanner says. Also confirm reset is -1 on your 4-pin module so the sketch doesn't clamp RES.
What contrast should my idle screen use so it doesn't ghost?
After the intro, send SSD1306_SETCONTRAST and a mid value such as 0x20 if your desk badge stays on all day. Use 0xCF for the intro, when you want your name obvious across a room. A contrast of 0x00 looks like a failed upload.
Idle name, then a replay button
Version two of the desk badge plays the Assemble Studio intro once, then parks a short name at text size 2. A button on D2 replays the intro, so you can show it off again. I use a Nano because it fits under a card holder; the OLED is the usual 4-pin SSD1306 on A4 and A5, VCC on 5V, address 0x3C. The idle string is six letters. At size 2 each character is 12 pixels wide, so "ASHISH" is 72 pixels and the cursor goes at (128 - 72) / 2 = 28. If you guess 16, as I did on the first gift, you'll leave the name looking shoved left.
const uint8_t BTN = 2;
uint32_t lastReplay = 0;
void showIdleName() {
display.ssd1306_command(SSD1306_SETCONTRAST);
display.ssd1306_command(0x20); // dimmer than the intro
display.clearDisplay();
display.setTextSize(2);
display.setTextColor(SSD1306_WHITE);
display.setCursor(28, 24); // (128 - 6*12) / 2
display.print(F("ASHISH"));
display.display();
}
void loop() {
if (digitalRead(BTN) == LOW && millis() - lastReplay > 800) {
lastReplay = millis();
display.ssd1306_command(SSD1306_SETCONTRAST);
display.ssd1306_command(0xCF);
playIntroOnce();
showIdleName();
}
}
In setup(), call pinMode(BTN, INPUT_PULLUP), display.begin(SSD1306_SWITCHCAPVCC, 0x3C) with reset -1, then playIntroOnce() and showIdleName(). The 800 ms gap is the debounce. Without it, a cheap button contact replays the rain animation until you've admired it more than you wanted.
Count your letters before you center. A 10-character name at size 2 is 120 pixels and barely fits. At that point you'll want to drop to size 1 (6 pixels per character) or two lines. The mockup in Assemble Studio is your check. If a surname fits the mockup and then clips on your glass, it usually means setTextSize(2) was left on after a size-1 export, or the panel is 128×32 and the constructor still says 64. A 128×32 badge uses height 32 and a cursor nearer y=8.
Flash budget is the other limit. Each full 128×64 intro frame is about 1024 bytes. A short Outside Random intro of eight to twelve frames fits your Nano. A heavy style plus the idle text plus a second logo won't. If the IDE tells you the sketch is too large, shorten the style. Don't "fix" it by deleting display.display(). That only makes a successful upload look like a dead badge, and you'd chase the wrong bug.
Badge faults that are not the animation
- You plug in USB and there's no port in the IDE. Nano clones often use a CH340 USB chip. Install that driver, then pick the new COM port. Your OLED can't show a sketch that never uploaded. This feels like a blank screen, but it's a laptop problem.
- Your intro plays on the bench, then it's black after you close the case. The flex tail or a Dupont plug pulled off SDA when you bent the display into the stand. Reseat all four wires yourself. If the image returns when you press the header, solder the harness. Breadboard contact isn't a gift.
- Your name appears shifted a couple of columns, only on one module from the bag. That module is an SH1106 (132×64 RAM, column offset) even though the listing said SSD1306. Use the SH1106 constructor for that badge. Your button code stays the same.
- Your power bank badge reboots in the middle of the intro. The bank shut off because the Nano's current was below its load detector, or your cable is thin and the rail dipped during
display(). A bank with an "always on" mode, or a wall cube, is the fix. A second 4.7k pull-up isn't, so don't add one. - You put two badges on one Uno for a booth, and both are dark. Both modules are at
0x3C. You'll need to change one address jumper to0x3D. Two 1024-byte buffers also crowd Uno SRAM; an ESP32 is the easier booth controller, with SDA on GPIO21 and SCL on GPIO22, OLED VCC on 3.3 V. - Idle screen ghosts after a month on a shop counter. The same pixels have been at full contrast the whole time. Dim yours to
0x20after the intro, or turn the display off after a timeout and wake it from the D2 button.
Nano, Mega, and ESP boards for the same gift
| Board | Where the OLED goes | Badge note |
|---|---|---|
| Nano / Uno | SDA A4, SCL A5, VCC 5V | Your best v1. Reset argument -1. Keep the intro short |
| Mega 2560 | SDA 20, SCL 21, VCC 5V | Physically large for your desk card. Only the I2C pins change |
| ESP8266 NodeMCU | SDA D2, SCL D1, VCC 3.3V | Call Wire.begin(D2, D1) before begin. You get more flash for longer names |
| ESP32 | GPIO21 / GPIO22, VCC 3.3V | Use this when your style is dense. Don't power the module from 5V, or you'll over-voltage the pins through the pull-ups |
I2C is the right bus for a badge. Two signal wires survive a small case, SPI's DC, CS, and RST don't earn their keep for a clip that plays once. If you later add a high frame-rate bitmap behind the name, that's when you should look at SPI. Don't do it before you've soldered the first gift.
Whichever board you pick, run an I2C scan before you hot-glue the bezel. If your scanner prints 0x3C or 0x3D, you can close the case. If it prints nothing, the animation file is irrelevant until the jumper seats.
Related
- Arduino OLED name animation guide
- Scrolling text vs name animation
- OLED logo splash screen animation
- About · Contact
Free tools: OLED Animation Maker for SSD1306 and SH1106 animations, Assemble Studio for name and logo animations, the Shadow Box Lamp Generator for 3D-printed shadow lamps, Text to STL for 3D-printed names and keychains, and 3MF to Web to show 3D prints on any website. New: the Image to Byte Array converter, the OLED Robot Eyes generator and the Lithophane Maker. See all tools.