Maker Pro
Maker Pro

1Hz timebase question

atollp

Feb 11, 2012
33
Joined
Feb 11, 2012
Messages
33
Hello,

I have a question regarding the accuracy of a 1Hz timebase generator circuit. I'm using a 32.768kHz crystal which the manufacturer specifies a load capacitance of 12.5pF....this circuit uses 33pF capacitors. That is rather far from 12, is it not? My question is would there be a noticeable drift in accuracy if I used the 33pF caps? Can I just substitute 12pF caps in their place?

Thanks much!

http://hackersbench.com/Projects/1Hz/
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,719
Joined
Nov 17, 2011
Messages
13,719
The correct capacitor depends not only on the quartz but in the specific circuit and its components, too. The best thing is to measure the actual frequency and tune the capacitors as needed.
For measuring the frequency of the oscillator do not use the oscillator pins 10 and 11 as the capacitance of the probe will change the frequency of the oscillator. Measure at pin 7 instead. There you will see the oscillator frequency divided by 16.

See the datasheet http://www.nxp.com/documents/data_sheet/HEF4060B_CNV.pdf page 6 for more considerations.

Harald
 

atollp

Feb 11, 2012
33
Joined
Feb 11, 2012
Messages
33
Thanks for the reply, I don't have an oscilloscope....is there any other way to determine? It doesn't need to be terribly accurate... but it should not drift more than 3 min a month
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,719
Joined
Nov 17, 2011
Messages
13,719
If you don't have a frequency counter (an oscilloscope would be too unreliable anyway) of a multimeter with frequency measuring function, I see only one simple way: wait 1 month, determine the drift, adjust the Cs. Wait another month and see, if necessary correct once more.

Maybe you can access a frequency counter somewhere near you (friend, school, work, university lab...)?

Harald
 

atollp

Feb 11, 2012
33
Joined
Feb 11, 2012
Messages
33
I might be able to purchase a multimeter with a frequency measuring function. If I did, you said to measure from pin 7 of the 4060, not on the 1Hz output from the 4027?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,719
Joined
Nov 17, 2011
Messages
13,719
You can measure the 1 Hz, too, but to measure 1 Hz accurately you need a long measuring time:
1 month = 2592000 seconds
max. 3 seconds deviation is just 2 clock pulses more or less during this time. So in order to capture at least 1 clock pulse deviation, you'd have to measure 1/3rd mont = 10 days.

Alternatively you would measure the period of the 1 Hz signal (which takes just about 1 second) and calculate the frequency.

If you measure at pin 7, the frequency is 2.048 kHz which you can easily measure with good accuracy within a few seconds. Any remaining error will be divided by the same ratio as the clock frequency.

Harald
 

atollp

Feb 11, 2012
33
Joined
Feb 11, 2012
Messages
33
Oh so you can still determine the accuracy but you don't have to wait 10 days? So basically, if the crystal is rated at 32.768, the output (pin 7) on the 4060 should be 2.048. I would adjust the cap values until I got 2.048 on pin 7 and that would tell me that my freq. was oscillating at 32.768? Sorry about all the questions, I just want to be sure I know what you mean.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Just to add more math :)

3 seconds in a month is 3 seconds in 2592000 seconds.

or 1 part in 864,000

this means your 32767Hz oscillator needs to be accurate to within +/- 0.038Hz,, just over 2ppm, or about 0.0002%

For typical accuracies, see this page. It may be hard to achieve without an oven.
 

KMoffett

Jan 21, 2009
723
Joined
Jan 21, 2009
Messages
723
Or you can hack a 1.5V wall/desk clock for a very small, accurate, 1-second pulse source.

Ken
 

Attachments

  • 1 Second Clock.gif
    1 Second Clock.gif
    13.1 KB · Views: 1,396

atollp

Feb 11, 2012
33
Joined
Feb 11, 2012
Messages
33
Thanks steve,

That's a great page. I forgot about the effect your constant body temp has on accuracy. I suppose a constant room temp would be suitable, though. I mean, the accuracy couldn't fall below that or a wall clock, or a cheap travel alarm. losing only 1 minute a month is pretty damn good for not being a wristwatch.
 

