Skip to main content

Cold Cathode Display Tubes - Nixies

A hobby project needs to be simple, so that I can sit down, stare at the circuit for a few seconds and carry on without having to read a manual and consult six data sheets, because then it feels like work.  Consequently, I found that thermionic valves make ideal hobby toys, since the circuitry necessarily has to be simple.  One can use a double handful of ICs and transistors in a hair brained design, but with tubes, two or three are the practical limit and this forces one to think carefully about what one wants to do and keep it elegant.

Here is my olde skool guitar amplifier: It works a treat.

There is nothing quite like the mystical glow of a Nixie Tube.  The Nixie is a special kind of neon lamp.  The Neon glows in space surrounding the almost invisibly thin cathode wires.  The wire itself is cold - it is the gas around it that glows and the glowing area is much wider than the wires.

A Nixie has something in common with our star, the Sun.  The sun's atmosphere is mostly made of glowing Neon above a surface crust of ferrite.  We cannot see the ferrite surface through all the glowing Neon - similar to a glowing Nixie, where the thin wires mysteriously disappear inside the glow.  

 Four Nixie Tubes with 10 Cathode Drivers

Nixies have lately become very popular amongst bored, or retired ex-hippies and their younger unemployed hipster children.  There is even now a factory for brand new super huge Nixie tubes in an old castle at Brno in the Czech Republic:

Controlling and powering a Nixie is not hard, but it requires high voltages and nowadays all electronics use very low voltages.  This causes a safety problem, as designers try to cut corners to reduce the cost of the resulting complexity.

Safety First

The web is awash with simple Nixie supply schematics that rectify the mains directly for the high voltage supply and use series capacitors to provide a low voltage supply for the silicon logic.  The argument is that since a Nixie needs a dangerous high voltage anyway, one can just as well hook it directly to the mains and since you are doing that, you can generate the low voltage the same way through a buck regulator series capacitor.

The problems with that argument is many fold:
  • The mains wiring is not guaranteed to be correct and many power plugs can be inserted any which way, so there is no certainty that a particular supply wire is Live or Neutral.  It can be either way around.
  • The mains supply is dirty.  Mains power consists of 115 or 230 Volt 50 or 60 Hz sine wave, plus a couple thousand volts of high frequency noise.  This noise will pass straight through a capacitor.
  • Without an isolation transformer, the high frequency 2 kilovolt noise spikes will run into your Arduino or Raspberry computer that you use to control your Nixie tubes.  It will run into your expensive Oscilloscope that you use to develop the electronics and it will run into your laptop computer that you use to debug the Arduino or Raspberry and if your laptop computer is on your lap, then it can also run straight into you.
So, after a little while of happy debugging - POOF!
For the cost of a replacement oscilloscope or laptop computer, you could buy a lifetime supply of little mains isolation transformers and if you don't, then your lifetime may not be very long...

A direct rectified supply is only good if the circuit is extremely simple and there is nothing else connected to it, ever.  It must be self contained in a closed box.

Power Consumption, Transformers and Fuses

Nixies do not draw much power, typically 2.5 mA @ 125 V = 0.312 Watt for a large one.

A little Arduino also does not draw much either. A Teensie 2.0 dissipates 27.3 mA 16 MHz 5V = 0.136 Watt. More modern ones draw half as much.

Therefore a widget with four tubes and one Arduino will consume 1.4 Watt or less.

You can get a tiny mains isolation transformer at Digikey or Mouser, for example the Triad Magnetics F-367P:
  • Power: 1.5 VA
  • Size: 34.93mm x 28.58mm x 28.58mm
  • Price: $10.32 
In retrospect, do get something heftier, since these little transformers blow up very easily.  I smoked two of them in no time, for no discernable reason.
Then, put a MOV (Littelfuse V10H250P) and polyfuse on the transformer (Littelfuse 250R080Z), rectify the 230V for the high voltage supply (1N4004 or 1N4007 Diodes), use a 1 uF (Self healing film, 600V AC, Kemet PHE450PR7100JR02R06L2) capacitor to feed the low voltage supply (BZX85C5V6 zener diode) and crucially, ground the secondary for safety of life, limb and test equipment.

