Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

32.768 khz oscillator

Status
Not open for further replies.

dr pepper

Well-Known Member
Most Helpful Member
I need 32khz for a project.

Thinking this would be simple I breadboarded a circuit using first a 74hc00 nand, then a 4000 series nand.
Cant get the bloomin thing to oscillate, tried various load capacitances and a 10 meg resistor across the inverter, as well as a resistor in series with the xtal from from 0 to 220k.
The load capacitance for watch crystals is 30pf.
So as a last resort I tried a 4060 which has a dedicated oscillator, and it works perfectly, with or without load capacitance.
So what is different about the nand gate oscillator within the 'hc4060 and a 'hc00 nand?
 
Last edited:
Buffering.

You have to read deep between the lines of the datasheets for this one. The RTC output of the 74HC4060 are unbuffered, which reduces the gain, and generally makes them better for crystal oscillator use.

**broken link removed**

On page 7, the output voltage of 3.98 V with a 4.5 V supply is quoted for a load of -0.65 mA for the oscillator connections and at a load of 4 mA for the main outputs.

The 74HC00 is buffered will tend to oscillate at much higher frequencies and it will be unstable and won't switch cleanly with the slow rise and fall times associated with a 32.768 kHz oscillator.

**broken link removed**

On page 4 it says that has a maximum transition time of 139 ns/V at 4.5 V, so it should take no more than 625 ns to go from 0 - 4.5 V. I can't be bothered to do the slope calculations accurately but the overall cycle time of a sinusoid with a rate of 139 ns/V at the mid point and 4.5 V amplitude is around 2.5 μs, so the frequency is around 400 kHz, so you shouldn't try feeding a 74HC00 running at 5 V with a sinewave that is slower than that.

You would probably get good results with a 74HCU04. The unbuffered versions don't specify a maximum transition time, while the buffered ones do. You can also get the single gate ones, if you don't want a whole 14 pin IC for the oscillator.
 
Think I used a CD4049UB device for similar job .... a few( many ) years ago...
 
Hello there,

I've used all kinds of gates to make oscilators for use with crystals. I've even used the original TTL family which is not even CMOS.
The trick is to get it biased right, and sometimes two gates works better like with TTL.
Also keep in mind there will be some drift with temperature.

But the best oscillator by a long shot is the DS3231 chip. It's both a crystal and an oscillator in one IC package. No external crystal to worry about, and the tolerance is better than any single crystal oscillator because it has built in temperature compensation. The published tolerance is 2ppm, but it's usually better than that because that's over a wide temperature range. It is also a real time clock, but has a 32kHz output (might need programming to get that). I dont think you'll find a more accurate oscillator anywhere without spending a fortune.
Most crystals will do 100 to 200ppm, and some as low as 50ppm with the right choice of 'load' capacitors, but this does 2pp which is much, much better.

I dont know what your application is though so i dont know how much accuracy you are looking for. Frequency counters and wall clocks work better with high accuracy, high stability oscillators like 2ppm.
 
I need 32khz for a project.

Thinking this would be simple I breadboarded a circuit using first a 74hc00 nand, then a 4000 series nand.
Cant get the bloomin thing to oscillate, tried various load capacitances and a 10 meg resistor across the inverter, as well as a resistor in series with the xtal from from 0 to 220k.
The load capacitance for watch crystals is 30pf.
So as a last resort I tried a 4060 which has a dedicated oscillator, and it works perfectly, with or without load capacitance.
So what is different about the nand gate oscillator within the 'hc4060 and a 'hc00 nand?

Hy dr pepper,

Here is a link to the MCS-OV-7604-C7 surface mount, 32.768 kHz oscillator module which has good frequency stability without needing a stabilized power line.
It has a comprehensive spec, which a roll your oscillator would not have. It only uses 300nA, and is a reasonable cost at £2.85 UK.
**broken link removed**
http://uk.rs-online.com/web/p/crystal-oscillators/6727647/

spec
 
3 excellent replies cheers guys.

