2hz crystal oscillator problems

Thread Starter

count_volta

Joined Feb 4, 2009
435
Hi, I have built the 2hz oscillator below, but using the mc14060b 14 bit counter, and my Vcc is 5V, not 12V.



I got the schematic here: http://www.reuk.co.uk/Making-Very-Accurate-Timers.htm


I connected it exactly as in the schematic on a breadboard, but noticed that my LED at the output is blinking faster than 2hz. I began to try things to fix it, and noticed that if I take the crystal and capacitors out of the circuit the LED is still blinking the same way. Turn power off and back on, still blinking. What the heck is going on LOL?

I think it might be noise going to the clock input of the counter that is causing this. The crystal seems to be doing nothing. Our own member retched has connected this circuit before and said he got it to work. I don't understand why its not working. Please help guys.
 

Wendy

Joined Mar 24, 2008
23,415
The 4060 is a ÷16384 chip as well as oscillator.

You will need a simple CMOS driver though.



It does sound like you have a level issue. How did you wire this up (construction method). I've been meaning to wire this up on a protoboard to see if I can get by with it.

The design is not written in stone though, I've seen several different version using variations of resistors and capacitors. Usually I see a variable capacitor to tweak the design.

I lifted this out of my personal cookbook, which in turn are based off of several different datasheets.

 

Attachments

Last edited:

Thread Starter

count_volta

Joined Feb 4, 2009
435
Ah okay, so its an oscillator also, that explains the blinking without crystal and capacitors. What kind of oscillator is it, square wave? What is the frequency it gives out? I read the data sheet but it seems vague on this point.

I am really not sure how the crystal circuit works exactly, and hardly know anything at all about crystals. I just know it vibrates at 32.768khz and the counter divides that down to 2hz.

Bill what is the transistor driver for? I am just going to use this oscillator as the clock for digital TTL chips, I hardly need any current.

As for how I built the circuit, I have a 10MΩ and 4.7MΩ in series to make the 15MΩ. Its slightly less than 15 but I'm sure its good enough right? I have two 10pF capacitors and the 330kΩ resistor. I connected it exactly as the schematic I have shown before and to the pin numbers in the schematic.

I also noticed that vibrations, and touching wires in the circuit causes the output LED to blink at different frequencies.

I would really like to get this circuit to work, because I am building this clock I designed, and it needs an accurate 1hz signal. I will try your versions also Bill.
 

retched

Joined Dec 5, 2009
5,207
I dont have the mc14060b.

I have used this more then a half-dozen times to help friends kids with science projects.

I would like to see a photo of your part and the circuit.

I am beginning to think you have the IC backwards (It may be printed wrong) OR the CMOS IC was damaged by static.

The pinouts for the mc14060b are the same.

Hrm..

Do you have pin 12 floating or do you have it pulled down to GND?
 

Wendy

Joined Mar 24, 2008
23,415
CMOS outputs are really, really weak. If you want to flash an LED from one you should use a driver. Some CMOS chips are stronger than others.

Electronically a crystal is equivalent to a complex LC circuit. Typically it has a series LC resonant sitting right next to a parallel, so two frequencies very close together are passed or rejected. Depending on the type of oscillator amplifier one of those frequencies are selected and create positive feedback.

I asked the question, the answer is important. What are you using to build this circuit?

Crystal circuits in general are picky. Things like stray capacitance will dramatically affect them, or just kill their ability to oscillate completely.

I have several 4060 oscillator projects planned for myself. One is to use an Altoids can and dead bug or Manhattan construction technique. The other is to use a protoboard. The first has a high probability of success, while I don't think the second has a chance in Hadies. If the second works I will put it in the AAC book experiments.
 

Thread Starter

count_volta

Joined Feb 4, 2009
435
Here is a photo of the breadboard like you asked for retched.



Sorry that its so blurry, but I took it with my phone. The chip is mc14060bcp. Yes I have pin 12 grounded as you can see.

The crystal I got here.

http://cgi.ebay.com/5PCS-Crystal-32...temZ250559292562QQcategoryZ7286QQcmdZViewItem

The way its connected right there in the photo, the led is flashing at much faster than 2 hz, I would say at 10hz. If I move the breadboard a little it slows down, or speeds up.

So what the heck is going on here?

Thanks

P.S. I tested the 14 bit counter by itself. I tested the Q4, Q5, Q6, Q7 outputs and used a debounced switch to increment the clock. Used led's at the outputs. The outputs light up exactly when they are supposed to. So the counter IC chip works, there is no doubt about that.
 

Attachments

Last edited:

Wendy

Joined Mar 24, 2008
23,415
You may not be able to get this to work with a protoboard, as I was saying earlier. They are nothing if not a bunch of parallel capacitors.
 

Thread Starter

count_volta

