Design files for this project can be found here
For the longest time now, I’ve wanted to build myself a Nixie tube clock completely from scratch. Building one isn’t easy though given the various barriers to entry: the high cost of Nixie tubes ($10-$50 each), high voltages for driving the tubes (~170V), designing the PCB, the desire for an nice enclosure that isn’t made out of laser cut acrylic.. All together, it meant that I didn’t have the time and resources to put towards this project until now.
Since I anticipate that I’ll be actively working on this project over the next 8-12 months, this post will not have the usual changelog at the top. Instead, I’ll be slowly appending my progress to this post along with any useful info I find.
- Nixie tubes, IN-8 for first revision
- Compact metal enclosure (CNC’d steel/brass)
- RTC with backup battery
- Sunrise projection lighting
- AC powered (wall transformer)
- Capacitive touch snooze button
- Tactile configuration buttons (CNC’d)
- HH:mm (4 tubes + separator)
- Dimmable brightness
Features Under Consideration:
- GPS for automatically setting time/location
- Audio via surface transducers on bottom
- OLED/VFD front display
- Custom sockets for easy tube replacement
- Motion/light sensors
- Current-controlled drivers
- AM/PM indicator
- Wireless connectivity (unlikely)
- Battery powered via 18650 (unlikely)
Nixie tubes come in two orientations, side view (IN-8/IN-14/IN-18) and end view (IN-12/IN-17). A few good sites for comparing different tube models: Dieter’s Nixie World site has both side and end views from a variety of different manufacturers, Steampunk Alchemy’s site has pictures on soviet models and others, and Sphere Research’s Nixie Tube site has pictures on a large number of models as well.
Soviet tubes looks to be widely available on eBay, and is thus likely a better choice since it’ll be cheaper and easier to replace parts. Non-soviet tubes are roughly the same price for similar display sizes but have different digit shapes at the cost of being rarer. A quick comparison of common soviet tubes available on eBay (shipping adds +$10):
IN-17 — side mount, 9mm height, ~$4 each
IN-12 — side mount, 18mm height, ~$1.5 each (IN-12B has a left dot, IN12-A does not)
IN-14 — vertical mount, 18mm height, ~$4 each, long leads, has a fine grid version, pointed taper at the top
IN-8 — vertical mount, 18mm height, ~$10 each, flatter top compared to IN-14
IN-8-2 — same as IN-8 but with longer leads, has an alternate version with a much smaller grid
IN-18 — vertical mount, 40mm height, ~$50 each, huge but expensive
For a clock, you’ll also need a divider of some sort between the digits. Similar to Nixie tubes, there are neon bulbs that operate at a similar voltage with a similar color output. These bulbs are available in both side view (IN-3/IN-29) and end view (IN-6/IN-24/IN-28) variations. Neon bulbs are inexpensive compared to Nixie tubes due to their size, and can be found on Ebay in much larger quantities for cheap (10¢ for an IN-3). Note that TH4B/TH5B/MTH-90 models, while commonly advertised as Nixie tubes, are actually Thyratron tubes used for switching and rectifiers.
For initial testing, a small high voltage power supply with a variable voltage output of 85-235V was used. The supply voltage was set at 170V and a 15k ohm resistor was used to limit the current to a safe level. The voltage drop measured across the resistor came out to be around ~37V, which corresponds to a ~133V drop across the tube and a drive current of ~2.5mA as the Nixie effectively short-circuits once the tube is ignited. The complete turn-off voltage was sightly lower than the voltage drop at ~124V. These values varied slightly between tubes, but not enough to really cause a difference in overall brightness. The ideal values for driving these tubes is unknown since the seller didn’t supply a datasheet, but most resources listed an anode voltage requirement of 170-200V and an ideal cathode current of 2.0-3.5mA for IN-8 tubes.
The interesting observation here is that the tubes exhibits a large voltage drop while simultaneously acting as a short-circuit with regards to the current (almost exactly like a diode). When the tube was powered at 170V with all the digits off, the voltages at the cathode pins was measured to all be around ~44V. When I bumped the supply voltage to 200V, the voltages changed to ~74V. This happens to be very close to (supply voltage) – (turn off voltage). With a single digit turned on, the voltages on the other cathode pins varied depending on the distance of the measured digit to the one that is on. For the digit right next to the one on (physically, not numerically), the measured voltage came out to be exactly the same as the turn-off voltage. The further away the digit, the lower the voltage.
Driving Nixie Tubes
Most Nixie tube projects use vintage ICs 7441, 7441A, 74141, or the K155ID1 for driving the tubes. The 74141 and K155ID1 in particular are commonly used as a single IC is required per tube. They also have a built in BCD-to-decimal decoder, making it so that only 4 control lines were required to drive all digits of a given tube. These chips operate as current-sink drivers, sitting between the tube cathode pins and ground. The downside to using these chips is that they are relatively hard to find and only come in through hole DIP packages which takes up a significant amount of space on the PCB. Fine for most projects, but not ideal for the compact setup that I have in mind.
One alternative to these chips would be to use something similar to a shift register. For my test setup, the driver would have to handle the turn-off voltage of ~124V (unless the supply voltage was more than double the turn-off voltage). The problem is that drivers capable of handling such high voltages via open collector or open drain outputs are rare or difficult to drive. I highly recommend EEVblog’s videos on searching for a suitable Nixie driver.
Voltage Clamping with Zener Diodes
Fortunately, there is a way to work around the high voltage requirement. By connecting a zener diode to each output of a lower voltage rated driver, the output voltage can be safely clamped (pre-biased) to a level that won’t damage the driver. The 74141 in fact uses zener diodes to clamp the output voltages at 55V. This results in a voltage drop of (supply voltage) – (zener clamp voltage) across the tube when the driver is off, which will be lower than the ignition/sustaining voltage if the clamp voltage is high enough. There are ICs that have this feature built in, such as the ULN2003 or the SN75468.
One possible issue to using zener diodes is that it changes the ‘current density’ inside the tube as a small amount of current is always drawn by each cathode. This results in an extra glowing ‘blue dots’ if the current density is too high as described quite well on this site. Details regarding this phenomenon is sparse, but it sounds like the issue can be avoided by clamping the output voltage to a higher level.
Switching with Transistors
There is a way to driving Nixie tubes without the use of zener diodes however, by opting for transistors that are capable of handling 200V or more. Modern bipolar transistors can easily meet this requirement while also being available in incredibly small packages: the MSD42WT1G at 10¢ each (quantities of 100+) is capable of switching up to 300V with a 2x2mm SOT-323 footprint. Combined with a logic level shift register, these BJT transistors can be configured as a simple switch to turn each digit of the tube on or off.
The downside to using this BJT and shift register combination is that it does not allow you to control the brightness of individual digits. This feature seems to be rare among other clock designs as most choose to dim the display by PWMing the anode supply. This works as a Nixie tube powered on behaves very much like an LED: to control the brightness of individual digits, the current or the PWM duty cycle for the each digit needs to be configurable.
Programmable Current Sink with BJTs
Similar to an LED, the brightness can be controlled by sinking a fixed current through each digit. One of the benefits of using a BJT transistor is that it can act as a fairly accurate current source in the right configuration. By varying the voltage at the base and placing a resistor between the emitter and ground, the collector current can be easily controlled. For example, a 1K ohm resistor and VB = 5V will result in VE = ~4.4V and IC = ~4.4mA regardless of VC. Given that VE and IC scales (mostly linearly) with VB, a few DACs with multiple outputs can be used to set the current for each individual digit between 0 and ~4.4mA on a 5V rail. This method introduces a few new issues however, the first being that each transistor now dissipates a significant amount of power (0.2W at 40V/5mA) when on. Another issue is that Nixie tubes have a lower limit for the operating current; the digits have uneven brightness at low currents, and cease to be fully lit when a threshold of ~0.5mA is reached:
High Frequency Switching with BJTs
Again, similar to an LED, an alternative method for brightness control is to vary the on-period of each digit via a PWM signal. This can be done fairly easily by replacing the shift register with an IC that has configurable PWM outputs. One possible issue with this method of driving Nixie tubes in this fashion is that the display may exhibit visible flickering if the PWM frequency is low. Another possible issue with the PWM method is that the anode power supply may struggle to maintain a consistent voltage if the PWM period is synchronous (switching on/off at the same time) among all the drivers. If this happens, the supply current will rapidly alternate between zero and the desired current, which may result in extra instability from the boost supply switching between CCM and DCM modes.
One important difference between LEDs and Nixie tubes is that LEDs have near-instantaneous turn-on times while Nixie tubes have an inherent ignition delay. Because of this, there is a minimum on-time that must be met by the duty cycle. This is easily done by decreasing the modulation frequency, but comes at the cost of visible flickering. At higher frequencies, a longer duty cycle is needed to meet the minimum turn-on time, thus resulting in a higher minimum brightness. Ignition time is also reduced with higher anode voltages, potentially allowing for a lower minimum duty cycle.
Another important thing to take into consideration when choosing among the different method of driving Nixie tubes is the PCB footprint required for the driving circuitry. Discrete transistors will take up significantly more space compared to a single 74141, and even more so when additional ICs are required for driving the transistors. With a minimum of 40 transistors, 40 resistors, and a few ICs, the PCB becomes significantly more complex to route. There are ways to minimize the footprint however, by using resistor arrays and ICs like the DAC088S085.
After the initial testing was done, I went ahead and designed the first of two PCBs. The first PCB, the top half, contains only the components required for driving the Nixie tubes. Given the testing results, I opted to use discrete transistors and a few cascading PWM ICs to drive them. The PWM chips chosen was an expensive but feature-rich chip: the NXP PCA9685. With 12 bits per each of 16 outputs and an I2C interface, only three are needed to drive all 41 pins with some room to spare for future upgrades. There were three main features that I was looking for in the driver chip: 1) output driver capability, 2) large operating voltage range, and 3) ability to phase shift each output.
The PCA9685 fits the bill perfectly as the outputs can be configured as open drain or totem pole (most PWM chips for driving LEDs are open drain only). It also has an operating voltage range of 2.3V to 5.5V, so by changing the supply voltage, the baseline current is programmable from ~1.7mA to ~4.9mA. Finally, the delay between the rising edge of each output can be individually configured. With a bit of extra logic, the current consumption of the tubes can be load balanced to maintain a more consistent load on the power supply. By adjusting the phase of each output such that the ‘on’ period has minimal overlap, the peak current can be reduced by up to 75% compared to a driver with non-phase shifted outputs. This amount of savings only happens when the duty cycle is less than 25%, but otherwise it scales somewhat linearly to the point of maximum peak current at 100% duty cycle.
The other half of driving the outputs is the high voltage transistors. I opted to use discrete high voltage NPN transistors here: the ON MSD42WT1G. The main feature of this transistor is it’s voltage rating: with a maximum VCE and VCB rating of 300V, there is an additional 50% buffer for voltage transients. It also comes in one of the smallest SMD footprints available for transistors, the SOT-323. This is quite important due to the number of transistors needed. The other parameters are nice as well, with VBE of 6V being higher than the operating voltage of the PWM chips along and the capability to continuously handle up to 3mA at VCE of 200V.
A significant amount of effort was put into routing the board to make the PCB as small as possible while only using two copper layers to keep the cost down. Routing a four layer board would have made things easier, but would have also doubled the cost. The resulting 20mm x 100mm PCB is just slightly larger than the bounding box of the tubes themselves when placed side by side. High and low voltage traces were also isolated as much as possible give the physical constraints of the board. High voltage traces (right input) are primarily routed on the top layer while logic level traces (left input) are routed on the bottom layer with both circuits having isolated grounds. Two holes for M2.5 screws were also placed in the middle for structural support using standoffs between the boards.
- 41x high voltage transistors (SOT-323): MSD42WT1G
- 41x 1K Ω SMD resistors (603): RC0603FR-071KL
- 40x 1mm sockets for Nixie Tubes (off ebay)
- 3x PWM driver IC (QFN28): PCA9685
- 1x two terminal spring cage connector: PTSM1770953
Anode Power Supply
The other half to driving Nixie tubes involves the high voltage power supply. A high efficiency DC-DC boost converter circuit is commonly used in Nixie tube projects to generate such high voltages. There are two variations of a boost converter circuit: one uses a inductor (boost) while the other uses a transformer (flyback). Each has its own merits: inductors are available in a smaller footprint while transformers with its built in winding ratio generates a high output voltage more easily. The output from a flyback converter is also isolated due to the transformer.
There are a number of excellent resources on the design and operation of boost converters: the Art of Electronics book, this site covers the basics while these TIapp notes go into more detail. This project page details the design of a custom high voltage boost converter, while this one does a good job at explaining how to optimize component placement on the PCB. An example of a minimal footprint design that boost 5V to 170V can be found here.
CCM vs DCM
There are two fundamentally different operating modes for boost converters. The first, continuous-conduction mode (CCM), occurs when the current in the inductor continues flowing during all stages of operation. The energy stored in the inductor increases while the switch is on and is equal to the energy discharged into the load through the diode when the switch is off, thereby ensuring steady-state operation. Because the current in the inductor never reaches zero, residual energy remains in the inductor at the end of each switching cycle.
In discontinuous-conduction mode (DCM), the energy stored in the inductor when the switch is on is equal to the energy required by the load for one switching cycle. The energy stored in the inductor is depleted to zero when the switch is turned off, and results in a period where there is no current flowing through the inductor. This results in higher peak currents through the components as well as a larger ripple voltage at the output of the converter.
Selecting a mode of operation is essential in the design of a boost converter as it impacts both the component choice as well as the resulting performance and efficiency of the converter when operating under design constraints. Efficiency is lower in DCM mode as peak currents are higher (due to the faster/complete discharge of the inductor) through the components. Maintaining operation in CCM mode requires a minimum load current however, which may not be achievable if PWM is used to control the brightness of the Nixie tubes.
Designing a converter that operates in CCM mode is also more difficult due to issues such as sub-harmonic instability and transitions between DCM (startup) and CCM (steady-state). Details of such issues are left out of this writeup, but can be found in resources listed at the start of this section.
Since I’m planning on utilizing PWM for brightness control, designing my boost converter to operate in DCM seems to be ideal. A side benefit of DCM in my use case is that the inductor value can be quite small, making it easier to find components with small footprints. To find the actual inductance value required to guarantee operation in the desired mode, use the following equation:
Where TS is the switching period, , and VD is the voltage drop across the rectifier diode. As shown in the graph above, the converter operates in DCM if the inductance is kept below the the computed value. Note that the requirement for inductance peaks when the duty cycle is at 50%.
While the operating duty cycle (inductor charging/discharging) in CCM is dependent solely on the input and output voltages, the same does not apply in DCM as there is a period where the inductor is completely discharged. Furthermore, in DCM, the duty cycle varies more with load changes than it does when running in CCM. Many boost controllers have both a maximum and minimum switching frequency so care must be taken to keep the operating duty cycle within the capabilities of the boost controller. The DCM duty cycle can be computed by taking the inductance and switching frequency into account:
Ddcm here is the duty cycle at the given switching frequency when the switch is on (inductor is charging). The duty cycle for the discharge period can be found with . The time in which the inductor is active is , and should be taken into consideration when choosing the switching frequency.
There are two main considerations that should be taken when choosing an inductor for a boost converter: the inductance and maximum current rating. Additional considerations include the winding resistance, shielding, core material, and size. The inductance value needs to be less than the CCM threshold in order to maintain DCM at the desired load.
The maximum current rating is also important as the peak current through the inductor will be significant higher than the average load current. This peak inductor current can be computed as follows:
Due to this high ripple current, when selecting an inductor, a core material with low permeability and low core losses at the switching frequency should be chosen to minimize power dissipation. A shielded inductor will result in less RFI but will also slightly lower the overall efficiency. Conduction losses in the inductor can be approximated with:
where (in DCM only)
There are four important parameters when selecting a MOSFET switch: VDS (drain-source breakdown voltage), RDS(on) (drain-source on resistance), Qg (gate charge), and Coss (output capacitance). The critical parameter is the breakdown voltage VDS which should greater than or equal to 1.5x the output voltage. Once the converter is running, it would be wise to ensure that all drain voltage spikes are well below this value.
Power dissipation of the switch is comprised of the three separate parameters: gate, conduction, and switching losses. The gate losses can be approximated using the gate capacitance, gate voltage and switching frequency:
The on-resistance of the switch, RDS, is used to approximate the conduction losses:
where and (in DCM only)
Computing the switching losses with the output capacitance is a bit more involved:
A recommended good rule of thumb is to select a MOSFET where the switching losses are equal to the conduction losses when the converter is operating at maximum load, with overall losses optimized to be as low as possible.
Similar to the MOSFET selection, the output rectifier diode must be capable of handling the peak input current as well as dissipating the diode’s average power. The breakdown voltage of the diode must be greater than the output voltage plus some margin. A simple approximation of conduction losses in the diode is:
where and (in DCM only)
For lower output voltages, a low capacitance Schottky diode is recommended. For higher output voltages, a fast recovery diode should be chosen. Soft recovery characteristics, normally desirable when operating in CCM, are not required when operating in DCM as there is no current flowing through the diode when the switch is on. Switching losses associated with a Schottky diode is based off the diode’s capacitance while the losses when using a fast-recovery diode is determined by the recovery time:
and (in DCM only)
For higher efficiency in low-current applications where the output voltage difference is small, it may be advantageous implement synchronous rectification with a second MOSFET in place of the diode. This adds additional implementation complexity, but efficiency gains may be possible as this allows for DCM designs to be run in CCM mode at the cost of potentially higher power dissipation. Reference this TI app note for more information.
The output capacitor is used to smooth out the DC voltage at the output to the load. The impedance of the capacitor at the switching frequency must be low, and the ESR of the capacitor must also be minimized to maintain a low ripple voltage. Assuming a steady-state load current, the peak to peak voltage drop created by the ESR and the voltage drop created by the output capacitance can be computed:
and (in DCM only)
Power dissipation of the output capacitor can be computed using the current and capacitor’s ESR:
where (in DCM only)
In addition to the main components listed above, some additional parts are needed to ensure stability in various parts of the circuit. Parasitic components such as inductor shunt capacitance and lead-wire inductance in the MOSFET and diode can cause ringing at the switch node in excess of 100Mhz. Voltage spikes generated by this ringing may end up damaging the MOSFET if it exceeds its voltage rating.
To address this issue, a series R-C snubber can be added across the MOSFET to dampen the parasitic energy. Refer to this app note for more information.
The choice of components used is critical to both performance and lifespan of the boost converter. For this particular project, the focus was placed on creating a minimally sized boost converter capable of driving a maximum load of 20mA at decent (>60%) efficiency in DCM. As PWM may be part of the brightness control, a fast transient response to the load current is also desirable. The input to the converter will be sourced from a 12V wall wart, with a 5V voltage rail generated with either a linear regulator or buck converter. The output will be fixed at 170V.
I originally planned on finalizing the power supply design before working on the remainder of the project, but after looking around for parts, I decided to hold off until I have the main PCB laid out. The reason for this is that the selection process for the above components is quite involved, with multiple variables to consider when choosing parts. For example, when choosing an inductor, the footprint is smaller with a lower inductance value, but the DC resistance generally increases as a result. A lower inductance value also results in higher peak currents, so other components will also need to be changed accordingly. Since the inductor is the most vital component in a boost converter, I figured it would be wise to wait until I know exactly how much PCB footprint I have to work with before I proceed. As such, this section will be postponed until I finalize some other parts of the project.