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.



8 comments:

  1. NICE WORK! By the Way, do not use for the next time rectangular conductor tracks ;-)

    ReplyDelete
  2. Man, this is a pretty slick build. Are the dekatrons running off your pc power supply? I would love to see your detailed schematics for opto-isolated atmega 328. I'm still pretty new to circuit design, but this project has really caught my eye.

    ReplyDelete
    Replies
    1. Yup its powered by the PC power supply, but through the NSD-10 isolated DC-DC supply. It takes the 12v power from the computer's PSU and produces a second completely isolated 12v supply to run the dekatrons. That way, just in case my circuit fails catastrophically for some reason, there should be no damage to the rest of my computer. I'll upload the schematic, and the Eagle CAD files.

      Delete
  3. Very pretty. I can't seem to find the exact dekatron's you're using, so please tell me: is the general idea here persistence of vision? From my understanding a dekatron is essentially a spinner with a widely controllable speed, so as these can probably run to a kHz or more you could get patterns by „jumping over” the pixels that are to be dark by counting extremely fast and then lingering on the light ones. Is that how your build works, or is it a different principle?

    ReplyDelete
    Replies
    1. Yes that's pretty much it exactly, Only one pin is able to glow at once, so to make it appear that many pins are glowing at the same time, the dekatron is stepped forward and/or backward very quickly. These tubes are the OG-4 type, which can count up to 2kHz. Not especially fast, but fast enough to create a POV kind of effect.

      Delete
  4. Great looking project. The link for the schematic is broken, and I was curious if you still have them. Many thanks.

    ReplyDelete
  5. Would you be willing to make one of these if paid?

    ReplyDelete