• 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]);


  • Sources for parts

    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.

    More to come!

  • Project Redo: Black Watch Officer’s Uniform Pith Helmet

    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)

  • 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 Completed: Black Watch Pith Helmet!

    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.


  • Playing with a Neopixel Stick: Lithium Polymer (LiPo) battery sample use case

    In my last post, Batteries, batteries, batteries! (Or, how do I power this thing!?) I mentioned the power and flexibility of Lithium Polymer (LiPo) batteries for your projects, but said I mentioned that I hadn’t started to work with them.

    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
    Adafruit NeoPixel Stick
    Rear (you only need 3 connectors)
    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?

    Over 30 hours, wow!

    I think I’ll be using LiPo more in my projects!

  • Batteries, batteries, batteries! (Or, how do I power this thing!?)

    Posted on by Xoff

    When it comes to powering your Ultimate Tesla Electrical Thingorama, you’ve really only got one choice, since you don’t want to be tied to an electrical outlet:


    Batteries are DC (Direct Current) versus AC (Alternating Current) — AC is what the power company delivers to your house. A dirty little secret is almost everything that isn’t a motor actually runs on DC, and has a small “rectifier” that converts that AC to DC…those are all those “wall warts” that things plug into…and it’s really pretty inefficient. But let’s leave off the rant for now.

    Electrical power consists of two power parts: voltage and current. This article explains it pretty well: “Electricity flowing through a wire is like water flowing through a garden hose. The amount of water that can fit through the hose depends on the diameter of the hose (amps). The pressure of the water depends on how far open the faucet is (volts).”

    A sidenote…The original Arduino is designed to run off 5v of power or greater. This is conveniently what you get from your computer’s USB port or a set of 4 conventional AA/AAA batteries, or even a 9v battery (but see below for my opinion on 9v batteries.) Newer Arduino versions, like those I covered last time in”But the Arduino is too big!” often come in 2 versions: a 5v version and a 3v (really 3.3v, but you can ignore that) version. When in doubt, go for the 3v version but make sure everything you do is 3v compatible…this is mostly a problem if you’re running motors or servos, which often need more current.

    So. Batteries. You really have 2 types to choose from: disposable or rechargeable.

    Disposable batteries are often called alkaline batteries because of their chemistry, but you can have other types as well. They’re the normal AA and 9v batteries you’re used to. Use them until they’re empty and toss them. The plus sides are they’re available everywhere, cheap, and come in standard sizes and currents. The A series (mostly commonly seen as AA and AAA) provide 1.5v of current each, and contain 1800-2600 MaH (milliamp hours) of power.  But the sizes are the downside: if you can’t fit the batteries in your project you’ll be SOL, and for most of the cool projects we’re looking at you’ll need at least a pair (2×1.5v = 3v, close enough to our needs of 3.3v.) Personally, if you have the room, this is the place to start, and it’s what I’ve been using. My Tesla Cane runs on 3 AAA disposable batteries. A side note, the extremely common CR2032 “coin cell” battery is a disposable 3v battery, and they’re pretty small. They work well for 1-2 LEDs, but you can’t really run an Arduino from them…not enough amperage.

    Here’s that note about 9v batteries: I hate them. Really, I know some makers like them, but they really suck. 9v is quite often far more power than you really need, and the 9v battery has horrible amperage…565 mAh versus the 2000+ of a AA. If you can fit a 9v battery in, you can probably fit in a pair of AAs instead. You’ll have 3v instead of 9v, but around 4 times the lifespan!

    Rechargeable batteries, often called NiCad (Nickel Cadmium), NiMH (Nickel Metal Hydride), or various forms of Lithium such as LiPo (Lithium Polymer) and Li-Ion (Lithium Ion). They happen to come in the same standard physical sizes are the disposables, so we’re quite likely to find the AA and AAA sizes. Due to the nature of the more traditional nickel rechargeables, they are really 1.2v each instead of 1.5v, so you’ll likely need 3 AAs (1.2vx3=3.6v) to run your project with rechargeables instead of 2 disposables. But…they’re better for the environment and cheaper in the long run, as you only buy them once and recharge them using a charger from regular AC power. The NiCad variety contain notoriously less amperage than their alkaline cousins (possibly half!) but the newer NiMH ones are much better, and can actually contain slightly more amps. You also have the same downside as disposables…the standard shape and size, and also now have to carry a charger. There is also an issue of the rechargeables losing power if they just sit around. I use rechargeables around the house, but not in props.

    Common Alakali batteries, from left to right: 4.5v ("Lantern battery"), D, C, AA, AAA, AAAA, A23, 9V, CR2032, LR44, and finally a matchstick and ruler for comparison.
    Common Alakali batteries, from left to right: 4.5v (“Lantern battery”), D, C, AA, AAA, AAAA, A23, 9V, CR2032, LR44, and finally a matchstick and ruler for comparison.

    The newest battery technology to hit the maker community is the availability of low-priced LiPo (Lithium Polymer) rechargeable batteries. LiPo batteries run at 3.7v, which makes them ideal for our needs of 3.3v or higher. Remember that the newer specialty Arduinos I’ve mentioned from Adafruit and Sparkfun have a 3.3v version? You’ll need a pair of disposable AAs (1.5vx2=3v) or three rechargeable AAs (1.2vx3=3.6v) to power those…but only one LiPo battery! They also come in much smaller sizes, so they are a great choice all around! The LiIon versions tend come in round(ish) shapes and the LiIon versions tend to come in flat shapes. My suggestion is to figure out how much power you need for how long, add a bit, and try one out! They do have some downsides that you need to be aware of! Lithium is nasty stuff, and if treated poorly these batteries tend to catch on fire or even explode. No, I’m not kidding. Do your homework about these first!

    Adafruit Round Lithium Ion
    Adafruit Round Lithium Ion
    Adafruit Lithium Polymer Battery
    Adafruit Lithium Polymer Battery

    Start with Adafruit’s excellent tutorial on LiPo batteries here — in short, only buy batteries from known sources (Adafruit) and use only known chargers (again, from Adafruit). The good news is that the tiny USB charger Adafruit sells (it’s adorable!) is $6, so you can leave them in devices and just plug in a USB extender cable (from a computer or cell phone charger) to charge your device!

    Go to Adafruit and search for LiPo batteries…they carry a lot, and they aren’t bad in price ($8-$30 depending on amperage). I’m going to be moving to Lithium batteries for most of my stuff.

    I hope these are helpful, and keep making!



  • So, this just happened…I’m in another Steampunk music video!

    Remember that Professor Elemental music video I was in? (If you don’t, go watch it here!)

    Well, I’m in another Steampunk style music video! This video is from the local Phoenix Arizona Jeff Hunt Band is of their song “Caravan” which happens to be the theme song from Mantecoza, a Steampunk web series/movie that was filmed locally in Arizona over the last several years. Mantecoza is due out later this year, so stay tuned for that!

    Anyway, the Jeff Hunt Band video (directed by Katherine Stewart, the female lead of Mantecoza and wonderful local actor, director, and Steampunk!) was shot locally with Steampunk and Cosplay volunteers over a long Saturday afternoon…it was a complete blast!

    Without further ado, here it is…enjoy!

  • New Professor Elemental video, featuring Arizona Steampunks!

    Back in March at Wild Wild West Con 3, Professor Elemental and his videographer Moog shot his new “All In Together” music video. Moog filmed the entire video with various Steampunks, including yours truly featured at 1:12s!

    The video has now been officially released by the esteemed Professor, please enjoy!