Nixie Tube Power Supply

This article is an abridged summary of my project logs from April 2020 on

The goal of this project was to build a flyback converter to boost common voltages of 5-12 V to 170 V for powering Nixie tubes. I’ve previous built converters using a boost topology, and a much earlier attempt to power Nixie tubes from USB was my entry point into studying electronics. For this design, I wanted to try a flyback topology and also use a newer controller chip from TI. I built the prototypes as evaluation boards to characterize the converter performance on its own.

Theory of operation

Schematic of a flyback converter

The flyback converter finds many applications in DC-DC and rectifier designs. It can step voltage up or down, and can be built with and without isolation, and can usually be realized with low parts count. This is the basic schematic for the flyback converter. I have exploded out the magnetizing inductance of the transformer as I find it helps in understanding the current flow in the transformer.

When the switch QQ is on, essentially the entire source voltage VgV_g appears across the primary winding and magnetizing inductance. Since the transformer windings have opposite polarities, the secondary voltage is negative, and no secondary current can flow because the diode is reverse biased. Since there is no current flow on the secondary, all the current on the primary side is flowing through the magnetizing inductance. The capacitor CC alone is supplying current to the load.

When the switch QQ turns off, the current through the magnetizing inductance must continue to flow, so it will transfer to the secondary and forward bias the diode. Since the diode is conducting, the voltage at the secondary is VV (plus the small diode junction voltage), and the voltage across the primary flips to V/n-V/n. The secondary current charges the capacitor and also flows through the load. Also, when the switch is off, no current is supplied by the input source.

If the load RR and switch duty cycle fraction DD remain constant, an equilibrium will be reached where there is no net change in charge on the capacitor over the switching period TsT_s. The output voltage will remain about constant, with some ripple up and down as the capacitor is charged or discharged. A similar principle applies to the magnetizing inductance in the transformer. As the voltage across the magnetizing inductance flips signs, the flux linkage either expands or contracts, but over the course of a switching cycle, there is no net change in flux linkage. These two principles, capacitor charge balance and inductor flux balance (sometimes called volt-second balance), lead to a steady state solution for both the average output voltage and inductor current.

When a switching converter is operated at low frequencies or light loads, the inductor current may drop to zero in the switch-off state. Because the diode is a unidirectional switch, the inductor current cannot go negative, and the converter operates in the discontinuous conduction mode (DCM). In DCM, the variation in inductor current is no longer small compared to the average value, and more careful analysis of converter dynamics is required. During the evaluation of this project, I found that the transformer would not operate efficiently at frequencies that support continuous conduction mode (CCM), so the remainder of this section will discuss the flyback converter in DCM.

The converter’s steady state behavior can be formally analyzed through state-space averaging. In this technique, the state-space representation of the converter circuit is averaged over the period of a switching cycle. The formal application of state-space averaging using matrices lends itself well to computer evaluation, which means less algebra to do by hand, and hopefully, fewer algebra mistakes. The state vector x(t)\mathbf{x}(t) consists of variables associated with energy storage in the system, i.e., inductor currents and capacitor voltages. The input vector u(t)\mathbf{u}(t) consists of independent system inputs; in this case, the input port voltage vg(t)v_g(t). The output vector y(t)\mathbf{y}(t) may contain any other dependent variables of interest, such as the converter input current ig(t)i_g(t). The state equations of the system can be expressed in matrix form:

Kx(t)=AMx(t)+Bu(t)y(t)=CMx(t)+Eu(t) \begin{align*} \mathbf{K}\mathbf{x}^\prime(t) &= \mathbf{A}\mathbf{M}\mathbf{x}(t) + \mathbf{B}\mathbf{u}(t) \\ \mathbf{y}(t) &= \mathbf{C}\mathbf{M}\mathbf{x}(t) + \mathbf{E}\mathbf{u}(t) \end{align*}

