In a previous tutorial, I showed how to control a Nixie tube with an old IC driver.
This tutorial will be very similar, except it uses typical BJT transistors. With this method, you actually do not need exotic parts.
Parts needed
- A nixie tube. In this tutorial I will demonstrate how to use a IN-14 (ИН-14) Soviet era tube, but any other tube with similar characteristics will work just fine: IN-12 (ИН-12) and IN-3 (ИН-3) for instance.
- High Voltage NPN Transistors: MPSA42, or its surface mount cousin MMBTA42
- 170~180V Nixie Power Supply
- 10 to 20k resistors (x10) for the transistor bases
- 15 to 20k resistor to act as a current limit for the nixie tube
- An Arduino compatible board (Arduino Uno, Nano, ESP8266 Arduino, etc. etc.)
- 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. Of course, that is provided the anode of the tube is supplied with ~170 to 180 volts. This “ignition voltage” differs for each tube but is generally in this range.
You can easily locate the anode of the tube, as it is generally situated at the back. A wide white structure reinforcement should be visible. This makes it very distinguishable from the other pins.

WARNING: Do not ever connect your tube between a high voltage source and the ground. 170V+ 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.

Step 2: Power Source
For high voltage I will use my trusty 170V power supply that I designed. It takes 5 to 15V as input and generates the 170V needed for the tubes.

Feel free to use a cheap eBay alternative, but if that’s the case I’d recommend using 12V as input. Low quality nixie power supplies may claim they work directly from 5V, but the reality is that often the power supply is pushed to its limit and would probably not last very long.
For a single tube, a solid USB connector (5V / 500mA) is safe enough. If you plan on connecting any other tubes, you should use a bench power supply and gets a higher current, or use something beefier (5V / 2A for instance).
Step 3: The transistors
The transistors used in this tutorial need to have a Vce (Voltage Collector Emitter) above the 170V mark to be safe. In practice, 300V transistors are extremely common and so we will be used these. Numerous semiconductors companies produce them and they can be found under various names. The most common names are MPSA42 and KSP42. Cheap Chinese copies also exist since the design of this transistor is so ubiquitous.

Just be careful of the pinout; depending if the transistor is facing you or not.

To use these transistors, we simply ground the emitter, and connect the collector a tube’s digit lead (cathode). The arduino then controls the base. If the transistor is turned on, we effectively ground the cathode; which in turns light up the selected digit. It’s as simple as that!
Step 4: Wiring it all together and schematics
A lot of wiring is needed to make this work.

Key points:
- Don’t forget the 15 to 20k resistor between the high voltage and the tube’s anode.
- Connect Arduino pin 2 to the tube’s 0 digit, Arduino pin 3 to tube’s 1 digit, etc. etc. all the way to Arduino pin 11 matching the tube’s 9 digit.
- If using 5V, connect power source to “5V” on the Arduino
- If using 12V, connect power source to “Vin” on the Arduino

Step 5: Arduino code
The code below is a simple counter from 0 to 9. At 0, we turn on pin 2 and turn off all other pins. At 1, we turn on pin 3 and turn off all other pins, etc. etc.
int nixie_pins[10]; //Array holding all our pins //function that translates a 0-9 digit into which pin to turn on/off void displayDigit(int digit){ for(int i=0; i<10; i++){ if(i == digit){ digitalWrite(nixie_pins[i], HIGH); } else{ digitalWrite(nixie_pins[i], LOW); } } } void setup(){ //Define all our pins as output and add them to array //This could be dramatically shortened with a for loop, //but this verbosity exposes in a simpler way what we //are achieving. pinMode(2, OUTPUT); nixie_pins[0] = 2; pinMode(3, OUTPUT); nixie_pins[1] = 3; pinMode(4, OUTPUT); nixie_pins[2] = 4; pinMode(5, OUTPUT); nixie_pins[3] = 5; pinMode(6, OUTPUT); nixie_pins[4] = 6; pinMode(7, OUTPUT); nixie_pins[5] = 7; pinMode(8, OUTPUT); nixie_pins[6] = 8; pinMode(9, OUTPUT); nixie_pins[7] = 9; pinMode(10, OUTPUT); nixie_pins[8] = 10; pinMode(11, OUTPUT); nixie_pins[9] = 11; } void loop(){ //Count from 0 to 9 for(int i=0; i<10; i++){ displayDigit(i); delay(500); } }
Conclusion
That’s all there is to controlling a tube! Of course, since we need 10 IO for a single tube, it gets rapidly impractical. This is why the 74141 BCD decoder was invented: you reduce needed pins from 10 to 4.
You can do even better though: by using 74595 bit shifters, you only need a 3 pin SPI connection to control as many pins as you need. This principle has been applied in my serial nixie driver design.
6 thoughts on “How to Control a Nixie Tube with Discrete Transistors and Arduino”
Hi Tony, have you checked what is PWM frequency can be used to dim the tube with that MPSA42 transistors? With 20K resistor and TLP627 + K155ID1 (which are still produced https://integral.by/ru/products/ttl-seriya-k155-ekf155/k155id1) I only able to reach stable 60Hz. If frequency gets higher say 100 Hz – there is an effect of spurious blink of adjacent digits ( usually i see that digit 2 blinking – my tube has smallest current on digit 2). Also reference soviet design for in12 – used 30K resistor. I found that for in14 using 40K will almost work except digit 2 and 3 that only partially glowing.
Hello Eugene,
I haven’t tried to PWN these transistors myself. That being said if you’d like to PWM the tube I’d go with a design slightly more robust than a simple transistors. This driver: https://github.com/drkmsmithjr/RpiNixieBarGraphHat/blob/master/KC_NixieBargraphHat/NixieBargraphHat.pdf for a IN-9 tube for instance is a good design. These are bargraph tubes and the display changes according to current.
Hi,
I’m trying to control IN-16 Tube using the MPSA42 transistor, but the problem is, that the transistor act like a normal wire. I mean, the ground is always connected to emitter irrespectively of the state of the base input. Have a look at this photo:
https://marek.helion.pl/tmp/mpsa42nixie.jpg
However , when I’m connecting a LED using the same transistor it behaves correct – I mean, the diode lights up only when there is +3.3V on the BASE.
Maybe the voltage is to high for this transistor?
thx for any hint 🙂
You are connecting only two pins. You need to follow the diagram. A transistor cannot work with a pin left floating!
Hi Tony, what pins can i use with arduino nano? Can analog and digital be combined?
Any is fine. Pins only source a minimum amount of current.