Introduction: What a Silly Hat!

This is a silly hat! Just a fantasy with a few LED's a bit of cloth, and a chip lying around.

Fashionable words:

Modifying a hat.
Personifying mass production.
Hand-made: sewing and soldering and programming.
DIY: well, I didn't make the LED's nor the chip, nor the pieces of cloth, the batteries, the rest, yes..
Recycling discarded LED's, the red ones, not very bright, i always recycle parts....
Bling: adding some bright LED's and two hand shapes made with a lasercutter.

Yes and no:
yes because of the different things you have to do: sewing, programming, soldering all a bit from incompatible domains.
no: this is not String Theory, it is rather normal stuff on all levels.

YES: this is an invitation to make your own versions and explore further, you can add all the things from your bag of tricks!

These few very bad shots to prove that it works. Filming LED's is somehow difficult business with my cheap digital camera :-)

Step 1: Tools Needed

Soldering device

Sewing machine, needles, scissors

Programmer, laptop with either AVR or Crosspack or avrdude
Crosspack: MacOS
AVR Studio: Windows
a programmer, or you can use your Arduino Uno too...
I used my avrispkkII

A nice desk to work on, some good light, magnifying glass

depending on your demands 1 afternoon to a few days (depending on your detailing abilities)

Step 2: Preparations: Electronics

i have prepared the LED's on my table, all with the GND in one direction so that i don't make to many mistakes with the GND and the V side. (Since these are recycled LED's the long and the short leg are already cut.)
(Testing with a spair coin cell is very simple.)

The LED's are soldered with one leg to a copper strip, that is the GND. The other leg is connected from one group to the other. This makes you a square, if you make the wires longer in one direction then you can arrange the copper wires in a circle.

The second thing you have to prepare is the PCB with the ATTINY2313.

You can either connect the wires from the copper strips and the LED's to the chip now, or after attaching the leaves to the hat.

Step 3: Stuff Needed

A hat (but you can do this for every accessoire)
LED's, i used around 35, normal small not bright, and 10 bright LED's
The brights are more expensive, 50 eurocents, the normal small ones around 10 eurocents
Some cloth

a programmable chip: I used an Attiny2313 (but you can use others like Atmega328, which have enough PIN's, so not a Attiny45)
Attiny2313 is around 1.50 euro, Atmega328 6 euro.
wires, and I used small copper wires.
i had a small PCB with a Attiny2313 and oscillator, but you can do without the oscillator

I used a few hand shapes from yellow perspex made with a lasercutter to pimp the backside of the hat, where the wires are not hidden.

batteries, or a LIPO, 10 euro's, lipo charger, 10 euro (eg Sparkfun, or in Holland,

Step 4: Preparations: Textiles

The hat is already finished because you bought it, but you could also make the hat yourself, it is quite funny to make a hat, because it is really 3D!
(Making peels of an orange, so peeling an orange back in time makes you a hat...:-)
I made the leaves using a lock machine, but you can use a normal sewing machine.
The lock machine gives a nice contrasting border.

Step 5: Electronic Functioning

I used the LED matrix setup, that is make several groups of LED's with a seperate "GND" and connect the members of the group according to their position in the group to V. So you get a matrix. (Square formed by the copper strips and the connected LED's between the strips.)

The GND's are connected to PD pins on the Attiny2313, the V's are connected to PB pins.

I keep the voltage low ( 3-4V) so that I don't need resistors.

You need a basic matrix script, most of the time i have to look which pins are in which group. After that it is your imaginations in what patterns these LED's should blink.
You can start with my script:

unzip and you will find a Makefile and one Main.c
in terminal window navigate to this folder and use the commands:
make flash
to make the necessary hex files and flash these to the Attiny2313
use this command:
avrdude -c avrispmkII -P usb -p attiny2313 -U hfuse:w:0xdf:m -U lfuse:w:0xff:m
(be careful, wrong fuses can make the chip unusable!)

Step 6: Putting It Together: From Fashionable Words to Storytelling

Make the leaves, sewing.
Add the LED's, soldering.
Connect the wires, soldering.
Construct the PCB with the chip, soldering.
Attach the leaves, sewing.
Program the chip.
Testing, improving the setting.

Two last parts: pimping the leaves and pimping the blinking.
This is all up to you, i like a mix of patterns and chaotic blinking which doesn't repeat itself too often.

and what about this one:
Storytelling, (Also very fashionable)
LED's storytelling?? Actually, the hands at the back are storytelling, the blink is going from the outside to the fingers, a wink to creativity, the cliché painting about Adam and God (in that order) of...what was his name again?

Nice movie this "No!" of Pablo Larraín....


About This Instructable




Bio: Happiness is invisible? Then you cannot sell it? You cannot copy it nor like it:-) You have to arrive there yourself??? But i am just ... More »
More by contrechoc:E-chopsticksPersonalized Ledstrip5 Simple ATtiny85 LDR Scripts
Add instructable to: