Archive for Nixie Tube Clock

Return, re-education, progress

So, after a long hiatus I am back in the lab and back to try and finish at least one damn project before I die. Started innocently enough, was bored on an evening and not knowing what to do with myself I thought I’d catch up on some of Dave Jone’s excellent video blog entries. Naturally, his energy and charisma stoked the flames of interest and had me missing the heady smell of flux and the hum of an energized transformer. I looked over what I had on the go and found with delight that I actually remembered a lot and was able to get back to where I was intuitively in no time at all (read: a couple of weeks of review).


Here I’ll summarize the projects I have on the go before I get to the good stuff – the experiments.

Nixie Clock

Almost finished. Kinda. Sorta. The schematic I reviewed for any errors and made sure I got everything right – no problem. I gave the half-finished board a good look-over and found it just fine, needing only to be populated. I know for certain I will be needing a second board on top of it, which is fine, to house the ridiculous number of high voltage transistors as well as the remainder of the 4017 counter ICs. I mapped out a plan of how i’m going to do my interconnects as well and puzzled over the problem of having something like 30 connections going from one board to the other. This is what happens when you use data that isn’t multiplexed and no microcontroller, you basically end up with a lot of wiring. For the power connectors and a few other things I don’t mind using molex style PCB connectors but I was faced with a challenge of how to route the 16 connector outputs from the bottom board 4017s to the top. I briefly flirted with the idea of keeping them all on the same board but then I would end up with 28 odd connections I would have to take to the second instead of 16. So with that in mind it dawned on me that the old IDC connector and the ribbon cable are ideal for this application! I’ll pick some up at the shops when I finally make it down there. As always, I’m s a few parts short on every project so it’s a worthwhile journey. All this one needs apart from this is a few switches to set the time some way to mount the nixie tubes securely and safely and of course a box to put it all in.

Power Supply

The power supply is, and always was, a beast of a project. Some do their first power supply simply but I wanted something flexible, cool, powerful, and more or less something I will want to use years down the road. The inevitable revisions take forever and the whole project is quite complex by this point. As I’ve mentioned before I’ve broken it into modules to make it easier on myself: AC Power, Pre-regulator, Current Limiter, Voltage Regulator, Control and display.

The AC Power board, as shown from previous posts, is complete and overall I’m quite pleased with it. It does have a rather high DC voltage output of ±42.6V which necessitates the inclusion of the pre-regulator block (mentioned previously) but otherwise performs just fine and will take more than I could possibly throw at it before it dies. Subsequent video watching and research has made me want to add the rather important addition of MOVs (Metal-Oxide Varistors) to add some over-voltage protection to the AC input of the supply though this is a rather trivial addition and simply have to add one each between the hot-ground, neutral-ground, and hot-neutral. I will probably add them to the rectification board or may have them on a separate board or hanging off the terminal block, I have not yet decided. Over-current protection is already present in the 5A hot fuse in the terminal block, as well as redundant case fuses I will employ in the final build. There is also the question of the ground lift. Research has shown me the wisdom of not tying the centre tap of the transformer (the 0V rail) to mains earth so with that in mind I will keep it floating by default with an aircraft switch on the front to enable mains earth referencing should I need it. Easy.

The pre-regulator has seen much progress since the last time I took a poke at it. I had previously included it, discarded it, then included it again in a much more workable form. After much fiddling in circuit lab, I settled on using a zener diode/darlington transistor regulator and crunched all the numbers into a workable solution. I did build it up and test it but will expound on my results in a subsequent blog post. The upshot is I can knock that crazy 42.6V down to much more usable 28-29V and have it work over a variety of loads which is nice. There still is the question of stability and whether or not it will play nice with the rest of the circuit.

The other modules are untouched from last check. It will be a long time before a completed product. I’m still fuzzy on a bunch of things and I’m expecting pitfalls along the way which could be both frustrating and highly amusing. Of course, that is why i’m doing this in the first place – I’m learning, and that is its own reward.

Dummy Load

Of course this ties in closely with the power supply project as I need some practical way to test the thing under working conditions not to mention calibrate it. It has taken a back seat to other projects yet I will have to build it to build my power supply. Projects always lead to more projects. It all started, as mentioned previously, with Dave Jone’s excellent example, but I’ve been further spurred on by the discovery of Martin Lorton’s excellent version which will probably be much more suited to my needs. Naturally, I will add my own modifications to both make it my own and to suit my needs. Martin’s has a 2A cap (I believe he reduced it to 1500mA by the end though) and I need mine to sink 3A to properly test my power supply. It should be a simple matter of selecting the right mosfet and/or using mosfets in parallel.

Given that this project is likely to take me as long as the others and I still have not been able to leave my house to grab the appropriate parts, I went back to why I need this damn thing in the first place. The easiest solution for a dummy load is to of course whack the right value resistor that can handle the power you want to dump through it. This has proven most frustrating since not only do I not have a collection of power resistors on hand, but finding ones with the appropriate tolerance and power dissipation capability has proven to be difficult.

I decided for a more low-tech approach and see if I could make my own power resistor to act as a static dummy load just for now. That is a subject of the next blog post which I will marry with the power supply pre-regulator test. Quick answer: I did, and it not only worked but I’m still alive and my house is still standing.

New Projects

Always something new an shinier on the horizon, isn’t there? This is why I never get anything done.

Milliohm meter

Keeping with the theme that projects beget other projects, the power supply needs a dummy load, the dummy load needs a precise high power low-ohm resistor, I need a way to measure low resistances. It’s commonly known that most DMMs do a woefully awful job of measuring low resistances. One has to dump enough power into it to see a measurable result, and things like the leads now have a nontrivial resistance. So I started building an adaptor for my multimeter that fixes these problems. A post will be written on this also. No, I didn’t finish this either.

eGo Charger

This is merely an idea and a helpful schematic posted by someone on a forum somewhere. One of my eGo chargers for my ecig is malfunctioning and not doing it’s job and I sit here rather nervously waiting for my one functioning one to die and deny me my fix. I’m merely thinking about this one for now, if I get it wrong i’ll have explody batteries on my hands so you can bet I’m going about this one carefully.


Made sure I did something constructive today…

Added on to my circuit board from the previous post. This is the heart of any clock: the crystal oscillator. I’ve explained it more or less in previous posts, a 4.194304MHz quartz crystal is set oscillating while a CD4521 24-stage frequency divider divides the frequency in to discrete steps by powers of 2. Of course the primary use for this is to get a clean 1Hz output from the thing.

After smacking my forehead and soldering one joint I forgot about when the initial test didn’t work. I’m happy to report it is working just fine. Here’s some pics and a video of the scope readout on my crappy (but working) PM-3200:


I think I had it set on 2 volts per division and there’s some parallax error from my crappy camera skills but there you have it. You can see that half at least of the board is still unpopulated and this will house the two seconds counters which will take the output of the 1Hz (i.e. one pulse per second) and convert that into counting minutes. Unfortunately, I highly doubt I will be able to fit the minutes and hours counters on the board (though it might be fun trying, $10 says I burn myself) so they will live on a board which I will mount on top. Beyond this, it is going to be a very boring wiring maze.

I have yet to find a suitable box for it, time to raid antique and junk stores methinks… if only I could work with wood (and make it look good) I would build my own, but alas, I stink at carpentry.

Progress amid much laziness

Nixie supply soldering coming along!


Winter is hard, it’s cold, there’s not enough food, the hounds attack… wait. That’s my video game. Relevant though, because that’s exactly what has been distracting me from making serious progress on my electronics projects. I am referring of course to Don’t Starve. Sometimes though, I have to force myself to haul my ass down to the basement and get something done – or I never will. I have a long history of procrastination and it’s time I finish a few things with electronics before the ice thaws.

