Jump to Sections Below:
Project Files and Important Links:
I can't remember my first exposure to Nixie Tubes but I became fascinated with the old technology immediately upon learning of them. Even though they require a ridiculous DC voltage level to operate, they truly are beautiful. A little searching proved old stock from Eastern Europe and Russia were available to purchase. I also found many Nixie Tube clocks (the most common application nowadays) for sale built by hobbyists. I then found electronics websites and youtube channels explaining the circuit design required for driving Nixie Tubes that became critical for designing my own: EEVBLOG, Fran Blanche, Dalibor Farny, and Threeneuron. After researching and reading up on the impractical but beautiful technology, I wanted to build my own Nixie Tube Clock.
After observing features implemented on other Nixie Clock builds I found online, I decided on a few requirements for the 1st version of this project:
For future versions of this project, I would like to include:
The Nixie Tubes I purchased require a DC voltage around 170V to operate. I found the work of Threeneuron (Michael Moorrees) to be of high quality and thoroughly documented, I like his work. His high voltage power supply only required 12VDC input and gave adjustable output from 45VDC to 190VDC, perfect. Instead of purchasing one of his kits (I think he was still selling them at the time) I decided to copy his circuit design and implement my own. I used EAGLE for all of my schematic and PCB designs.
However I made a few changes specific for my application:
Selecting individual digits on Nixie Tubes is pretty straightforward. The anode is pulled up via a current-limiting resistor to the high 170VDC. Then pull any of the 10 cathode pins to GND to illuminate any respective digit. Only 1 digit should be illuminated at a time. The other 9 pins not being used should ideally be disconnected and floating, but that's not feasible unless you want dozens of relays in your circuit. Screw that. Instead the 9 pins should be connected to a high enough voltage somewhat comparable to the anode voltage so the Nixie's "strike voltage" is not reached and therefore that digit is not illuminated. Even though Nixie Tubes require high voltage, the overall current draw is low and not a problem.
The problem arises with the high voltage and "turning off" the digits. Connecting/switching the individual cathode pins to GND is trivial and can be accomplished with a simple microcontroller, but bringing the cathode voltage high enough to "turn off" digits can't be accomplished. The voltage is greatly beyond what a microcontroller can handle. One solution is having the microcontroller drive MOSFET circuitry connected to each cathode, but this would result in far too many transistors littering the circuit. The logical solution is utilizing shift registers. The microcontroller controls the shift registers which interfaces with the high voltage Nixie Tubes; a middle man due to the high voltage difference.
However, they must be "high-voltage" shift registers that are capable of clamping its output pins as high as possible to cross the threshold of Nixie "turn-on" effects. I copied Dave Jones' Nixie logic scheme from his personal Nixie project that uses the Texas Instruments IC TPIC6595 - Power Logic 8-bit Shift Register. The output drains have a clamp voltage of 45V, which is sufficient to effectively turn off the Nixie digits.
Using 8-bit logic to control the switching of the Nixie Tube digits, each single bit output (DRAIN#) is connected to a single Nixie digit. Since each Shift Register IC only has 8 outputs and I want a 6 digit clock in the format (H1H0:M1M0:S1S0); multiple Shift Registers daisy chained together is required. The Shift Register pins SER IN and SER OUT allow this linking together so you can basically turn your logic from 8 bits long to 16, 24, 32, and so on. Since I want a 12-hour clock, the number of bits to fully represent any valid time is 44 bits. Using the format (H1H0:M1M0:S1S0): H0, M0, and S0 can hold all 10 digits 0-9. M1 and S1 can only hold 6 digits 0-5. H1 can only hold 2 digits 0 or 1. [3*(10) + 2*(6) + 2 = 44]. The graphic below gives a better explanation. Note: while only 44 bits are needed for a 12-hour clock, I included one additional bit connection in my final circuit design in case the programmer wishes to change it into a 24-hour clock (45 bits).
While the SER IN and SER OUT pins are daisy chained together for the 44 bits to flow/shift, the RCK pin (latch out pulse) and SRCK pin (shift register clock) must be shared amongst all Shift Register ICs. This is where the microcontroller comes into play. The microcontroller acts as the source of the 44-bit data, the shift register clock, and the latch output pulse. I chose the small 14-pin PIC16F15325 Microchip microcontroller. I choose this PIC due to its small pinout, serial capabilities, external interrupt pins, and peripheral pin select (PPS) capabilities which allows flexibility in choosing which pin does what. A large 40-pin PIC would have been overkill with many unused pins. In fact only 1 single pin went unused in the final circuit design. The PIC has the normal connected electronics for a push button master clear (MCLR) reset, PICkit 3 Programmer pin header connections, and an external crystal for sourcing the PIC's internal clock. I choose a 12.288MHz clock since it can be easily "chopped down" or prescaled into precise 1sec pulses (the rate of my clock).
My C source file is found at the top of this page, and it's fairly well commented (I think). Check it out for more details. Within the PIC's C code, the clock's time is stored as seconds elapsed in decimal, 43,200secs == 12hrs. Every second an interrupt is triggered, then 2 steps occur:
Note: all of the electronics and parts described here and used in the project are in my Bill of Materials file at the top of this page. I included specific part numbers and Mouser/Amazon links.
I included 6 SMD RGB LEDs (Cree CLY6D-FKC-CK1N1D1BB7D3D3) below each Nixie Tube to add more color. So pretty. Since each Nixie Tube is encased in glass all around, the LED light shines through very well. Each LED package contains 3 independently controllable red, green, and blue LEDs that are controlled by 3 latching push button switches. In the future I might make them microcontroller-controlled with PWM dimming capabilities.
The 3 LED colors for all 6 RGB LEDs are controlled via self-locking latching push button switches of corresponding color for red, green, and blue. The variable resistor shown in the SCH image below was not included in my final implementation. It didn't offer much benefit. The user may select a combination of red, green, and blue to mix and generate a few other colors in the spectrum.
To control the Nixie Tube illumination a larger latching push button switch was added. It does not control the power for the whole circuit (12V), but controls the 170VDC feeding the anodes of the Nixie Tubes. The logic of the circuit is still powered and keeping time, only the Nixie Tubes are shut off. I did not utilize the push button's LED ring as shown in the SCH image below.
A rotary encoder (Bourns PEC11R-4015F-S0024) with a detachable knob (taken from a potentiometer set) is used to manually set and adjust the clock's time. The encoder has two features: a non-latching push button and continuous rotation in either direction CW or CCW. Pressing the push button feature of the encoder sends an external interrupt to the PIC microcontroller allowing the user to manually set the correct time in the following steps:
Push button and rotation debouncing circuitry in the form of capacitors and pull-up/pull-down resistors is shown in the SCH below. It greatly improved accuracy.
I first breadboarded the high voltage supply circuit and it worked just fine. Giving me variable high voltage output. This phase is where I experienced my only "injury". The high voltage output had a slight ripple when observing via the oscilloscope, nothing major just a few volts. Which is nothing when considering the +170VDC level, but I wanted to clean up the ripple as much as possible with a high voltage-rated capacitor... for some reason. The capacitor attenuated the ripple a little but not completely. So I decided to scrap the idea and removed the capacitor, which my dumbass forgot was fully charged to +170VDC. Anyway, the leads touched my arm and gave me quite the shock. ALWAYS REMEMBER TO PROPERLY DISCHARGE CAPS WITH A MEDIUM SIZED RESISTOR!
I drew up the schematic and PCB for the high voltage supply first in EAGLE and ordered the PCB from JLCPCB. Ordered all the parts and soldered together everything. It worked just fine as the breadboarded version. I used the finished PCB version of the high voltage supply for prototyping and breadboarding the main Nixie Clock circuit.
After I had a working circuit design and semi-complete schematic for the main Nixie Clock circuit, I began prototyping small aspects of the project by good ole fashioned breadboarding (one of my favorite things to do). The wiring of the shift registers, the PIC, and the buttons/encoder was fairly simple. The difficult aspect was the PIC programming and correctly translating "digit time" to the 44-bit binary data needed for the shift registers. For the code writing and debugging I didn't use the Nixie Tubes. Instead I used standard LEDs to represent the Nixie digits and eventually worked out the C code to correctly interface with the shift registers.
I used EAGLE to create the schematic and custom components that weren't available in component libraries. The actual SCH files are at the top of this page. You'll note in the schematic I added 2 different Nixie tubes to serve as the : clock separator between the digits, the Nixie Bulb/Lamp IN-3.
I used EAGLE to create the PCB design. The actual PCB files are at the top of this page. The main Nixie Clock PCB was 2 layers (top and bottom with GROUND planes colored red/pink and blue below) with rounded board corners (why not). I used JLCPCB in China to manufacture the physical PCBs. Their prices are cheap and the boards are high quality for simple DIY home projects. Shipping time is extremely quick too. I strongly suggest using them. I selected a red soldermask (different color options shown below) and didn't notice my "Enocder" typo until they arrived. DOH!
The soldering of all the components did not take too long. The most difficult part was hand soldering the small SMD RGB LEDs. A few died in the process, RIP. I did not solder the Nixie Tubes directly to the PCB. Instead I soldered individual Nixie tube socket/connectors which allowed me to swap out bad Nixies in the future. I used screw terminals for all the wiring connections between the 2 PCBs and external components. I used DIP sockets for all ICs instead of soldering directly to the PCB. The entire circuit is powered through a typical AC-to-DC wall power adapter outputting 12VDC. I made sure to buy one with a maximum current rating of 2 Amps after measuring the current drawn when the final circuit was put together. It connects to the circuit via a female power jack socket with pigtail cables. I used (picked early on to determine PCB size) an old wooden bourbon box with a sliding plexiglass window as the clock's housing box/container. I drilled holes on the left side of the wooden box for the LED switches, Nixie switch, rotary encoder, and power connector cable. The High Voltage PCB sits behind the main PCB mounted to the back of the box out of view. The main Nixie Clock PCB is mounted to the back also but with much longer standoffs to "raise it beyond" the HV PCB.
Wrapping up, I absolutely loved this project. It was a great distraction from graduate school and helped increase my knowledge on various electronics topics. I even incorporated this project into the semesters I was teaching Electronics at UTA (see my Teaching page above to see how). I finished the Nixie Clock in March 2018 and to this day (December 2020) it's still running perfectly fine. Though the accuracy of the 1-second clock increment isn't perfect and accrues an offset over time, it only requires manual resetting about every 6 months or so. I hope to better increase this accuracy with my next version which will include a Real Time Clock IC.
THANKS FOR READING! And now here are all of the sexy finished product photos.