I'm trying to design a basic nixie clock with an arduino.
Some pictures of the setup.
The hardware consists of an 74HC595 shift register and two k155id1 for each of the nixies. The power supply for the nixies is based on the 555 timer and gives the required 170v.
The code I'm using is very basic which could be causing the problem I'm having.
int clockPin = 12;
int latchPin = 8;
int dataPin = 11;
int y = 0;
int x = 0;
int Seconds = 0;
int Minutes = 0;
int Hours = 0;
void setup() {
//Serial.begin(9600);
pinMode(dataPin, OUTPUT);
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
}
void loop() {
//Serial.println (Seconds);
//Serial.println (Minutes);
//Serial.println (Hours);
Seconds = x;
y = ++x; // counts from 0 to 59.
if (y > 59) // when seconds reach 59, Seconds go back to 0, 1 is added to minutes.
x = 1, Minutes ++;
if (Minutes > 59) // when minutes reach 59, 1 is added to hours, minutes go back to 0.
Minutes = 0, Hours ++;
if (Hours > 23) // when hours reach 23, hours rollover to 0.
Hours = 0;
digitalWrite(latchPin, LOW);
shiftOut(dataPin,clockPin,MSBFIRST, Seconds); // shifting out Seconds only.
digitalWrite(latchPin, HIGH);
delay(1000); // one second delay to make it work like a clock.
}
The program kinda works , But when the nixies try to rollover from 9 to 0 there is a 5 second delay before the next part of the counting cycle continues . The counting only reaches 39 before rolling over to 0 again. This problem does not happen when digits are viewed though the serial panel so I think it might be something to do with the shift register.
I also have a video, might give you a better idea of what I'm taking about.