Slimline SMD Bamboo IN-14 Nixie Clock

by wouterdevinck in Circuits > Clocks

24027 Views, 261 Favorites, 0 Comments

Slimline SMD Bamboo IN-14 Nixie Clock

temp_564383203.jpg

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:

Requirements and Component Selection

Clock_2016-Oct-14_06-32-51PM-000_CustomizedView7669987286.png
thickness.PNG
blockdiagram.PNG
IMG_20170124_151539.jpg
IMG_20161018_125649-.jpg
IMG_20161018_125740.jpg
IMG_20161018_130614.jpg
IMG_20161018_130114.jpg
IMG_20161018_130629.jpg
IMG_20161018_130621.jpg
IMG_20161018_125937.jpg
IMG_20161018_130651.jpg
IMG_20161219_000410.jpg
IMG_20161219_000427.jpg
IMG_20170412_225200 (2).jpg
IMG_20170412_225320 (2).jpg
IMG_20170412_225502.jpg
IMG_20161218_203804.jpg
IMG_20161218_183013.jpg
IMG_20170412_225403.jpg
IMG_20170412_225621.jpg
IMG_20170412_225827.jpg

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.

Schematic Design

main-1.png
tubes-1.png

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

Reference Description Manufacturer Part number Package Value Quantity Link
N1,2,4,5,7,8 Nixie tube (numbers) Soviet Union IN-14 - - 6 eBay
N3,6 Nixie tube (dot) Soviet Union IN-3 - - 2 eBay
U1 Microcontroller Microchip (Atmel) ATmega328P-AUR TQFP - 1 Atmel samples
U2 Real-time clock (RTC) Maxim (Dallas) DS3231 SO - 1 eBay
U3,4 High voltage shift register Microchip (Supertex) HV5622PG-G QFP - 2 Digikey
X1 Crystal oscillator Abracon ABM3 SMD 16MHz 1 Digikey
J1 Programming connector JST SM10B-SRSS-TB(LF)(SN) SMD 10 pin female 1 Digikey
J2 Micro USB connector Molex 0473460001 SMD - 1 Digikey
F1 Fuse Littelfuse 0466001 1206 1A 1 Digikey
- RTC backup battery in socket Maxell CR1220 - 3V 1 eBay (battery) eBay (socket)
DCDC DC/DC module 5V to 170V DC - Type D SMD module - 1 eBay
SW1,2 Tactile switch C&K KSS221GLFS SMD - 2 Digikey
C1,2,3,4 Capacitor Murata GRM21BR60J226ME39L 0805 22µF 4 Digikey
C5,6,9,10 Capacitor - - 0603 0.1µF 4 -
C7,8 Capacitor - - 0603 18pF 2 -
R1,2,4,5,7,8 Resistor - - 1210 27kΩ 1/3W 6 eBay
R3,6 Resistor - - 1210 120kΩ 1/3W 2 eBay
R9,10 Resistor - - 0603 4.7kΩ 2 -
R11,12,13 Resistor - - 0603 10kΩ 3 -

PCB Design and Manufacturing

register-plan.png
IMG-20161023-WA0005.jpg
IMG-20161023-WA0008.jpg
PCB-bottom.PNG
PCB-top.PNG
PCB-3D-top.PNG
PCB-3D-bottom.PNG
IMG_20161216_202439.jpg
IMG-20161216-WA0005.jpg
IMG_20161216_213404.jpg

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.

PCB Assembly

IMG_20161216_213404.jpg
IMG_20161216_224424.jpg
IMG_20161216_224414.jpg
IMG_20161216_225425.jpg
IMG_20161218_180345.jpg
IMG_20161218_183534.jpg
IMG_20161218_185628.jpg
IMG_20161218_204921.jpg
IMG_20161218_212249.jpg
IMG_20161219_000320.jpg
IMG_20161219_000754.jpg
IMG_20161219_001510.jpg
IMG_20161219_001500.jpg
IMG_20161219_001505.jpg
IMG_20161219_002829.jpg
IMG_20161219_125859(1).jpg
IMG_20161219_214323.jpg
IMG_20161219_215604.jpg
IMG_20161227_213235.jpg
IMG-20161227-WA0015.jpg
IMG_20161227_230530.jpg
IMG_20161227_230521.jpg
IMG_20161227_231019 - Copy.jpg
IMG_20161227_231049.jpg

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.

