Title image showing a working nixie tube clock

I have always liked how nixie tubes looked, so I decided that my first ESP32 project should use them somehow. And since I also like the contrast in the tech used, I decided to modify my nixie tube clock and add an esp32 to it that syncs it’s time over Wi-Fi using NTP.  

If you want to look at the code and the hardware, it is in our GitHub.


The software is probably the easiest part of the nixie tube clock, as the esp32 comes with basically all libraries needed to sync time. So, all the software does is connect to a wifi network, enable the SNTP service and then just update the display periodically.

The most complicated part of the software is probably writing data to the display, as the way I made the digit mapping is a little odd to make PCB routing easier. When one value needs to be mapped to a specific byte sequence with no logical relation to the input value, it is common to use a lookup table. This is what I am doing in my code, as well. The NIXIE_NL variables act as the lookup tables for each unique number. To get the bit value that will need to be outputted, I just use division/modulo to get each digit, get the matching values from the LUT, then AND/OR them to get the value to write to the shift register. 


The Nixies

I chose to use IN-12 tubes since they seem to be quite readily available and not too expensive at ~5$ a tube, but they are relatively small. I like the compactness of the clock I built, but it isn’t something for people that want large orange glowing digits in their living room. The dots in the middle are just ordinary neon indicators from Digikey. I initially used INS-1 front-illuminated neon dots, but after one and a half years of running them, I have noticed that the discharge tends to disappear into the back of the tube where it is not visible from the front, something that won’t happen with typical indicators. Plus, I do think they look better than the dots.

close up of nixie tube displaying a digit

The 180V supply

The biggest issue with nixie tubes is, of course, the high voltage they require. Back in the day when they were common, the equipment using them had one big linear transformer in it that put out the voltages required, but nowadays we do not have that luxury. Furthermore, I wouldn’t try hard to build a nice and small clock if it ends up having a large mains’ socket on it. 

The solution is to use a boost converter to step up the 5V from the USB port to the 180V that the tubes need. Usually, one wouldn’t use a boost regulator for voltage ratios beyond 5 or 6 because the duty cycle and peak inductor currents get quite large. Still, since the tubes only draw a few milliamps, it is viable to let the converter operate in discontinuous mode (so the current in the inductor drops to zero during the off-time) and use a much lower duty cycle than would usually be necessary.

Using a zener diode to limit duy cycle

I used the BD9303 PWM controller because I had some around, and they were decently cheap. One slight workaround is necessary to allow the circuit to function. D2 is used in parallel with the compensation network to limit the error amplifier’s maximum voltage. This has the effect of limiting the duty cycle. The chip has an overcurrent shut-off built in that would trigger otherwise. I recommend that you go to eBay or Aliexpress and buy yourself one of those assembled boost modules if you just want to get the tubes working since my circuit can only run 5 or 6 tubes with the large-ish source resistor on the mosfet. It probably wouldn’t do well with any of the larger tubes, either. 

Controlling the Display

Another issue that the tubes’ high voltage brings is that no ordinary logic can control them. Connecting them to a standard 74hc595 shift register would result in either the shift register dying, or more likely, the tubes just staying on as the top clamping diode conducts the display current even with the output turned off. The obvious solution is to use parts with an open drain or open collector output, but those tend to only go up to ~100V. Back in the day, there were dedicated high voltage BCD decoders that could handle 180V easily, but they are now only available as old stock and in DIP packages, increasing circuit size a lot. Since I tried to make the nixie tube clock decently compact, that wasn’t an option.

An image of the nixie tube level shifter, boost converter and shift register

Fear not, though, because microchip has an entire portfolio of up-to-date high voltage logic parts 😀 The one I picked (HV5122) has 32 open-drain outputs that go up to 250V, and there are some push-pull ones available, too, in case somebody wants to build a large, multiplexed display of nixies. The only issue is that the one I chose needs 12V logic signals, so I added a 12V charge pump and some mosfets for level shifting.

The tubes have one pin for each of the cathodes in the shape of the number displayed and one for the anode grid on the tube’s front. To turn on a segment, we just need to pull the corresponding pin to ground (and make sure that no other digit is illuminated as that will show both simultaneously).


Example of a nixie tube clock display with too little brightness.

