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
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
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
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
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
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:
MicrocontrollerThe 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 & switchesNext, 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 registersThen, the two shift registers were soldered.
High voltageThe 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 tubesFinally, 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
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:
- AVR programmer: a usbasp: http://www.fischl.de/usbasp/
- USB to serial adapter
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.
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.
- Top (3.2 mm): http://a360.co/2oSdS47
- Middle - top (3.2 mm): http://a360.co/2oSaXbX
- Middle - bottom (3.2 mm): http://a360.co/2okmxuJ
- Bottom (1.6 mm): http://a360.co/2oS3r0K
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
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
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
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.