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.

Crystal Oscillator using SN74HC04 does not work !

Status
Not open for further replies.
Having worked in a company that made crystal oscillators, I don't understand why so few packaged oscillators are used. It is so much easier to buy an oscillator that just works. The only additional component is a decoupling capacitor, which will almost always be there anyway. There is no worry about load capacitance or how the output loading will affect the frequency.
 
Hi,

How do the prices compare? That might tell you the answer.
 
I've used oscillators when I've required the performance.

But for cost, a plain 10Mhz crystal can be had for US$ 0.17 plus $0.02 for a pair of NPO caps. Compared to US$0.59 for a plain XO oscillator.
Prices in 1,000 quantities from DigiKey.

Of course if one requires an OCXO or other high stability unit, prices quadruple.

The moral of the story is that, like all engineering decisions, there is a tradeoff between cost and performance.
 
I've used oscillators when I've required the performance.

But for cost, a plain 10Mhz crystal can be had for US$ 0.17 plus $0.02 for a pair of NPO caps. Compared to US$0.59 for a plain XO oscillator.
Prices in 1,000 quantities from DigiKey.

Of course if one requires an OCXO or other high stability unit, prices quadruple.

I was often charging $100 each for OCXOs, and around $30 - $50 for TCXOs. I have seen crystal oscillators up to $10,000 each. I think that quadruple is a massive underestimate of what good oscillator costs.

I appreciate the point about the cost of oscillators vs. crystals, but there seem to be many questions on this forum about getting crystals to work correctly, for what appears to be one - off projects, maybe on breadboards. I don't think that there is much point in using a crystal unless $0.50 per unit is important. If $0.50 per unit is important, then the quantities are high enough to warrant prototypes that are representative of production, where the layout is good and the capacitor values can be adjusted.

I've seen automotive products using two identical crystals on adjacent processors, just like the application note of each processor says, and no-one has stepped back and looked at the overall picture enough to work out that the output pin of one could drive the input pin of the other, saving the cost of a crystal. There are lots of crystal applications where the engineers didn't have a clue how to chose the capacitors, resulting in unreliable oscillation, or crystals far off frequency. I know that from talking to engineers when selling crystals and oscillators. Getting a crystal circuit correct is difficult, and too many people just follow the application suggestions for the processor, which themselves are not always accurate.

There is a lot of engineering involved in making a crystal work correctly, which is why it is a lot easier to buy an oscillator.
 
I only use Crystals and discreet loading capacitors now when timing is critical, rarely do I find that a standard ceramic resonator can't do the job where a micro is concerned. Back in the early '80's I spent some time working for a manufacturer of Crystal thickness monitors and heads, eye watering amounts of money were involved for the equipment :)
 
Hi,

We faced that same issue about the long leads to the crystal a long time ago. The idea was to provide a switched crystal choice for the end user for a 10000 watt inverter. The leads to the switch were too long so the oscillator would stall now and then. Had to be modified.

Also in a CB radio, same issue, very long time ago. The oscillator would not start sometimes so the switch had to be moved back and forth two or three times to get it to kick into gear. Once going though it kept going.

The rule is crystals dont like long leads, and even 6 inches could be too much in some cases.
 
Dear All,

Thank you all for replies. I built a cmos inverter as shown below:

upload_2015-5-2_23-28-31.png


This cmos inverter worked as an logic inverter very well. But when I tried to apply to crystal oscillator as below. It did not work at all! Could anyone here explain why ? Thanks all.

upload_2015-5-2_23-28-52.png
 
Last edited:
Presumably this is why you've started the other thread? - if you want to make an oscillator, then use an oscillator circuit, it's not really a 'proper' use of a CMOS inverter but is just a useful 'accident' of the IC.
 
It's not good form to hijack someone elses thread.
Those power MOSFETs have way to much gate capacitance to work in a crystal oscillator circuit.
 
Dear Nigel,
Please delete the newly created thread. I have just found out that it would be better if I combine the newly created thread to this thread and continue discussion about crystal oscillator and cmos inverters. Tks. I tried to delete that thread but it seems that there is no function to delete. Just edit.
 
Hi,

Yeah those MOSFETs are not suitable for use in an oscillator like that. You should really use the hex inverters or something like that, and follow the directions of a good app note on crystal oscillators like that from Microchip.
There are a few issues you should be aware of, depending on the accuracy you need too and what kind of crystal you are using as it is even possible to burn out the crystal if it is not done right.
 
As others have said, you need to pay for a proper inverter.

https://uk.farnell.com/nxp/74ahc1gu04gw-t1/74ahc-single-gate-smd-74ahc1gu04/dp/1201258
or
https://uk.farnell.com/texas-instruments/sn74ahcu04n/ic-logic-hex-inverter-14dip/dp/1749946

An oscillator has to start up to work. When it is starting, the voltage on both the input and output are near the middle, and the inverter runs in its linear region, and takes more current than when full oscillation has started. The resistor is there to hold the voltage in the linear region during starting, while thermal noise is amplified by the inverter and filtered by the crystal until the amplitude eventually builds up. Starting takes several thousand cycles, so an AT-cut fundamental crystal will take 0.1 - 1 ms, while a watch crystal takes a few seconds to start.

The power MOSFETs have a large gate threshold voltage, so there will most likely be a dead area in the middle when both MOSFETS are off. If not, and there is a cross-over point where both MOSFETs start to turn on, and with those MOSFETs you could get lots of current though the MOSFETs, shorting the supply. Either would stop the oscillator starting.
 
Having worked in a company that made crystal oscillators, I don't understand why so few packaged oscillators are used. It is so much easier to buy an oscillator that just works. The only additional component is a decoupling capacitor, which will almost always be there anyway. There is no worry about load capacitance or how the output loading will affect the frequency.
My former C-MAC sister plant used to make high end XO's.

At another co. we made our own 1ppm TCXO -40~+70 for <1$
I created a 15 second test that binned 50ppm Xtals into a 3rd order equation that could correct with binned varicap and free DAC port with < 1ppm over all temps.

Now you are a newbie not to buy a 1ppm TCXO for $1 .!!!
 
I agree that the power Mosfets will not work in the 5V crystal oscillator circuit:
1) Gate capacitance is thousands of times higher than in an inverter IC.
2) The gate-source threshold voltage is much too high for a 5V supply, a 10V or 20V supply would be better. Many power Mosfets DO NOT turn on when the gate voltage is only 2.5V. The threshold voltage in the datasheet shows 2V to 4V when it barely conducts only 0.25mA. An ordinary CD4xxxx Cmos inverter works perfectly with a supply as low as 3V and many 74HCxxxx Cmos inverters work when the supply is as low as 1.5V (a 2V supply is guaranteed).
 
Dear Nigel,

Most Design Engineers and Techs dont know that the Ciss * RdsOn product for a given family of Mosfets e.g. lithographic size is constant . Thus your RdsOn is too low causing Ciss to be too high eg >1000pf loading the input 33 pf cap in parallel and severely attenuating the Xtal feedback signal in parallel high impedance mode.

In CMOS gates, we call this simply parasitic junction capacitance which lowers the resonant frequency by as much as 25ppm say roughly, when the input is 5pF and the Xtal load capacitance is rated at 16 pF. But if you load it with 1000pF it attenuates the input more than the voltage gain of complementary MOSFETs. In unbuffered (UB) single stage CMOS gates had a gain from 10 old to 100 new for 74ALVC2xx types. Standard gates are 3 stages with a minimum gain of 1000 which can be too high for many crystals with overtones or harmonics.

Therefore, if the Ciss of the MOSFET was at least 100 to 1000x smaller and RdsOn was 100x bigger, it may have worked.

After about 10~20ms the input DC reaches V/2 and then the AC envelope grows according to inverse bandwidth where T= 1/2 * 1/f-3dB

Another factor is technology in last decades has made quartz crystals smaller , most that have been microsliced and have shrunk in volume orders of magnitude, which lowers the Q, quality factor or gain and rated load capacitance, so 33pF may not match your crystal, unless you have specs. It might only be 12 pF depending on supplier, thus two 24pf or a 27 out and 16pf input may be better, depending on circuit input capacitance.

I hope this makes sense to you. If in doubt, read then ask ! Ok?

Keep all 12MHz AC wires short (<1cm), and dont lose any hair. Then you can probe with short ground clip and feed 10cm without problems into logic over a ground plane or between to wide tracks with connections to a low inductance busbar ground on 1 layer, or twisted pair matched impedance or .. For greater lengths...
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top