Nixie Tube Shift Register Not Working

Hello,

Following this tutorial, I have tried to get the shift registers + 1 driver to count up from 0-99, but no matter how many times I wire it up and flash code, one tube always has all of the numbers lit up at once, and I have absolutely no clue on how to continue.
I am pretty much a beginner to most of this stuff, and I have succeeded in using just the driver chip to control one tube.

Here is the code:

/*  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 = 14;
int clockPin = 12;
int dataPin = 27;
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<100; x++){ // count from 0 to 99
    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);
}
  

Any help is appreciated, thank you.

Show an as-built schematic (what is in front of you, not a screenshot/copy from somewhere else). Hand-drawn is ok.

1 Like

When you post your annotated schematic I expect to find all the part numbers on it as well as links to technical information on them. show all connections, power, ground and any other parts connected to the circuit. If you want to use CAD (Computer Aided Design) software KiCad as well as many others are free for the download. Some are trial some are complete such as KiCad.

This is not code. Don't put it inside code tags!

your sketch is working as expected.

Sorry about that.

This is the setup that I based off this youtube video from the tutorial. I removed the Nixies from the setup for an easier view.


I have the +5V connections all connected to a 5V rail with 10k ohm resistor, with ground being similar, and for the Nixie tubes a ~170V anode with 30K ohm resistor. The blue, yellow, and green wires are connected to the microcontroller as the latch, clock and data.

Thank you.

Which board are you using? The tutorial shows a Uno.

If the voltage is too high (in excess of 170v) then the clamp diodes in the sn74141 chips cut in and this can cause all the digits to light. You could also swap the sn74141 chips over to see if the problem moves to the other side.

I'd trouble shoot this by starting with only one nixie tube and one sn74141 chip and forget the shift register. Connect the 4 inputs of the sn74141 directly to 4 arduino pins and use a very basic sketch to set the pins to various combinations of BCD values to see if you can get digits to display in the tube.

Even if you do keep the shift register, the code could be much simpler. At the moment there is one array element for each combination of 2 digits (100 in all). That does not scale up well. A 4 digits counter would need 10,000 elements. Your board anyway probably has 8 free pins so the shift register is not necessary.

EDIT

I have just raked through that "Instructable" and found this schematic which could be close to the one you are following:

It could be also that a bad ground connection on an sn74141 may cause the phenomenon of all digits glowing. Anyway, if the problem is only on one side, keep swapping parts until the problem moves to the other side.

1 Like