Dimming the nixies is also pretty easy, as they do reasonably well with just ordinary PWM, even though the frequency has to be reduced below a specific duty cycle (10% in my case), as the tubes won’t fully illuminate their digits otherwise.

One workaround I used in the nixie tube clock was only to connect some of the digits, so I got away with using only one shift register. Since it will only ever display time, I could just ignore the numbers that are never shown. For example, all digits above 3 in the 10-hour tube. That does limit the number of possible values that can be displayed. So not a full IOT display thingy, but good enough for me 😛

Ways to Improve the Nixie Tube Clock

Since this was meant to be a quick proof of concept, I did not re-engineer the nixie tube clock’s parts that already worked (mainly the HV section). But there certainly is a lot of room for improvement:

  • Replace the PWM regulator with just a PWM output from the microcontroller to make the circuit simpler
  • The 12V logic supply could be created by the microcontroller using a charge pump.
  • Replace the 12V logic with other ICs that work from a 5V supply
  • A finger guard behind the nixie tube PCB might be nice since I have already shocked myself a few times when playing around with the thing.

If I get around to making these changes, I’ll be sure to keep you updated since I think this has the potential to be a cool little DIY project if designed for that properly. Maybe we’ll turn this into a nixie tube clock kit? Let us know what you think!

Making a Nixie Tube Clock with an ESP32

Exciting news! Our performance stunt with David Blaine was a complete success!

On October 5th of this year, Blaine began performing a 72-hour endurance stunt called Electrified: One Million Volts Atop 22-foot high pillar on Pier 54 in New York City. During the stunt, David, wearing a 40lb protective chain mail suit, stood on the pillar surrounded by seven Tesla coils producing an electric discharge of one million volts or more continuously.

With barely 3 months lead time, we manage to build this enormous musical Tesla coil system. The design considerations were tough: we needed to design a musical Tesla coil system that could operate for 3 days without interruption. We began the job in Austin texas and managed to complete most of the project before boxing it up and shipping it to New York City. We arrived about 3 weeks before the event, and built the stage inside a rental warehouse.

What a project! Never before has a Tesla coil system had to endure such rigorous conditions. To operate for 3 days straight, outside and exposed to the elements. Our small crew of technicians worked in shifts to keep the installation running around the clock. Two of us worked in shifts, monitoring everything from equipment temperature to O3 concentrations, conditions had to be perfect to meet the safety standards.

But if you think our job was hard, imagine what it must have been like for David, standing up there for so long. Well I can tell you, I had the privilege of testing the setup for a very short amount of time and my legs were stiff after just a few minutes of standing there wearing all that heavy chain mail. It was amazing to watch him endure what must have been a frenzy of lightning and sleep deprived delusion for three straight days and nights!

While we’re excited to have been a part of this project, one thing is for certain.. we are definitely looking forward to a nap!

 Read more about it from the New York Times!

David Blaine: Electrified

We’re finally wrapping up our stint on America’s Got Talent! What a crazy experience that was. It’s hard to believe that we’ve been involved in this process for almost a year, and even though we didn’t make it all the way to the end, we are thrilled with how far we got.

Who would have guessed that hours of studying how to make a Tesla coil would take us all the way to the semi finals of one of the most popular competition shows on TV.. so bizarre. Also worth mentioning, it’s very exciting to be the first to successfully use these machines live on a major TV network! You couldn’t even imagine the politics involved in making all that happen.

One of the hardest parts about being on this show, is just not knowing how long you are going to have to commit to it. On the chance that you proceed to the next round, you immediately have to change your schedule for months at a time. It was tough but we managed to make everyone’s schedule work!

Next on the list of difficulties was the pressure to keep pushing things up a notch. There was an understanding that every round needed to increase in quality and complexity. The rapid hardware development that resulted from this will likely be used in our Tesla coil performances for years to come! Likely the Lightning guitar is the greatest achievement out of all this. Pretty cool that we got to debut it with a rendition of “Iron man” for Sharon Osbourne. No pressure there!

Here’s some more good news guys, even though we didn’t win, we’re getting LOTS of booking requests because of this. We might actually manage to book more and higher paying shows on our own as independent agents. I’m sure people will be asking us for years to come if we are that one AGT Tesla coil show. Yes, yes we are!

Tesla coils on America’s Got Talent