atollp

Feb 11, 2012
33
Joined
Feb 11, 2012
Messages
33
ooh, thanks ken!

Didn't think of that.

Come to think of it, I have an old analog wall clock and I might pull the module out of that and give it a go.
 

timothy48342

Nov 28, 2011
218
Joined
Nov 28, 2011
Messages
218
In post #3 atoolp said 3 minutes per month.
Thanks for the reply, I don't have an oscilloscope....is there any other way to determine? It doesn't need to be terribly accurate... but it should not drift more than 3 min a month

That's only 1 part in 14400. A 1 cycle difference in count would show up in 4 hours, rather than 10 days.

I'm looking at the page steve linked to and I think their math is off for the crystal section. They say:
How good is a typical crystal ?

A typical crystal has an error of 100ppm (ish) this translates as 100/10e6 or 0.001% (its the same number expressed as a percentage). So the total error on a day is 86400 x 0.01%= 8.64 seconds per day so in a month you would loose 30x8.64 = 4.32 minutes per month.

100ppm = .001% That's true. But in their next calculation they switch to .01% which comes out to between 4 and 5 minutes per month. Still not good enough for your 3 minutes requirement.

They did each seperate calculation right, but lost a digit in between. For 100ppm, I get about 26 seconds per month. (One tenth of what they get)

Someone double check me?? (and them.)

And, am I understanding your requirement right? 3 minutes/month?

-t?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
A typical crystal has an error of 100ppm (ish) this translates as 100/10e6 or 0.001% (its the same number expressed as a percentage). So the total error on a day is 86400 x 0.01%= 8.64 seconds per day so in a month you would loose 30x8.64 = 4.32 minutes per month.

100/1000000 = 0.0001 = 0.01%, so their original quote that it's 0.001% is wrong. However the rest of the math works out.

But that 100ppm may be +/- 50ppm, so the spread is +/- 2.15 min per month.

A little research shows that the accuracy of crystals varies a lot and you're best off checking the specs of the device.

I have some 19MHz oscillator modules that are rated as +/1100ppm (an option is for +/- 50ppm)

Some others are +/-50ppm with +/-25ppm available as an option.

Some tuning fork crystals are 20ppm.

So that varies from over +/- 4 minutes per month to under +/-1 min per month.
 

atollp

Feb 11, 2012
33
Joined
Feb 11, 2012
Messages
33
I'm using a typical 32.768kHz watch crystal, it says +/- 20ppm. I recognize that temperature changes will affect accuracy, as typically your internal temp. helps hold accuracy. (in a wristwatch). I don't know how accurate your basic wall clock or cheap travel alarm is, but that should be good enough for me, and since those don't use your body temp to hold an accurate time, I'm guessing:

1. They aren't as accurate
2. Severe fluctuations will affect, so a constant temp is good. On the warmer side, preferably.

I guess what I'm saying is that it doesn't need to be exactly 3 min/month. But it should definitely be within the parameters of what's considered appropriate for sale, (e.g should not sway more than something commercially manufactured)

If this circuit will work within those parameters, then that should be fine.

If not, then I can always pull a module out of a wall clock or travel alarm, as those are going to be somewhat accurate.
 

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
If you put the crystal in a suitable circuit, it can be adjusted to the correct frequency, then you only have variables such as temperature and power supply voltage to upset things.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Voltage can be taken care of by regulation, temperature is another matter

The crystal itself may have specifications covering frequency change with temperature. If the device is indoors, the temperature will stay far more constant than if you were to place it out in the open in a dry dessert, so location is important.

If you want a simple oven, there are designs based on a TL431 and a thermistor that you could use to keep the thing at about 60C. CHeck here.

Even just wrapping the oscillator in foam will make a large difference. See here. In this case, even though the device is unheated (well the heat is uncontrolled), the oven formed by wrapping it in foam means that ambient temperature changes take far longer to have an effect.
 

atollp

Feb 11, 2012
33
Joined
Feb 11, 2012
Messages
33
Thanks for the Styrofoam tip, it seems like in the link you posted it helped a lot to retain a steady freq
 
Top