I first built a Nixie clock around 50 years ago, using a bunch of TTL chips including 7441 Nixie drivers. It was some close approximation to the project featured here:
https://worldradiohistory.com/UK/Practical-Electronics/70s/Practical-Electronics-1970-12.pdfAt some point, perhaps thirty years ago, and not knowing such things would become desirable, I got rid of the clock, but I did keep the Nixies - four GN-4-D tubes. I also have four Elfin tubes, which are sort-of 7-segment Nixies except what I have are actually 9-segment ones like this:
https://www.swissnixie.com/tubes/MG19B/For some time I have been thinking of using the tubes I have to make one or two clocks, but I'm too lazy to start from scratch.
A while ago I noticed various sellers in all the usual places selling four digit Nixie clock boards, and I grabbed one for AUD24. See below. There is nothing on the other side of the PCB other than the now apparently obligatory RGB LEDs. I don't recall that back in the days when I used equipment that employed Nixie or even Dekatron tubes that LEDs were added, but I could just be getting old and forgetful.
The main line up is STM8S003F3P6, 5 x 74HC595, 6 x ULN2003A, DS3231 (+CR1220 cell), 3.3V AMS1117, and TPS40210 in the Nixie supply voltage generator.
I don't have any of the IN-12 tubes that the PCB is designed for, but I did get as far as connecting one stray GNP-7AH tube that I also had lying around. Besides the fact that I got the order of the numerals wrong, it was working OK, but some of the numbers were not completely illuminated. I did not have a chance to investigate that further (perhaps trying an anode resistor a bit lower than the fitted 30K could be a start).
The seller I got it from provided absolutely no documentation. So, no clue as to how to set anything using the two buttons labelled "up" and "down". I found another seller who did give some terse instructions but even with those I could not get very far, probably not helped by having only one digit visible, and that with the numbers in a scrambled order!
It could be relatively easy to get it to work with the GN-4-D tubes (I'm waiting for some sockets to arrive). However I am also thinking of the possibility of getting another one to drive the Elfin tubes, either by rewriting the STM8 code, or maybe by inserting a diode array between the drivers and the Elfin tubes (been there, done the latter decades ago, to be able to use the Elfin tubes in a frequency counter that was designed to use Nixies). An Elfin tube clock could be kinda neat, as they seem to be much rarer than those dirt-common Nixies.
I sorta live in hope that there could be a schematic out there somewhere, of maybe even the code that drives it (either original or re-written), but so far I have turned nothing up. I did find a different STM8-based Nixie clock here
https://github.com/Althrone/NixieClock/.Has anybody encountered this clock before, and found anything useful about it?
... or maybe by inserting a diode array between the drivers and the Elfin tubes (been there, done the latter decades ago, to be able to use the Elfin tubes in a frequency counter that was designed to use Nixies). An Elfin tube clock could be kinda neat, as they seem to be much rarer than those dirt-common Nixies.
That's likely to be the least effort, you can make a custom diode-adaptor PCB, with maybe segment drive resistors, using SMD double diodes it could be small ?
If you wire up the 10 second digit, you should be able to decode the pinouts manually ?
Nixies that have been out of use for a while may not display complete cathodes at the beginning, but they will heal with use. Personal experience.
The 595s are driven by serial loading with SPI or bit banging. It also sounds like the anodes are multiplexed.
It should be fairly straightforward to modify or develop STM8 code to timekeep and drive 7-segment nixies using a different font (7 segment instead of 1 of 10). If you go to hackaday.io there are several designs, including mine.
It looks to me to be a straight forward SPI driven chain of (qty 5) 8-output '595s driving (qty 6) 7-output ULN2003s; enough for 40 cathodes. Starting with the leftmost '595, it's likely that pin 9 (/Q7) connects to pin 14 (DS) of the next '595, etc. You should be able to confirm the bit-stream with a o'scope or logic analyzer to pins 14(DS; serial data), 12(ST_CP; latch) and 11(SH_CP; clock). You should see 5 bytes per ST_CP cycle.
I don't think the nixies are multiplexed since you can clearly see the anodes (pin at the 7-oclock position) of the middle two nixies are connected to R14 and R15 near the HV coil section; no transistors in sight there.
Since the choice of ICs allows multiple outputs to be grounded, there shouldn't be a problem driving 7-segment tubes if you can produce a different SPI bit-stream.
Thanks for the comments.
Other than checking which pin was the anode (and that is marked with a circle on the other side of the PCB) I just connected the test Nixie in the easiest way without actually comparing with the IN-12 pinout. So not really surprising what I got.
Sounds like a good tip about the Nixies healing. I could try leaving that Nixie on for a while, but I only have three of those tubes, so wouldn't actually be using those.
I did confirm that all the 595s are cascaded into one long shift register, and I traced the input of the first 595 to one of STM8 pins, but I have not checked if that is an SPI-capable pin.
Yeah, there is no multiplexing there, the anodes appear to go directly to the high voltage (measured at around 174V), via 30K resistors.
There are four transistors near to the STM8, three of which are for the red, green and blue LED channels (so not "pixel" LEDs), and the fourth transistor controls two neon lamps that form a colon between the hours and minutes. The colon flashes at 1Hz but stops briefly every minute when it goes through some sort of screen saver (is "cathode saver" a term?) where it runs quickly through each numeral on the Nixies.
I'm not sure why they used a separate transistor for the neon lamps. I would have thought that they would have ULN2003A outputs that could have been used. 6 x ULN2003A = 42, with only 40 needed for the Nixies, and that is without pulling any tricks that make use of the fact that in a clock, not all the tubes need to display all numerals. Well, OK, some Nixies have a decimal point, but I don't think that is a feature of the IN-12 tubes that this board is made for.
Another thing that I still need to check further into is that I can't see any obvious connection to pin 9 on any of the ULN2003As. So nothing jumping out at me that would be clamping the voltage on the outputs below 50V.
The shift register signals are not designated as SPI but it so happens that SPI can handle it. You still need an extra strobe line though.
...
Yeah, there is no multiplexing there, the anodes appear to go directly to the high voltage (measured at around 174V), via 30K resistors.
..
Another thing that I still need to check further into is that I can't see any obvious connection to pin 9 on any of the ULN2003As. So nothing jumping out at me that would be clamping the voltage on the outputs below 50V.
I suspect they are fingers-crossed on the ULN2003A rating, and simply let the transistors break-over on the leakage.
Provided one cathode is always grounded, once ignited the tube voltage will pull the anode down from 174V
I'm not sure why they used a separate transistor for the neon lamps. I would have thought that they would have ULN2003A outputs that could have been used. 6 x ULN2003A = 42, with only 40 needed for the Nixies
That may have been simplicity and getting a heart-beat that is outside the serial link.
I'm still plugging away at this. I think I have enough figured out now to be able to reprogram the STM8, but I'm not committing to actually doing that yet.
This is what I have so far. If I do reprogram it, I'd have to double check all this. The Nixie driving lines appear to follow a neat pattern, and after following about the first 15, so far I have only spot checked some of the others.
One anomaly (meaning mystery to me now) is that the /OE pin of the first 595 shift register in the chain is under the control of the STM8, while the /OE pins of all the other 595s are grounded. I have not powered up the board again to see if I can catch the micro disabling the first shift register outputs.
/*
* "NixieClock IN12 V4.2" board. September 2023
*
*
* STM8S003F3 TSSOP20 8K FLASH, 1K RAM, 128 byte eeprom.
*
* Pin 1 PD4 (HS) UART1_CK/TIM2_CH1/BEEP input <= SW UP & 10k R28 pullup, GND when pressed
* Pin 2 PD5 (HS) UART1_TX/AIN5 input <= SW DOWN & 10k R29 pullup, GND when pressed
* Pin 3 PD6 (HS) UART1_RX output => 1k R11 => Q2b for colon neons DS1 & DS2
* Pin 4 NRST debug connector pin 3
* Pin 5 PA1 OSCIN
* Pin 6 PA2 OSCOUT
* Pin 7 Vss GND
* Pin 8 Vcap
* Pin 9 Vdd +3.3V
* Pin 10 PA3 (HS) SPI_NSS/TIM2_CH3
* Pin 11 PB5 (T) I2C_SDA/TIM1_BKIN inout <=> DS3231 SDA & 10k R21 pullup
* Pin 12 PB4 (T) I2C_SCL/ADC_ETR output => DS3231 scl & 10k R20 pullup
* Pin 13 PC3 (HS) TIM1_CH3/[TLI]/[TIM1_CH1N] output => 1k R25 => Q4b for LEDs red
* Pin 14 PC4 (HS) TIM1_CH4/CLK_CCO/AIN2/TIM1_CH2N output => 1k R26 => Q3b for LEDs blue
* Pin 15 PC5 (HS) SPI_SCK/TIM2_CH1 output => 595 U4 sr data in & 10k R19 pullup
* Pin 16 PC6 (HS) SPI_MOSI/TIM1_CH1 output => 1k R27 => Q5b for LEDs green
* Pin 17 PC7 (HS) SPI_MISO/TIM1_CH2 output => all 595 RCLK (latch) & 10k R18 pullup
* Pin 18 PD1 (HS) SWIM debug connector pin 2
* Pin 19 PD2 (HS) AIN3/TIM2_CH3 output => all 595 SRCLK & 10k R17 pullup
* Pin 20 PD3 (HS) AIN4/TIM2_CH2/ADC_ETR output => 595 U4 /OE (all other 595 /OE grounded)
*
*
* PC5
* |
* V
* 595 U4
* Q0 -> 2003A U5 I1, O1-> N4 0
* Q1 -> 2003A U5 I2, O2-> N4 1
* Q2 -> 2003A U5 I3, O3-> N4 2
* Q3 -> 2003A U5 I4, O4-> N4 3
* Q4 -> 2003A U5 I5, O5-> N4 4
* Q5 -> 2003A U5 I6, O6-> N4 5
* Q6 -> 2003A U5 I7, O7-> N4 6
* Q7 -> 2003A U6 I1, O1-> N4 7
* |
* V
* 595 U7
* Q0 -> 2003A U6 I2, O2-> N4 8
* Q1 -> 2003A U6 I3, O3-> N4 9
* Q2 -> 2003A U6 I4, O4-> N3 0
* Q3 -> 2003A U6 I5, O5-> N3 1
* Q4 -> 2003A U6 I6, O6-> N3 2
* Q5 -> 2003A U6 I7, O7-> N3 3
* Q6 -> 2003A U8 I1, O1-> N3 4
* Q7 -> 2003A U8 I2, O2-> N3 5
* |
* V
* 595 U9
* Q0 -> 2003A U8 I3, O3-> N3 6
* Q1 -> 2003A U8 I4, O4-> N3 7
* Q2 -> 2003A U8 I5, O5-> N3 8
* Q3 -> 2003A U8 I6, O6-> N3 9
* Q4 -> 2003A U8 I7, O7-> N2 0
* Q5 -> 2003A U10 I1, O1-> N2 1
* Q6 -> 2003A U10 I2, O2-> N2 2
* Q7 -> 2003A U10 I3, O3-> N2 3
* |
* V
* 595 U11
* Q0 -> 2003A U10 I4, O4-> N2 4
* Q1 -> 2003A U10 I5, O5-> N2 5
* Q2 -> 2003A U10 I6, O6-> N2 6
* Q3 -> 2003A U10 I7, O7-> N2 7
* Q4 -> 2003A U12 I1, O1-> N2 8
* Q5 -> 2003A U12 I2, O2-> N2 9
* Q6 -> 2003A U12 I3, O3-> N1 0
* Q7 -> 2003A U12 I4, O4-> N1 1
* |
* V
* 595 U13
* Q0 -> 2003A U12 I5, O5-> N1 2
* Q1 -> 2003A U12 I6, O6-> N1 3
* Q2 -> 2003A U12 I7, O7-> N1 4
* Q3 -> 2003A U14 I1, O1-> N1 5
* Q4 -> 2003A U14 I2, O2-> N1 6
* Q5 -> 2003A U14 I3, O3-> N1 7
* Q6 -> 2003A U14 I4, O4-> N1 8
* Q7 -> 2003A U14 I5, O5-> N1 9
*
*
* debug connector
* Pin 1 3.3V
* Pin 2 SWIM
* Pin 3 NRST
* Pin 4 GND
*
*
*/
Before committing to reprogram, you could tack thin wires to U4 SER (14), SRCLK (11), RCLK (12), /OE (13), GND (_8), and +3.3Vcc (16). Then use your favorite 3.3V MCU module (eg. Arduino, Teensy, etc.) to produce a SPI stream with either the STM8 removed completely OR just kept in reset (pin 4 grounded) which should default all pins to hi-z inputs. If using the latter, I'd put a 330R in series per SPI signal wire just in case.
I'd want to avoid trying to remove the STM8, but holding it reset sounds like a reasonable approach, so I might investigate that. For that purpose my "favorite MCU module" could be an STM8S103F3 breakout board, as I have a few of those (might all have 5V regulators on them but still...)
Last time I did something like this was to re-purpose/enhance a "kinetic doorbell" receiver, which also used an STM8S. I made the assumption that the MCU would be protected from readout, and only after I had written my own code and tested it as well as I could on one of the breakout boards, I found that the MCU was in fact not protected! So, I was able to grab a backup of the original code, and also from the contents of the eeprom I was able to gain insight into the RF code used by the transmitter, which was useful for what I was trying to do.
I don't expect to be lucky again this time, but that is another thing I have not checked yet.
As for the /OE of the first shift register, I left the board running for a couple of hours without seeing that ever go high.
Here's my first attempt to write an alternative for the GeekStyles IN12 V3 Nixieclock board using the Cosmic STM8 compiler as i could not reveal the original software by 'powerglitching' and after accidently erasing the original software:
https://www.tromop.eu/geekstylesnixieclockin12v3/Work is still in progress but functions already quite well to my humble opinion.
grtx,
Onno
I also had this "GeekStyles IN12 V3" Nixieclock board, which every minute runs a cathode anti-poisoning routine that i hate so much.
So i looked for a solution and found first "
https://github.com/darkbyte-ru/Nixie-Clock-esp32" where the STM8 was replaced with an ESP32.
But fortunately I found your "simple" Solution. So i bought an ST-Link programmer, loaded your binary file and it works perfect for me.
Thank you very very ... much for your work
Hi everyone.
Here's my project for "GeekStyles IN12 V3" Nixieclock board. With night dimming and anti-poisoning.
The Cosmic and SDCC compilers are supported. Not all planned features have been implemented yet, but it works quite well.
https://github.com/siliverst/IN12v3clockP.S. Thanks to everyone who traced the schematic, it was a great help!
I am trying to use this custom firmware. Any updates or further info? Also I would like to edit the defaults since the clock does not save my settings on power off (12/24 hour, LED color, etc). Is that possible? Thanks.