Today, I managed to get down there and solder some more. Like many things, it’s easier once you get into the rhythm of it. I’ve never been great at soldering (see my previous post on the voltmeter sub-project) but it’s exactly true that practice makes perfect. I’m finding with each successive try, I am making better, cleaner, shinier joints that are less likely to short or crack or be non-functional.


Today is a landmark. The first time I soldered something up and it worked. I didn’t have to reflow any joints or troubleshoot mistakes, it worked. I couldn’t be more pleased. From the pictures here you can see me assembling my nixie clock and what I have done so far is solder on a triple power supply. The first two are quite simple using LM78xx regulators to gave me +12V and +5V. No explanation needed there. The second feeds off the 12V and uses a switchmode circuit to bump it up to 170V – the butter zone above strike voltage for my nixie tubes.

After a couple hours of soldering and a quick trimpot calibration, it reads 170.2V. Brilliant.

Next step is to fit the oscillator into the small space beside it to the left which consists of a 4521 frequency divider, a crystal and some passives.

Nixie Clock Schematic Finished

After a lot of testing, it’s looking good!

My Nixie Clock Schematic

My Nixie Clock Schematic

So here is my more-or-less final schematic. Since I used bits ripped off from a bunch of places and cobbled them together, use it freely for your own clock project. Schematic posted here.

Please of course bear in mind that though I’ve made an effort not to make mistakes on the schematic, they are bound to be there so if you build this and hurt yourself because you didn’t check your work, well that’s your fault isn’t it? You’ve been warned. Some parts of this circuit have potential around 170Vdc which will zap you good!. I very much doubt the the circuit can kill, but I don’t want to see a test of that either. Enough, you get the point.

So I am quite pleased. Although I’ve been unable to breadboard up the entire thing at once, I’ve built it in pieces and it seems to work well. Quite low power also, I reckon the thing draws 150mA or less. I will have to wait a bit to give a measured reading on that as I accidentally melted one of the fuses in my multimeter and will seek a replacement for it.

Things put in, things left behind

There are many things I added to this circuit to give it some functionality and to make it usable. One can set the hours and minutes independently using push-button switches and in this sense works just like an alarm clock. There is also a seconds reset button which will zero out the seconds when whatever your setting it to reaches zero seconds to keep them close to in-sync. Holding down the button also acts as a seconds-hold so that’s quite useful. These three should be push-button momentaries, the type that have three terminals: a normally closed, input and normally open. The seconds reset needs to be double-pole double-throw momentary. All cheap and easy to find.

I’ve helpfully labelled the transistor pinouts as well. As it happens, I seem to have selected ones with every type of pinout combination possible. Infuriating really, why can’t they just stick to one standard one? Doesn’t matter what it is, just make it the same! All of the parts here, apart from the nixie tubes themselves, are cheap as chips and commonly available.

How it works

The circuit is divided into five basic sections. At the bottom left we have the 5V power supply (simple 7805 regulator) which powers all the CMOS chips as well as the crystal oscillator and the vanity LEDs. Moving right we have the 4521 frequency divider IC and the crystal oscillator. The resistors and caps start the crystal resonating and the 4521 divides its frequency down to the desired pulses we need for other parts of the circuit.

At the bottom right is the blue ultra-bright vanity LEDs which I plan to mound under the nixies to give them a nice nuclear blue glow that I’ve seen from other projects. Gotta have that! It pulsates once every four seconds and uses an RC timing circuit to fade it in and out. It should be noted that this circuit causes slight voltage fluctuations elsewhere in the circuit though these seem to not effect it’s function at all.

Above that we have our 12V Supply. I chose a 12V wall wort, since they are frequently over voltage anyway and as it happens it overcomes the 7812s dropout voltage to make a reasonable 11.90V. Moving right we have the small switch-mode supply that steps up the voltage for the nixies to about 170Vdc. This is quite a lovely circuit I lifted in its entirety from stuff posted around the net (see my previous posts for schematic). It is quite reliable and works well. As I mentioned in previous posts, it has a maximum output of 10mA. Since each nixie draws about 1.25mA, and each of the neons that make the separator colon draw about 1mA, we are only up to 7mA. Plenty of headroom. This saved me from having to step up un-isolated mains voltage and makes the whole circuit a damn lot safer.

