An experimental idea, but good so far and it works…

After my experiments with successfully Charlieplexing up to 144 LEDs, I decided to try the same method with the cathodes of high voltage nixie tubes.

Charlieplexing is an electronics technique developed by Charlie Allen at Maxim in which relatively few I/O pins on a chip are used to drive a large number of devices.

I designed a little two tube clock, using a 14 pin 16F688 PIC microcontroller.

Two nixie tubes each contain ten cathodes, one each for the numbers 0 to 9.

20 cathodes fits neatly into a 5 x 4 Charlieplex. Just 5 output pins drive 20 cathodes. Only one high-low output pair from the PIC is active at any one time, thus the two tubes’ data are rapidly switched between to give the illusion that both are lit all the time.

The clock also includes a switched mode high voltage power supply for the nixies. This is based on a very tried and trusted design using a 555 timer, a FET and an inductor.

The PIC used has 14 pins. After using the five data outputs and two for the switches, I still had some pins spare so I decided to put some dual blue/red LEDs in the bases of the tubes. Just for fun.

The only issue that I encountered is that this system is very unforgiving if there is an open connection somewhere – the whole group of other cathodes connected to that same anode set will all glow together, dimly. It’s a shock to see and looks horrendous, but it’s easy to spot and fix once aware of what is happening.

The clock has red LEDs lit when the hours are displayed, blue when the seconds are displayed and magenta when the display goes blank between digit pairs.

This is probably best shown in a little movie…

The clock is built on two circuit boards, which fit one above the other.

This Post Has 13 Comments

  1. Colin Ng

    Thanks for posting such a neat project!

    Up till now I have only seen low-current applications (i.e. single LED) for Charlieplexing. For my project (an addressable LED Christmas Tree for my niece, nephew, and cousins’ kids to learn about electronics), I would need to Charlieplex or find some other way of multiplexing, because I would need to light segments of LED ropes per output.

    From your design it looks like you are driving transistors with Charlieplexing – something I did not know possible because I can’t wrap my head around how the Low and High-Impedance values would be used for the transistors, so I am trying to understand your circuit so I don’t fry parts in my experimenting.

    Are the rectangular pads SMT diodes? Or resistors?

    Much thanks,


    1. clock-it

      If you can imagine a normal situation where you have a transistor’s base switched on by a controller pin via a resistor and the emitter to ground, then the transistor will switch on when you set the base high. With charlieplexing, all you are doing is lifting the emitters to a ground supplied from other output pins. So each pair of outputs can switch a different transistor depending on the polarity. You can drive N*N-1 outputs. You’ll need some more high current driver transistors if you are going to drive strings of LEDs. Charlieplexing

      1. Colin Ng

        Thank you very much for the explanation, and for the diagram! So in my case if I were to replace the neon lights in the diagrams with high current transistors, then I’d be able to use those to drive strings of LEDs. I’ll give that a try!

        1. clock-it

          Yes I think you will need to use my switch transistors to turn on much higher current transistors.

    2. clock-it

      Colin, in the picture the five red resistors are the base resistors for a 5 x 4 pin charlieplex. I have 20 cathodes across two tubes, so 5 x 4 gives me 20. The top resistors x 4 are current resistors for the bicolor LEDs I have under the tubes.

      1. Colin Ng


        I was experimenting last night but I got strange results. I was using FETs (2N7000) instead of BJTs. I now have BJTs so I will try again.

  2. Matt

    What code did you use in trying to make my own 2 tube clock thanks

    1. clock-it

      I didn’t use any code in trying to make your 2 tube clock.

      I wrote my own code for my clock. PIC code, not Atmel or Arduino.

  3. Sublime

    Turns out my ghosting was the result of impurities between my tightly packed smd board. A couple of good scrubs with a tooth brush and the ghosting is gone.

    1. clock-it

      I am glad you got your issue fixed. I have just made a set of ‘universal’ one and two tube nixie clocks using Charlieplexing – 4 lines per tube. – I can configure the cathodes in software to drive any nixie (except biquinary of course). I have thus tested a whole range of tubes and all are working without issue so far. I have found both LED and nixie circuits to be finicky about unconnected drive pins – I don’t know why.

  4. Sublime

    I have been experimenting with Charlieplexing transistors to drive nixie tubes as you did so long ago and I am running into the same issue as you found with the ghosted cathodes and I am not sure what you mean by open connection. With Charliplexing are not all the High-Z state pins the same as an open connection? If so how do you not have any open conenctions but still have a high-Z state?

    1. clock-it

      I have had the same issue with both charlieplexing leds and nixie tubes. An open connection to one of the anodes or cathodes (don’t ask me which causes the problem, I cannot remember) will cause ghosting issues on all the other items that are in the same group.

      I have just built and coded a PIC to drive any nixie I like – I can reassign the cathodes via software – and I have tested it with a dozen different tubes and I have no problems with any of them misbehaving.

      1. Sublime

        I’m still unsure what you mean by “an open connection” because with Charlieplexing one of the states is the same as being disconnected, is it not?

Leave a Reply