Tag Archive for oscillator

Oscillations

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:

oscpcb1
oscpcb2
oscpcb3

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.

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:

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!