'minimal' Nixie tube clock

Status
Not open for further replies.

zike

Member
Here's a very simple clock display idea, if you already have a surplus digital counter. I like Nixie tube counters, like this HP5216A. It has a "totalize" function where it just counts input transitions, and also a TTL "reset" input on the back. Pull reset low briefly to clear the counter, then send an n-pulse burst where digits of n form the time as 'hhmmss' (so in the pic it is showing 19:36:11, or 7:36:11 pm). Teensy 3.5 is overkill here, anything with a realtime clock will work. I added an NPN transistor to do the reset (and inverted the pulse correspondingly), although it would probably work OK without that.

Here is a video (also showing T3.5 scope clock from another thread).

DSC_1118.jpg

The code is very simple:

Code:
/*
   clock display on antique frequency counter
   (e.g., HP 5216A)
*/
#include <TimeLib.h>
#define pulsePin 14             // to counter input
#define resetPin 37             // to counter reset 
#define ledPin 13
elapsedMillis r = 0;            // update timer

void setup() {
  Serial.begin(9600);
  setSyncProvider(getTeensy3Time);
  pinMode(pulsePin, OUTPUT);
  pinMode(resetPin, OUTPUT);
  pinMode(ledPin, OUTPUT);
}

void loop() {
  long nout = 0;
  if (r > 1000) {
    r = 0;                          // reset update timer
    digitalWrite(resetPin,  HIGH);  // send reset pulse to counter
    digitalWrite(ledPin,    HIGH);
    digitalWrite(resetPin,  LOW);
    delay(30);                      // delay to re-arm after reset pulse
    nout  = 10000 * hour();         //  230000
    nout += 100 * minute();         //    5900
    nout +=       second();         //      59
    if (0)  nout = 235959;          // (for testing)
    for (long p = 0; p < nout; p++) {
      digitalWrite(pulsePin, HIGH);
      digitalWrite(pulsePin, LOW);
    }
    digitalWrite(ledPin, LOW);

    if (1) {                        // (diagnostics)
      Serial.println(nout);
      printTime();
    }
  }
}
/*

*/
time_t getTeensy3Time() {
  return Teensy3Clock.get();
}
/*

*/
void printTime() {
  Serial.print(hour());
  Serial.print(":");
  if (minute() < 10) Serial.print('0');
  Serial.print(minute());
  Serial.print(":");
  if (second() < 10) Serial.print('0');
  Serial.print(second());
  Serial.println("\n");
}
/*
   FIN
*/
 
Last edited:
Nice simple project. There is something magic about Nixie tubes.

Now the next advance would be to build some interface to pickup the Radio Time Signals! (WWV, DCF77, MSF60...).
 
It could be more economic if the counter was just incremented with 1 pulse per second and the reset/full recounting cycle would only happen once per minute to update the hour and minute display.
 
It could be more economic if the counter was just incremented with 1 pulse per second and the reset/full recounting cycle would only happen once per minute to update the hour and minute display.

Very nice idea! Although I wonder if "economic" is quite the right word... maybe "serene?"

(BTW the blinking is also much less obtrusive since you folks helped me speed up the pulses, thanks for that help as well!)

Nice simple project. There is something magic about Nixie tubes.

Now the next advance would be to build some interface to pickup the Radio Time Signals! (WWV, DCF77, MSF60...).

Advance, or retreat? ;^) I'd been thinking of a GPS module... but you're absolutely right, in fact a 60 kHz WWVB decoder would be more in keeping with the theme. A good Teensy project, too.
 
Status
Not open for further replies.
Back
Top