OpenDNS turned 5 this year and I wanted to build something really cool to commemorate the occasion. I wanted to make something that would look amazing, was functional and would make people think about just how much we have accomplished. As a product manager I spend a lot of time looking at data visualizations but have always had a soft spot for old sci-fi war rooms and power stations with hundreds of physical analog gauges.
- Design must have both vintage and contemporary elements. I love steampunk as much as the next guy but it just didn’t feel right for this project.
- Arduino driven. It has been a year since my last Arduino project and it’s time to get back to my favorite little microcontroller. There are also a few other people playing with Arduinos at OpenDNS – not so many using picaxe or MSP 430s .
- Expandable – not everything has to be done at once but a little work now gets me more to play with later. I used RGB tri-color LEDs but only connected the red channel for the first iteration.
- Get others involved - I work with brilliant software engineers. If I provide them with instructions on how to send data to the panel over USB, they will do a much better job than I ever could. While this write up is about my work, it was awesome to work with engineers Doug Tabacco and Adam Phelps on this project.
- Pre-finished Birch Plywood – cut to 18″x24″ pieces to fit on the laser bed.
- Arduino – I had an Arduino Mega sitting around but it’s overkill for what I need. I need lots of PWM outputs and the Mega only has 13.
- TI TLC5940 LED Drivers – I daisy chained two of these chips to drive up 32 PWM/analog outputs. Each chip is about $4 and there is a good library with plenty of examples of Arduino+TLC5940. The one odd thing is that the 594o controls the individual cathodes (negative) so all the LEDs have to be common anode.
- 5mm common anode RGB Leds – I am only controlling the red channel with fading for now but will hook up the rest of the colors later to allow color changes.
- 0-5v gauges – the Arduino+TLC5940 can drive up to 5v which makes these voltmeter panel gauges ideal. I originally tested on a 0-1A gauge with the shunt cut off but having 12 identical gauges already set up for 5v made the project much simpler.
- Misc – a little bit of glue, some 22AWG wire, 22AWG butt crimps, tap splices and a breadboard.
Laser etching can be done in one of two ways: Raster and vector. While raster mode allows for fill and shading, vector mode etching cannot be beat for detail and sharpness. Vector etching provides a 0.005″ (0.13mm) lines with curves rendered at 1200 dpi. The trick is to run the vectors with #FF0000 line color at 100% speed, 10% power whereas the black vectors would cut at 20% speed, 90% power on a 60 Watt CO2 laser.
The world map needed to vector etched but the original file (http://www.vectorworldmap.com/) had every tiny little island as a barely visible vector form. In my test etching I found that the even with a laser cutter’s precision, there was heat spread in the wood causing charring! Sorry to our friends in Alaska and Western Europe but I had to hide some of the tiny islands.
I found the locations of our data centers on the map and added mounting holes for the LEDs. Since I am using nice 5mm RGB diffused LEDs, I wanted to show them off. Instead of drilling a single big through hole for the LED body, I decided to laser cut a hole for each lead (Red, Anode, Green, Blue). Each hole is 0.5mm in diameter with .75mm spacing between holes. This aligned the leads perfectly and snugly allowing me to attach wires from the back.
The gauges are voltmeters that measure 0-5v DC. I originally planned on replacing the face of the gauges but the stock gauges looked so good I didn’t bother. The ambiguity of 0-5 only seemed to add to the overall effect. I used calipers to measure the gauges and design a mounting through hole for laser cutting into the wood. I always test my designs by first laser cutting them into cardboard so I can find all the little flaws. To my surprise, the first iteration was a perfect fit!
I have been playing with box joints for a little while and really like the contrast of laser charred edges against a light birch face. I got my settings dialed in to the point that I was getting a dovetail-like fit. In fact the boxes you see here are incredibly hard to disassemble.
For this project, I will be assembling and disassembling frequently so I adjusted my settings to make for a looser fit.
The laser cutter at TechShop San Francisco has an 18″ x24″ bed. This is a great size but scaling the world map to fit in that space with enough room for two rows of gauges left New York and Washington DC so close together that the LEDs would be touching. I needed to scale up.
Since I have 24″ on one end I decided to make the case 23″ x 23″ x 6″. The 23″x6″ sides/top/bottom cut easily. I then split the back into two pieces and the front into three pieces. By keeping the front modular, I was able to permanently glue the sides, top front and bottom front but allow the middle front and back to be removed. Why leave that extra space in the middle? I’m not sure yet but I think there may have to be some rocker switches, buttons and dials added to the panel in the future.
Assembly and Wiring
This picture pretty much tells it all. The clamps were probably unnecessary since the finger joints were holding just fine but one can never be too careful. The only part missing from the shot is the Arduino that sits along the bottom along with a breadboard holding two TLC5940 chips. Notice the hole in bottom left for USB cord.
Hot glue used to hold wires in place. I reversed colors (oops) and the common negative/cathode is black for the LEDs.
Tiny butt crimp connectors attach the LED leads to the wires. You’ll also notice the red wire taps to attach common anode. Electrical tape is covering up the unused green and blue pins.
Arduino and breadboard are attached to the bottom of the case using foam tape.
I couldn’t be happier with how it turned out! The monitoring station now sits at the front of our office for everyone to see.
The Arduino makes serial communication pretty simple. The two tricky parts are keeping the serial connection open and debugging. I settled on the format of three digits and a character to indicate which location (LED+Gauge) was being updated. For example, updating Amsterdam to 100% (gauge pinned at 5, LED glowing brightly) send 100A or 050A for 50%.
At this point, uber-engineer and friend Doug Tabacco took over and wrote the control software. The laptop does all the heavy lifting of fetching stats and scaling/normalizing. His python script scrapes the per-site stats data, normalizes it to a % value and sends that value over serial every 0.085 seconds.
Everything seemed to be fine but then a strange thing happened: after a few minutes of testing, Doug’s Mac’s USB port stopped responding until it was rebooted. I was starting to freak out because the Sysadmin Appreciation Day party was only 5 days away and this was more than just a little weird glitch.
My first assumption was that there was something wrong with the Arduino. Then after a good night’s sleep I realized I forgot to comment out one of my debug serial outputs in the Arduino code. The Arduino was sending a line of serial output every .085 seconds (12 outputs per second)… yep, that’s how you fill a buffer and cause weird things to happen. After commenting out that output line in the Arduino code, Doug’s script worked perfectly!
Note: This is a cross post from my personal blog at www.nerdkraft.com