Joined Feb 4, 2009
435
You may not be able to get this to work with a protoboard, as I was saying earlier. They are nothing if not a bunch of parallel capacitors.
Are you serious? This circuit is that sensitive? I am building a binary clock and am planning to solder it all together next week, and this is supposed to be my 1hz signal.

How do I get it to work then Bill? Use tiny wires? Come on you can't just say I can't get it to work and thats it. I am waiting to hear how retched did it. He said he did it dozens of times, with this particular schematic too.

I may settle for a completed 1hz crystal oscillator and just buy it. I tried googling but can't seem to find such a thing. Do they come in chips or something? Crystal 1hz oscillators that is. I could probably try to get it out of a clock I guess, but I will need some help with that since the components inside clocks are usually tiny.
 

Markd77

Joined Sep 7, 2009
2,806
Try moving the crystal and the resistor much closer to the strips with the IC in. Another thing that might help is a 100uF capacitor on the power rails in parallel with a 100nF ceramic. Another 100nF capacitor across the IC power pins might not hurt.
 

Wendy

Joined Mar 24, 2008
23,415
Did you read the dead bug and Manhattan Techniques I linked to? For digital or low frequencies such as audio protoboards are fine, but for a crystal oscillator I'd use either a bread board or a small tin (as in Altoids can). It really isn't hard, just a bit of superglue (the rest you already have).

Anytime you have a circuit that uses 10pf caps a protoboard is iffy. I place 10pf as the approximate capacitance between the traces on a protoboard. For anything even approximately resembling RF you need the other techniques I referenced.

You could try a 12V power supply on the 4060 circuit, just to see if it helps.
 
Last edited:
I notice two things:

1) Layout! --> crystal oscillators are very sensitive and really must be as close as possible to their pins.

2) Why are the two 10 pF caps in series? In the schematic, they are both on opposite sides of the crystal and tied to ground. It's fuzzy but that's what I think I see.

I bet it will work if you fix that schematic issue and put all the components near the chip itself (you shouldn't need any wires, only the components themselves).
 

Wendy

Joined Mar 24, 2008
23,415
I notice two things:

1) Layout! --> crystal oscillators are very sensitive and really must be as close as possible to their pins.

2) Why are the two 10 pF caps in series? In the schematic, they are both on opposite sides of the crystal and tied to ground. It's fuzzy but that's what I think I see.

I bet it will work if you fix that schematic issue and put all the components near the chip itself (you shouldn't need any wires, only the components themselves).
As to issue #2, see the datasheet for the 4060.

While it may be able to work with a protoboard, I'm very skeptical. I've already explained why. I like protoboards, but as with all tools you need to know their limitations.
 

SgtWookie

Joined Jul 17, 2007
22,230
Just a little bit on nomenclature.
What you have built the circuit on is commonly referred to as a "breadboard". They're great for low-speed circuits, but are problematic with even moderate speed items; there are just too many parasitic properties (L and C).

"Prototype" boards aka "protoboards" are pre-drilled PCB's (printed circuit boards) that have various patterns of copper foil on the bottom side. These have far fewer parasitics than breadboards do.

"Veroboard" aka "stripboard" is a type of prototype board that has copper foil in strips on the bottom side.

Practically ALL IC's have a minimum requirement of an 0.1uF (100nF) metal poly film or ceramic bypass capacitor(s) across their supply pins. If it is a dual-supply IC, you need at least one cap from each supply to ground. If you don't use the bypass caps, you WILL have problems.

Crystals: are not all alike. Frequently you can get by using 10pF to 20pF caps on either side of the crystal. However, some xtals require that you use trimmer caps in a range of 10pF to 80pF on one side in order to get the correct waveform out. Your best resource is to examine the manufacturer's datasheet for the particular xtal in question.

Along a similar line; if you want your timing to be very consistent, you should take a look at Roman Black's OCXO project (oven controlled xtal oscillator). It is VERY simple and cheap to build using commonly available components, and will help a great deal towards making your time base stable. Otherwise, fluctuations in the ambient temperature will throw your timing off.
Link: http://www.romanblack.com/xoven.htm
 
Last edited:

Thread Starter

count_volta

Joined Feb 4, 2009
435
I notice two things:



2) Why are the two 10 pF caps in series? In the schematic, they are both on opposite sides of the crystal and tied to ground. It's fuzzy but that's what I think I see.
:D Laughing out loud!!!

You are absolutely right, I forgot to connect the capacitors to ground. Guess what, I just connected it and I got a steady 2hz signal!!!



I just dropped the board on the table a few times and shook it, and nothing. Steady 2hz signal. Its not that sensitive after all.

Its funny how you guys were trying to come up with reasons like internal capacitance of the breadboard and etc, when the whole time I just forgot to connect the capacitors to ground. It works now. Problem solved. LOL.

On the other hand I did learn a lot of cool and useful information and will definetely bring the crystal closer to the IC and use shorter wires, and have capacitors across the supply to minimize unwanted parasitic capacitances and inductances.

Thanks.

