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

Step 1: Parts

Almost everything used to make this project is 'off the shelf'. While something may not already be in your toolkit, there isn't anything here that will be hard to find or for which you won't be clever enough to make a substitution. :)

- Top Hat (Amazon) ($79)
- Optical fibers (I used 156 x .03" fibers I had in my kit, cut to around 12") (ebay) (1' = $12.95) (For my most recent hat, I got my surplus fiber from this guy on eBay.)
- 4x Cool Neon TCL controller chips (Not on their website, but $2 w/LED if you call them directly) (4x$2 = $8)
- 4x 8mm RGB common anode LEDs. (Got mine from Cool Neon, paired with the TCL controller chips)
- 2000mAh Lithium Polymer rechargeable battery (Cool Neon / Seeed Studios) ($12)
- LiPo Rider recharging module (Cool Neon / Seeed Studios) ($9.50)
- Seeeduino (Cool Neon / Seeed Studios) ($27)
- 40-pin IDE cable (junk drawer)
- bits of velcro (Home Despot)
- 1/4" heat-shrink tubing (Cool Neon - Ask, and they'll throw some in with your order.)
- 2x short USB to USB-mini cables
- 3"x2" piece of cardboard

Cost of major parts (including hat): $159.50

<p>Ooh, orbiting sun...neopixel strip...so did you put the neopixel strip around the band and have a yellow blip circling? That is a great addition.</p><p>I'm *finally* getting around to making one of these for myself and I'm super excited! I've got some ShiftBrite units lying around that I'm hoping to make work with it...they need 5.5-9v though, so I think I'll need to do something different about the power. If you're game, I've got two questions for you so far:</p><p>First, how bright are the LEDs that you used? the ShiftBrites that I have are apparently 8000mcd per color and having never done any fiber projects before I'm curious if you think they'll be bright enough to be noticeable under reasonable indoor lighting.</p><p>Second, you say you've added gamma correction...I've heard about gamma for years and never really understood what it is; could you point me at some resources to get my head around it, or explain what it changed about your hat?</p><p>Thanks!</p>
Howdy!<br><br>Here are the output specs on the LEDs I am using:<br><br>Red = 3.3 Lumens/300 mcd<br>Green = 10 Lumens/1000 mcd,<br>Blue = 2.7 Lumens/300 mcd <br>(mcd calculation based on full 120 degree beam)<br><br>Looks like your LEDs will be a LOT brighter, which is a good thing. As it is, the ones I use a easily visible under normal lighting indoor conditions.<br><br>Gamma correction tries to correct for the difference between how PWM works and the way your eyes work. Logically, a a PWM value of 127 should be 50% of 255, but with the way our eyes perceive light that value of 127 looks way more than 50% lit. The folks at Adafruit have a nice writeup on it here: https://learn.adafruit.com/led-tricks-gamma-correction/the-issue<br><br>Good luck with your project. Please let me know how it goes, and feel free to hit me up with any questions you have.
<p>Oh, neat...that makes sense; I know I've heard our bodies sensory responses tend to be more -- logarithmic, I think it is -- than linear. Thanks for the Adafruit writeup!</p><p>I'll let you know how it goes! First task is probably to source some fibers and then to figure out how to attach them to the LEDs...(they're more pancake-y packages than yours, so I may have to get creative).</p>
<p>I got my last batch from this guy. Great selection, decent prices, and fast shipping: </p><p>http://www.ebay.com/sch/localphillyman/m.html?_nkw=&amp;_armrs=1&amp;_ipg=&amp;_from=</p>
<p>Wonderful! I had no idea the range of sizes you could get for fibers! Would you recommend I go with the 0.75mm fiber that you used, or something larger or smaller?</p>
<p>Lots of factors to that decision. Thicker diameter means fewer light points, but they'll be brighter. Thinner means a lot more work feeding them through the holes and securing them. </p>
<p>Okay...nearly done I went with the 0.75mm fibers and printed up a guide for my starfield. I need to get my button properly debounced in my firmware to cycle modes, but I'm just now stuffing the hat.</p><p>I realized none of this was going to be removable and I wasn't sure how well my velcro would stick so I'm trying to glue things to the crown of the hat. It's...been a learning experience. For example: I've learned that contact cement does not stick PCBs to felt very well. It also kinda bleeds through. E6000, however seems like it's much more successful, so far.</p>
<p>Hey Chris! Can you make me a hat like this?</p>
I've thought about making a few and putting them on Etsy, but I don't think I could charge enough to cover my labor. That's one of the reasons I put together the instructable, so that I could share the knowledge and let other people input the labor. :)<br><br>-Chris
this technical site is not for me&hellip; perhaps there is an easier tool kit&hellip; where the led lamp is already done, I just put the little lamps in the hat&hellip; :o))
<p>A great ready made light source for smaller fiber optic projects are LED glowsticks. You are stuck with the colour programmes that are built in but they normally have a few different options. I just removed the platic hollow part and inserted the led end into a short lenght of flexible tube that i had stuffed with my fibers and glued all together with silicone sealant. </p>
Chris I would be happy to tell you where you could get your components for alot less $.
<p>Spectacular! </p>
<p>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?</p>
<p>Howdy Rachel,</p><p>I'm happy to help you debug this. I've got a few questions:</p><p>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?</p><p>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?</p><p>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?</p><p>-Chris</p>
So doctor who
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! <br> <br>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. <br> <br>WHY DO I HAVE TOO MANY PROJECTS? I NEED TO MAKE ONE OF THESE!
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. <br><br>I try to keep things simple, but when someone hands me free toys I feel compelled to make use of them. :)
Hi Chris, <br>She is a beauty! <br>I am also in the hat making business and for my next project, I am looking at using a wireless solution. I like the &quot;RF Remote&quot; 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.
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!
this is great <br>
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? <br> <br>Thanks!
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.<br><br>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.<br><br>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. <br> <br>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. <br> <br>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. <br> <br>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. <br> <br>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.
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. <br><br>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.<br><br>*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/<br>
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
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. :)
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?
There are a couple of things I can think of to shrink the size of the electronics: <br> <br>1) Replace the Arduino/Seeeduino with an Ardweeny. This will cut your project's footprint by a third. http://www.solarbotics.com/product/kardw/ <br>You will need a FTDI adapter to program the Ardweeny. I can recommend the FTDI Friend: https://www.adafruit.com/products/284 <br> <br>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.
Where I can buy TCL controller modules? I live in Croatia, Europe. <br>And what current for LED this modules can provide?
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. <br>http://shopping.netsuite.com/s.nl/c.ACCT88394/sc.2/category.1665/.f <br> <br>I don't have the electrical specs with me, I'm at my day gig. I'll try to reply later.
Perfect, indeed
It's very... whimsical and a little Doctor Who like. :)
Thank you.
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?
You can drop the LiPo battery, LiPo rider, and one of the mini USB cables. Step 6 pretty much goes away too. <br> <br>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 <br> <br>Please let me know how your project turns out.
Amazing! What's the approximate cost of this project? (Excluding the cost of the hat itself, since those have a broad range.)
I've updated the parts page with the prices of the 'major' parts. I didn't price out things like the old IDE cable. :) <br> <br>Ballpark cost, including the hat, is around $159.50
The Top Hat is on sale right now for $69, so my price is high by $10.
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.
So lovely. Really well done, and thank you for taking the time to document it so well!
Nice project and great ibles!
That's amazing - it came out great :D
Thank you. It took me longer to document it than to build it. :)

About This Instructable


419 favorites


More by ChrisKnight: Quantum Bottle Stand The Playa Mary Horseradish Vodka
Add instructable to: