Instructables
Picture of My hat, it's full of stars!
Top hats are cool; just like bow ties.  Not only are they stylish, but they give you a lot of room for incorporating techno goodness.  I recently had cause to buy a tuxedo, which necessitated a kilt, and then a top hat.  You know how it goes.  To the tux I added silver buttons, the kilt was exemplary on its own, so only the top hat needed some flash.  I decided that since my head is generally in the stars, I should try filling my hat with stars.  Initially I was going to use an arduino and some 1W white LEDs hanging off the PWM lines, and feeding the light through fiber optic lines, to create a twinkling effect.  By the time I started work on the project I realized that I wanted colors, and that 1W LEDs were going to drain my LiPo battery pretty darn fast.  Multiple color LEDs on a single arduino is a bit of a problem, though.  There are only six PWM channels, so I would max out at two RGB LEDs.  Fortunately I had a few sample Total Control Lighting control chips from Cool Neon in my kit, and with a little hacking they are perfect light sources for this project.  Each TCL chip is a latching, addressable, three-channel PWM controller; so I can control a near infinite number of RGB LEDs from a single arduino.  Hat space is limited though, so I settled on four; that provided sufficient variety.  The end result of my project is a super-stealth techno-mage top hat that looks amazing when it is turned on, and completely normal when it is turned off.  I can wear it to Dicken's Chrismas Fair and nobody will notice, or to That Thing In The Desert where everyone will notice; one hat for all occasions.

I built this project on-site at Burning Man, with only the tools and parts I had in my travel kit.  You should be able to complete this project in two days, accounting for glue drying, using easily available parts for less than $200.



tl;dr This article will walk you through every step necessary for adding multi-color dynamic fiber optic lighting to your hat, or any other project to which you want to give a star field effect.

tags:  SteamPunk, Arduino, TopHat, LEDs, TCL, PWM
 
Remove these adsRemove these ads by Signing Up
Eric Rocher42 minutes ago

Spectacular!

So I've attached the fiber optics and everything and I'm trying to upload and test the code in order to cycle through the colors. It's uploading properly to my board and all of my connections are good - does anyone have any idea what might be wrong/has anyone else had the same issue?

ChrisKnight (author)  Rachel Hargrave26 days ago

Howdy Rachel,

I'm happy to help you debug this. I've got a few questions:

1) Can you send me some close-up pictures of your rig? Close and clear enough that I can make out your wiring from the Arduino to the pixels?

2) You said it was lighting up. Can you describe that in more detail? Are all the pixels going white, are they turning on and then off, etc?

3) If I send you some sample code to use for debugging, would you be willing to install it and let me know the results?

-Chris

thehbird7 months ago
So doctor who
kyle.marsh2 years ago
This is incredible. I was going to suggest a solar charger when you mentioned it with the lipo rider, but you're a step ahead of me there. Instead of the RF shield why not add a reed switch or Hall-effect sensor on an interrupt that cycles the programming? You can have a small magnet that you hold so you can change the effect when you tip the hat!

Or, even lower tech...hide a momentary switch behind the bow of the hat-band. Easier to accidentally trigger, but still really awesome. I might even break out the power switch to a more accessible location that way, too.

WHY DO I HAVE TOO MANY PROJECTS? I NEED TO MAKE ONE OF THESE!
ChrisKnight (author)  kyle.marsh2 years ago
I was going to run a bit of steel thread to the brim, and rig a capacitance sensor so I could change the lights by touching the brim. But then Benny at Cool Neon gave me a set of engineering prototypes for their new RF shield, and I decided it would be cooler to trigger changes in the hat without having to touch it.

I try to keep things simple, but when someone hands me free toys I feel compelled to make use of them. :)
Hi Chris,
She is a beauty!
I am also in the hat making business and for my next project, I am looking at using a wireless solution. I like the "RF Remote" you are using - do you know when this would be an actual product for sale as my connections don't seem to run as deep as yours.
ChrisKnight (author)  dovadil1 year ago
I've been too busy with work lately to drop by the shop, but if you send an email to info@coolneon.com and tell them you are asking about the Arduino RF Remote Shield you saw on Instructables they can give you the latest info.
Oh, well of course. Have at, then, and let us know how it turns out!
emmylove1 year ago
this is great
kyle.marsh2 years ago
Hmm...the link you gave for the optical fibers is a side-glow cable, rather than end-glow. I've never looked into buying fiber optics before, so I don't know if that's just how they're arranged and we'd be taking the actual cable apart to get to the fibers. Could you go into some detail on that for me?

Thanks!
ChrisKnight (author)  kyle.marsh2 years ago
When I made the hat, I didn't go out and buy fibers; I used these because I had bought them for another project and had plenty left over. I did have to cut the vinyl sheathing off to get to the bundles on the inside, but that is trivial.

Side glow just means that the fibers have light scratching to cause leakage. The majority of the light still comes out the end, and since the average length of the fibers is going to be under five inches when you are done, very little light is lost to the inside of the hat.

There are probably plenty of other sources you can use for the fiber optics. I was just documenting what I used. If you find a great alternative source, could you please post it here in the comments?
Got it. That makes perfect sense. I haven't gone looking yet ; just poked around on that guy's ebay store a bit and thought I'd ask.