The MOV and transformer will absorb the high voltage spikes and will ensure that your circuit will run happily for many years, without needing repairs after every thunder storm and the polyfuse will help ensure that your bad soldering will not burn your house down...

Nixie Data Sheet

The common IN8-2 looks like this:

Computer I/O Control

You can control the Nixies using DIP opto-couplers such as the Toshiba TLP627-4F, or you can use MPSA42 (for the cathodes) and MPSA92 (for the anodes) transistors - or use an opto-isolator, more costly, but simpler: 

A few high voltage DIP opto-isolator packages can be more compact, but a double handful of transistors and 10k resistors can be much more fun to wire up.  The trannies are also a little cheaper, but with this ridiculously expensive hobby, cost is not really an issue - if it is, then you got to find something else to do!

Nixie Anode Voltage, Metal Sputter and Resistors

If you start with 115 V rms AC and rectify it, you supposedly get a high voltage supply of 162 Volt DC.  However, the actual mains voltage is usually about 120 V rms and rectifies to 120 V x 1.414 = 170 V DC, which is equal to the strike voltage of a Nixie tube, so a tube can usually work off a 115 V rms mains supply, but sometimes it won't, leaving you scratching your beard.  This is why most 115 V supplies use a voltage doubler to ensure that there is sufficient tension to reliably strike the lamps.

Once lit, the resulting Neon plasma has a lower resistance and the Nixie Anode needs 125 Volt to sustain the glow and the current should then be limited to about 2 mA, to keep the electron energy to a reasonable level, otherwise metal atoms can be knocked out of the Anode, causing them to sputter on the inside of the glass, making the tube dark.  The manufacturer recommended maximum current rating for a Nixie tube is about 3.5 to 4 mA.

Therefore, a 230 V Anode supply is better and it rectifies to 230 V x 1.414 = 325 V DC (I have measured 350V DC).  At that voltage, the Nixie will definitely strike.  Note that you don't need to put a capacitor on the Anode supply:  The Nixie will happily strike and glow on each half cycle (100 Hz), which is too fast for the eye to see, so it will look like a continuous glow.

If the DC is smoothed with a capacitor, then the current limiting resistor should be (325V - 125V) / 2 mA = 100 kilohm, but if you don't use a capacitor, then you would need to use about 38 k to 47 k to get a decent average glow from a rectified unsmoothed sine wave, but then you may get some sputter and reduced Nixie life from the peak current.  High voltage capacitors (600V to 1000V and a MOV are needed to survive spikes) are expensive and bulky - so it is your call whether you want to buy a capacitor, or a cup of Starbucks coffee.

Note that common garden variety 1/4 W resistors are rated at 100 V, so the Nixie Anode resistor which will drop 200 V, should be made from two resistors in series, or it may eventually carbonize and smoke - 1/2 Watt resistors are rated at 200V.  The wattage of the resistor should be 200 V x 2 mA = 0.4 W, so use a 1 W or 2 W resistor to avoid burning a fingertip if you would touch it - a blister on a finger tip is very sore...

If you find that multiple anodes light up at the same time - ghosting - put a pull-up resistor to the anode on the offending cathodes.  A 1 M resistor may work - some happy experimenting may be required.  With neon bulbs, nothing is exact, or entirely predictable, due to wide manufacturing tolerances and the old age of the devices.

Clock PSU With Battery Backup

If you are building a hoosammawatzit with a little processor to control the Nixies, then you will find that the slightest power interruption will cause the thing to lose the time of day and resetting it every few days will get annoying in no time.

