Home Education Experience Publications Teaching Projects Contact
Education Experience Publications Teaching Projects Contact

Nixie Tube Clock Project

Project Files and Important Links:

Overview

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:

  1. The clock's logic would be powered via a simple microcontroller (PIC16, PIC18, etc.) not with the overkill of a single-board computer (Raspberry Pi, etc.).
  2. The high voltage supply's circuitry will be its own standalone circuit/PCB. To give the overall project a more modular and flexible design in case I want to use the high voltage supply for another application. Also to limit (as much as possible) the presence of high voltage and noise generated by the HV generator on the actual Nixie PCB. Lastly, to reduce the size of the Nixie Clock's PCB by placing the HV PCB behind the main circuit board to keep out of view in the final clock box.
  3. It will be a 6-digit 12-hour clock (H1 H0 : M1 M0 : S1 S0)
  4. Beneath each Nixie Tube will rest a small RGB LED to add additional color if the user wishes. The red, green, and blue controls of each LED will be controllable through 3 latching push button switches so a combination of colors can be achieved.
  5. The setting of the clock's time will be done via a rotary encoder. Pushing the encoder puts the system into "set mode", rotate to set hour, push again, rotate to set minute, push again, rotate to set second, push again, and back to normal ticking operation.
  6. There will be a main latching push button power switch. Not to cutoff entire power to the overall circuit, but just to cutoff the high voltage to the Nixie Tubes when the user wishes to turn off the Nixie light when going to sleep at night.
  7. The overall circuit is powered through an off-the-shelf low-voltage AC-to-DC adapter.
  8. This version will use the IN-12A Nixie Tube design.

For future versions of this project, I would like to include:

  1. A Real Time Clock IC for more accuracte timing and small battery backup in case of power loss to the overall circuit. (The old microwave clock issue)
  2. Possible WIFI or GPS IC to automatically sync the correct time instead of doing so manually.
  3. Add PWM control to the RGB LEDs so dimming and a larger color range is possible.
  4. Add a PTC Fuse for overcurrent protection in case something goes wrong.
  5. Incorporate a IN-9 Nixie Bargraph Tube to act as the seconds counter for a 4-digit Nixie Clock. I've already started on this and seems promising.
  6. Design the Nixie Tube connectors with a more modular flexibility. Smaller PCBs that act as adapters between different types of Nixie Tubes that have a simple pin header connection to the main PCB board. Allows easy swapping between Nixie Tubes of different styles. I have already made the adapter for the IN-12A.

High Voltage Power Supply

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:

  1. I added a 5VDC Regulator for powering the microcontroller circuit that drives the logic on the Nixie Tube PCB. The regulator I selected takes the already available 12VDC and outputs a nice flat 5VDC connected to the output pin headers.
  2. I eliminated the "Pulse" output since possible higher voltages aren't needed and I wanted to keep the pin header count as small as possible.
  3. Instead of having the Rx connect to an external potentiometer, I included a 50K POT on-board the High Voltage PCB. Why not.
  4. Included alternating GROUND connections on the pin header output for ease of access.
  5. Since the circuit is fairly simple, layout-wise, I made the PCB bottom-layer only for the traces. That's why the picture below only has solder mask on one side. DOH!

High Voltage Power Supply Circuit for Nixie Tubes

High Voltage Power Supply PCB for Nixie Tubes

High Voltage Power Supply PCB for Nixie Tubes

High Voltage Power Supply Circuit for Nixie Tubes

Logic Design

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).

Shift Register Logic for Time Display using Nixie Tubes

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).

Nixie Tube Clock Shift Register Circuit and Logic

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:

  1. Convert the amount of seconds into 6 (H1H0:M1M0:S1S0) integer variables.
  2. Convert these individual clock digits into a 44-bit data message to send to the shift registers. The 44 bits are sent in 8-bit chunks starting with H1 and ending with S0. You must inspect the SCH and circuit connections between the shift registers to fully understand the decimal-to-binary logic below.

RGB LEDs, Switches, and Rotary Encoder

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:

  1. The clock is ticking along normally in FREE RUNNING MODE.
  2. User presses the encoder's push button to enter USER SET MODE: rotates the encoder CW or CCW to set HOURS.
  3. User presses the encoder's push button: rotates the encoder CW or CCW to set MINUTES.
  4. User presses the encoder's push button: rotates the encoder CW or CCW to set SECONDS.
  5. User presses the encoder's push button to return to FREE RUNNING MODE.

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.

Push Button and Rotary Encoder Debouncing Circuitry

Prototyping and Breadboarding

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.

Schematic

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.

Nixie Tube Clock Circuit - Schematic

PCB

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!

Nixie Tube Clock Circuit - PCB Design

Nixie Tube Clock Circuit - PCB Design

Nixie Tube Clock Circuit - PCB

Nixie Tube Clock Circuit - PCB

Housing, Final Photos, and Thoughts

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.

Nixie Tube Clock

Nixie Tube Clock

Nixie Tube Clock

Nixie Tube Clock

Nixie Tube Clock

Nixie Tube Clock