In this standard form, the matrix K\mathbf{K} contains the values of capacitance, inductance (including mutual inductance) of the energy storage components represented by x(t)\mathbf{x}(t). The matrices A\mathbf{A}, B\mathbf{B}, C\mathbf{C}, and E\mathbf{E} (conventionally D\mathbf{D}, but renamed to E\mathbf{E} to avoid confusion with the duty cycle DD) are constants of proportionality that are determined by the connections in the circuit.

In DCM, the previous observation that the inductor current deviates significantly from its average value has a pair of consequences. An additional factor M\mathbf{M} is needed in the averaged state space equations. The application of inductor flux balance to solve for the DCM duty cycle causes the inductor current to vanish as a state variable, yielding a reduced-order model of the converter, which is sufficient for predicting behavior at lower frequencies.

At equilibrium, the derivative of the state vector is zero. To obtain the steady-state or DC operating point of the converter, set the Kx(t)\mathbf{K}\mathbf{x}^\prime(t) term to zero and solve the resulting linear system. For the DCM flyback converter, the solution is V=VgRReV = V_g\sqrt{\frac{R}{R_e}} and Ig=Vg/ReI_g = V_g/R_e, where Re=2LD2TsR_e=\frac{2 L}{D^2 T_s}. The interpretation of these equations as an equivalent DC circuit requires some thought. The second equation indicates the input port to the DCM flyback converter obeys Ohm’s law with an apparent resistance ReR_e. The first equation can be understood by rewriting it in the units of power: V2/R=Vg2/ReV^2/R=V_g^2/R_e. This suggests an interpretation that the power “dissipated” in the apparent resistance ReR_e is actually transferred to the load.

Converter circuits require feedback to maintain stable output, which requires a dynamic model of how the converter responds to small disturbances to the load and control inputs, called a small-signal model. This AC equivalent circuit is found by linearizing the averaged state space equations about the DC operating point. First, write the state equations as functions of the elements of the state variables and inputs:

Kx(t)=(LiL(t)Cv(t))=(f(v(t),iL(t),vg(t),d(t))g(v(t),iL(t),vg(t),d(t)))y(t)=ig(t)=h(v(t),iL(t),vg(t),d(t)) \begin{align*} \mathbf{K}\overline{\mathbf{x}}^\prime(t) = \begin{pmatrix}L\overline{i_L}^\prime(t) \\ C\overline{v}^\prime(t)\end{pmatrix} &= \begin{pmatrix}f(\overline{v}(t), \overline{i_L}(t), \overline{v_g}(t), d(t)) \\ g(\overline{v}(t), \overline{i_L}(t), \overline{v_g}(t), d(t))\end{pmatrix} \\ \overline{\mathbf{y}}(t) = \overline{i_g}(t) &= h(\overline{v}(t), \overline{i_L}(t), \overline{v_g}(t), d(t)) \end{align*}

The iL\overline{i_L} terms are zero in the reduced order model. Then applying Taylor’s theorem (as f(x+x^)f(x)=y^f(x)x^f(x + \hat{x}) - f(x) = \hat{y} \approx f^\prime(x)\hat{x}) and the chain rule for partial derivatives:

iC^(t)=Cv^(t)=gv(V,IL,Vg,D)v^(t)+gvg(V,IL,Vg,D)vg^(t)+gd(V,IL,Vg,D)d^(t)ig^(t)=hv(V,IL,Vg,D)v^(t)+hvg(V,IL,Vg,D)vg^(t)+hd(V,IL,Vg,D)d^(t) \begin{align*} \hat{i_C}(t) = C\hat{v}^\prime(t) &= \frac{\partial g}{\partial \overline{v}}(V, I_L, V_g, D)\hat{v}(t) + \frac{\partial g}{\partial \overline{v_g}}(V, I_L, V_g, D)\hat{v_g}(t) + \frac{\partial g}{\partial d}(V, I_L, V_g, D)\hat{d}(t) \\ \hat{i_g}(t) &= \frac{\partial h}{\partial \overline{v}}(V, I_L, V_g, D)\hat{v}(t) + \frac{\partial h}{\partial \overline{v_g}}(V, I_L, V_g, D)\hat{v_g}(t) + \frac{\partial h}{\partial d}(V, I_L, V_g, D)\hat{d}(t) \end{align*}