P.S. Bill I think I just proved that you CAN build crystal oscillator circuits on a breadboard and have them work, so don't be afraid to try it.

Oh and also, are there any special precautions I should take when soldering the crystal onto a pcb?

Ah and I did notice that when first turning power on, the LED blinks too fast for like 1 seconds and then gives a steady 2hz signal. That must be the transient period before everything settles down.
 

Attachments

Last edited:

retched

Joined Dec 5, 2009
5,207
That little ground symbol next to the caps on the crystal got away from you did it?

I would recommend following all of the tips on this thread.

Bill is right about the capacitance on the board. You MAY notice a difference in your timebase "as-is" from room-to-room. Changes in humidity can also create problems.

They are more sensitive than you may think. Also, dont drop crystals. They are made of crystal ;). Impact can break the crystal.

I feel like I am repeating everything else already posted, but it is quite important.

Next time you are searching for and buying components, you should pick up a few dozen (or hundred) .01uF ceramic caps. They REALLY are part of every project that uses ICs. After adding an IC to a project, the VERY next thing to add is bypass caps. REGARDLESS of them being shown in the schematic.

Any AC ripple can affect your circuit. After all, the IC IS a ripple counter. ;)

Keeping the circuit as "tight" on the bread board as possible is good practice. Less little antennas going every which way.

I would also like to second the sarge's recommendation for Roman Blacks XTAL oven. That is a very smart, very tight design. (I think it looks cool in the project too ;) )
 

Thread Starter

count_volta

Joined Feb 4, 2009
435
I connected the 2hz to a T flip flop to make the 1hz signal for my clock. It works, but I did a little test and after connecting the 1hz oscillator to a 15 bit counter and observing the LED's, its losing something like 5 seconds every 10 minutes. I was comparing it to a stopwatch. This won't work.

So much for crystals being more accurate than the 555 square wave. At least home made crystals on a breadboard that is. I think I need to get the 1hz signal circuit out of an old clock for my binary clock project, those babies are accurate as heck already and are soldered together in tight packages with minimum exposure to the outside world and its imperfections.
 

retched

Joined Dec 5, 2009
5,207
You really have to get that thing on a suitable board. That capacitance is KILLING you.

OR

You could break your professors watch before having him see your project ;)
 

Thread Starter

count_volta

Joined Feb 4, 2009
435
You really have to get that thing on a suitable board. That capacitance is KILLING you.

OR

You could break your professors watch before having him see your project ;)
This is not a project for school retched, I am just doing this for fun. Now I am thinking whether I should take the 1hz source from an electronic clock with actual hands, or take it from an old digital alarm clock?

Here is the first method.
http://www.josepino.com/circuits/one_second_timebase

I need accuracy. I cannot have my binary clock lose 5 seconds every 10 minutes, and the only way around this, as far as I see, seems to be, to take apart an old clock.
 

retched

Joined Dec 5, 2009
5,207
Well, the old digital alarm clocks MAY use the 50/60Hz AC cycle as a time base (Which is surprisingly accurate)

Im pretty sure Bill_Marsden mentioned this in another thread..but Im a repeater ;)

If you notice how your time may be off a min or so when the power goes out and a standard digital clock uses battery backup, its because they switch to a RC circuit to keep time while the power is out. The RC circuit is pretty bad from an accuracy standpoint.. especially when you use non-precision parts.

The crystal counter SHOULD be a pretty accurate way to go.

It could be a few things. It could be the crystals you got from ebay were damaged before or during shipping. (or when you dropped the breadboard ;) )

It could be the breadboard capacitance...
It could be the counter.

What I am wondering, is... You said the LED continued to blink when the crystal was removed.. So I am wondering if the onboard OSC is affecting your timebase.

Is there a way to disable the on-board osc?

Also, I would re-build using the Manhattan or Dead-Bug style that Bill_Marsden mentioned earlier.

It is a quick way to see if it's the breadboard and/or wiring that is causing your trouble.
 

Thread Starter

count_volta

Joined Feb 4, 2009
435
Well there is nothing really wrong with the circuit. It works. Gives off pretty accurate 2hz signal.

Its just when I put it through the flip flop, made it into a 1hz signal and used it as the clock input of a 6 bit counter and noted the led's blink, I compared the timing to a stopwatch.

For example the 6 bit counter was showing 001111 (15) when the stopwatch said 30 seconds.

Then after some time later it was showing 001111 when the stopwatch said 28 seconds. Then 25 seconds.

Now I trust the stopwatch is accurate. Stopwatch in my computer. That means the counter is slowly but surely getting desynchronized from the stopwatch. That means the oscillator is putting out something other than 1hz sometimes which is obviously bad.

Now my final design will be soldered on a pcb board, it won't be on a breadboard with long wires.

You know what I am going to try rebuilding the 2hz oscillator using much much shorter wires and having everything really tight and compact, if it still loses seconds after that then I may try hacking an old clock, but I really hope it works.
 
Top