Introduction: Slimline SMD Bamboo IN-14 Nixie Clock

Every electronics hobbyist has to build a nixie clock at some point, right? This Instructable walks through the process of designing and building one from scratch based on six Soviet IN-14 tubes of over forty years old.

A video of the finished clock in operation:

Step 1: Requirements and Component Selection

Basic requirements

There are a lot of nixie clocks out there and a lot of them are based on the IN-14 tubes. I wanted to design my own for the sake of designing my own, but also had some specific requirements:

  • Make it as small and thin as possible. A lot of the clocks out there have very bulky bases.
  • CNC a nice case out of bamboo. Because I like bamboo and wanted to get some use out of my little desktop CNC machine.
  • No RGB leds under the tubes. I hate those.
  • Single spin of the PCB, no prototypes. I wanted this to be a relatively quick project. This meant using a microcontroller and RTC I have used before, heavily borrowing from proven designs and using a pre-made power supply to limit the risk of having to iterate the board.

I would also have liked to design everything on the board myself, including the high voltage power supply, but getting any kind of switching step-up converter right on the first go without doing a separate prototype first seemed too risky. I went with a module instead.

High voltage warning

Nixie tubes require high DC voltages to strike and drive the segments. This clock uses 170V DC and the power supply can deliver a few Watts.

THIS HIGH VOLTAGE IS DANGEROUS AND CAN BE LETHAL. DO NOT TOUCH ANY PART OF THE BOARD DURING OPERATION. Seriously.

Main component selection

For a complete BOM, see the next step.

  • Nixie tubes: Six IN-14 tubes for the digits and two IN-3 tubes for the dots
  • Microcontroller: Atmel ATmega328 microcontroller @16MHz with small Abracon SMD crystal
  • Real Time Clock: Maxim DS3231 with integrated TCXO
  • Tube drivers: Two high-voltage Microchip HV5622 shift registers. Total of 64 bits, of which 62 are used (six times ten for the digits plus two for the dots)
  • Power supply: The entire board is powered from a micro USB connector. All digital logic (microcontroller, RTC and shift registers) is powered straight from the USB 5V volt line. The tubes require 170V DC, which is generated from the 5V line by an off-the-shelf DC to DC converter module.

Design

  • To keep the base as thin as possible, all SMD components were used on the bottom of the board. This keeps the top of the board entirely flat (other than the tubes), so it can sit flush against a thin layer of bamboo covering it.
  • The transformer on the power supply module is the highest profile component. The module was selected to be as thin as possible.
  • The base was designed to be built using thin layers of bamboo (three times 3.2 mm and one time 1.6 mm, total thickness ~11 mm) that can be machined by a small desktop CNC machine.

Step 2: Schematic Design

EDA software

The schematic and PCB were drawn in Altium CircuitMaker, which can be downloaded for free from http://circuitmaker.com.

Project link: https://workspace.circuitmaker.com/Projects/Details/Wouter-Devinck/Nixie

Schematic overview

Microcontroller section (sheet 1)

The ATMega328 is supported by a minimal of external components, including an Abracon 16 MHz SMD crystal oscillator. Two momentary push buttons are connected to two GPIO pins. For programming and serial console, ICSP and UART are connected to a female JST connector.

Real time clock section (sheet 1)

The DS3231 RTC chip does not need an external crystal for time reference, since it has a precision one built in. It connects to the microcontroller over I²C. A 3V battery keeps the clock running even if main power is disconnected.

Power supply section (sheet 1)

5V from the micro USB connector goes through a fuse and a few ceramic capacitors and then supplies the the digital components and the step-up DC/DC converter module. The enable pin of this module is connected to a GPIO on the microcontroller, which allows the software to enable or disable the 170V supply.

Shift registers & tubes (sheet 2)

The chain of two shift registers connects to the microcontroller using five GPIOs. Together, both chips form a 64 bit shift register. The 62 relevant segment cathodes of the nixie tubes are connected to the outputs of this this shift register, which leaves two pins unused. The anodes of the nixie tubes are connected to the 170V line through 1/3W current limiting resistors.

