Driving two Nixie tubes with an Arduino via a shift register and two SN74141s.
You will need the following:
An Arduino development board of some type. I'm using a Freeduio from NKC Electronics
Two IN-12b nixie tubes with sockets (I found some on eBay)
Two SN74141 BCD chips (or the Soviet equivalent; K155ID1, also from eBay, see above)
One SN74HC595N shift register (very common, e.g. Adafruit)
A high voltage power supply for the Nixie tubes (I used this one, see the picture)
A 12 volt power supply for the high voltage power, I used a 12 volt wall wart.
Two current limiting resistors, one for each Nixie tube. I used a 1 watt 4.7 kohm.
A breadboard and some jumpers

Step 3: Setting up

Driving two Nixie tubes with an Arduino via a shift register and two SN74141s.
You'll want to place the shift register in the middle of the breadboard and the two 74141 chips on either side of it. I've added a mounting spot to my breadboard to hold the Arduino. It just needs to be close by.
Assemble the high voltage (HV) power supply per its directions. The ground for the HV supply needs to be common to the Arduino and the rest of the circuit. Keep the HV line away from the normal five volt power line or bad things will happen. Please read all of the warning associated with your HV power supply and remember that this is enough voltage to hurt you.

Step 4: Wiring the Nixie tubes

Driving two Nixie tubes with an Arduino via a shift register and two SN74141s.
On the bottom of the Nixie tube socket each of the leads is numbered. Solder 4-6" leads on to each of these connections (you can ignore pin 12 as it does not get used). Note that the socket has a notch in it near pin one.
Identify pin one on the Nixie tube. Looking at the top of the tube, the number 3 will be on top. Pin 1 is at about 5 o'clock when holding the Nixie tube with the digit 3 upright. On my tubes this pin was painted white to differentiate it.
Place the Nixie tube in the socket so pin 1 is near the notch in the socket.
Connect the 11 leads in order to 11 rows of the breadboard near one of the 74141 chips.
Repeat for the second Nixie tube.

Step 5: Wiring the chips

Driving two Nixie tubes with an Arduino via a shift register and two SN74141s.
There are a lot of jumpers that need to be wired. The diagram above shows the connections. The D inputs on the left refer to connections to the digital pins of the Arduino. I used the Vcc and ground pins on the Arduino to power the Vcc and gnd busses on the breadboard. Note that all three chips need 5 volt and ground connections.
I chose to use jumpers to connect to open slots on the breadboard and then connecting those slots to the Nixie tubes. Alternatively you could simply connect the leads from the Nixie tubes directly to the output pins on the 74141 chips.
Pin 1of each Nixie tube is the HV anode, do not connect this to anything yet.
Note that the number on each of the green lines adjacent to the chip is the pin number for that chip. Note that they are usually not in order so your wiring will look a lot more complicated than this diagram. (see here for determining pin numbers).

Step 6: The code

The code is designed to simply make sure that everything is working. All it does is count from 0 to 99 and displays these values on the nixie tubes. The byte sent to the shift register is actually two four bit segments that tell each 74141 chip what number to light up. Because of this, each of the possible 100 outputs is a distinct binary number. Taking advantage of this I calculated the decimal equivalent of each of those 100 bytes and set up an array that converts the decimal 0 - 99 value to the appropriate byte. Thus, all one needs to do is to provide the code with a two digit number (the variable 'x') and it will be displayed.
I've included some serial.print commands to make sure it's all working.

/* a sketch to drive two nixie tubes using two SN74141 BCD chips and a single SN74HC595N shift register
developed from the tutorials on Adafruit.com and arduino.cc
the sketch will cause two nixie tubes to count from 0 to 99 but you can change it to create any two-digit number and have the nixie tube display it
Jeff Glans 2013
Released into the public domain

*/
//set up the pins for communication with the shift register
int latchPin = 8;
int clockPin = 12;
int dataPin = 11;
int x; //create a counting variable


// create an array that translates decimal numbers into an appropriate byte for sending to the shift register
int charTable[] = {0,128,64,192,32,160,96,224,16,144,8,136,72,200,40,168,104,232,24,152,4,132,68,196,36,164,100,228,20,148,12,140,76,204,44,
172,108,236,28,156,2,130,66,194,34,162,98,226,
18,146,10,138,74,202,42,170,106,234,26,154,6,134,70,198,38,166,102,230,22,150,14,142,78,206,46,174,110,238,30,158,1,129,
65,193,33,161,97,225,17,145,9,137,73,201,41,169,105,233,25,153};


byte nixies = 255; //initiate the byte to be sent to the shift register and set it to blank the nixies

void setup(){
pinMode(latchPin, OUTPUT);
pinMode(dataPin, OUTPUT);
pinMode(clockPin, OUTPUT);
Serial.begin(9600);
}

void loop(){
nixies = 255; // create a blank byte
updateShiftRegister(); // send the blank byte to the shift register
delay(500);


for (x = 0; x nixies = charTable[x]; // translate into a byte to send to the shift register

updateShiftRegister(); //send to the shift register
delay(500);

Serial.print("x = ");
Serial.println(x);
Serial.print("nixies = ");
Serial.println(nixies);}
}
//the process of sending a byte to the shift register
void updateShiftRegister(){
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, LSBFIRST, nixies);
digitalWrite(latchPin, HIGH);
}
Driving two Nixie tubes with an Arduino via a shift register and two SN74141s.
shift_nixie_2.zip1 KB

Step 7: Make sure it's working BEFORE connecting the high voltage line

A simple test will be to load the code into your Arduino and use the serial monitor to make sure it's doing what you expect. This won't really tell you anything about the 74141 output however. What I did was connect 10 LEDs to the output pins of each 74141 to 5 volts through a 100 ohm resistor. If you do this, what you should see is one set of LEDs counting the ones digits and the other counting the tens digits. You can also use a multimeter to make sure each of the output pins is being pulled low periodically, which is a bit more tricky and not as graphical as the LEDs.
Once your convinced it's working as expected it's time to connect up the juice (make sure you remove the LEDs first as they can provide a route to ground for 180 volts).

Step 8: Connecting up the HV to the Nixie tubes

Driving two Nixie tubes with an Arduino via a shift register and two SN74141s.
I found the hard way (by burning up two 74141 chips and one ATMega328 chip) that some high voltage supplies need a current limiting resistor. If you use the power supply I did a 4.7k ohm 1 watt resistor should work well. Some power supplies have built in limiting resistors. If you can't tell, it's better to be safe than sorry.
Connect the HV power lead to each of the anode pins (pin 1) through the current limiting resistor. DANGER: this is pretty high voltage, make sure you know what you're doing!
I found the best way to do this was to have the Arduino sketch already running but with the HV power supply unplugged. Connect the HV line to the Nixie tubes before plugging in the HV power supply. Double check all your connections and then plug in the power supply. This will minimize shock to the system as it takes a bit for the power supply to come up to power. Reverse the procedure to power down.
At this point you should see the two Nixie tubes counting from 0 to 99.

Step 9: Troubleshooting

Are the Nixie tubes lit at all?
-If not, are you sure they're getting power? Measure the voltage to pin 1, it should be at least 150 volts.
Are the tubes lit but not counting?
- if all the numbers are lit you probably have a ground fault somewhere.
- if only one number is lit but not changing check the serial monitor to make sure the code is running properly
Are the numbers not counting up correctly?
- make sure you have the connections from the shift register to the 74141 in the right order
 
 

Tag cloud

make build easy simple arduino making homemade solar laser printed portable cheap mini building custom cardboard wooden create super lego turn paracord chocolate your paper light intel