The third row up from the bottom is where all the time calculation happens. Six 4017 counter ICs are used, one for each digit. Since the clock only has four nixies, the first two (the 1s seconds and the 10s seconds) are left with their outputs unconnected. Function couldn’t be easier: the 1s seconds accepts the 1Hz signal from the 4521, counts to ten then resets, passing a signal to the 10s seconds 4017 IC which counts to six and resets, passing it on to the minutes and so on. The function of the three switches is explained above and the hours in the previous post.

Finally, at the top we have the four nixie tubes and two neon lamps for our display. Each number of each digit (and the pair of neons) are driven by the MPSA42 high voltage transistor which accepts the input from the appropriate counter IC output via a 33k resistor. This works wonderfully. The two neons use the same transistor, but use the 1Hz signal from the 4521 as an input.

That’s it really. Better explanations of how this works are out there written by others more eloquent than I.

If you are going to build this up, I would highly encourage you to examine the circuit closely and test as you build it up. For a beginner project (as that is what I am still) this has some quite excellent educational value.

So now, I just have to build it up. The last challenge is, of course, to select (or build) a suitably attractive case for it. I’m hoping to hunt through a few junk shops for a nice box I can use.

Nixies on display

and the tiny amount of current that drives them

Here’s just a quickie post to show off my Hivac XN11 nixie tubes. I simply brought out the power supply for them and hooked up all four to various numbers. Nothing special apart from the nixies themselves which I find nerdtastially beautiful! Here:


Isn’t that a thing of beauty? I hooked all four of them up (for the first time ever as it happens) to try and get a current reading to see if I might be in danger of overloading my power supply. This is a serious consideration considering such high voltages (~170Vdc) bad things could happen if I get to close to the edge. I was delighted to find that four nixie tubes draw a measly 4.67mA. Considering my power supply for them is rated for 10mA, I’m in business!

24 hours in a day

Like many of you feel, it’s simply not enough :)

What I’m referring to is the slight issue with 24 not being a multiple of 10 and using two decade counters for an hours display for a clock. Normally, I can set a 4017 counter to reset when it hits any of its digits without issue. In this particular case, the 1s hour digit has to count to 10, increment the 10s, reset, count to 10 again, increment the 10s again, reset and then count to four at which time both hours counters need to be reset.

This is a tad more difficult than counting out 60 seconds and 60 minutes in which the counters can reset themselves without caring what the others are doing. For the hours, I have to have them conditionally reset which brings up a whole bunch of interesting thoughts on digital logic.

