Thursday, July 18, 2013

Dekatron PC Status Display

Well, I found a good use for a pair of the soviet made dekatron counting tubes I bought on eBay months ago: a CPU and RAM usage display that fits in one of the 5.25" optical drive bays on my desktop computer.

Regular readers of my blog (if any of you exist) will remember that I bought two kinds of these from an eBay seller in Ukraine about a year ago, some 3-guide argon filled OG-3 tubes and some 2-guide neon filled OG-4 tubes. I found that the OG-4 tubes are much brighter, and glow a pleasant shade of orange, although they count at a  much slower rate than the OG-3s. I ended up etching some circuit boards and building a power supply according to threeneuron's  schematic Here. It worked beautifully, and I was able to play around with controlling the dekatrons from an arduino. 

Several months passed before I came up with the idea to build this PC status display with the dekatrons, several more passed before I had time to actually start on it. I knew that housing a 450 Volt, potentially noisy switching supply inside my computer was risky, but I think the design I came up with should mitigate any potential risks. It is powered through an NSD-10 isolated DC-DC supply, and communications is done with a USB to serial converter that uses opto-isolators to interface with the microcontroller. I designed it around an ATMEGA328 running the arduino bootloader and an FT232RL usb to serial converter, so it is actually fully arduino compatible. Once installed in the computer, reprogramming it is as simple as opening the arduino IDE and selecting the appropriate COM port.

I had the front panel and the dekatron tube mount inside 3D printed, and the whole thing is housed within the shell of an old 5.25" drive. A small python program retrieves the RAM and CPU usage percentages and sends them to the device over serial. The device displays the data by spinning the left dekatron at a rate related to the current CPU load, and the right dekatron shows a bar graph representing the current proportion of RAM used.   
I wasn't totally happy with how the CPU dekatron reacted to abrupt changes in CPU load, so I had the arduino calculate a running average over the last second, so it would speed up and slow down smoothly. I also wanted more of a response to small changes at the bottom end of the scale, while still reaching the maximum spin rate, so I generated a non-linear response in excel and used a lookup table in the arduino to determine how fast to spin the dekatron. 

In the video below I compiled some arduino code first just to show what a mild load on the CPU caused the dekatron display to do, then I started a stress test to show a heavy load. The stress test also begins to allocate all the available memory, so the RAM bar graph tube begins filling up. 

The Schematic and board design Eagle CAD files can be downloaded Here. I apologize if they are messy.