How to control a Nixie Tube with Arduino

4 comments

In this tutorial, you will learn how to control a nixie tube with an Arduino.

Nixie tubes were the only way to display numbers back in the 50s, before VFD and seven segments display. Today they are highly sought after for their retro / steampunk look.

Using nixies with Arduino is fairly straightforward, but you’ll need a few exotic parts. Read on!

 

Parts needed

  • A nixie tube. In this tutorial a Soviet era IN-14 (ИН-14) is used but it can be substituted for any other tube.
  • A Nixie driver IC (KM155ID1, SN74141, 7441, etc. etc)
  • 12V power supply
  • 12V to 180V step up converter
  • A 20k resistor
  • Arduino Uno or any other 5V Arduino
  • Multimeter
  • Lots of jumper cables

 

Step 1: Getting started with a Nixie tube

Before you get started, you need to get acquainted with the Nixie tube. Each digit of the tube has an ending pin at the bottom of it. If any of these leads are connected to the ground, the digit will glow; provided the anode of the tube is supplied with with a 170V ~ 180V source of power.

You can easily locate the anode of the tube as it is generally situated at the back, and it’s structurally reinforced. This makes it very distinguishable from the other pins.

IN-14 nixie tube with the anode clearly visible
IN-14 nixie tube with the anode clearly visible

WARNING: Do not ever connect your tube between a 180VDC source and the ground. 180V is very high voltage. Always connect a current limiting resistor between the anode and your power source. 20k is a good value for the IN-14. In any case, proceed with caution!

TIP: A typical female 0.1″ jumper cable should be a tight fit around the Nixie leads, so you can use them to run your initial tube tests.

IN-14 tube connected to 0.1" female jumper cable
IN-14 tube connected to 0.1″ female jumper cable

 

Step 2: power source

For Nixie tubes, you need a 180V power source. eBay or Aliexpress should have readily available 12V to 180V step up converters.

A Nixie power supply listing on eBay
A Nixie power supply listing on eBay

These kits usually require between 12V to 24V, and incidentally 12V is a good value to power your Arduino from the barrel jack and onto the integrated 5V voltage regulator. From a single 12V power source you can therefore power both your Arduino and the Nixie, while maintaining the same ground level. 12V is a popular value for a lot of consumer electronics so chance are you have one of these wall warts hanging around in your home.

A 12V power supply salvaged from an old router
A 12V power supply salvaged from an old router

 

Step 3: The Nixie driver

Many companies produced Nixie drivers, but today they are no longer on their catalogs. That being said, you can easily find “new old stock” on eBay or any other place. These chips are 5V logic and transform a 4 bit input (0000 to 1111) into a given output pin. They are no more, no less, than a typical BCD to decimal decoder that you can buy today for 7 segment displays; except that they are built in with high voltage transistors.

k155id1 Russian nixie driver
K155ID1 Russian nixie driver

The pinout is as following:

74141 IC typical pinout
74141 IC typical pinout

 

Known nixie drivers include:

Truth table is as following:

Input Output
D C B A
0 0 0 0 0
0 0 0 1 1
0 0 1 0 2
0 0 1 1 3
0 1 0 0 4
0 1 0 1 5
0 1 1 0 6
0 1 1 1 7
1 0 0 0 8
1 0 0 1 9

 

Step 4: Putting it all together -the schematics

Connecting it all together should be an easy task. The difficulty here is the amount of wires: it’s easy to mix up input A, B, C & D of the driver chip since they are in a completely random order (A, D, VCC, B, C –who thought that was a good idea?); and the output to connect to the nixie don’t seem to make any more sense. Proceed with caution!

The complete Nixie tube schematic
The complete Nixie tube schematic

Key points on this schematic:

  • Connect Arduino pins 10, 11, 12 & 13 to the pins A, B, C & D of the nixie driver.
  • You can connect the 12V source directly on the Arduino by using the “VIN” pin and any ground pin.
  • Use the same 12V source to power the step up converter.
  • Use the 5V pin of the Arduino to power the nixie driver.
  • Don’t forget the 20k resistor on the anode of the nixie!
In real life, you might have something closer to this hot mess of wires!
In real life, you might have something closer to this hot mess of wires!

 

Step 5: uploading the code

Upload this code on your Arduino. Don’t forget to disconnect it to the 12V source first! Having two source input (from the USB and from the external 12V) might damage your Arduino.

The pins chosen (10, 11, 12, 13) are completely arbitrary and of course can be substituted by the pins of your choice.

One interesting bit about the code is the “nixieWrite” function: it transforms a decimal number into its individual bit components by isolating the bit with a bitwise and operation; then the result is shifted according to the position.

Take number 9 for instance, or 1001 in binary. The result will be:

  • D: 1001 AND 0x08 (1000) = 1000. 1000 shifted 3 bits: 1
  • C: 1001 AND 0x04 (0100) = 0000. 0000 shifted 2 bits: 0
  • B: 1001 AND 0x02 (0010) = 0000. 0000 shifted 1 bit: 0
  • A: 1001 AND 0x01 (0001) = 0001. no need to bit shift this one.

 

Wrap up

… That’s all there is to it! Nixies are fairly easy to use provided you have all the components needed and the patience to painstakingly wire everything one by one. As a single nixie requires at the very least 17 wires (10 for the digits, 6 for the driver’s input including VCC and GND, and one for the 180V anode), it can get rapidly messy.

As a matter of fact, without the IC driver it gets even more messy. You can drive nixie with high voltage transistors such as a BF259 “Bipolar (BJT) Transistor NPN 300V 100mA 90MHz 5W”; but you will need one for each digit!

That being said, there is nothing quite like this amazing orange glow; and all this work will definitely give a unique look to your projects!

 

Credits

This tutorial would not have been possible without these other great resources:

 

 

Leave a comment

Your email address will not be published. Required fields are marked *

4 thoughts on “How to control a Nixie Tube with Arduino”

css.php