Bill of materials

ReferenceDescriptionManufacturerPart numberPackageValueQuantityLink
N1,2,4,5,7,8Nixie tube (numbers)Soviet UnionIN-14--6eBay
N3,6Nixie tube (dot)Soviet UnionIN-3--2eBay
U1MicrocontrollerMicrochip (Atmel)ATmega328P-AURTQFP-1Atmel samples
U2Real-time clock (RTC)Maxim (Dallas)DS3231SO-1eBay
U3,4High voltage shift registerMicrochip (Supertex)HV5622PG-GQFP-2Digikey
X1Crystal oscillatorAbraconABM3SMD16MHz1Digikey
J1Programming connectorJSTSM10B-SRSS-TB(LF)(SN)SMD10 pin female1Digikey
J2Micro USB connectorMolex0473460001SMD-1Digikey
F1FuseLittelfuse046600112061A1Digikey
-RTC backup battery in socketMaxellCR1220-3V1eBay (battery)eBay (socket)
DCDCDC/DC module 5V to 170V DC-Type DSMD module-1eBay
SW1,2Tactile switchC&KKSS221GLFSSMD-2Digikey
C1,2,3,4CapacitorMurataGRM21BR60J226ME39L080522µF4Digikey
C5,6,9,10Capacitor--06030.1µF4-
C7,8Capacitor--060318pF2-
R1,2,4,5,7,8Resistor--121027kΩ 1/3W6eBay
R3,6Resistor--1210120kΩ 1/3W2eBay
R9,10Resistor--06034.7kΩ2-
R11,12,13Resistor--060310kΩ3-

Step 3: PCB Design and Manufacturing

Routing strategy

  • The PCB was designed to be small and symmetrical, i.e. have the tubes centered horizontally and vertically.
  • Void spaces between the hours and minutes and between the minutes and seconds were used to place the large-ish TQFP shift registers.
  • Routing of traces between the shift registers and nixie tubes was carefully planned out (see first image) and was done first (see second image).
  • The top of the pcb (side of the tubes) was left empty. Other than the tubes, no through-hole components were used.
  • Size: 15 cm by 4 cm (~ 6" x 1.5")

Manufacturing

Many manufacturers have affordable offers for manufacturing a two layer PCB of this size, most of them in China. I went with dirtypcbs.com, but cannot recommend them, since quality issues made assembly harder. I'd recommend going with seeedstudio.com (China) or oshpark.com (USA) instead. For cosmetic reasons, a chose to add the following options:

  • Black soldermask, since some of it will be visible through the cutouts in top of the case and through the glass of the tubes.
  • ENIG: gold plating of all exposed copper, including some decorative circles and edges on top of the PCB

Even with these options, these boards were very cheap: 35 USD for ten boards including shipping to Belgium.

Routing errors

The silk screen & footprint of the RTC backup battery had positive and negative inversed. This was fixed by filing one of the two plastic mounting pins flush with the bottom of the battery holder and rotating it 180 degrees. This has been fixed in the PCB design in CircuitMaker.

Spacing between the high voltage traces and the ground plane -and spacing between high voltage and low voltage sections in general- is less than ideal. Anyone wanting to make their own clock based on this PCB design is recommended to fork the project on CircuitMaker and to at least increase spacing between HV and ground to decrease leakage across the board.

Step 4: PCB Assembly

Board assembly and first power-up

Since this was a newly designed and untested board, is was assembled, powered-up and tested in multiple steps:

Microcontroller

The USB connector, fuse and input capacitors were soldered first, establishing 5V power to the board. Next, the ATMega and its supporting components and programming connector were soldered. The micro in TQFP package was soldered using solder paste and hot air, but using the drag solder method would have worked just as well. At this point, the board was powered up for the first time, the bootloader was programmed into the microcontroller and a serial hello world program was loaded for testing. See the next steps for details.

RTC & switches

