Nixie Tube Clock
Near the end of 2016, I watched a show containing a very interesting and inspiring sci-fi electronic device based on real-world electrical components. Its function in the show is to display a number, which it does so by presenting its digits across eight Nixie tubes, officially named cold cathode display tubes, rather than using a modern digital display to print the numbers. Right after I saw the device for the first time I took to the internet, first to find out what the tubes were called, and then I hoped to find somewhere that I could purchase some for a reasonable price. I did a bit of research pertaining to the voltages necessary for driving them to ensure that I’d be able to power them easily using the 120-volt modern wall voltage. Once I was sure that I could, I purchased a set of six tubes, deciding shortly after that I would build a clock by combining them with an Arduino microcontroller and a power supply, then set out to construct it.
I’ve faced many trials since I first began building this Nixie-tube clock, but it has allowed me to become quite comfortable with the Arduino IDE, helped me to improve my circuit designing and soldering skills, and allowed me to work with new materials and types of machinery to bring my imagined design to life. The final clock, which is nearly completed and currently functions perfectly, will comprise the six tubes separated in pairs of two by colon tubes to display hours, minutes and seconds protruding from the top of a decorative base made from three sections of edge-routed bloodwood sandwiching two brass panels. I modeled the entirety of the clock in Creo Parametric to visualize it before settling on final dimensions for the structural components and to aid in performing the math involved in preparing the parts, so that they would fit well with each other, and in storing the resulting values.
In total, I spent hundreds of hours, possibly over a thousand, researching components and techniques, coding and debugging, wiring and soldering, replacing components and making the circuitry more efficient, machining the base components, modifying the Arduino board to allow my Arduino prototyping shield to fit with components soldered to it, shopping for materials and assembling everything into the final product. I have enjoyed every aspect involved in this project: coding, building, soldering the circuits, modeling and troubleshooting cover the majority of the tasks involved and are the reason that it has been one of my favorite hobby projects to work on thus far.
I’m in the home-stretch at this point and only need to do some final cutting of the brass sections, filing and sanding away blemishes in the brass and wood, applying a clear coat to the bloodwood and assembling the entire structure one final time. There are a few useful additions to the code that I will eventually include, having already added daylight saving time support even when the clock Is unplugged and a method of changing the time using buttons and a switch, also responsible for switching between 12 and 24-hour time.
Now that I have an extremely accurate clock that considers temperature fluctuations and can keep track of the date, I want to implement new code to allow the date to be changed using those same buttons and displayed on the tubes, as well as making the tubes display the temperature if requested. I also just decided now that I want to implement capacitive sensors connected to the brass sections, allowing the clock modes and settings to be switched simply by tapping the brass with a finger.
These ideas are all exciting to me and I know exactly how I want to bring them to the clock, so I can’t wait until I can start working on it again to add my new feature ideas. At one point I considered selling my clock once I completed it, but I have decided that I can’t place a monetary value on it since I’ve invested so much of my time and energy into it. It’s a clock that I will cherish forever, as weird as that sounds to say.
After spending a few weeks planning and researching the materials, circuitry and coding knowledge that would be required to build my clock, I purchased a few key components on eBay and got started constructing the physical clock. I first grabbed a set of six tubes, since I needed three sets of two-digit displays to print hours, minutes and seconds, and buying them in a bulk package of six saved me some money compared to buying them individually. I had never built a power supply circuit before, nor had I researched their composition and structure, and made the mistake of purchasing a DIY-assembly power supply kit for around 20 dollars instead of doing the small amount of research that it would have taken to know that there was a simpler and better method.
After assembling the kit, soldering the components in myself, I tested it with my new tubes, which for some reason were not the ones that I ordered. They were a smaller size, called IN-16 tubes, than the IN-14 tubes that I had purchased. My favorite size of Nixie tube is the IN-18 tube, which was used on the device that inspired my clock, however a set of six IN-18 tubes is over 200 dollars, as they are old stock from Russia and are no longer produced. The art of manufacturing them through the original methods was lost as well, with no remaining texts detailing the gas mixture, however there have been a few replica-candidates in the past few years who have reverse-engineered old tubes and developed new manufacturing methods, and who are now selling their superior modern tubes. If I ever attempt to make another Nixie-based device in the future, which I’m almost certain that I will, I plan to use IN-18 tubes because of their larger tube shells and much larger, easier to read numbers.
Once I realized that I had the wrong tubes, since IN-16 tubes are smaller than IN-14s, I contacted the seller and got the correct ones shipped to me. In the meantime, while testing the tubes that I had with my power supply, I found a few features that I didn’t like. First, the driver was limited to a 20-milliamp output current, which was only enough to drive a few tubes at the correct brightness level, and I desired for them to be bright. Second, and far more important to me, was the constant ringing that the relatively low-frequency voltage-transforming power supply produced. I’d place the tone to be audibly similar to a 14-kilohertz square-wave, as it sounded buzzy, which was a poor design choice in my opinion, and quickly becomes obnoxious. The voltage that the power supply expects as an input is between 12 and 18 volts, which I assume is filtered down to 12 and then switched repeatedly at that high frequency and driven through a transformer which converts it to 170 volts AC, where it is then rectified back to DC with a smoothing capacitor.
Nixie tubes require a high voltage to start them glowing, usually somewhere between 150 and 180 volts. I asked my electrical-engineering-major roommate if he had any ideas about driving the tubes with a quieter power supply or changing the frequency to be inaudible on mine, and he led me to full-bridge-rectifier circuits. He explained the basics to me and I set off to purchase the necessary components which were dirt cheap, as for about two dollars I purchased a hundred one-amp 200V Vrrm diodes with which to construct my rectifier.
At first, I didn’t fully understand the effects that adding a smoothing capacitor would have besides smoothing the voltage out, and I was convinced that the output voltage of my rectifier circuit would effectively be the 120-volt RMS output of the 120-volt outlet waveform, whose voltage would be too low to fire the tubes, which worried me. I eventually made the connection that the smoothing capacitor would draw extra current through the rectifier at first to bring its charge to the peak voltage in the waveform, which for a 120-volt RMS sine wave is 169.7 volts, almost exactly 170, the requested voltage of many Nixie tubes. Once the capacitor reaches that voltage, it very slowly discharges in wasted energy through the air and any imperfect circuit components, as the diodes prevent it from discharging, or since it’s an electrolytic capacitor, exploding.
When exposed to a load, like the tube-resistor combination, the capacitor supplies the voltage equal to the peak voltage of the wall-outlet waveform, 170 volts, slowly dropping as its energy is lost to the resistor and tubes. However, on each cycle of the 60-hz input to the capacitor, it pulls the current necessary to bring itself back to 170 volts across its terminals. This way the capacitor stays fairly steady near the peak voltage.
Tuning the capacitance value as a function of the voltage and expected resistive load of the circuit is necessary to balance the capacitor’s charging time with its ability to supply current to the tube without dropping its voltage too much between cycles, which would cause the current through the tubes and thus their brightness to decrease. Effectively, if tuned correctly for the circuit, the voltage stays very close to the peak voltage with a ripple-voltage of less than 10% of the peak voltage. The lower the ripple voltage is, the less visible the flickering will be in the tubes, in the case of driving Nixie tubes.
Armed with the knowledge of the structure and mechanisms behind full-bridge-rectifier circuits, I soldered one together on one of the many double-sided prototyping boards that I purchased around the same time on eBay. Since I still only had the IN-16 tubes that were sent to me by mistake, I had no qualms about accidentally damaging one electronically, so I tried driving it with my rectifier. My first rectifier circuit blew up the moment that its terminals touched those on the tube. At first, I chalked it up to improperly laying out the circuit or driving the tube backwards, but I was pretty sure that I had it right, so I soldered together another, sure to follow online diagrams this time. That one blew up as well, as did the following three. My roommate made one for me to test out using his own circuit components, in case mine were somehow all faulty, and his blew up as well. It was not until the seventh rectifier circuit that I realized what the problem was and moved to resolve it.
When the tubes fire, I had made the assumption that they draw their optimal operating current, which should be in the tens of milliamps. What I did not realize was that when the voltage across the gap between the metal cage cathode and the number anode exceeds the breakdown voltage of the gas within the tubes, the gas effectively acts as a wire, or a dead short, between the ground and high-voltage pins of the tube. This allows them to pull potentially a near-infinite current before blowing the driving circuit, which can only handle one amp, or the tube. To remedy this issue all that I had to do was to insert situationally tuned current-limiting resistors between the tubes and driving circuit, leading to an initial voltage across the tube of 170 volts and a current limited to around 4 milliamps.
The first method that came to mind when I decided to build the clock was to power the tubes through a microcontroller of some kind, which would need to be cheap, easy for me to learn to program, and have a sufficient number of input and output pins. My go-to solution was Arduino, since I knew that my clock program would be simple enough that an Arduino could easily run it, that they were cheap, and that I had used them before.
A small amount of research led me to the conclusion that the Arduino Mega was my best option of all Arduino models because of its large number of output pins, which I would need to drive the individual numbers on each tube. It still didn’t seem like an adequate selection to me, since the Mega had 54 input/output pins, which was not enough to supply for the six tubes each having 10 possible outputs, not to mention the other input and output connections for buttons and such that I might need to add. Luckily a solution existed for that problem in the form of a cheap integrated circuit called the k155id1, capable of driving up to 10 outputs at the high voltage necessary for controlling Nixie tubes. I bought a pack of six for a few dollars, one for each tube.
Soon after that I discovered that shields existed, which are essentially boards dedicated to a single purpose, like driving motors or communicating via Bluetooth, and can be plugged in temporarily to the multi-purpose Arduino’s input and output pins. This made designing my wiring circuit far easier than it otherwise would have been because once I eventually purchased a cheap prototyping shield, I had a whole board of available space to solder my components and wires to with direct access to all input and output pins on the attached Arduino.
Around the time that I got the shield and started mapping out my connections, I decided to get started learning to code in Arduino’s language within its IDE. This project occurred at about the same time as the door-lock project that I worked on with my roommates, which made both projects my first real introductions to the Arduino IDE and circuitry. Luckily for me, Arduino’s coding language feels extremely similar to C, which I am quite familiar with after my engineering courses taught me to navigate it, and because I worked on a few hobby projects involving C in my free time.
I was able to quickly whip up the logic part of the clock using for loops, if statements, the serial monitor for temporary display of outputs allowing me to troubleshoot, and the built in Micros and Millis functions for keeping track of time. I set up a for-loop to parse through every possible display option for each individual tube and update the binary output to the Nixie tube drivers, which took a four-bit input signal from four pins, to reflect the number that each was to display at a given time.
Pressing forward with the physical clock, I began purchasing all of the other required materials including small-gauge wire, the prototyping shield that I had selected which matched the Arduino Mega’s pinout, and the remaining resistors and transistors that the circuit required. I found that with the new Nixie drivers I now only needed to use 24 output pins rather than the 60 that I would have needed and not been able to supply, which left me with 30 open pins to potentially use for other purposes. This allowed me to individually control each of the four dots of the colon tubes, called IN-3 tubes, using transistors controlled by four of the leftover output pins, so that I could later add blinking functions if I wished to.
I added a small section to the code telling the colon tubes to wait to turn on until the program had started, which looked better in my opinion than having them turn on instantly and the tubes turn on later, as they now wait for the number tubes to display anything before turning on themselves which appears to happen simultaneously. After I had that completed, I added a new section of code to handle reading the values returned by a switch and two buttons, allowing the user to control whether the clock displayed in 12 or 24-hour time, and giving them the ability to change the clock time with momentary button presses.
Moving back to the clock itself, as all of the relevant code was in place before testing the interface and improving features could be performed, I decided the layout that I wanted the tubes to be positioned in and soldered them into place on three prototyping boards in groups of two. On the two boards that would carry the tube sets on the “outside”, for hours and seconds, I left a small space on the “inside” portion to which I soldered the IN-3 colon tubes. They were not powered by Nixie-driving integrated circuits, so I had to also solder their transistors and two resistors for each tube to the bottom of both boards, that would control the tubes individually.
I discovered that there were a few extra pins protruding from my Arduino Mega board in the center that interfered with the components that I was soldering to my Arduino shield, so I de-soldered those pins and removed them as they served no purpose. The same interference issue occurred in one other location on the Arduino with its two main capacitors, so I had no choice but to move them out of the way, as I had already made the poor decision to solder all of my Nixie drivers to the prototyping shield before checking that they wouldn’t interfere and was reluctant to remove and re-solder them. I was not using the built-in DC power jack for anything, as for the time being I was powering the Arduino through USB, so I removed it as well to make room for the shield.
To each of the 96 pins on the drivers, 60 outputs, six voltage-ins, six grounds and 24 input pins, I soldered lengths of color-coded wire that would later lead to the tubes and the locations on the shield paired with the Arduino’s output pins. The next logical step was to form those connections, to solder the other ends of the wires to their corresponding leads on the tubes and the communication lanes on the shield. Wire-stripping and soldering every one of those connections was a tedious task, but once completed, there was really nothing to physically work on besides designing a decorative frame for the clock’s electronics to reside in. I moved to Creo to put together a model of the clock, including potential designs for the base as well as the required features including the tubes and boards.
Much of my inspiration for the design came from clocks that I’d seen others make using Nixie tubes online, which as it turns out, is a very common thing that hobbyists do. I have found many online, offering to sell pre-made PCBs already designed to act as clocks, allowing people to focus on the design aspect surrounding Nixie tubes and get a free pass on the coding and wiring. Since I knew that I could code the clock myself, I was not interested in using anyone else’s circuitry or code, as I would have missed out on a great learning opportunity and it wouldn’t have felt like nearly as much of an accomplishment if my entire project was just decorating a circuit that someone else had designed and manufactured for me. Nevertheless, other people have taken that path, and there are thousands of images online of the clocks that people have made using Nixie tubes to display time. I found some that were quite appealing that combined wood and brass to form their structure, and I decided to follow a similar route after viewing them.
I was very much pleased with my first design featuring three layers of wood separated by two much thinner layers of brass, the brass polished and slightly rounded at the corners and the wood sections each shaped around the edges with a different routing-bit pattern. To narrow down the possible wood edge-patterns, I tried looking up routing bits, but ended up finding and using misleading bit cross-section images online that didn’t exist as purchasable bits. I later had to go back and modify the curves in my model to actually be manufacturable using existing simple-geometry routing bits.
I was interested in using a specific type of wood with a deep contrast in its grain that I had seen used for expensive decorative boxes in a movie, or at least replicating the look as best I could with high-quality wood, so I asked my uncle for ideas since he knows far more about wood selection than I do. He suggested that I look into rosewood to naturally achieve the grain and color that I was looking for, since I was against the idea of using a cheap wood and staining it to get the desired visual effect. I looked into rosewood and even attempted to buy a section at a nearby hardwood shop, but the planks that they had there were too small for my needs, and since trade of rosewood is currently illegal, they were all that they had left from before that change had been made. They directed me instead to the bloodwood that they had, called Cocobolo, whose dimensions were large enough for my needs, and which had a nicer color and grain pattern than the rosewood that they had in stock. I brought a very nice wood section home for half of the price of the rosewood and, with my uncle’s help and tools, cut the three precisely sized sections from it and carefully routed the patterns into their top edges.
Using my calipers, I marked out the hole locations onto the top wood section then drilled pilot holes and later widened those holes in 1/8-inch steps with wider bits to keep them aligned, and finally used my step drill bit set to bring the holes to their final 0.75-inch diameters, all on my drill press. I recently tried to cut the two brass sections from a single 1/8-inch thick sheet of brass that I purchased online, however in the hour that I spent cutting it with my piercing saw blades and jeweler’s saw, I was only able to cut through around two inches of material, broke a frustrating number of saw blades, and had trouble keeping the cut-path straight. Left tired of cutting by hand so carefully, and with so much left to cut, I have changed plans and now intend to use a scroll saw to slowly make those cuts, which will take away the manual load and hopefully make the cuts more accurate. I would be using a hacksaw if I could spare the material that I would lose, but at the moment that isn’t an option, at least for a few of the cuts.
Between when I modeled the clock in CAD and when I purchased the wood, I began testing the clock program’s interaction with the drivers and tubes. Since I didn’t want to risk damaging anything else if my wiring was incorrect in any way when plugging in the tubes for the first time, I used a different method to troubleshoot my code. I wired the Arduino to a breadboard prepared with colored LEDS, each color designated to a set of 4 output pins that drove each of the six Nixie drivers. This way I could visualize the outputs in binary to ensure that they were correct, and that time was being sent to be displayed correctly, exposing a few errors in my code.
To view every possible time that could be displayed, I modified my code to move forward one second every millisecond, which allowed it to pass through a full day in 86.4 seconds. I found a few pins that weren’t operating at all, which let me easily move wires on the shield and select different output pins since I had so many available.
Eventually I got up the courage to plug in the clock for the first time which I feared doing mostly because of the chance that it could fry components if I had anything wired incorrectly. I was thoroughly convinced at that point that I had done enough troubleshooting though, and that the connections were all fixed and no unintentional shorts were present. I plugged it in for the first time, hopeful that everything would work perfectly, and was moderately pleased to find that nothing fried in that moment, however there were a few problems.