This is really my first real foray into digital electronics that wasn’t some silly LED chaser or other such dinky toy. The 4521 and 4017 chips are digital CMOS chips and thus only accept inputs and generate outputs as either DIGITAL HIGH (about 5Vdc or DIGITAL LOW (a certain threshold beneath that). The 4521 (as explained in previous posts) divides the crystal frequency down to 1Hz pulses that are HI for half the cycle and LOW for the other half (a square wave). Every time the 1s of seconds counter receives a HI pulse from the 4521, it increments a digit by making its next sequential output HIGH and making the previous one (as well as the other outputs) LOW. It does this until it hits it’s reset point, which is dictated to where it’s RESET pin is tied to. If it’s tied to ground it will count to 10 and reset. Optionally, it can be tied to any other digit to set the reset point. When it hits this point, it sets the 0 output to HIGH, the others to LOW and sends a HIGH pulse out of it’s CARRY OUT output pin. This carries a signal to the next counter’s CLOCK input causing it to increment and the cycle goes on.

All very logical, which is what you would expect from a chunk of digital electronics. In this light, the solution to the 24 hour reset problem would be a logical one.

Since the 1s of hours digit needs to count to ten twice, we need to tie the RESET pin to ground. Since the 10s of hours needs to count to three and then reset, we tie it’s RESET pin to its 3 output pin. So now we have a case where the two counters will count to 30 or exactly 6 hours more than the length of a day on planet earth. Not a very good clock if it falls behind six hours per day and displays cryptic times like “27:45″.

What’s going to solve this is a conditional reset of both counters. Using our logic we can say that IF 10s == 2 AND 1s == 4 THEN reset both counters. In order to do this, when the 1s just turns 4 and the 10s is at 2, we need to take both RESET pins HIGH so they both go to 0.

Off the top of my head I can think of two possible ways to do this. One being digital the other being somewhat analog. The first would be to take the above logical statement literally and use an AND gate, which is one of the basic logic gates and available in a convenient IC package of 4. I could use something like a 4081 quad AND gate or make AND gates from the 4011 quad NAND gate (you can make any gate out of a bunch of NANDs). Same goes for the equivalent 7400 TTL series ICs. It’s two inputs would be the 1s 4 output, and the 10s 2 output, the true condition taking both reset pins HIGH. Bit of a problem to figure out how to disconnect the 1s reset from ground though. I’m thinking on it.

Another, simpler solution is suggested by the original schematic for the nixie clock, which ties both RESET pins together with some circuitry voodoo to basically perform the same task. What appears to have happened is the 1s digit is shifted over a nudge so that the reset pin can be removed from ground and be solved using a flip flop in combination with the other reset pin. The modification to this circuit to make it a 24 hour clock is something I still need to decipher but is basically the AND logic as described above.

Few hours later

It appears someone else has ran into the same issue and even done up a clearer schematic to illustrate how the hours resetting works for a 24 hour clock. here:

24 hour 4017 wiring

This is a snippet from this schematic LEDSales in Australia (not Austria heh) who interestingly also carry the schematic and sell kits for both this and the power supply for the nixies that I’m using. From what I can see here, they’ve modified the one over at Mike’s Electric Stuff (or vice versa or who knows where the original one came from) in a way that agrees with his notes on the original I have.

It sort of makes sense, from looking at it. The two reset pins are indeed connected but how and why this works I haven’t a clue! I am assuming that it is balanced to only reset if both the 10s hours is 2 and the 1s hours is 4 (as explained above, ok that works) but how the 1s hours resets when it has to count to 10 twice is a mystery to me. I also don’t get that 4148 diode, why it’s there and why it’s biased that way.

The only way to find out is to build it of course! To the lab!

20 minutes later

Well waddaya know? It works! Fantastic. Wired it up according to that schematic and it does indeed count to 24. Mind you, I still don’t understand WHY it works. The reversed biased diode, resistor and cap and what these are actually doing are not obvious to me. Perhaps I’ll submit it to the EEVBlog forum and let the experts there explain it to me in layman’s terms.

That’s it for the timer! Another module is ready to rock. I guess I’ll just figure out how to set the time, a simple pair of push-button momentaries to increment the hours and minutes should do it. Since I probably won’t include a seconds display, there’s no reason for a seconds hold switch. Probably the most challenging part of this build will be finding a suitably nice case for it. I’ll talk about that in a soon-to-come post.

10 Minute Clock

I briefly had a chance to mess about in the lab last night just to continue doing some tests for my nixie clock project. I’m pretty sure I have a firm handle on how the 4017 decade counter works and the timebase is working beautifully. I also did a quick current measurement of my Hivac XN11 nixie tubes to be sure the power supply can handle them.

I first did a simple test of adding to my previous circuit with the addition of two more 4017 decade counters. I had run out of them and was forced (oh poor me) to go out shopping for more. I bought about 20 of them thinking I’ll make good use of these chips in other projects down the road. The result, before I ran out of space on my large breadboard, is a 10 minute clock that counts seconds and one digit of minutes before resetting. Video of the result is below. I used the 16Hz output from the timebase so it’s more exciting than watching paint dry or beards grow.

So yeah, that works. I’ve also been mulling over how to get the hours to reset at 23:59. Though it’s easy to get one counter to reset when it hits any number, it’s more difficult to get two counters to reset conditionally. What I mean by this is that the hours digit must count to 10 twice, then count to 4 while the 10s of hours digit counts only to 2 then resets at 3. When the 10s of hours resets, the 1s of hours should reset when it hits 4.

This I can make possible by linking the reset signals of both chips together though how I will actually do this isn’t quite clear to me yet. The original schematic I’ve had for years, found over at Mike’s Electric Stuff, suggests that I connect the two together and use an RC plus a diode to actuate the reset. The 24 hour clock instructions are written (the schematic is for 12 hour clock) rather than diagrammed so I’m trying to decipher what they mean without melting anything. It would mean that I can ditch the 4013 flip flop entirely from the circuit, being unnecessary.

It’s on the list for this evening’s entertainment. I’ll modify my 10-minute clock to simulate the hours digits for testing.

I had also given some thought to adding two more digits to the clock, which would be easy to do provided I had more nixie tubes. I was gifted a pack of 4 so that is rather limiting. I’ve found a potential source here in Toronto so I may investigate adding a seconds display to my clock. Or I may not. Reason below.

Power to the nixies

The original nixie clock schematic linked above is great I am sure, but it did scare me a bit in that it used un-isolated mains power to both power the circuit and provide a clock for it. I am not quite confident enough to mess with that especially given a certain degree of klutziness of which I am prone. My alternative was to use the schematic for a kit I found that is a power supply for nixies and neon lamps which is pretty cool. It is much safer to my mind and I can use a wall wort to power the thing. One limitation of this little switchmode converter is that I read somewhere it has a max current output around 10mA which is not much at all.

Fortunately, though they require a high voltage to operate, nixies draw very little current. I read somewhere that a typical max current rating of your run-of-the-mill nixie is about 2.5mA. Using the 33k resistor (recommended for the XN11) and 170V I am able to get the things to light up nicely. A quick current measurement from my multimeter gives me the joyous news that it draws a measly 1.25mA. So technically I can power up to 8 of them. Being the cautious sort, I would limit myself to 6 of them and/or a neon lamp to indicate the flashing colon.

I think what I will probably end up doing is just stick with the 4 digit clock and use ultra-bright blue LEDs underneath them to indicate that seconds are indeed being counted. After all, a seconds display is nice to look at when you are playing with a clock, but annoying in every other conceivable circumstance.

The LED under-lighting idea came from photos of numerous nixie clock projects and looks pretty damn cool. It would be a simple matter to add 4 ultra-bright LEDs in any colour I choose, then use a simple NPN transistor to switch them on and off to the 1Hz or 2Hz signal (whichever looks better). The addition of a capacitor would also give them a fading effect rather than an annoying blink. Going to look super-cool!

10 Second timer

As a follow up to the previous post, I breadboarded up the timebase and added a counter. Due to lack of 4017 chips, it can currently only count 10 seconds and reset. This is quite strange as I could have sworn I had cubic buttloads of 4017 counters laying about in my parts bins. I had used them for a previous project and I usually never buy parts singly. There are probably more in a baggie somewhere, I’ll have to hunt or hit the shops to grab some more.

Timebase and 10 second counter

Timebase and 10 second counter

Murphy, in his infinite wisdom, decided to hand me a non-functional 4017 just to drive me crazy for half an hour wondering what I had mis-wired or thinking the clock signal was too weak to trigger the 4017 (which is foolish, of course it isn’t). After ripping another one out of the aforementioned old project (I’ll have to replace it later), it works a treat. Using the 1Hz output of the 4521 (see here) and dumping into the CLOCK input of the 4017, it increments once per second. Nice.

Next step is, of course, to obtain several more 4017s either from the nethers of my parts bins or from the shop and chain them together to count seconds, minutes and hours. The Easy part will be getting the 10s of seconds and minutes to reset when they hit 6 (60 minutes/seconds), the more difficult will be getting it to roll over at 23:59:59 to 00:00:00. I see a solution in the schematic to roll it over using a D-type flip flop so that will be educational as well.

See it in action:

Dividing Frequency

Crystal oscillator and dividing it’s frequency to make something useful

Last time I was messing with crystals, I managed to get a stable 0.5Hz timebase for my nixie clock and frequency counter projects. After some investigation through data sheets, I thought I’d take a moment and de-mystify a very useful IC called the 4521 24-stage frequency divider. Not that it is much of a mystery to those who know electronics, but for an amateur like myself who is figuring this all out for the first time, it can be a bit annoying to build something and not know why it works. I won’t go into the details of the crystal oscillator part, but focus on the 4521 IC.

Basically what this little beastie does is take the frequency pulses from a pulse generator (in this case, a crystal oscillator) and performs some math on them to divide the frequency down from the megahertz range to the hertz range which is more suitable for clocks and things that humans actually will see.

Consider the schematic on the right.


Pretty simple huh? The crystal’s frequency (printed on the can) is 4.194304MHz. That’s 4,194,304 cycles per second. You might think that is a weird number to pick but as usual, math comes to the rescue. Stick with me. The 4521 frequency divider exponentially divides the frequency generated by the crystal oscilator by powers of 2. You can see outputs labelled Q18-24. These are the exponents of 2. So Q18 is 218. What it does is divide the frequency from its input by this number and out pops the result on the appropriate pin of the IC. So in the case of Q18: 4,194,304/218 = 16Hz. Get it? Not hard at all. For my 0.5Hz timebase, I used the Q23 pin so: 4,194,304/223 = 0.5Hz. I’ve helpfully labelled the outputs on the schematic for you to show the various output frequencies.

Of course, if you substitute a crystal with a different frequency, you will get different results using the math above proportional to that frequency.

Fried crystals mmmm

Parallel to my power supply project are two others, both requiring an accurate timebase.

These are my nixie tube clock and my frequency counter (which I will probably combine with my function generator that I will also build).

The two, being time-based, are inherently related. The nixie clock happens to use the mains frequency as a timebase and I really do not like the idea of using an un-isolated mains if I can possibly avoid it. The frequency counter schematics I have all seem to use a crystal timebase which seems more logical. After all, if all of our clocks and watches rely on them, why can’t my nixie clock?

With the mind to use the same time base circuit for both projects, I thought I’d quickly whack it up on the breadboard and see what I get.

I first tried the timebase from Miguel Pedroso‘s cmos frequency counter project. I liked the look of this project, as it seemed simpler than the other one I was looking at which looks scanned from an old electronics magazine. Also, it uses the more modern 4000 series cmos chips rather than the 74HC ones (which I am sure are good too). Anyway, his timebase was deceptively simple, involving only a CD4521 24-stage divider, a 4.194304MHz crystal, a trimmer cap, and a 10pF cap. Great, I like simple.

So I build it up and immediately notice something wrong. It’s not oscillating. What’s more, the 7805 regulator powering the thing is heating up, which it most definitely should not. I tried fiddling with it, checking my wiring, swearing at it, nothing worked. It could have been a dodgy trimmer cap or some other mistake of mine, after all Miguel Pedroso seems to have got his working fine and he did warn me the thing was touchy.

Reaching a dead end, I figured I’d try another schematic I found in a forum, which seems to agree with many others I find floating around the internet. Posted here:

1Hz timebase

My sincerest apologies to the original author and the gentleman (or woman) who posted and cleaned it up. I have forgotten where I found it.

Anyway, I build this up and the bloody thing still doesn’t work! On a whim, I swap the crystal out for another one and behold! My ‘scope starts twitching hi and low every second – making a 0.5Hz square wave. Joy.

I tried the original crystal and discovered it is indeed dead. For all I know, it could have always been dead, or it could have been fried due to the absence of resistors connected to the crystal in Mr. Pedroso’s diagram. Either way I got it working!

Even more fun, I noticed the other output pins on the 4521 give you different divisions of time. It appears I can get 0.5Hz, 1Hz, 2Hz etc. Handy!