Tiny Nixie Clock

Hey kids, that's 250000 volts! (Careful!)

Tiny Nixie Clock Project

You can reach me at fred.niell@gmail.com

That's delicate! Maybe I shouldn't use the torch...


Tiny Nixie Clock

A tiny clock?
After the success of my first clock, I decided to make a second 6-digit clock and give it to a friend as a wedding gift. But after that, I had run out of tubes. I ordered some Russian-made IN17s from www.LEDSales.com and decided I wanted to try my hand at a much smaller clock. I had it in mind that I would make a clock that would run reliably from batteries, but as the crunch for minimizing development time loomed, I settled on just designing and building a smallish clock, as opposed to an exceptionally small clock. I had intended to enter it into the www.altoids.com case-modder's contest, but didn't finish it in time (missed by less than 40 hours- grrr). Thus, the Tiny Nixie Clock was born.

These nixies are of course Russian in origin, so I needed some help understanding some of the more strange specs on the spec sheet. I employed the translating powers of a good Ukrainian friend from college. Initially, the "flowing discharge tube" didn't make any sense until he looked in the microelectronics section of the dictionary...

So the clock itself uses Maxim MAX6921 VFD driver chips to handle the cathodes. They work with a nice 4-wire serial interface. The only problem was that I had a PIC16LF84A on hand, which doesn't have a simple shift register on board for easy serial communication protocols. So that made coding a little difficult (thus missing the deadline...). In order to keep the final size of the clock down, I used SOIC-flavored ICs in this project. I've worked with SMT chips before professionally, so I knew soldering down something as large (relatively speaking) as a 18-pin and 28-pin SOIC would be no problem at all.

The next trick was the HV PSU. In the interest of time I just stuck with the traditional MAX771 circuit and junkbox parts. That made the development time drop to zero, as I had used one before. I used a 200uH 3A inductor, and an IRF640 as the switching element. The low ESR caps came from switching supplies. Also, since I didn't have any surface mount passive components on hand, I just went with thru-hole components. This allowed me to use scavenged/found components almost exclusively. The surface mount packages in this design were from sample requests.

I also decided that for this project, I had finally outgrown having to etch my own boards. I started using ExpressPCB's software and express service. So that is why there's no solder mask on these boards in the photos. The guys at ExpressPCB just added a nice groundplane functionality to their software, which was what (in my opinion) was keeping it from being a really useful tool. But now, their software and services are really good. The boards I got back were excellent- well made, correctly plated vias- just excellent all around. And boy was it nice not to have to pour Ferric Chloride...

Building the Nixie Tube Clock

As I mentioned, this clock uses custom PCBs. The clock itself uses two small PCBs, one display board with the nixies and the MAX6921s, and one main board with the PIC and the HVPSU. The boards from ExpressPCB were done in the "miniboard" service option level, so no panelization below the 3.5''x2.5'' rectangle. So I had to cut them out with the Dremel cutoff wheel and a steady hand.

Here is my Pic Micro .asm Assembly Code for the clock. If you're looking for well-thought out, well-reasoned code, this is not the place to find it. There's probably some unused variables still floating around in there, and the usage of memory blocks is deplorable. Not to mention the hacked-together binary-to-bcd-to-serial-cathode-position EEPROM & table lookup hack. Just nasty. But it works. Timing comes from a version of Roman Black's modified Bresenham "error-free" 1-second algorithm. Basically, it loads a pseudo-24 bit register with 38579545/8 = 447443Hz = 0h6D3D3, and divides it down to 1-Hz with the internal prescale and subtraction. Each time the timer overflows, 256 is decremented from the large register. When it overflows, the remainder is kept, and 0h6D3D3 is added to the result, and the 1-second flag is pulled. The mainline code then updates the time registers when the 1-second flag is thrown. Thus, error from one second to the next is carried, resulting in an overall stable 1-second interval after the first.

In order to keep the current draw down, the display is effectively multiplexed, even though the drivers are latched and could be a direct-drive display. Basically, 360 times a second, the two driver chips are loaded with 20 serial bits each. A "0" in any bit position of the 20 bits grounds the corresponding output pin. In practice, I load the chips with all "1"s except for one of the nixie's cathodes. The next time I load the chips, 2.7ms later, I load the next nixie's cathode position, and "1"s for all the rest. In this way, each nixie's display is on for about 2.7ms, then the next digit, then the next, etc. That way, only one nixie is on at a give time, and the overall current draw is reduced. The display is plenty bright, even in this modified pulsed manner. The current through the tubes is still only 0.3-0.4mA and the display remains readable.

Since I was in a rush, I threw everything onto one page of schematics. So, it might be a little bit cluttered, but so what? You can still read it. Just click the image for a more readable version.
This page has everything on it. There is a rough division between the top and the bottom of the schematic, reflecting the separation between the display board and the main processing board. The two switches on the left are for setting the time. The lone switch in the middle is to turn the HVPSU enable on or off. The HVPSU is on the right, and has a standard lineup, as mentioned. The upper half of the schematic includes the driver chips and the headers used as the nixie locations.

Picture gallery

This is the layout of the assembled clock.

This is the clock displaying 11:32PM. Note the quarter in the scene for scale

This is the display board with the SOIC driver chips. This is the whole board, being cut down into the two PCBs. The Dremel turned out to be perfect for the job

Here is the display board showing 11:28PM. The light cast through the tubes looks nice as a shadow on the paper.

Here's the clock in it's case. The case itself started life as a little nautically-themed display box. I removed the display and put the Tiny Nixie Clock into the box. The only major modification I had to do was to secure the glass to the inside cover of the box. The clock is quite securely held by hot glue.

The box is mahogany, and has a really pretty grain to it. The box is 4.5'' square, and 3'' deep. So far, it's keeping time quite well, and not too much heating or anything. Interestingly, the inductor is a little warm to the touch, and the nixies themselves are a little warm, but nothing else in the box is making any heat.

-Fred Niell

Design, text, programming copyright 7/2005 Fred Niell