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.

XTAL frequency accuracy

Status
Not open for further replies.
...
The turnover temperature of a crystal is the temperature where the frequency is not going up or down. Crystals designed for a single temperature will have their turnover at that temperature. Watch crystals are designed like that for approximately wrist temperature.
...

Temperature curves are not that critical for household clock applications. I've tested a number of typical microcontroller type xtals 4MHz to 20MHz range and their temperature drift is usually about 1 to 2 PPM max over 10'C temp change. For indoor clocks they can be easily calibrated to with a trim cap (or software) to give a clock accurate to average <2PPM or less than 1 minute error per year.

That's a big part of why I like using a software calibrated "second" like these methods;
https://www.romanblack.com/one_sec.htm
As you can just run the clock for a month (which will include household temperature variations), see how many seconds error, and adjust the one constant value in software. Then reprogram the PIC and have a clock that is extremely accurate after that.
 
Temperature curves are not that critical for household clock applications. I've tested a number of typical microcontroller type xtals 4MHz to 20MHz range and their temperature drift is usually about 1 to 2 PPM max over 10'C temp change. For indoor clocks they can be easily calibrated to with a trim cap (or software) to give a clock accurate to average <2PPM or less than 1 minute error per year.
I would agree with that.

The only point to note is that crystal temperature curves are very non-linear, so if one changes by 2 ppm over 10 °C, then it might change by more over the next 10 °C and a lot more over the following 10 °C. Most microcontroller crystals, as well as watch crystals, are designed to be stable at room temperature, and their frequencies change much more for each degree at the extremes.
 
Hi , I have constructed the first phase of the project. I have a working 1 second "tick" generator. It took some time as I made a few mistakes in translating the cct to actual wiring. I also had a cd 4518 failure (probably caused by me ) . So here is the finished cct and a photo of the construction. My next job will be to make a compare cct to an elapsed timer (clock) cct to allow a match to alarm or radio. Still thinking about the compare circuits and also thinking about the actual construction of the perspex box. There are probably more elegant ccts to achieve this. This is a mix of my ideas and bits and pieces from the internet.
I am trying to attach some other stuff (pics of actual construction) but it is not working , I'll try again tomorrow.
ScreenHunter_01 Jun. 25 10.49.jpg
 
Last edited:
Congrats on your success there, that is an ambitious and sophisticated level of performance, especially from discrete logic chips! :)

Have you considered switching to a microcontroller instead? You obviously like powerful operating features, and with a micro you could provide all those features within one 8pin IC (features can be made in code).
 
Congrats on your success there, that is an ambitious and sophisticated level of performance, especially from discrete logic chips! :)

Have you considered switching to a micro controller instead? You obviously like powerful operating features, and with a micro you could provide all those features within one 8pin IC (features can be made in code).

Hi RB , Yes I have considered a micro controller but decided against it because I have never worked with a pic and I would need to learn Pic language.
Ofcourse, I hope that my soldering will not develop dry joints. Hence the heavy soldering job.
I attach some photos that I could not upload yesterday (probably too large)screenshots scope and project 011reduced.JPGscreenshots scope and project 013reduced.JPGscreenshots scope and project 004reduced.JPG
As you can see the soldering is a *****. The 250 volt connections are protected with polycarbonate shields cut from a 2 L Coke bottle. The original battery connector failed so this is a temporary battery connect strap. A shot of the 1Hz pulse. The funny loose wire on the back is the end of the of the actual 1Hz pulse used as a tag to connect my scope probe
It will be some time before my next entry as the next stage is the actual time display and comparator ccts to set the time and alarm signal
 
Nice photos! Very "old-school" on the soldering into perfboard. :)

For prototyping digital circuits I prefer stripboard (veroboard), it's quicker to work with and a bit neater;

**broken link removed**

The PCB copper strips run one direction, and chips and wires generally go in the other direction.
 
Hi, I need some help. I have a beautiful 1 second pulse (square wave) of 0 to 9V . I am trying to multiply/divide to a 1minute pulse to drive the clock. I want to drive the clock with 1 minute ticks. I had hoped that a simple CD4017 pin 12 (divide by 10) driving the second (cascading) cd4017 and using the Q6 from the second cd4017 to reset the chain. I was hoping that it would be simple but I am having problems deriving a nice 10-200 mS pulse to drive the clock and display by minute ticks. If I use the Q6 to reset the chain I cannot get a pulse to make a nice tick for the clock. I am probably overlooking something simple as there are plenty of clock ccts. What I need is a hint or more to derive a 1 minute tick (square wave) from a 1 second tick Using cd4017 's . Vdd is 10.4 (battery backup) or 9.5 (mains).
 
You might need to post your schematic, but a common problem is that the count that resets the counter will be very very short (depending on how you did it) and won't drive other circuits.
 
Yep that is likely the problem. That 4017 chain reset pulse is only in the uS range.

You could put a latch there, that sets ON when the pulse occurs, then resets OFF when the main 1 second pulse goes off. That would give you a 1 minute pulse with the same ON period as the 1 second pulse.
 
ronv and Mr RB thank you for your replies. Indeed, the problem is the shortness of the pulse. I can see the scope being triggered but cannot display it. Tomorrow I will see if the reset pulse can be made wider with a 555 configured as a monostable. I probably have to play a bit with the output of Q6 as this is a 10 sec up pulse and the 555 trigger is a down pulse. The output of the 555 will easily reset the chain. but I think I need to keep the pulse width down to less than 500 mSec (half of the 1 sec pulse) so that I have time to reset the chain before the next 1 sec pulse comes along. At least that is what I think ( I may be wrong here, I have to think or experiment a bit more on this)
 
hi Hal,
This circuit will give you a 0.5s pulse very 60th count, then it will Reset and restart

Note: I have used diodes for the AND and OR gates, normally I would use Gates, but I see you have already configured some diode gates.

The 4017's clock on the falling edge of the clocking pulses.

q60 is the end take off signal.

E.

BTW: Ignore the Y axis scaling, the Vsupply is 5V
 

Attachments

  • AAesp04.gif
    AAesp04.gif
    50.2 KB · Views: 182
Last edited:
Hi , thank you all for your advice. I have discovered that there is a major problem with my design, that has to be fixed before I go any further. I thought that the switch over between battery and mains would not be too disruptive (perhaps lose or gain a second or two) and indeed when I was testing the change over at the one second stage this was in fact correct. But now if I test the changeover at the minute stage when pulling or inserting the mains plug I see a lot of noise (simulating a power disurbance) it may cause as much as ten resets in the chain Thereby losing as much as 40 seconds. If the same resets are applied to the hours chain and similar discrepencies are applied then the integrity of the time is compromised and will probably be completely wrong in a change over scenario. IOW the design is not worth a pinch of doodah until I have a reliable change over method.

I have learned / re-learned a lot of stuff and use this experience to start again with a new cct
.
Note, the individual parts all work correctly. I have run the clock over a day or two so on battery (until it went below 5 volts) and mains for a longer time and compared the minute clock pulse to a kitchen clock with a second hand and found it to be correct to the kitchen clock second hand movement .

I will have to think about a method to always run on batteries and just keep the batteries topped up with mains . IOW a very small UPS setup. The batteries I want to use are Powerex true 9.6V NiMH 230mAh because these are good batteries, probably two in parallel. I would still like to use 50Hz mains input as the major clock pulse and a 32.768 xtal derivative as a backup if the mains fail.

Perhaps, I should start a new thread when I have sorted out the UPS issue?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top