Nixie clock: 2 – the driver

by luca

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:

[youtube id=”4KGUjLeXVUc” width=”600″ height=”350″]

Related Posts


Kevin Saturday June 16th, 2012 - 12:42 PM

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 Monday June 18th, 2012 - 08:22 AM

Hi Kevin,

could you please post the full error you get?

Kevin Monday June 18th, 2012 - 02:11 PM

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 Monday June 18th, 2012 - 07:26 PM

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!

Kevin Monday June 18th, 2012 - 07:47 PM

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

luca Tuesday June 19th, 2012 - 11:43 AM

Hi Kevin,

did you get the same error?

Kevin Tuesday June 19th, 2012 - 01:07 PM

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 Tuesday June 19th, 2012 - 01:47 PM

Kevin, you’re welcome! 😉

KomandanteKrull Sunday May 12th, 2013 - 11:41 PM

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 Monday May 13th, 2013 - 09:44 AM


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

Nat Victor Thursday May 23rd, 2013 - 02:57 PM

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 Thursday May 23rd, 2013 - 07:16 PM

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

Nat Victor Friday May 24th, 2013 - 11:36 AM

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 Saturday May 25th, 2013 - 09:22 AM

Hi Victor,

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

Dan Tuesday June 4th, 2013 - 02:35 PM

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 Wednesday June 5th, 2013 - 04:20 PM

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?

Dan Friday June 14th, 2013 - 04:44 PM


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)

Cant Wednesday March 12th, 2014 - 03:32 PM

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 Saturday March 15th, 2014 - 10:24 AM

Ciao Cosimo, purtroppo non so dirti: uso Eagle.

holmes. Tuesday May 27th, 2014 - 12:37 PM

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 Tuesday May 27th, 2014 - 12:59 PM

Hi Olly,

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

holmes. Wednesday May 28th, 2014 - 10:57 AM


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 Wednesday May 28th, 2014 - 08:32 PM

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)

Anthony Monday February 16th, 2015 - 03:12 AM

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 Monday February 16th, 2015 - 10:02 PM

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

Andrea Thursday February 25th, 2016 - 07:48 PM

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

luca Thursday February 25th, 2016 - 08:09 PM

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

Andrea Thursday February 25th, 2016 - 08:25 PM

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

luca Friday February 26th, 2016 - 07:58 PM

collegali insieme

Ardjan Saturday August 27th, 2016 - 02:15 PM

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 Wednesday September 14th, 2016 - 08:24 AM

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 Thursday September 15th, 2016 - 05:58 PM

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 Comment

nineteen − 6 =