For the DCM flyback converter, the resulting equations are:

iC^=Cv^=sCv^=2Rv^+2VRVgvg^+2VDRd^ig^=vg^Re+2VgDRed^ \begin{align*} \hat{i_C} = C\hat{v}^\prime = sC\hat{v} &= -\frac{2}{R}\hat{v} + \frac{2 V}{R V_g}\hat{v_g} + \frac{2 V}{D R}\hat{d} \\ \hat{i_g} &= \frac{\hat{v_g}}{R_e} + \frac{2 V_g}{D R_e} \hat{d} \end{align*}

Both of these equations have the form of KCL node equations, so they can also be expressed in circuit form as below, yielding an AC equivalent circuit that is identical to that of a buck-boost controller. The transfer functions for the converter can also be directly obtained from these equations or the circuit diagram. In the reduced-order model, the DCM flyback has a single, low-frequency pole.

AC small signal model of the DCM flyback


The prototype design process started with selecting the critical components for the power stage: the controller, switching transistor, transformer, and diode. One reason I took up this project was to design something with the LM5155, a new boost/flyback/SEPIC controller that TI introduced in 2019. It offers a number of improvements over the LM3478 controller I previously used in a DCM boost converter design. Several of the datasheet figures regarding the current-programmed mode threshold are a lot tighter on the LM5155. The soft-start feature of the LM5155 is adjustable and easy to design around. The LM5155 also supports a wider switching frequency range and very low voltage operation.

Flyback transformers are specifically designed with a gapped core so they can store and transfer energy. There are only a handful of commercial flyback transformers that have a high turns ratio (nn = 10), and can support a high secondary voltage. These transformers were built specifically for capacitor charging circuits for camera flashes where the output capacitor is discharged almost instantly.

One advantage of the flyback topology is the switch doesn’t need to block the full output voltage, so a lower-voltage, higher-performance part can be used. For a MOSFET, high performance means lower on-resistance Rds(on)R_{ds\mathrm{(on)}}, and lower gate charge QgQ_g. The VdsV_{ds} figure needs to withstand the off-state voltage of Vg+V/nV_g + V/n. With a maximum input voltage of 12 V, the output voltage of 170 V, and a 1:10 transformer, the MOSFET needs to be able to block 29 V. Some headroom is required, because a resonance exists between the leakage inductance of the transformer and the output capacitance of the MOSFET, leading to ringing and overshoot when the switch turns off. Unless attenuated by a snubber, this can damage the MOSFET if the peaks exceed its VdsV_{ds} limit.

While the MOSFET gets off with light duty, the diode is reversed biased with a voltage of V+nVgV + n V_g when the switch is on. When VgV_g = 12 V, the diode has to block 290 V. While Schottky diodes are usually the first choice in low-power switching converters, they are limited to voltages below 200 V, so a regular silicon diode with at least a 400 V rating is needed.

The input and output capacitance was chosen to keep the input and output voltage ripple to about 100 mV and 1 V, respectively. Nixie tubes were often run from crudely rectified AC power, so they are tolerant of significant voltage ripple. The remainder of the parts selection was dictated by the LM5155 datasheet. Lastly, while flyback converters can be designed with output isolation by using optoisolators, they draw significant current and the design is only rated to 30 mA, so I used a nonisolated topology for simplicity and higher efficiency.

One of the many tricky parts of building switching power converters is designing the compensation circuit for the feedback loop. Many practical books and guides I read do not provide detailed advice on the subject and more or less suggest a trial-and-error approach. It’s rare that a switching converter will flatly not work due to a carelessly-designed compensation network, but a poorly tuned feedback loop can lead to slow or oscillating behavior in response to changes to the load or input voltage. A better approach is to obtain an analytical expression for the feedback loop transfer function from a small-signal AC model of the circuit. I combined the model with other elements of the LM5155’s feedback loop in a Python script that selects the compensation network components to meet a target crossover frequency and phase margin.


The LM5155 datasheet provides several helpful layout guidelines and examples, and the engineering team at TI also produced three evaluation boards (in boost, isolated flyback, and SEPIC topologies) that demonstrate good layout. Since PCB layout can be critical for a working switching converter, I was more than happy to copy a layout that works. As the flyback power stage is the only thing on the board, I also used a 2-layer layout like the examples and commercial evaluation boards. Without a tightly-coupled and continuous ground plane in a 4-layer design, careful attention must be paid to current paths to reduce stray inductance. I went through two board revisions in evaluating this converter; one of the motivations in doing rev. B was to improve the primary side current return path. Better layout and additional capacitance reduced the input voltage ripple by 50%.

I wanted to characterize all aspects of the converter, so I built the prototype boards with evaluation in mind. The board has a row of test points to make probing easier. I intentionally used a low-density layout, with larger component packages (no smaller than 0603 for passives) so there would be plenty of room to probe and rework parts. The input and output power terminals accept banana jacks for secure, hands-free connections to a bench power supply and multimeter. For characterizing the feedback loop, I added a small series resistor before the feedback network as a signal injection point, away from other components to make it easy to rework and remove a connection.

I don’t have an electronic load, so I also designed a simple circuit board with switches and resistors to step the load for faster, repeatable evaluation. Each switch on this board adds a branch with two 1 W 68 kΩ resistors in parallel, so the output current at 170 V can be adjusted from 0 - 50 mA in 5 mA steps.

Performance and evaluation

Flyback converter being tested

Using a bench power supply, multimeter, and oscilloscope, I characterized the converter’s performance. The typical output voltage is 168 V with a 1.4 V (peak-to-peak) ripple at full load (30 mA). With the rev B design, the input ripple is just below 100 mV (p-p). Additional capacitance can further reduce the output ripple, but I don’t see a need since Nixie tubes can tolerate significant ripple. Measurements of the switch node and secondary voltage showed the voltages remained within limits for the MOSFET and diode, respectively.

For testing the feedback loop performance, I built an injection transformer based on a design from EEVBlog forum members. The transformer was constructed by winding twisted pair wire around a high-permeability core. This allows a low-level signal to be injected with isolation over a wide range of frequencies. The technique I used for measuring the feedback loop is documented in Texas Instruments application note AN-1889. After making connections to my oscilloscope’s function generator and inputs, I used its frequency response program to generate a Bode plot of the feedback loop response. The dynamic range using an oscilloscope is not great; once the difference between channels is over 30 dB, the noise becomes too much to be useful, but the result is still useful near the crossover region. The script I used set a target crossover frequency and phase margin of 12 kHz and 60°, and the measured values were 12 kHz and 50°.

Using the switchable load board, I made efficiency measurements by recording source and load power levels while stepping the load. The converter is capable of 85-90% efficiency over a wide range of input voltage and output current.

Converter efficiency of the flyback converter

Further work

The flyback converter shows excellent performance and efficiency, but as an evaluation module, it’s not optimized for space, parts count, or cost. The design can likely be miniaturized with smaller component packages and other changes. If you have a Nixie tube project with special power needs, I’m available for consultation on power design or integrating this converter into your project.


The schematics and PCB layout of the evaluation board, along with simulation and design scripts, are available on Github.

For a summary and discussion of state-space averaging, see R.W. Erickson and D. Maksimović, Fundamentals of Power Electronics, 3rd ed. Cham, Switzerland: Springer, 2020, pp. 251-270.

Project logs for the design and evaluation of the converter are on