The battery needs to be a higher voltage than the logic supply for the regulator to work, but it also needs to be a lower voltage than the supply, else it will power the circuit until it is run down.  To handle this conundrum, regulate the 230 V AC from the isolation transformer secondary down to 12 V DC, put a 9 V battery with a blocking diode, then regulate that down to 5 V.

Errata: I have to upload a new PSU sketch.  The high voltage supply needs to be half wave rectified with a 470nF capacitor for a little smoothing, to be able to use a common ground with the low voltage supply.  So put a cap after the 1N4004!

Due to the high voltage, the 1M resistor should be made from two 470k resistors in series.  The buck capacitor should be Self Healing Film (Type X or X2), 600V AC, Kemet PHE450PR7100JR02R06L2, or a Ballast Self Extinguishing Capacitor, so you don't burn your house down.

It is not necessary to backup the Nixie supply - they will simply glow again once the mains power comes back, so a 9 V alkaline battery will be good for a year.

Arduino Teensie2 Clock Sketch

Here is a basic clock control routine that should get you started.  You'll have to tweak the TIMEBASE to get it reasonably accurate, but don't expect high precision from a 4 MHz garden variety crystal!

// Teensie 2 - Nixie Clock Controller
// Copyright reserved under GPL version 2, Herman Oosthuysen, 2017

// Includes for interrupt routine handlers
#include <avr/io.h>
#include <avr/interrupt.h>

// Teensie 2.0 Nixie Clock Pinout
// USB: Serial Port, ppogram and test
// Power: Gnd, +5V (next to USB socket)
// Pin 0: CATHODE1, output
// Pin 1: CATHODE2, output
// Pin 2: CATHODE3, output
// Pin 3: CATHODE4, output
// Pin 4, PWM: CATHODE5, output
// Pin 5, PWM, INT0: PWM Time Base, output, 976.56 Hz
// Pin 6, INT1: INT1 Time Base, input
// Pin 7, RX, INT2: CATHODE6, output
// Pin 8, TX, INT3: CATHODE7, output
// Pin 9, PWM: CATHODE8, output
// Pin 10, PWM: CATHODE9, output
// Pin 11, A10: CATHODE0, output
// Pin 12, A9, PWM: ANODE1, output
// Pin 13, A8: ANODE2, output
// Pin 14, A7, PWM: ANODE3, output
// Pin 15, A6, PWM: ANODE4, output
// Pin 16, A5: HOURS, input
// Pin 17, A4: MINUTES, input
// Pin 18, A3: ENTER, input
// Pin 19, A2: NC
// Pin 20, A1: NC
// Pin 21, A0: NC
// Pin 22: LED Seconds, output
// Pin 23: SPEAKER (Via 330R, 100UF)

// Example: digitalWrite(LED, LOW);  // LED on
// Example: digitalWrite(LED, HIGH); // LED off
// Example: val = analogRead(HOURS);

#define CATHODE1         0
#define CATHODE2         1
#define CATHODE3         2
#define CATHODE4         3
#define CATHODE5         4
#define CLOCK             5
#define INTERRUPT1        6
#define CATHODE6        7
#define CATHODE7        8
#define CATHODE8        9
#define CATHODE9        10
#define CATHODE0        11
#define ANODE1            12
#define ANODE2            13
#define ANODE3            14
#define ANODE4            15
#define HOURS            16
#define MINUTES            17
#define ENTER            18
#define NC1                19
#define NC2                20
#define NC3                21
#define LED                22
#define SPEAKER            23

unsigned int cathodes[10] =

unsigned int anodes[4] =

// PWM is used as a time base for the clock:
// PWM pins: 4, 5, 9, 10, 12, 14, 15
// PWM is controlled with the analogWrite(pin, value) function.
// analogWrite(5, 128);
// The value is between 0 to 256, 128 is 50% duty cycle.

