Blinky Sew-on Coat-Buttons




About: Slightly Dorky High Nerd - You might find some of my stuff on Tindie.
I was missing a button on one of my pants and just couldn't be bothered to hunt down a suitable one. So I made me one.

The end-result works pretty well, and thanks to an ATtiny13 microcontroller on the back side it can do a couple of nice visual effects. It accepts either single-color or dual-color 0805 LEDs.

The current blinking pattern is stored in EEPROM. To cycle through the patterns, short the two centermost pins on the ISP pads (marked by silkscreen) with a paper-clip and power up the device.

The minimum supply voltage varies depending on which LED colour is used. It starts up at 1.8V (RED, AMBER, ORANGE) and will therefore run fine with a 3V CR2032 lithium cell. GREEN, BLUE and WHITE work as well, but will cease working much earlier when the battery wears down.

Step 1: Schematic...

One micro-controller, some LEDs, some resistors, one capacitor and two optional transistors. Done. Almost not worth the trouble talking about.

For the latest design files (KiCad gerbers...) visit github.

Step 2: A Bit of Code for the ATtiny13

* You'll need a AVR toolchain to compile the firmware. Almost any version available for linux (avr-gcc avr-libc binutils) or winblows (winavr) should work.

* Upload code with an ISP programmer (avrispmkII, usbtiny, usbasp, ArduinoISP...)

* Latest version is on github.

There are a lot of comments in the source code, so I'll stop talking now.

Step 3: Making It

I had the prototype boards made by oshpark, which no doubt you might have guesses by the purple colour.

Depending of which parts are populated, the PCB supports a couple of different modes of operation:

* dumb single color: with just LEDs resistors (controlled externally)
* intelligent single color: adds a microcontroller
* intelligent dual color: same micro, but fancier LEDs

There's also the option to add tiny MOSFETS and change the resistors for more brightness.

Depending on your skill, assembly may get a bit fiddly. The LEDs are 0805 (pretty harmless), some resistors are 0402 (challenging), some are 0603 (doable), the microcontroller comes is a DFN10 package (challenging).



    • Trash to Treasure

      Trash to Treasure
    • Arduino Contest 2019

      Arduino Contest 2019
    • Tape Contest

      Tape Contest

    3 Discussions