• Category Archives Tesla Cane
  • Projects » Steampunk » Tesla Cane
  • Arduino Flickering Code

    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:

    Flickering Arduino Instructable

    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.

    int ledPin = 10;
    byte flicker[] = {180, 30, 89, 23, 255, 200, 90, 150, 60, 230, 180, 45, 90};

    void setup()
    pinMode(ledPin, OUTPUT);

    void loop()
    for(int i=0; i,7; i++)
    analogWrite(ledPin, flicker[i]);


  • Changing with the times: Tesla Cane electronics rebuild

    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
    Tesla Cane Mk I Electronics

    And in with the new:

    Tesla Cane Mk II Electronics
    Tesla Cane Mk II Electronics

    The Trinket is slightly bigger, but being able to reprogram via USB is a great advantage!

  • Steampunk: The Exquisite Adventure now at Sky Harbor Airport!

    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!

    The Exhibit runs through May 2015.

    Steampunk Exhibition at Sky Harbor Airport
    Steampunk Exhibition at Sky Harbor Airport
  • Project One: The Steampunk Tesla Cane lives!

    It’s alive!

    At long last, Version 1 of my Steampunk Tesla cane is done, just in time for the Wild Wild West Steampunk Convention!

    Steampunk Tesla Cane!
    Steampunk Tesla Cane!

    The original idea of using a Plasma Ball never really went anywhere, and when I saw another cane made by Der Geis while googling around, I decided to change directions a bit…

    For my cane, the upper cane body is made of Delrin, a plastic that is easily machined, made by a friend of mine who is an expect machinist and uses a lathe and Delrin for making many parts. The stuff is very easy to work with, but doesn’t accept paint well, so its still black, but it does look a bit rubbery, so that fits with the electrical theme. A future redo may use wood or some other material, but Delrin was an easy and fast prototype material. The entire section is held together by hex key screws so I could disassemble and change things around. Oddly enough, the hex key (Allen key) isn’t widely outside of “period” for Steampunk, having been developed around 1910! Future versions won’t need this flexibility, so I may redo the head in wood, or maybe not… The tubes are held in place by grease fittings called “zerks” that are used for greasing some engines, and I borrowed the idea from Der Geis’s cane. My friend also custom made the brass insert from round stock, as well as the aluminum end cap. The interior of the handle is hollow, houses the electronics and batteries, and is wrapped in leather cord for a grip and a sword-like appearance.

    Cane top
    Cane top
    Chamber closeup
    Chamber closeup

    The shaft of the cane is a wood dowel from another project, wrapped with twisted brass wire, and secured to the chamber of the cane with two more grease zerks, one for each wire. The twisting was done using a pair of safety wire twisting pliers. These are special pliers that are designed to twist wire together for safety links or jewelry. I love the look! Just google around for the “safety wire twisting pliers” and you’ll find them.

    Now to the insides! The light tube is the body of a “lightsaber” keychain, just like the one cane I’m pseduo-copying, but I didn’t just use the whole thing like he did. I removed everything but the plastic light tube, supplying my own blue LED. I built a custom circuit using an ATTiny85 (I describe that here) and googled around for interesting affects I could make. That boiled down to two: I could pulse the LED on/off or I could use a “flickering candle” style. I posted a poll (here) and the overwhelming result was the flickering…I agree, it looks like its working, but just barely…very Steampunk!

    Here is the entire circuit: the ATTiny85 in a socket for easy programming, the battery pack (3 AAA batteries in a round holder stolen from a $2 flashlight), a resistor, and the LED, heatshrinked into the end of the lighttube. The LED uses about 20mw of power and I get 1000mw from the batteries at around 4.5v…I left it running for 24 hours as a burn in and the batteries are still pretty full! I did not put in an on/off switch, as I didn’t have one that fit well, that’s for a future version.

    The guts photo
    The guts photo

    I don’t have a great video of the cane running in the completed form, but the effect is clear in this prototype video I made for my friend who worked the Delrin for me:

  • Which effect?

    Which effect do people like better?


    Which effect do you like better?

  • Project One: The Tesla Cane

    Some time ago I saw a cool blog post on Gizmodo about a steampunk “Tesla Cane” where the creator, Virtuoso Datamancer,  had designed a cane with a Tesla theme. Later I say pics on Flickr from one someone else had made.

    I thought the idea was pretty cool but had no reason to pursue making one.

    With the steampunk wedding in the future, I now had a real reason to make one!

    With the advice (and probably some construction help) from the guys at work (one is an Electrical Engineer and the other is one of the heads of the robotics club) this is going to be pretty fantastic!

    So far, I’ve ordered the Plasma Ball: a 3″ USB powered one from Amazon ($10). Its a little hard to tell from the description, but it may also be powered by 4 AA batteries (1.5v x 4 =6v, USB supplies 5v)…if not, it won’t be hard to convert the ball to running off batteries. The guys at the office want to use rechargable batteries so we can seal them in the cane!

    The ball should arrive in a couple of days, then to (carefully!) disable it to see what needs to be modified.

    I also need to find a cane body, either a wood cane (maybe a sword cane so its already hollow?) or a brass/copper tube.