Next, the RTC chip with its supporting components and battery holder were added. The two push buttons were soldered at the same time, since they are in the same area on the board. Quick tests were added to the test firmware to confirm the RTC and switches were functional.

Shift registers

Then, the two shift registers were soldered.

High voltage

The DCDC module was soldered, the micro was programmed to pull the enable line and then the HV line was measured with a multimeter and confirmed to be around 170V DC. From this point onward extreme caution is required while the board is powered up.

Nixie tubes

Finally, the tubes and their resistors were mounted and tested one by one. The test firmware was modified to shift some testing data into the shift registers to enable one segment on every tube. A simple block of wood was used to align the tubes during soldering.

Cleanup

After assembly, the board was cleaned using a bath of isopropyl alcohol (IPA) and a toothbrush. This step is not only cosmetic since flux residue increases leakage across the board.

High voltage warning

Nixie tubes require high DC voltages to strike and drive the segments. This clock uses 170V DC and the power supply can deliver a few Watts.

THIS HIGH VOLTAGE IS DANGEROUS AND CAN BE LETHAL. DO NOT TOUCH ANY PART OF THE BOARD DURING OPERATION. Seriously.

Step 5: Assemble Programming Cable

Custom programming & serial cable

Since the 10-pin JST used as a programming connector has a custom pinout, a custom programming/serial cable is required. The pictures show the details & see schematic sheet 1 in step 2 for the pinout. This cable connects the board to two USB devices:

  • USB to serial adapter

Step 6: Programming and Testing

Bootloader

The usbasp programmer was only used to program the Arduino bootloader onto the microcontroller and to set the right fuses. This was done using avrdude on the command line (see screenshot). Once the bootloader was programmed, all further programming was done over the serial connection.

Software

Software was written in C++/Wiring using the Arduino IDE. Some functions of the Arduino core were used. As shown in the pictures and indicated in step 4, programming the software was already started during assembly of the board to test the partially assembled board in multiple steps. All code is available on GitHub: https://github.com/wouterdevinck/nixie

Features

The firmware on GitHub supports the following features:

  • Get time from the RTC and display it, flash the dots once per second
  • "Slot machine" effect, cycling through the numbers once an hour to prevent cathode poisoning
  • Simplistic European automatic DST-adjust
  • Using the push buttons to adjust the clock
  • Serial menu to adjust clock etc.

Step 7: Case Design and Preparation for CNC

Layers

The body is constructed using four thin layers of bamboo. These layers were designed to be machined by a small desktop CNC mill/engraver. The top layer has a pocket for the PCB to sit in and cutouts for the pairs of tubes and for the dots. The next two layers have cutouts for the components on the bottom of the board. The bottom layer is a simple flat piece without cutouts and can be cut out of thinner material to keep the total thickness down.

CAD/CAM software

Autodesk Fusion 360 was used for both the 3D design and for defining the machining steps (CAM). After defining the CAM steps (e.g. 2D contour, 2D pocket), G-Code was generated for the the CNC machine. Also, a machining simulation was done and 3D renders of all layers were generated using cloud rendering (see last four images).

Step 8: Case CNC Machining

Machining the layers

Four pieces of bamboo were cut out using a hand saw and bolted to the bed of the CNC machine one by one to be machined.

A video of machining the top layer:

Step 9: Cleaning, Glueing and Sanding of CNC'ed Parts

Cleaning & sanding the layers

When the layers come of the CNC machine, they still require some cleanup. I used a Stanley knife, some sanding paper and some elbow grease to clean all four parts.

Gluing

The bottom four layers were glued together to form one solid base piece.

Screws

The top layer (including PCB in recess) is mounted to the base using four small black hex cap screws. Four small holes were drilled through the top layer using the holes in the PCB to locate their position. These holes were countersunk from the top.

Sanding

An unpopulated PCB was placed in the case before screwing it together. This allowed sanding the complete case flush using increasing grits ranging from 150 to 600.

Cutouts

Finally, the cutout for the USB jack was shaped and two small holes were carved out to allow setting time using a pin to press the push buttons.

