7-Segment To Nixie Decoder
7-Segment To Nixie Decoder
by Peter H. Wendt

Rel. 0.9.1, Last Update: Wednesday, 2001-12-19

Intro: What the heck are you talking about ?

I am talking about using a commercial desktop radio / alarm clock, like that thing you have laying around in your workshop for years already and how to convert things like these for a Nixie display.

Yeah - I know, this is quite odd - but lets stop here for a moment and think.

Given you built one or more Nixie Clocks already and they look neat and work fine ... but lack functions a bit. Like an alarm for instance. Or radio-control to name another very neat bit. Want to re-invent the wheel again and build your own micro-computer controlled alarmclock module ? Okay, you could do that - but there are alternatives.

Now: there you got this marvellous piece of plastic shitware from Taiwan, bought at a supermarket some ten years ago. It has a radio. It has -probably- two different alarm setups. If it is a newer one it may even have a radio-controlled timer chip inside. But it looks like shit with its stupid 7-segment display.
Why couldn't this thing been reworked - "Nixified" - to a Nixie Display ?

There you are. Welcome to my world.
That's the "mental chain" I followed when I looked at my 1979 digital desktop alarm clock for the 3rd million time while building a neato-Nixie clock prototype once again.

Time to pull out the screwdrivers and do some pathological studies again ...

The Present: What you see is what you get

After taking apart the plastic case from the digital alarm clock you will find this basic layout (more or less):

  • a transformer
  • a printboard with the radio part
  • a printboard with the clock part
  • a printboard for the setup switches
  • a printboard or module with the 7-segment LED display
  • a loudspeaker (two of them, if it is a stereo radio clock)

You may find all of that munged into one bigger printboard probably. The digital clock part of the thing uses one bigger clock chip like the very common (but almost undocumented) NatSemi MM5402N. Trying to find a circuit diagram or a data-sheet for that thing ended up with nothing. So I had to meddle with the multimeter a bit to find the pinout and some dire data.

The clock I did my testing with uses the MM5402N and a 4-digit 7-segment unmultiplexed (!!) module marked "Tiger LT667 Rev. E". It has 34 pins with a 0.1" (2.5 mm) spacing. It has 4 x 7 segments + 2 x 2 round dots, 2 left of the display to mark "Alarm 1" and "Alarm 2" and two in the middle between the hours and minutes used as blinking ":" for the seconds ticking away. I unsoldered the thing and used a +5 VDC source with a 1 KOhm resistor to test out the single displays.

Here's the pinout:

|      +--------------------------------------------------+       |
|      |      aaaaa     aaaaa         aaaaa     aaaaa     |       |
|      |     f     b   f     b       f     b   f     b    |       |
|      |     f  4  b   f  3  b   S1  f  2  b   f  1  b    |       |
|  AL1 | O   f     b   f     b   O   f     b   f     b    |       |
|      |      ggggg     ggggg         ggggg     ggggg     |       |
|      |     e     c   e     c       e     c   e     c    |       |
|  AL2 | O   e     c   e     c   O   e     c   e     c    |       |
|      |     e     c   e     c   S2  e     c   e     c    |       |
|      |      ddddd     ddddd         ddddd     ddddd     |       |
|1     +--------------------------------------------------+     34|
H | | H | | | | | | H | | | | | | | | H | | | | | | H | | | | | | H
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |

G A A 4 4 4 4 4 4 4 3 3 3 3 3 3 3 S S 2 2 2 2 2 2 2 1 1 1 1 1 1 1 G
N L L A F G E D C B F G A B E D C 1 2 F G A B D E C F G A B E D C N
D 1 2                                                             D

As you can see from the two pins marked "GND" (1 & 34) the display is a "Common Cathode" type. This means the common pin is GND and the display segments are lit when a positive voltage is applied to them.

"Unmultiplexed" means: each single segment ("Light Dash") is represented by a pin on the connector. If your clock has a display module with only 12 or 15 pins it is multiplexed and cannot be used with this circuit.

See also the part on Multiplex displays in "Advantages and Disadvantages" further below. There is a different circuit described on another page.

Running a test with the display removed comes up with a voltage of + 5.4 VDC at each activated pin and + 0.3 VDC on those currently off. This almost matches the levels for a logical "1" and logical "0" in the TTL-scheme. So you could directly interface to a TTL or CMOS logic chip to drive the Nixies ... if such a chip would exist.

Fact is: there is no such chip that converts the 7-segment scheme back to the "1 out of 10" required for the Nixies.

And here's my simple, cheap "quick & dirty" approach.

Using and Abusing: Using EPROMs to decode back

Those people with too much time at hand and more literate in the world of ASICs would surely pick some GAL or PAL chip to burn a logic into it that does the conversion. Some more straightforward people (like me) with preferences for "components recycling" would simply use an Eprom.

If you pick any of the Eproms from 27C32 to 27C1001, which run on a single +5V supply you can connect the 7-segment outputs to the Eprom adress lines A0 - A6, tie the unused adress lines to GND and use the lower 4 data pins D0 - D3 as outputs to a CD 4028 BCD-to-Decimal decoder chip.
When the clock chip sends a digit one or more segments are set to "1" level - and the bit-pattern on the Eprom adresses change accordingly and select one memory cell within the Eprom ... which is then programmed with the according BCD-value of the number to be displayed.
The 4028 decoder reads the BCD value from the Eproms' data-lines and selects the corresponding of the 10 outputs Q0 - Q9. From there on it is "classical Nixie" technology: a driver stage and the Nixie with its anode resistor.

