My Nixie Clock Build
It’s finally done, jesus. A few years ago, I bought some electronics components from a former Eastern Bloc country. Nixie tubes are apparently still widely available over there, so since the largest line item in the order was shipping costs, I had them throw some Nixies in with the order. They sat in my parts bin until, a few months ago, I decided to make a clock out of them.
Nixie clocks aren’t exactly novel if you read the DIY blogs, and you can buy yourself any number of commercially available kits or even mostly finished clocks to simplify the build. I’m a big fan of using kits to allow you to focus on the parts of the project that interest you, and honestly designing the high voltage supply and multiplexing from scratch would probably be more trouble than I would want to go to for this project, if not beyond my abilities with electronics altogether.
But, the kludge. My issue with the available kits for this type of project are that you end up with a large box to hold the control electronics and drivers that’s all out of scale to the tubes themselves. It’s one of the giveaways that something is DIY, even if the fit and finish is quite good you end up with a finished product that’s several times as large as one would like. I wanted the final project to look like a industrial mass-produced product, one that had been found in daily service for many years. So the circuit layout is custom to fit in my enclosure, although I borrowed code and the schematic from the Arduinix project, many thanks to them for open sourcing their hardware and software.
Microprocessor control is done with the RBBB Arduino, which is a fantastic solution to embedded Arduino projects. They’re quite small, and if you buy five of them at a time they’ll cost you a mere $10 apiece. My only complaint with the RBBB design is that while there’s any number of places to tap into the 9-12V supply voltage, there’s only one pin that puts out regulated 5V supply.
I also added a real time clock to keep time when power is lost using the newly released Adafruit DS1307 kit ($9!). The number of ready-made solutions now available within the Arduino ecosystem is very impressive. Sure, you could engineer $20-30 of cost out of all of the above by building it yourself from scratch, but life is short, and I personally like to finish more than one project a year.
Even with all these building blocks, this build took me a few months to complete, mostly because of the difficulty of fitting all the parts within my chosen enclosure, and, you know, life. Since I’m using mostly other people’s design material, the most interesting part is the build process. Without further ado:
For the record, this is my preferred brand of PCB blank. I usually buy the 1/2 oz, it works just as well and it’s easier to etch. The brand they sell at Radio shack is shit, it’s this ugly brown color and it has a texture that makes it difficult to get all the copper off your etched areas. This stuff is also milspec, so that’s cool, I guess.
I used this commercial toner transfer product for the first time, and it works much, much better than any paper I’ve ever used. Well worth the $1 a sheet. I’m still figuring out the heat setting for the iron, however– it has a much lower fusing point than standard inkjet toner, and I’m having trouble with the traces smudging. The same company also makes also a foil that seals the copper, and a stencil product. I haven’t tried those, but I’m curious about them. Shout out in the comments with your experience. [update: the sealer foil is great, pick up some of that as well. Man, my PCBs look so good now that I started using this stuff]
Another protip I recently figured out– brushing the etchant onto the board with a sponge works a lot better than the dunk and slosh method. Also uses less etchant. The part on the left covered by the tape is where the time set controls ended up, I got impatient and etched the board before I had them fully designed.
Testing the high voltage supply. Yes, that’s 180V DC. I kept shocking myself on the high voltage parts throughout the project, but by luck more than skill didn’t kill the microprocessor due to short circuiting. You can see my Arduino Duomilanove in the background, which I use all the time to produce 9V and 5V DC for testing purposes. Final voltage was 165V on my IN-4 Nixies.
About this time the sockets arrived from the Ukraine, with love. I usually work by designing one part while building another, and trying to order parts just before I need them so that I know all the parts I need and I don’t have to place two orders. Sometimes that means painting yourself into a corner, but it keeps things lively and if I waited until the project was completely designed and thought out to begin building, I’d never start anything.
Assembling the sockets. Each socket has 11 (tiny) wires, times two ends, times six sockets total. Then I had to redo them with shorter cables, because all that cable wouldn’t fit in the enclosure. You know how Sartre imagines hell as this tiny room full of tiresome people, forever? I can do him one better.
First test of the socket. One thing to know about if you’re using the Arduinix as your reference design: it does not include the necessary 10KΩ current limiting resistors on the anode pins. I can see why they did it this way, but I think it needs a big stupid warning on their literature. I came very close to burning up my supply and/or a tube because I did not realize that crucial point until it was almost too late. So that’s why I have a resistor soldered on to the socket, instead of the main PCB where it belongs.
About this time the enclosure for the project finally arrived, from Really_Lethargic_Shipper_87 on ebay. It’s some kind of toolbox from the early 20th century. The right enclosure can make a project and the finish and size were perfect, exactly what I had in mind. I carefully cleaned off some but not all of the ingrained dirt and put a coat of polyurethane on it to fix the patina.
Uh Oh. It was at this point that I realized that I had been optimistic about how much space was needed. The seller had been nice enough to send me the interior dimensions of the box. But, while on paper a 8 7/8 x 1 7/8″ x 7/8″ deep interior dimension was large enough to contain everything, in practice I found that I desperately needed another 1/8″ of depth. Also, bad day story: The box is old and very brittle, and so the very first hole that I tried to drill in the lid split the entire lid in half. I regret the intemperate nature of my ensuing remarks. Fortunately, it glued together really cleanly, and you can’t even see the seam. I added some wood strips on the back of the lid to reinforce it, though.
I removed 1/4″ wood backing on the box with a dremel and wood chisels, and replaced it with 1/8″ plex. The fasteners are dollhouse hinges that I drilled the pin out of and replaced with stainless steel clevis pins. I wanted the sliding lid type of box for aesthetic reasons, but I knew ahead of time that I might have to figure out another way to get at the innards for servicing. As it is, the lid slides open just enough to reach the time set controls.
The power jack. The mounting bracket was milled down from a spare piece of angle iron. I think if my left hand was replaced by a dremel, that would really be just fine. Also, a tip: Goodwill is great for power supplies. They have a bin of them, $2 a pop. It’s getting harder and harder to find ones that aren’t 5V, though.
Here I took a break. To do two shows and some other projects, which I’ll post up eventually.Serendipity! In the meantime, the DS1307 breakout board was released by Adafruit. It connects to the Arduino via I2C, so only two wires. It will keep the time for up to five years if power is lost, and is somewhat more accurate than the crystal found on the standard Arduino board, and much more accurate than the oscillator used on the RBBB. And it just fit within my enclosure. The board was initially unresponsive, and I spent at least a week troubleshooting it until I finally figured out that I2C on the Arduino is done on *analog* pins 4 and 5, not digital pins 4 and 5. Facesmack, but I think the support pages on arduino.cc and adafruit could be a bit more forceful on this point.
Controls: The trim pot is to set the high voltage, which runs from about 140V up to 190V. I’ve got mine trimmed out to about 165V. The switches are:
- Time set: Shows hours only, minutes only, seconds only, and then restores to regular time display. I tried using the external interrupts for this because I thought it would simplify coding, but with all the switching high voltage it ended up being very unreliable. Hey Internet, how do you fix that? I’m thinking it’s something clever with a resistor and capacitor, but I’m not sure exactly what.
- Time Increment: increments hours, minutes, or seconds, whichever is displayed currently.
- Time Decrement: as above, but –.
- Spare switch: something I’ve learned to put into my designs. I was thinking that it would be a display blank, because I was worried about the clock being really bright, but it’s not an issue in my current apartment. I’m planning to re-program it as a cathode exerciser, i.e. cycle through all ten numbers in turn, to prevent cathode poisoning.
The final assembly. I used dental floss to do the cable lacing, because cable ties were too bulky. It had the added benefit of making the enclosure smell minty fresh, instead of something unspecific but foul.