I've been thinking about microcontrollers. Since you're using separate driver boards and just doing some color-changing stuff an Arduino feels like overkill. The only microcontroller work I've ever done so far has been with the Arduino platform, but I feel like since we just need to talk SPI or I2C or whatever at some drivers we could get away with just a $5 AVR or PIC or something.

Looks like the ATtiny85 in SparkFun's LilyTiny can talk SPI and I2C, and that board breaks out the programming pins, so maybe I should order a hat-full of those and take a swing at lower-level microcontroller work.

Or we could go even further and avoid the microcontroller altogether...ThingM's BlinkMs are really cool little gizmos that drive color-changing LEDs and have enough brains to play back a short sequence. You program (or directly control) them over I2C and then let them go on their merry way.

I'll definitely let you know what I end up doing, but it'll probably be a while. I'm thinking I'll make a top hat and a bowler, although I'll have to figure out where to put the electronics in the bowler, since the fibers will be going all over the crown.
ChrisKnight (author)  kyle.marsh2 years ago
I haven't give Christopher De Vries's TCL library an in-depth look, so I don't know how much of a pain it would be to port to the ATtiny85. If you use an Ardweeny or an ExtraCore* you get the small footprint and a price tag of around $10.

Sure, I didn't need to go with a full Arduino. It's big, and it cost me $22. For me it was a matter of balancing size and expense against the value of my time. If I am designing something for mass production, than shrinking the project cost makes sense. If it's a one or two off, like this hat, I'd rather be quick and dirty and save my time for myself. I come out behind if I spend two extra hours to cut $20 off the price of a project.

*ExtraCore: I just discovered these things yesterday. I have two on order and can let you know how well they work if you want to know. https://tindie.com/dustinandrews/extracore/
Sure. I was mostly musing to myself in a stream of consciousness way...if I commit to learning how to use bare microcontrollers I might get a stack of them for the purpose of having around for when I want a simple little project to leave embedded. ExtraCore sounds *fantastic*. Definitely let me know what you think of them.
So pretty. :D
ChrisKnight (author) 2 years ago
I picked up a black wool top hat at the Berkeley Hat Company today. Thinking of doing the optical fibers in bands, so that I can create the illusion of motion. :)
saramwrap2 years ago
I'm thinking about scaling this down for a fez... but I'm a little concerned that it'll be too much stuff for a smaller hat. I'd undoubtedly decrease the number of fibers, but the electronics will be the same size. Any thoughts about the viability of this idea?
ChrisKnight (author)  saramwrap2 years ago
There are a couple of things I can think of to shrink the size of the electronics:

1) Replace the Arduino/Seeeduino with an Ardweeny. This will cut your project's footprint by a third. http://www.solarbotics.com/product/kardw/
You will need a FTDI adapter to program the Ardweeny. I can recommend the FTDI Friend: https://www.adafruit.com/products/284

2) Use a smaller battery. Adafruit has a 1300mAh battery, and SparkFun has a 1000mAh battery. Both are smaller than the 2000mAh battery I used. Be sure to the original LiPo Rider from Seeed, because the LiPo Rider Pro has a larger footprint.
flega2 years ago
Where I can buy TCL controller modules? I live in Croatia, Europe.
And what current for LED this modules can provide?
ChrisKnight (author)  flega2 years ago
TCL components are sold by Cool Neon. Here is their web page for most of the TCL stuff. To buy bare TCL controller chips, you have to email them directly.
http://shopping.netsuite.com/s.nl/c.ACCT88394/sc.2/category.1665/.f

I don't have the electrical specs with me, I'm at my day gig. I'll try to reply later.
arashdx2 years ago
Perfect, indeed
kumiko2 years ago
It's very... whimsical and a little Doctor Who like. :)
ChrisKnight (author)  kumiko2 years ago
Thank you.
way772 years ago
Beautiful project Ghostwheel. I'd like to use your lighting setup but in a wall piece that I can plug in. Can you tell me what parts I could delete and what plugin tranfsormer would be required?
ChrisKnight (author)  way772 years ago
You can drop the LiPo battery, LiPo rider, and one of the mini USB cables. Step 6 pretty much goes away too.

You will need to add an Arduino compatible DC power supply. The most commonly used is a 9v supply with a 5.5mm/2.1mm positive tip jack. Something like this: http://www.adafruit.com/products/63

Please let me know how your project turns out.
J-Manoo72 years ago
Amazing! What's the approximate cost of this project? (Excluding the cost of the hat itself, since those have a broad range.)
ChrisKnight (author)  J-Manoo72 years ago
I've updated the parts page with the prices of the 'major' parts. I didn't price out things like the old IDE cable. :)

Ballpark cost, including the hat, is around $159.50
ChrisKnight (author)  ChrisKnight2 years ago
The Top Hat is on sale right now for $69, so my price is high by $10.
ChrisKnight (author) 2 years ago
I'm packing it up and taking it down to the Mini Maker Fair in Oakland. Drop by and flag me down if you want to see the guts in person.
scoochmaroo2 years ago
So lovely. Really well done, and thank you for taking the time to document it so well!
mikolynn2 years ago
Nice project and great ibles!
That's amazing - it came out great :D
ChrisKnight (author)  jessyratfink2 years ago
Thank you. It took me longer to document it than to build it. :)