Buffered gates was in the back of my mind, I was too lazy to consider that one.
Of course what you say makes sense, the transconductance of the gates is critical for oscillation, 32.768 kc xtals have a really high Q and higher series resistance being so small so this is even worse than a standard 'computer' crystal.
I have some 4007's, I'll try one of those, if not I'll see if I can get some 'U04's, or 4049 ub's.

The same circuit has a 10mc sine wave feeding a 'hc390, it works perfect biased to 1/2 supply and cap coupled.
Yes I have used the 3231 before, in fact I have a couple, this project so far doesnt use a micro, maybe I'll see if you can setup the chip once and it retains its settings, probably as mine come with battery backups, I seem to remember you can even get the selectable freq o/p to work when main power is down.
 
Last edited:
Hi dr. p,
I have just tried a 32.768 KHZ oscillator using a 4049 and it works. I used the circuit suggested on the 4060 data sheet. This one in case there are different versions of the data sheet.
Screen Shot 05-23-16 at 11.16 AM.PNG

It does not work with the 330K resistor shorted out. I used a fixed 18 pF capacitor in place of the 39 pF trimmer. The crystal I used was from CPC (Part number SC08197) But this item is no linger listed on their website. It also worked with 4 other crystals from unknown sources. (Removed from clocks etc.)

Edit.
Also tried it using an 74HC04. This also worked but when fed into one of the other inverters the slow edges from the oscillator stage caused the output of this to oscillate on the transitions. Using a schmitt trigger (74HC14) would probably stop this.

Les.
 
Last edited:
Hi,

The other type uses two inverter gates and is probably easier to get going.
The two inverters are each biased with a resistor from each output to each input, creating two somewhat linearized amplifiers.
The crystal is used to couple one output to one input, and the remaining output gets coupled to the remaining input with a capacitor. This creates positive feedback and so the set oscillates but with the crystal acting as a filter it oscillates at the crystal frequency.
Using standard TTL, the bias resistors have to be low, like 470 ohms. Using CMOS they can be much higher and thus less stress on the crystal.

For example:

x---|>o---||---|>o---x

and one resistor placed across each inverter and the crystal connects to the two x's (the cap is in the middle there). This of course isnt made for high accuracy.
 
I dont have a 4049, but I tried a 4007, it works fine, sounds along the lines of mr Al's suggestion.
I put 150pf caps to ground and a 27pf in series with the xtal to improve the Q, its spot on without adjustment.
The series resistor limits power through the xtal, if you overdrive it the thing rings and oscillation dies out, its possible and this happened the other day to blow an xtal, esp ones with low esr and High Q.
 
"a 27pf in series with the xtal"
"The series resistor limits power through the xtal"
Series resistor or series cap or both?
 
Both, 150pf caps to ground increase the Q, the series cap then corrects for these and loads the xtal with the proper capacitance.
And to keep drive levels down the 220k in series too, with the drive being a square wave the harmonics are plentiful and easily overdrive the xtal, as Les found when he kindly tried it out.
 
In case you need a looong counter after the oscillator, the CD4521 is a crystal oscillator followed by a 24 bit divider.

I know this is not in the grow-it-from-scratch spirit, but a completely integrated crystal oscillator package is only about $1 more than the bare crystal. Just sayin...

ak
 
Hi again,

The DS3231 chip also has a way to select output frequency, starting with 32kHz and down to 1Hz. It must be set up with programming codes sent via I2C from a microcontroller though.
 
Yes I've used that ic before, there are a couple of o/p's from memory, I seem to remember the other o/p is for an alarm.
 
Yes I've used that ic before, there are a couple of o/p's from memory, I seem to remember the other o/p is for an alarm.

Hi,

On yes, the alarms, i havent tried using them yet. What woke me up was that the 32kHz output is available and that is a frequency often sought after. I needed that a couple times myself, including for a home built stand alone discrete TTL chip frequency counter. I used a crystal oscillator with dividers because at the time i dont think there was any DS chip like we have now. The crystal i used isnt too bad, probably about 50ppm, but the DS chip 2ppm is so much better.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top