// The PWM signals are created by hardware timers:
// Timer 0: Pin 5 = 976.56 Hz (1024 us)
// Timer 1: Pin 4, 14, 15 = 3921.57 Hz
// Timer 3: Pin 9 = 3921.57 Hz
// Timer 4: Pin 10, 12 = 3921.57 Hz

// Timer 0, Pin 5 is the slowest, use it for the Time Base
// and link it to Pin 6 INT1, next to it.
#define TIMEBASE    1024

// Interrupt Inputs:
// INT0: Pin 5
// INT1: Pin 6
// INT2: Pin 7
// INT3: Pin 8

// Speaker:
// Beep the speaker with the tone function.
// tone(pin number, frequency in Hz, duration in ms);
#define BEEP 440
#define SHORT 250
#define LONG 1000
// Example: tone(SPEAKER, BEEP, SHORT);

// USB Serial Port:
#define BAUD  9600

// Variables
unsigned int    hours = 0;
unsigned int    minutes = 0;
unsigned int    seconds = 0;
unsigned int    deciseconds = 0;
unsigned int    microseconds = 0;

// Initialization:
void setup()
    // Configure the USB serial port
    Serial.begin(BAUD); // The USB port is 12 Mbit/sec
    // All digital pins default to input mode.
    // Set the mode of all output pins
    pinMode(CLOCK, OUTPUT);
    pinMode(SPEAKER, OUTPUT);
    pinMode(LED, OUTPUT);
    pinMode(CATHODE1, OUTPUT);
    pinMode(CATHODE2, OUTPUT);
    pinMode(CATHODE3, OUTPUT);
    pinMode(CATHODE4, OUTPUT);
    pinMode(CATHODE5, OUTPUT);
    pinMode(CATHODE6, OUTPUT);
    pinMode(CATHODE7, OUTPUT);
    pinMode(CATHODE8, OUTPUT);
    pinMode(CATHODE9, OUTPUT);
    pinMode(CATHODE0, OUTPUT);
    pinMode(ANODE1, OUTPUT);
    pinMode(ANODE2, OUTPUT);
    pinMode(ANODE3, OUTPUT);
    pinMode(ANODE4, OUTPUT);

    // Set all Nixie outputs off
    digitalWrite(ANODE1, LOW);
    digitalWrite(ANODE2, LOW);
    digitalWrite(ANODE3, LOW);
    digitalWrite(ANODE4, LOW);
    digitalWrite(CATHODE1, LOW);
    digitalWrite(CATHODE1, LOW);
    digitalWrite(CATHODE1, LOW);
    digitalWrite(CATHODE1, LOW);
    digitalWrite(CATHODE1, LOW);
    digitalWrite(CATHODE1, LOW);
    digitalWrite(CATHODE1, LOW);
    digitalWrite(CATHODE1, LOW);
    digitalWrite(CATHODE1, LOW);
    digitalWrite(CATHODE1, LOW);

    // Set the clock PWM time base
    analogWrite(CLOCK, 128);

    // Print startup message on USB to computer screen
      Serial.println("Nixie Clock, GPL v2, Herman, 2017.");
      tone(SPEAKER, BEEP, SHORT);

// Flash each digit at 50 Hz refresh rate
// Each digit is on for about 5 ms and off for about 15 ms
#define FLASH    5   
unsigned int    a = 0;
unsigned int    digits[4];

// Main program loop
void loop()
    // Recalculate the digits
    digits[0] = minutes / 10;
    digits[1] = minutes - digits[0];
    digits[2] = hours / 10;
    digits[3] = hours - digits[2];

    // Refresh the display
    for (a = 0; a < 4; a++)
        digitalWrite(anodes[a], HIGH);       
        digitalWrite(anodes[a], LOW);