Assemble Programming Cable

IMG_20161218_180407.jpg
IMG_20161218_180414.jpg
IMG_20161218_180430.jpg
IMG_20170326_175709.jpg
IMG_20170326_173007.jpg

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

Programming and Testing

IMG_20161218_180341.jpg
IMG_20161217_184209.jpg
IMG_20161217_184324.jpg
IMG_20161217_184205.jpg
IMG_20161227_102707.jpg
IMG_20161227_111211.jpg
IMG_20161227_115502.jpg
IMG_20161218_193213.jpg

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.

Case Design and Preparation for CNC

Capture0.png
Capture1.png
Capture3.png
Capture2.png
Capture4.png
Case-top_2017-Apr-10_08-08-12PM-000_CustomizedView11825872964.png
Case-mid-top_2017-Apr-10_08-17-56PM-000_CustomizedView15020836475.png
Case-mid-bottom_2017-Apr-10_08-17-07PM-000_CustomizedView4163639556.png
Case-bottom_2017-Apr-10_08-18-37PM-000_CustomizedView10330702464.png

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).

Case CNC Machining

IMG_20170124_151529.jpg
IMG_20170124_152224.jpg
IMG_20170124_154132.jpg
IMG_20170124_154126.jpg
IMG_20170124_154837.jpg
IMG_20170124_155344.jpg
IMG_20170124_155859.jpg
IMG_20170124_162712.jpg
IMG_20170124_182856.jpg
IMG_20170124_183000.jpg
IMG_20170318_134711.jpg
IMG_20170318_134708.jpg
IMG_20170318_135141.jpg

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:

Cleaning, Glueing and Sanding of CNC'ed Parts

IMG_20170124_183005.jpg
IMG_20170126_211226.jpg
IMG_20170126_211638.jpg
IMG_20170126_212641.jpg
IMG_20170126_212704.jpg
IMG_20170126_213053.jpg
IMG_20170126_213123.jpg
IMG_20170126_213320.jpg
IMG_20170126_215646.jpg
IMG_20170126_215702.jpg
IMG_20170126_215711.jpg
IMG_20170126_215726.jpg
IMG_20170126_215744.jpg
IMG_20170129_141655.jpg
IMG_20170129_142451 (2).jpg
IMG_20170318_142723.jpg
IMG_20170318_143445.jpg
IMG_20170318_144059.jpg
IMG_20170318_221835.jpg
IMG_20170318_221838.jpg
IMG_20170318_222344.jpg
IMG_20170318_222411.jpg
IMG_20170318_223810.jpg
IMG_20170318_224921.jpg
IMG_20170319_001300.jpg
IMG_20170319_175137.jpg
IMG_20170319_175308.jpg
IMG_20170319_175345.jpg
IMG_20170319_175359.jpg
IMG_20170319_175503.jpg
IMG_20170319_180928.jpg
IMG_20170319_181257.jpg
IMG_20170319_181655.jpg
IMG_20170319_181658.jpg
IMG_20170319_194400.jpg
IMG_20170319_182655.jpg
IMG_20170319_194548.jpg
IMG_20170319_203106.jpg
IMG_20170319_222010.jpg
IMG_20170319_222032.jpg
IMG_20170319_222104.jpg
IMG_20170326_140840.jpg
IMG_20170326_142458.jpg
IMG_20170326_142512.jpg
IMG_20170326_142627.jpg
IMG_20170326_143438.jpg
IMG_20170326_145131.jpg
IMG_20170326_145302.jpg

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.

Final Assembly, Feet and Finishing

IMG_20170326_145847.jpg
IMG_20170326_150627.jpg
IMG_20170326_152654.jpg
IMG_20170331_095313.jpg
IMG_20170402_173810.jpg
IMG_20170402_173948.jpg
LRM_EXPORT_20170404_084834.jpg

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.