If you bring home a batch of -say- 27C256 Eproms from a computer crapyard you first need to erase all content of it using an ultraviolett lamp. The internal cells then all contain the value "FF" - the Eprom is blank.
After that you re-program the Eprom with an Eprommer. You don't need to bother much with the unused cells - leave them as they are or fill them with "00". It is better to fill them with "00", since a "FF" value causes the 4028 to blank all outputs. Most Eprommers allow to fill a range (0000 - 7FFF for the 27C256) with a given value. Then edit the workspace for these new values:

Pos A7
LED Cell = Hex DCBA = Dec

You look a bit puzzled .... not clear how to use this table and how the values are related ?

Easy: each segment a - g is connected with an adress line from an Eprom. The adress line A0 is connected with the "a" segment of one digit. Its binary value is 1. Segment "b" is connected to A1 with a binary value of 2, "c" with A2, value 4 and so on. A7 - A14 (on a 27C256) are not used and fixed set to GND.
For every LED bit-pattern a binary value is calculated. For the LED display 6 for instance the segments a, c, d, e, f and g are lit. Add the binary values 1, 4, 8, 16, 32 and 64 and you end up with 125. That's the number of the memory cell adressed when the bit-pattern for a "6" is applied to the Eprom. In Hex the decimal number 125 is "7D". Now you got to edit the memory cell 7Dh on your Eprommer and write in the BCD-value for "6" ... which is "06".

The row with the greyed background is an alternative setting for a "6" without the upper dash. You may include this into your Eprom at memory cell 124 (7Ch) and it won't harm. Gives you a bit more versatility in case you use that method for various LED-to-Nixie conversions. Same for the "9", which may appear with and without the lower dash.

Putting in Practise: Schematic for one LED Digit (1 of 4 required)

Nixie Clock 7-Segment Converter

As things go: this schematic is the result from a raw draft I build just recently. I found out various minor problems to be fixed later. Basically it works. You should use pull-down resistors at the A0 - A6 adress inputs of the Eprom. I'm currently still experimenting with that, but I think 4K7 should suffice. For "room challenged" applications you should use resistor packs (with e.g. 8 x 4K7 resistors fed to a common GND).
The serial resistors are for the case that the input voltage is higher than +5V ... they act as current-limiting resistors. Also still experimental, but I am pretty much convinced that anything in the range between 220 Ohms and 1 KOhm will do. Eproms used to have internal clamping-diodes so that a minor overvoltage at the inputs would not harm under normal circumstances - except the voltage is a lot over +5V DC. The AMD 27C256 Eproms that I used are spec'd to tolerate +7V DC at the input pins according to the AMD datasheet. But you should not take that as given for all Eproms. Generally you should keep the input voltage in the +5V range.

The Balance: Advantages and Disadvantages

First off: this schematic can be used for "common cathode" clocks only. If your clock has a "common anode" and the timer chip pulls each segment low to get it activated you will have to alter the circuit. You will have to use pull-up resistors on the Eprom adress-lines (4.7 KOhms should do - probably resistor packs with 8 resistors to a common pin). You will have to reverse all values for the "0"s and "1"s in the table further above - and recalculate the Eprom cell-adresses. Common cathode displays are active-high, means: on when the output goes to logical "1". Common anode displays are active-low. The segment lights up, when the output goes to logical "0". Therefore the recalculation of the Eprom values.

Problematically are clocks that use a voltage other than 5 VDC on the output pins. Some CMOS clocks run with lower voltages, some with higher. I had the luck that my clock is within a 10% limit, which is "just so" tolerated by the 27C256 Eproms as input voltage to any of the adress pins.

A much higher input voltage (over 5.5 VDC) can be reduced with either 2-resistor voltage dividers -or- resistor / Z-Diode combinations. In most cases the serial resistors mentioned further above will do. In the worst case you need at least 2 resistors or 1 resistor / 1 Z-Diode for each segment. That's quite a bit - and since you need (at least) 4 Eproms, 4 4028s and 29 transistors + 29 resistors for the segment drivers the conversion circuit might become pretty large. If you want to "Nixify" e.g. a frequency counter or any other digital LED-instrument your conversion may soon be outside any reasonability.
But you decide.

Clocks that use a much lower output voltage are even more delicate to handle. If they are using "common cathode" layout you need to install a transistorized segment interface (29 of them for a 24-hours display HH:MM) using a current-limiting resistor to the base of a transistor. Emitter of each goes to GND, collectors to Eprom inputs with a 10K pull-up resistor to +5V DC. This -of course- reverses the polarity of the "active" signal per segment and you will have to alter your circuit as for "common anode" clocks. The additional number of parts required simply doubles and if you are going to nixify e.g. a 12-digit frequency counter you will soon reach the point, where you'd wish that you'd never tried.
Possible - but most likely unreasonable.

Also not suitable for clocks with multiplexed LED modules. Multiplexed displays -in our digital watch case- would use 7 "segment" lines and 4 "digit" lines. A single segment lights up, when the segment line and the digit line are set simultanously. On multiplexed displays you may see a slight "pulsation": the digits do not light permanently but are switched one after the other. It is possible to build a circuit to "Nixify" multiplexed LED displays - but it is a bit more complicated.

I am going to describe the multiplexed 7-Segment to Nixie conversion on a separate

Snapshots from "The Lab"

You don't think that this will work ?
Here's a picture from the current prototype. Still a bit awkward - but basically functional.

Click to enlarge !

Other related Topics:

My Nixie Tube Mini-Tester - My Little Nixie Collection
Dimming the Nixies - My Nixie Clock Project

© 2001 by Peter H. Wendt