A number of people have asked me for the code for the Flickering LED for my Steampunk Tesla Cane.
It’s a modified version of the standard “Fade” Arduino example code. The original code I borrowed appears to have disappeared, but this instructable (not mine) has some “flickering” sample code: that is very similar:
Roughly, you make an array of values (the flicker[] below) and cycle through them. Some versions are far more complex, and generate a pseudo-random number for each step instead of a static set of values.
I’m often asked about sources for parts, and it always comes up when my friends and I do our Teslapunk panels.
Our two favorite sites are Sparkfun and Adafruit. Each has it’s own strength and weaknesses: Sparkfun is closer for those of us in the West (they’re in Denver) and while they have a large selection of parts for the electronics Maker, they focus a bit more on robotics. Adafruit (based in New York) is an amazing company that was worked hard on bringing a curated selection of products to the Maker community, and produces their own versions of the Arduino microcontrollers: the Gemma, designed to be worn in clothing and the Trinket/Trinket Pro, which are much smaller than the original Arduino. I discussed both the Gemma and Trinket in my post “But the Arduino is too big for my project.” Adafruit also sells the Neopixel product line of programmable RGB (Red/Green/Blue) LEDs available in variously sized rings, strips, and individually. These are the multi-colored LEDs that Thadius Phule (Peter Valentine) uses in a number of his gadgets. I also buy my Lithium batteries from Adafruit.
For generic electronic parts I check both DigiKey and Mouser, but I also check ebay. Buying through ebay can save you a lot of money if you’re willing to wait while they’re shipped from China, but if you don’t get exactly what you expect, you can be SOL. I’ve generally had good luck, but I’ve stuck with components (LEDs, battery cases, etc) and not full Arduinos. Peter does use ebay for his Arduinos and has had good luck.
So originally I’d made this Pith Helmet for my Black Watch outfit:
[singlepic id=15 w=640 h=480]
On reflection, while it was historically fairly accurate…it didn’t actually fit me well. I’d sort of given up on finding one that fit (I have a big head!) until The Artist Wife ordered one for a project for her cousin. The one she ordered fit me GREAT! So I ordered another from the same supplier…and it fit “ok.” I finally removed the inner liner and restrung the string it used to give me a better fit. I also discovered that the naugahide liner was miscut, and didn’t fit well, so I cut a slot in a couple of places in the liner to have it fit better. Much more comfortable now!
The Artist Wife also offered to vent the Helmet, so I couldn’t turn that down. So behold, the Vented Pith Helmet! (Click the slideshow to advance)
It’s been a busy few months without posts, but there is lots of stuff going on, some of it even coming off the back burner!
Wild Wild West Con 4 is rapidly approaching…and since my Tesla Cane Mk II (with a copy of the Mk I electronics but with the original chip) is in the Sky Harbor Airport Steampunk Exhibition as I mentioned last time, I needed to rebuild the electronics for the Mk I cane itself. I somehow lost (or maybe they were …stolen by an Airship Pirate Gang?!?!) the original code for the flickering, I needed to recreate it. I actually found an earlier version I was fairly happy with in a separate backup, and it made sense to rebuild all the electronics using a Trinket instead of the barebones chip: easier programming (via the built-in mini-USB), battery/voltage management, easy reset, cleaner pinouts, etc.
The Mk I electronics were very simple (see here): I used a bare Atmel ATTiny chip, a resistor, and LED. In the last few years Adafruit and other companies have come along and make really awesome low-cost ATTiny-based boards (I covered them in this post about what to do when an Arduino is too big for your project), and I’d pickup up a couple of the Trinkets to play with. Since a bare ATTiny chip is $2-4 individually and a Trinket is $8…that seems a decent deal.
So, out with the old:
Tesla Cane Mk I Electronics
And in with the new:
Tesla Cane Mk II Electronics
The Trinket is slightly bigger, but being able to reprogram via USB is a great advantage!
The Steampunk Exhibit from the Scottsdale Library from last year is being reshown at the Sky Harbor Airport’s Art Gallery! Yes, the airport actually has an Art Gallery in Terminal 3.
My Tesla Cane (actually Mk II of the cane – I made a new version just for such displays, but using the original electronics) and the original prototype Vented Hat by myself and the Artist Wife (along with a pair of our friend Tim’s goggles) are on display!
Even better, the Vented Hat is featured very prominently on their website AND is the cover of the Announcement Postcard for the Exhibit! Woohoo!
The Exhibit is located in several display cases located just inside the Parking Garage of Terminal 3, around the Starbucks. It’s easy to park in the garage and go see it (it’s all before TSA Security), please do so!
With a lot of help from The Artist Wife, the Pith Helmet for the Black Watch outfit is done!
The tartan is stiffened with medium weight interfacing to give it some body and was then folded over into a double thickness and spray-adhesived together to make a single piece, and glued (using E6000) to the pith helmet. The red feather hackle is also glued into the puggaree (the band running around the hat) with E6000.
Next, I trimmed the metal pins from the back of the badge and added some scrap foamboard to give enough surface area that the badge (which is convex) could be glued to the tartan fabic.
All that nice evenness and well-trimmed edges? That’s the Artist Wife. 🙂
Lastly, I replaced the pleather band with nice laredo strapping that ties into the inside of the helmet’s supports.
For an upcoming project, using an Arduino Gemma (which I talked about in my post about “But the Arduino is too big for my project!“) I decided to use a LiPo battery, since the Gemma conveniently has a JST battery connector on it.
As a test, I connected a NeoPixel Stick — another awesome piece of kit from Adafruit, to the Gemma. The Neopixel Stick, like all Adafruit’s Neopixels, is a string (in this case, a stick) of RGB LEDs with a built-in color controller. The Stick is 8 of these LEDs on a rigid circuitboard. Each LED in the stick is really three sub-LEDs, one in Red, Green, and Blue (hence RGB). With these three sub-LEDs, you can make almost any color you can imagine. Because of the built-in color controller, you only need a single data pin (besides the two normal power connections) to control an entire group of LEDs!
Adafruit NeoPixel Stick
Rear (you only need 3 connectors)
Note that if you are interested in NeoPixels (I learned about them from my friend Jeff McDaniel, who did the Teslapunk panel at Phoenix Comiccon) you should read Adafruit’s entire Uberguide, here. I’d call them a medium difficulty item, as there are some power requirements to be aware of…in short, the individual pins on an Arduino can’t handle the amperage for many of these LEDs, so you need to directly wire them to power.
To test the LEDs, I connected the appropriate pads on the Stick to positive, negative, and D1 (digital pin 1) on the Gemma. I ran a “Larson Scanner” test — this is named after Glen Larson, who was the producer of the old Knight Rider and Battlestar Galactica TV shows, which both featured a red moving LED light (on KITT the car’s front bumper and the “eye” of the Cyclons). This test basically chased from one LED to another and altered the colors each time.
Here’s a demo video of the setup:
The Neopixel Stick is held in the grip, the little blue breadboard in the middle is just linking the soldered wiring to the alligator clips connected to the tiny Gemma board. Notice the silver LiPo battery pack powering the Gemma!
I’ll mention the Neopixels are really bright, wow!
The LiPo battery pack is 850ma, and cost around $8. So, take a guess at how long it ran that Neopixel test?
I’m working on a new Steampunk outfit, but I’m not going to reveal the Steampunk elements yet!
The outfit is a Victorian Black Watch Officer’s Uniform, the desert (Africa) version:
British Victorian Era South Africa campaign Scottish Regiment Uniform
The image is a Argyll & Sutherland Regiment and I’m doing Black Watch, but it’s mostly the same. There are a number of cool parts of this uniform: the khaki colors were originally issued white, that was either mud or tea dyed by the troops. Apparently the Boer guerrillas in Africa had a great time picking off the British Officer’s in their nice white uniforms, so the troops used “field expedient” methods to make themselves less of a target.
My first step has been creating the pith helmet. I started with an “Imperial” style British Pith Helmet. These are the taller ones that were more common earlier in the 19th Century. Later on the flatter wider “Wolseley” Pith Helmets became more common. The Black Watch had a couple of special uniform elements that were unique (or semi-unique) to their uniforms: first was they wore a Black Watch tartan patch under the badge on the side of the helmet, and second they had the right to wear a red feather “hackle” on their helmets. This is a period example from the Canadian precursor to the Black Watch, of the later part of the 19th Century:
Wolseley-style 5th Royal Canadian Highlanders
I later found a recreation of the exact helmet I wanted: the 42nd Black Watch Pith Helmet, with tartan patch, helmet badge, and red hackle:
Reproduction Black Watch Pith Helmet
I got the Pith Helmet from Gentleman’s Emporium and the badge and hackle from ebay. A friend had some extra Black Watch fabric from when they were in the SCA, so that became the patch. So here is my version, ready to be attached!
An interesting note is that this is before the commonplace pin-and-clamp on the back of pins and badges now…they used a seperate cotter pin to hold the badge on, through holes in the puggaree (the wrapping around the helmet). I may use those if the Artist Wife helps with the cutting/pinning, or I may just glue the whole setup on.
After a few fits and starts (finding a case I was happy with was really hard!) I’ve finally finished the TARDIS lantern necklace for my friend!
It consists of a small Tim Holtz Lantern that had an incandescent bulb powered by 2 AA batteries, which I retrofitted, removing the cheapo flashlight bulb and replacing itwith a white LED. The wires run through black necklace chain to a battery pack that my friend will wear tucked in her corset.
The battery pack is a cool little case from New Age Electronics (via Mouser) that combines space for 2 AAA batteries (more than enough juice for this) and space for a small circuit board on the opposite side:
AAA Project Box Blowout
Note that if you’re going to use the same box (which I really like) the battery “plates” are seperate, just make sure you order those on Mouser, too. The circuit board is a stripboard I got from ebay, cut and drilled to size. The wires are heatshrinked and come in through a hole in the side:
Sideview of completed box, wires visible. The side opposite the batteries holds the circuit board.The circuitboard showing the ATTiny and resistor
The circuit is basically the same thing as the Tesla Cane ATTiny, except running a “fade” program I tinkered with to get a more Doctor Who-like effect. Here is it in action (I love this thing in the dark!):