Nixie Clock

Introduction

I got inspired by a 10 year old kid who made his own Nixie tube clock with his dad. And i really liked how it looked and if he could do it, i should be? So i looked at his post, and it was not really explained how he made the clock. So i started digging, i could do without use of the shift registers, but it shouldn’t be easy. Basically you can divide my project into smaller parts: 5v supply, 170v supply, controlling the shift registers/tube drivers. Since i liked using eagle i was limited with free ware to 8 x 10 cm of space. A in-14 tube has a radius of 9 mm and it wouldn’t fit on 1 PCB. That is why this is a modular design with 2 tubes on a tube board. Also it is designed it are 3 exactly the same boards so you can order just one batch of PCB. The main board houses the raspberry pi zero, RTC, 5v supply, 170v supply, headers for the power supply and the 3 tube boards.

Setup

  • Raspberry Pi Zero
    • OS
    • Power supply
    • WiFi
    • Under glow
    • Clock code
    • Start after booting
    • Real Time Clock
  • Self designed Main board PCB
    • 5v Power supply
    • 170v Power supply
  • Self designed Breakout PCB
  • In-14 Nixie tubes
  • Case
  • Photos

 

Raspberry Pi Zero

OS

I used Raspbian Jessie lite for this project and a 4GB micro sd card i still had laying around.

Power supply

The Raspberry pi zero is powered by an LM 2940 CT 5v on the Main board and connected by the GPIO. No extra Power adapter is required.

WiFi

For getting the correct time we use a WiFi module with NTP. When the clock is Powered off or in case of a power loss, the clock uses a RTC backup. When the it is powered back on, it will have the RTC time. I used a Raspberry pi B board to setup the WiFi settings with putty over a LAN cable.

Under glow

The plan is to make a sort of Cherenkov radiation around the Nixie tubes. The Raspberry pi controls 1 transistor for the LED under glow which can be programmed on or off.

This is the code i use to power the transistor, which switches on the 6 background led.

import RPI.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(17,GPIO.OUT)
print "Backlight on"
GPIO.output(17,GPIO.HIGH)

To turn it off, i use the top command and kill the python process. to remove it permanently from startup follow the same steps above and add a # in front of the line.

Clock code

The code is Originally from smbaker with some adjusting for 4 or 6 tubes

@ Github

Start after booting

Crontab is the easiest way to schedule python scripts in my eyes at boot.

Sudo crontab -e

Add at the bottom

@reboot python /home/pi/ledon.py &
@reboot python /home/pi/clock.py &

Now reboot the Raspberry pi, and the clock and back light will be on after boot.

Real Time Clock

I integrated a RTC on the Board to maintain the correct time after a loss of power. It consists of a DS1307, a Crystal and a cr1220 battery . The Choice for a cr1220 is because it is a tiny 3.3v battery and lasts around 2 years.
Enable i2c

sudo raspi-config

lets see if the raspberry sees the real time clock.

sudo i2cdetect -y 1

Now there should appear UU or 68.

Edit now /boot/config.txt and add.

dtoverlay=i2c-rtc,ds1307

Remove the fake-hwclock.

sudo apt-get remove –purge fake-hwclock

Now we check what the status is off the time.

timedatectl status

If you need to enable ntp.

timedatectl set-ntp true

If you need to write time towards rtc

sudo hwclock -w

 

Main board PCB

mainboard schematic v2.1png

The main board is supplied by a 9v, 1A Power adapter Plug size 5.5/2.1.
It supports 2, 4 and 6 Nixie tubes.

The 3 data lines towards the shift registers are being pulled down to GND to make sure the tubes always display a 0, when not being used.

5v Power supply

There is an on board LM 2940 for 5v for the Raspberry pi and the other components what require a 5v power supply. The circuit has a few capacitors to keep the voltage ripple to a minimum.

170V Power supply

This circuit is based on a simple boost converter with a lm555.

Source

 

Breakout board

 

Tube board v2.1

v2.0

Make sure that you check how the tubes and shift registers work before modifying or drawing your own PCB. Otherwise you might end up with the reversed digits like 94 instead of 49 like me. In the version 2.0 board schematic, this is all addressed.

In-14 Nixie tubes

Bought on Ebay, Make sure the seller has a good reputation.

Case

Made a 3D model in sketchup and used 3dhubs.com to print my case. I designed my case for the v1.x test boards. The v2.x PCB boards have different dimensions. but i will show you mine for an idea.

The Design is @ Github. I used the dimensions in eagle cad for reference.

 

Photos

IMG_2315

3 thoughts on “Nixie Clock

  1. Dag Thijs, Great story! I built a similar clock using Scott Bakers Python code. HH:MM:SS displays just fine, but a testpattern of e.g. “123456” shows up as ” 3456″ with the first 2 digits missing. How’s that in your clock?

    • Thanks for the reply, now i should definitely update this page a bit and add more photos.
      I just checked it here, and it works. Are the tubes showing 00 or nothing at all?
      It is really strange that the clock code works and the static, test program doesn’t.

      • As adviced by you I exchanged the shift register IC with a spare one. I was sceptic but it worked! (I had before that remounted the first IC in its socket which did not work). Maybe the reason why the clock code worked: that code is far from static. Thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s