Step 10: Final Assembly, Feet and Finishing

Finish

The completed case was finished using boiled linseed oil.

Feet

Four rubber feet were glued to the bottom of the case to slightly lift it of the table, which looks a lot better.

Final assembly

Before screwing the case together one las.

Comments

author
Satine007 (author)2017-07-24

I love this build so much but I have four important questions: What was the overall cost to make this? How much time did you spend making this? Was this a dangerous project or have any precautions and warnings? And is there a way to code it so after 12:00 pm it goes to 1:00 pm? (Im guessing you can but I'm new to engineering and coding; Im only 14). I also suspect you're from Europe because of going from 12:00 to 13:00. Thank you so much! ?

author
pzwanepoel (author)2017-07-18

Very nice build.

Though is there a glitch in the matrix, in the video, there are 29, 30, 31... 33, 34 etc.. and the counter stayed for two counts then the next time it goes around after panning from the hours to the seconds at the end of the video there was the elusive 32.

Just a small observation.

author
wouterdevinck (author)pzwanepoel2017-07-18

Good catch! This has been fixed in the software on GitHub a few days ago.

author
putyn (author)2017-07-17

nice work, i would have put the screws on the bottom so the top would be clean - but this motivates me to stop procrastinating and finish my own nixie clock :D

IMG_20170413_072249.jpg
author
DavidM1444 (author)2017-07-16

It would be nice to know approx current / power consumption ?

author
wouterdevinck (author)DavidM14442017-07-16

I have never measured it, but the datasheet says 2.5 mA / segment. That means about 3 Watts for the entire thing. This is my back-of-the envelope estimate. Might at some point cut a USB cable in halve and actually measure it though... :)

author
DavidM1444 (author)wouterdevinck2017-07-16

Thank you. For measuring USB device current/power I really recommend something like this:

http://www.ebay.co.uk/itm/OLED-USB-3-0-Charger-Capacity-power-Current-Voltage-Detector-Tester-Meter-Mobile-/172265554973 I find it invaluable. No need to cut the cable!

author
LesB (author)2017-07-16

Nice project, but from a cursory look it seems to have the same weakness as the ice cube clock I built. It uses a crystal oscillator as the timekeeping standard. Nice as it is, I have found the ice cube clock to be annoying because it drifts off the real time. The irony is that the AC line is available and could be sampled for use as the standard, but that was not done, and may not be possible with the control IC they used.

https://www.instructables.com/id/Ice-Cube-Clock-3/

author
xyzmonitor (author)2017-07-16

By the way in 1972 That was my final year project to build from discreet components much easier now but all the bits I still have them may be when I have time will rebuild again now at age of 70.

cheers

author
fjanon (author)2017-07-16

Great projet, nice design. Thanks for sharing!

author
klauson (author)2017-07-13

great Project. very nice. where did you bought your cnc mill? are you happy with it?

author
wouterdevinck (author)klauson2017-07-14

It is the cheapest kit I could find on AliExpress about a year ago. It's an older version of this kit with some modifications: https://m.aliexpress.com/item/32661950881.html
It is limited in capabilities but useful for engraving (e.g. PCBs) and for small projects like this.

author
klauson (author)wouterdevinck2017-07-14

that's great. I think that's the machine i'm looking for. Making PCBs and other light work is just the right thing. What's about the accuracy of the machine?

author
cmorda (author)2017-07-12

Beautiful design! Thank you for sharing your talent!

author
inconceivable1 (author)2017-07-11

thats impressave

author
leomiranda (author)2017-07-11

Great! Nice and clean. Sad that it is missing to share more details (program and PCB files).

author
wouterdevinck (author)leomiranda2017-07-11

Sorry about that! Something went horribly wrong during publishing and most of the text was gone. I have restored the right version and now the things you were asking for should be there!

author
noch2017 (author)2017-07-11

good DIY

About This Instructable

10,718views

191favorites

License:

More by wouterdevinck:Slimline SMD Bamboo IN-14 Nixie ClockAquarium standWordclock
Add instructable to: