Nixie clock: 2 – the driver

luca 08/12/2011 32

In this second post about my Nixie clock, I’m going to show you how to drive those tubes with a microcontroller.

Current limiting resistor

Every Nixie tube is characterized by two voltage values:

  • ignition voltage (Vign)
  • maintaining voltage (Vm)

and by one or more current values:

  • average/peak numeral current (Ik)
  • average/peak decimal point current (Ikdp)

You can find all these values on Nixie’s datasheet:

The typical schematic is the following:

The formula for calculating resistor R value is:

And the power dissipated is:

If I apply previous formulas to my Nixie values I get:

  • (for numerals) R = 12Kohm and P = 0,075W
  • (for decimal point) R = 60Kohm and P = 0,015W

In my clock I won’t use the decimal point, so I choose a 12Khom 1/4W resistor.

Discrete transistor driver

You can’t directly drive a Nixie with microcontroller’s output PINs: each Nixie cathode not connected to ground is at a voltage near to Vm.

The simplest solution is to use a transistor and connect its base to a microcontroller PIN.
Not every transistor is able to sustain the high collector-base voltage (Vcbo): the most widely used one is MPSA42, which – as you can read on its datasheet – sustains a Vcbo of 300V.

The schematic is very simple:

The disadvantage of this approach is that you need a transistor for each cathode, so if your nixie clock project uses 4 Nixies, you need about 40 transistors.

Integrated circuit driver

In the past, some integrated circuits were produced to drive Nixie tubes; the most widespread ones are 7441, 74141 and their russian “clones” K155ID1KM155ID1 – you can still find them on eBay. These ICs are called bcd-to-decimal decoder to drive nixie tubes and have 4 input PINs (A/B/C/D) and 10 output ones (0..9).

Their function is very simple: if you send to input PINs a number (0 to 9) in binary form, the corresponding output PIN is set high. All the input-output states are listed as a “truth-table” in the datasheet:


I wrote a simple Arduino sketch that ouputs on 4 digital PINs (D8-D11) numbers from 0 to 9 binary-coded, with an increment every second and goes back to 0 after 9.
Note: to change all the PINs at the same time, I don’t use digitalWrite() fuction but I change PORTB register directly as explained here.

void setup() {
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);  
void loop() {
  for(int i = 0; i < 10; i++) {
    PORTB = i;

I connected 74141 input (A/B/C/D) PINs to Arduino and the output ones to Nixie cathodes. Power supply (5V) for 74141 comes from Arduino, while Nixie is supplied by the power supply shown in the previous post with a 12Kohm resistor:

Here’s the working circuit:


  1. Kevin 16/06/2012 at 12:42 - Reply

    I tried to compile the short sketch in Arduino v1 and 022 but keep getting “lt” error. As you might of guessed i’m new to the Arduino. What am i doing wrong.

    • luca 18/06/2012 at 08:22 - Reply

      Hi Kevin,

      could you please post the full error you get?

  2. Kevin 18/06/2012 at 14:11 - Reply

    Hi Luca,
    I get the following error:
    ‘lt’ was not declared in this scope

    sketch_jun18a.cpp: In function ‘void loop ()':
    sketch_jun18a:12: error ‘lt’ was not declared in this scope
    sketch_jun18a:12: error: expected ‘)’ before ‘;’ token
    sketch_jun18a:12: error: name lookup of ‘i’ changed for new ISO ‘for’ scoping
    sketch_jun18a:12: error: using obsolete binding at ‘i’
    sketch_jun18a:12: error: expected ‘;’ before ‘)’ token

    Also I would like to thank you for your guide to SeeedStudio’s Fusion PCB Service. It has made the process of sending suitable board files so much easier, and I’ve been very pleased with the results.

    • luca 18/06/2012 at 19:26 - Reply

      Hi Kevin!

      sorry it was my mistake… something went wrong with copy&paste, now the sketch is fixed and you should be able to run it without problems!

      Thanks for your feedback!

  3. Kevin 18/06/2012 at 19:47 - Reply

    Hi Luca,
    I tried the new code but it still would not compile. I used both Arduino v1 and 022.

    • luca 19/06/2012 at 11:43 - Reply

      Hi Kevin,

      did you get the same error?

  4. Kevin 19/06/2012 at 13:07 - Reply

    Hi Luca,
    Not sure what went wrong works now with v1. Thank you you have been a great help to someone just starting out with Arduino’s.

    • luca 19/06/2012 at 13:47 - Reply

      Kevin, you’re welcome! ;)

  5. KomandanteKrull 12/05/2013 at 23:41 - Reply

    Hi, I have a questio about the circuit schematic.

    Where must go the ground cable of the 180V power supply?

    In the schematic, there is only 1 cable connected to the power supply. Is not missing the ground cable of the power supply?

    • luca 13/05/2013 at 09:44 - Reply


      connect the ground of the power supply to the ground of Arduino and 74141 IC.

  6. Nat Victor 23/05/2013 at 14:57 - Reply

    hi, I have your circuit & sketch running but I’m not seeing an 8 displayed, just a pause. I’ve checked the tube and it works ok & tried 2 74141 IC’s

    Any ideas?

    • luca 23/05/2013 at 19:16 - Reply

      Hi, are you using the same power supply I used? Did you connect the ground wire?

  7. Nat Victor 24/05/2013 at 11:36 - Reply

    Hi, ground is connected and 0,1,2,3,4,5,6,7,9 all work, just the eight missing.
    Its a different power supply from
    I may try playing with the anode resistor – I didn’t have a 12k so used a 10k instead.

    • luca 25/05/2013 at 09:22 - Reply

      Hi Victor,

      sorry I misunderstood your message… is 8 working if you connect it directly to power supply, without 74141?

  8. Dan 04/06/2013 at 14:35 - Reply

    Hey Luca,
    Nice post. I’m trying to follow it to test out my nixe tube setup. before I build a nixie clock.
    Everything works for a bit, but then I have problems.
    Maybe you can help me out?

    Here is my dilema:
    When I wire everything, it all works for about 10-30 seconds.
    I get my nixie tube to display digits 0 to 9 in a loop. All nice so far.
    But after about 30 seconds it either gets stuck at 7, completely goes out, or displays almost all digits at the same time. The only way to fix the situation is to go to a new nixie IC driver. I already tried 3 new ICs, think of Einsteins theory of insanity: doing the same thing over and over again and expecting different results. LOL!
    I have a strong feeling that I’m burning nixie drivers. Besides for that on my third attempt with a new driver I think I have burned my arduino mini (it just overheats any time I plug it in USB, so I declared it dead…)

    I’m using this power supply
    and wiring everything just like in your diagram.
    I have used a multimeter to see how much voltage comes out from this power supply to power arduino and IC, its a constant 5 – 5.5V

    Any help on how I can test nixie IC drivers that I might have burned, to see if I really burned them or if they are still alive?

    I’m more or less a newbie with all of this. Hope my questions are not too lame.

    Any thoughts or ideas?

    • luca 05/06/2013 at 16:20 - Reply

      Dan, be sure you used the power supply to power ONLY the nixie tube, not Arduino or the driver: they need 5V (for example power Arduino via USB and the driver using Arduino outputs). Could you send me a drawing of a photo about how you wired the different elements?

  9. Dan 14/06/2013 at 16:44 - Reply


    Sorry it took me a while to respond.

    My power supply comes with ports-out for +5v, +12v, +180v, Ground.

    I was using power supplys +180v to power the nixie anode.
    I was using power supplys +5v and Ground to power arduino and drivers.

    Here is a very rough sketch I made with Fritzing.
    I could not find some parts in Fritzing library and didn’t want to draw them from scratch, so I just took similar looking things (Magic Eye Power Supply, K155ID1, Nixie)

  10. Cant 12/03/2014 at 15:32 - Reply

    Ciao Luca,
    sto cercando in giro librerie Altium per il MAX1771 per farne un alimentatore step up DC-DC e poi alimentare una valvola.
    Sai dirmi se tale libreria si trova?
    Grazie dell´attenzione,
    buon pomeriggio

    • luca 15/03/2014 at 10:24 - Reply

      Ciao Cosimo, purtroppo non so dirti: uso Eagle.

  11. holmes. 27/05/2014 at 12:37 - Reply

    Hi Luca,
    I’m getting a error saying PORTB was not declared in this scope, sorry I’m all new to this and not sure what this means?

    thanks, olly.

    • luca 27/05/2014 at 12:59 - Reply

      Hi Olly,

      strange, I’ve just tested the sketch and I can compile it. Which version of the Arduino IDE are you using?

      • holmes. 28/05/2014 at 10:57 - Reply


        the version is 1.5.6 -r2 to work with my Arduino DUE. It’s annoying because your work has helped me a lot with my HNC college project (Nixie Clock) the theory is there I just wanted to get something built and running even if its not a clock! but time is not on my side so i’ll have another play with the code after work to see what can be done.

        thanks, olly.

        • luca 28/05/2014 at 20:32 - Reply

          Olly, maybe direct port manipulation is not allowed for Arduino Due.
          Anyway the code can be easily changed to use the “normal” commands: in the for() loop use something like:
          switch(i) {
          case 0:
          digitalWrite(8, LOW);digitalWrite(9, LOW);digitalWrite(10, LOW);digitalWrite(11, LOW);
          case 1:
          digitalWrite(8, HIGH);digitalWrite(9, LOW);digitalWrite(10, LOW);digitalWrite(11, LOW);
          case 2:
          digitalWrite(8, LOW);digitalWrite(9, HIGH);digitalWrite(10, LOW);digitalWrite(11, LOW);
          case 3:
          digitalWrite(8, HIGH);digitalWrite(9, HIGH);digitalWrite(10, LOW);digitalWrite(11, LOW);
          (and so on)

  12. Anthony 16/02/2015 at 03:12 - Reply

    Hello, I have your circuit up and running but my nixie is only displaying odd numbers. Any idea why that might be? I have tried 5 of the IC chips that I had and still the nixie counts down 9, 7, 5, 3, 1. I have everything wired like yours. The nixie is not defective because I checked that each digit lights up.

    • luca 16/02/2015 at 22:02 - Reply

      Hi Anthony, are you using the same Nixie I used? It’s strange, the chip just “convert” the input value setting one pin high to light up a particular number of the tube

  13. Andrea 25/02/2016 at 19:48 - Reply

    Ciao, per la resistenza calcolata è opportuno usarne una per ognuno dei nixie?

    • luca 25/02/2016 at 20:09 - Reply

      sì, meglio resistenze separate anche per poter eventualmente adattare la luminosità delle varie nixie

      • Andrea 25/02/2016 at 20:25 - Reply

        Ti disturbo per un ultima cosa, il GND del power supply lo collego a quello dell’arduino o lascio le le masse separate?

        • luca 26/02/2016 at 19:58 - Reply

          collegali insieme

  14. Ardjan 27/08/2016 at 14:15 - Reply

    Ciao, sai per caso come poter controllare la luminosità delle nixoe? Devo provare ad aumentare la resistenza oppure devo usare il pwm?
    Il problema con il pwm é che non so da dove iniziare purtroppo. Io dispongo di relè che possono commutere 170 vdc, nel caso posso usare anche quelli.
    Graize mille.

    • luca 14/09/2016 at 08:24 - Reply

      Ciao, devi usare il PWM ma i relay non commutano abbastanza in fretta: transistor per attivare le nixie con un microcontrollore che invia il PWM, o in alternativa qualcosa tipo questo.

      • Ardjan 15/09/2016 at 17:58 - Reply

        Ciao, grazie per la risposta. Posso usare un pin dell’arduino per il segnale pwm? Io ho 8 nixie, un transistor può bastare o sarebbe meglio disporre un transistor per ogni nixie?
        In alternativa al circuito che hai linkato posso usare questo ->
        Il circuito usa un condensatore da 12v ma io sono riuscito a reperirlo di 16v. Va bene lo stesso?
        Scusa per tutte queste domande e grazie in anticipo.

Leave A Response »

This website uses cookies to ensure you get the best experience on our website maggiori informazioni

Questo sito utilizza i cookie per fonire la migliore esperienza di navigazione possibile. Continuando a utilizzare questo sito senza modificare le impostazioni dei cookie o clicchi su "Accetta" permetti al loro utilizzo.