As my previous posts show, I’ve been working with an Arduino and some Nixie Tubes. Don’t get me wrong, they’re pretty cool, but they don’t come close to IN-13 Bar Graphs. Yeah, neon tube bar graphs that glow orange, don’t even try to deny the badass nature of these.
Check out the circuit I put together to test these tubes out. No Arduino required, just a power supply, a couple of resistors, some pots and a capacitor. I’d love to take credit for designing this circuit, but I borrowed it from this super helpful project: Multi-band VU Meter. Specifically, the circuit I built can be found here.
Still want more? Check out this video I took with the iSight in my Macbook.
I gave a brief Lightning Talk today at work. It went well and the audience seemed genuinely interested and engaged. I’ve posted a 30 second youtube video of the device running on my desk and showing off a few of the commands over the serial port.
A few people have mentioned they have no idea what I’m talking about or what’s going on in those awful videos I’ve put on youtube. To help clear things up here are a couple of photos.
With the flash it is hard to see the lit digit, but it is a 5 on the right. Arduino up top and Ogi Lumen power supply on the right.
Same as above but without a flash and the five on the left.
More of the same but with 00 on the tubes.
You get the point, it displays digits, for example: 99.
Hopefully the pictures make it clear how simple the configuration is. No extra components are required, the Arduino wires directly to the Nixie Tube Driver and the power supply only has two wires. The code is also pretty simple at about 115 lines and heavily commented. I forgot how fun playing with electronics can be when it isn’t for a grade.
I might have mentioned previously that I recently bought an Arduino Duemilanove. It’s pretty damn cool and I’m amazed at the amount of power you can get for such small price (and form factor).
My first month or so was spent hooking it up to LED’s and the Ethernet Shield. I wasted a bunch of time on a poorly thought out messaging system. I had LED’s hooked up to PWM outputs and was controlling their brightness independently from my computer. It was a great learning experience and the perfect way to remind me how to write C. Luckily for us all, that code has been scrapped (it can probably be found at the first revision on Github).
This week I got a package from Canada. “What comes from Canada?” you might ask. Not much, but there is a place that loves to ship NOS Russian Nixie tubes. Ogi Lumen has been a pleasure to deal with, and provides a top quality kit. Assembling the Nixie Driver kit took about an hour, and getting it up and running was smooth as can be. Ogi Lumen provides a concise and well written library with only a handful of functions for the developer to learn.
Tomorrow I’m giving a lightning talk at work about all this. I’ve spent the better part of the evening putting together some code to help with a demo. I’ve cleaned up the messaging protocol a bit (it still needs major refactoring, but I’ve opted to keep it simple). Now I have a few different kinds of messages, as well as minor error handling. I’ve set up a simple way to clear the Nixie tubes, a command to left justify some digits (and continuously shift them to the right) as well as right justify the display (with no shifting). But my ace in the hole is a demo command I’ve put together that will do some cool cycling of content across the tubes.
Ok, so it’s still not all that exciting, eventually I’ll buy more than two tubes. First though, I have plans to conquer this beast: Neon Bar Graph. I’ve placed an order from Digi-Key for a few discrete components to get myself started, eventually building a shift register/DAC driver similar to the Ogi Lumen Nixie Tube Driver kits (probably without the cool boards though).
Oh news groups, we really have a love hate relationship.
Why do many people chose never to send a final correspondence to let the others in the discussion know how things turned out? It’s really frustrating to try to offer help and have no idea if you were useful.
Also, why isn’t Google Groups more like a forum and less like a minor update to an aging system?
Last week I stole a ticket from my boss. It’s an interesting one involving streaming of XML data to another application. There are some issues with the concept and process, but it’s a legacy system and we can’t change it (other teams are busy building a replacement). We’ve also recently upgraded this project from Rails 2.2 to 2.3 and switched from Mongrel to Passenger. All this means I’ve been tasked with refactoring all of this streaming code from a custom Mongrel handler to a normal ActionController setup utilizing a render call with a Proc in the text attribute.
The XML streaming is actually a search API for our ETL system. It queries for very large chunks of data. The streaming requirement has a few positive side effects, it allows the extracts to take place quicker and it helps us run our queries and instantiate our models in batches, keeping our RAM usage under control. Check out the really simple example below.
I had the migrations from the Mongrel Handler to a regular controller mostly done so I decided it was time to get some tests together. I setup the first test, the simplest thing I could do was ask for the default set. It looked something like this:
test "default" do
get :search
assert_response :success
assert_select "element", 10
end
I hit cmd-r in Textmate and something was wrong, I got the following exception: TypeError: can’t convert Proc into String. After about 45 minutes of debugging I found the source of my problem, line 16 of HTML::Document. After thinking it over, it seemed like the appropriate place to make the update was around line 490 in TestProcess. The update is pretty simple: check to see if @response.body responds to call, if so run it with a StringIO object, eventually passing its contents to HTML::Document.new. Check out my ticket and patch at lighthouse. Read it over, check out the patch, run the tests and give it a +1 if you don’t mind.