// Clock Control Interrupt Routine
// Interrupt period is 1024 us
    microseconds += TIMEBASE;
    if (microseconds >= 9999)
        // 1/10 second
        deciseconds += 1;
        microseconds -= 10000
        if (deciseconds >= 99)
            // second
            seconds += 1;
            deciseconds = 0;
            if (seconds >= 59)
                // minute
                minutes += 1;
                seconds = 0;
                if (minutes >= 59)
                    // hour
                    hours += 1;
                    minutes = 0;
                    if (hours >= 23)
                        hours = 0;
            // Once a second, flash the LED
            digitalWrite(LED, LOW);  // LED on
        if (deciseconds >= 2)
            // 200 ms flash
            digitalWrite(LED, HIGH); // LED off

This project, when controlled by an Arduino Teensie, is about as simple and low cost as I can make it.  With a little bit of additional programming, one can make the thing display the time, ring an alarm, roll the numbers, scroll, flash and go crazy every once in a while, just to break the monotony.

What I thought of recently, is to make a Grandfather Clock:
It runs fast in the morning, slow in the afternoon, nods off unexpectedly and when you disturb it (with a light sensor), it blinks and catches up quickly...

I'll wait for someone else to code that up!

Also see this for more neon fun:

- .. -- . / .. ... / --- -. / --- ..- .-. / ... .. -.. .

Have fun, but be safe!



  1. WOW just what I was looking for. Came here by searching for %keyword% craigslist des moines


Post a Comment

On topic comments are welcome. Junk will be deleted.

Popular posts from this blog

Parasitic Quadrifilar Helical Antenna

This article was reprinted in OSCAR News, March 2018: If you want to receive Satellite Weather Pictures , then you need a decent antenna, otherwise you will receive more noise than picture. For polar orbit satellites, one needs an antenna with a mushroom shaped radiation pattern .  It needs to have strong gain towards the horizon where the satellites are distant, less gain upwards where they are close and as little as possible downwards, which would be wasted and a source of noise.  Most satellites are spin stabilized and therefore the antenna also needs circular polarization, otherwise the received signal will flutter as the antennas rotate through nulls. The helical antenna, first proposed by Kraus in 1948, is the natural solution to circular polarized satellite communications.  It is a simple twisted wire - there seems to be nothing to it.  Various papers have been published on helix antennas, so the operation is pretty well understood. Therefore,

Weather Satellite Turnstile Antennas for the 2 meter Band

NEC2, 2 m band, 146 MHz, Yagi Turnstile Simulation and Build This article describes a Turnstile Antenna for the 2 meter band, 146 MHz amateur satcom, 137 MHz NOAA and Russian Meteor weather satellites.  Weather satellite reception is described here .  A quadrifilar helical antenna is described here .   Engineering, is the art of making what you need,  from what you can get. Radiation Pattern of the Three Element Yagi-Uda Antenna Once one combine and cross two Yagis, the pattern becomes distinctly twisted. The right hand polarization actually becomes visible in the radiation pattern plot, which I found really cool. Radiation Pattern of Six Element Turnstile Antenna Only a true RF Geek can appreciate the twisted invisible inner beauty of a herring bone antenna... Six Element Turnstile Antenna Essentially, it is three crosses on a stick.  The driven elements are broken in the middle at the drive points.  The other elements can go straight throug

Patch Antenna Design with NEC2

The older free Numerical Electromagnetic Code version 2 (NEC2) from Lawrence Livermore Lab assumes an air dielectric.  This makes it hard (but not impossible) for a radio amateur to experiment with Printed Circuit Board Patch antennas and micro strip lines. Air Spaced Patch Antenna Radiation Pattern You could use the free ASAP simulation program , which handles thin dielectrics, you could shell out a few hundred Dollars for a copy of NEC4 , You could buy GEMACS if you live in the USA, or you could add distributed capacitors to a NEC2 model with LD cards (hook up one capacitor in the middle of each element.), but that is far too much money/trouble for most. More information on driving an array antenna can be found here: l Air Dielectric Patch   The obvious lazy solution is to accept the limitation and make an air dielectric patch antenna. An advantage of using air dielectric, is that the antenn