How does one get a 32.768KHz signal from our 10MHz reference.
There does not appear to be a nice divide ratio to do this.
With a locked 32.768KHz signal one could lock the oscillator of any of the cheap (low cost) LCD clocks that are available with nice big digits, temperature sensors and calendars, etc.
Any suggestions on how to do it??
Regards
Max
ps. I got sucked in good. Six months ago all I had was an HP 10811 and now I have another crystal oscillator, two rubidiums and a Trimble GPS.
At 09:09 AM 7/23/2008 , Max Skop wrote:
How does one get a 32.768KHz signal from our 10MHz reference.
There does not appear to be a nice divide ratio to do this.
With a locked 32.768KHz signal one could lock the oscillator of any of
the cheap (low cost) LCD clocks that are available with nice big digits,
temperature sensors and calendars, etc.
Any suggestions on how to do it??
DDS?
At 10:09 AM 7/23/2008, Max Skop wrote...
How does one get a 32.768KHz signal from our 10MHz reference.
There does not appear to be a nice divide ratio to do this.
I've thought about this too. It seems the simple way would be to clock
a PIC with the 10 MHz, then use loops to produce the 32768 Hz. It's
easier than it seems once you realize that phase noise doesn't really
matter in this application - duty cycles don't need to be exactly 50%,
etc.
The only thing that comes to mind is to divide the 10 MHz by 2500000
(5x5x100000) and then use a phase locked loop to multiply by 8192. Of
course the PLL would best control a varactor with a clock crystal vice
controlling an RC oscillator. Other divisor multiplier pairs are:
1250000/4096, 625000/2048, 312500/1024, 156250/512, and 78125/256.
John WA4WDL
----- Original Message -----
From: "Max Skop" mskop@bigpond.net.au
To: time-nuts@febo.com
Sent: Wednesday, July 23, 2008 10:09 AM
Subject: [time-nuts] How to get 32.768KHz from 10MHz.
How does one get a 32.768KHz signal from our 10MHz reference.
There does not appear to be a nice divide ratio to do this.
With a locked 32.768KHz signal one could lock the oscillator of any of
the cheap (low cost) LCD clocks that are available with nice big digits,
temperature sensors and calendars, etc.
Any suggestions on how to do it??
Regards
Max
ps. I got sucked in good. Six months ago all I had was an HP 10811 and now
I have another crystal oscillator, two rubidiums and a Trimble GPS.
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
They said 'Windows or better'
so I used Linux.
John Franke wrote:
The only thing that comes to mind is to divide the 10 MHz by 2500000
(5x5x100000) and then use a phase locked loop to multiply by 8192. Of
course the PLL would best control a varactor with a clock crystal vice
controlling an RC oscillator. Other divisor multiplier pairs are:
1250000/4096, 625000/2048, 312500/1024, 156250/512, and 78125/256.
John WA4WDL
----- Original Message -----
From: "Max Skop" [1]mskop@bigpond.net.au
To: [2]time-nuts@febo.com
Sent: Wednesday, July 23, 2008 10:09 AM
Subject: [time-nuts] How to get 32.768KHz from 10MHz.
How does one get a 32.768KHz signal from our 10MHz reference.
There does not appear to be a nice divide ratio to do this.
With a locked 32.768KHz signal one could lock the oscillator of any of
the cheap (low cost) LCD clocks that are available with nice big digits,
temperature sensors and calendars, etc.
Any suggestions on how to do it??
Regards
Max
ps. I got sucked in good. Six months ago all I had was an HP 10811 and now
I have another crystal oscillator, two rubidiums and a Trimble GPS.
time-nuts mailing list -- [3]time-nuts@febo.com
To unsubscribe, go to
[4]https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
time-nuts mailing list -- [5]time-nuts@febo.com
To unsubscribe, go to [6]https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
References
At 07:09 AM 7/23/2008, Max Skop wrote:
How does one get a 32.768KHz signal from our 10MHz reference.
There does not appear to be a nice divide ratio to do this.
With a locked 32.768KHz signal one could lock the oscillator of any
of the cheap (low cost) LCD clocks that are available with nice big
digits, temperature sensors and calendars, etc.
Any suggestions on how to do it??
Regards
Max
ps. I got sucked in good. Six months ago all I had was an HP 10811
and now I have another crystal oscillator, two rubidiums and a
Trimble GPS.
There's two approaches to your high level problem (driving a
clock)... one is to make 32.768 kHz, the other is to directly drive
the 1pps. Obviously, dividing down 10M to get to 1Hz is easy.
But, for the other, you don't need to have a perfect symmetrical sine
wave. All you need to do is make sure that there are 32,768
transitions in a second, so any sort of rough and ready divider
scheme will work.
Now.. in the lab what I did is use a HP3325B to make clocks run on Mars time
See:
http://www.techbriefs.com/content/view/2299/34/
Since the 3325 was locked to the lab's maser, it's probably the most
accurate Mars clock around (bearing in mind that Mars's rotation
isn't nearly as stable as the maser, so it's superfluous accuracy)
You can do other nifty things, by the way... you can make a clock
that displays solar elevation ("sundial time") because the rate can
be changed systematically.
I never did get around to programming a PIC to do some of this stuff,
but it would be quite straightforward.
Jim Lux
Since synchronization is more important than jitter in this
application it's easy to generate 32 kHz from 10 MHz.
A 10 MHz clock into a PIC gives a 400 ns/instruction time.
To produce 32.768 kHz you flip an output pin put every 38
instructions, except that 9632 times per second you make
it 39 instructions instead.
The result is 65536 bit flips per second (giving a frequency
of exactly 32768 Hz) consuming 2 500 000 instructions per
second. The output accuracy equals the input accuracy.
The output jitter is as most 400 ns.
/tvb
Problem is one period of 32768 is not a multiple of 100nS (one period of 10 MHz) so that won't work. Maybe there is a common denominator and it may be possible to generate an average 32768 periods over one second, even though all periods may not be equal.
Didier KO4BB
---- Mike S mikes@flatsurface.com wrote:
At 10:09 AM 7/23/2008, Max Skop wrote...
How does one get a 32.768KHz signal from our 10MHz reference.
There does not appear to be a nice divide ratio to do this.
I've thought about this too. It seems the simple way would be to clock
a PIC with the 10 MHz, then use loops to produce the 32768 Hz. It's
easier than it seems once you realize that phase noise doesn't really
matter in this application - duty cycles don't need to be exactly 50%,
etc.
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
At 11:56 AM 7/23/2008, Didier Juges wrote...
Problem is one period of 32768 is not a multiple of 100nS (one period
of 10 MHz) so that won't work.
As long as both periods are rational numbers, it doesn't matter, and it
can work. For this purpose (display for humans), it doesn't matter if
some seconds have 32768.xxx cycles and some have 32767.yyy, as long as
they average to exactly 32768. Being off by a whole lot less than the
time it takes an LCD segment to change contrast won't hurt anything.
Max,
You are a mild case....
I also got bitten by the bug: Now I have 4 HP10811, two rubidiums,
two cesiums, T-Bolt and I am seriously considering making my own Cesium.
A visit to Las Vegas could turn to be cheaper fun than this......
Predrag
At 16:09 23.7.2008, you wrote:
How does one get a 32.768KHz signal from our 10MHz reference.
There does not appear to be a nice divide ratio to do this.
With a locked 32.768KHz signal one could lock the oscillator of any
of the cheap (low cost) LCD clocks that are available with nice big
digits, temperature sensors and calendars, etc.
Any suggestions on how to do it??
Regards
Max
ps. I got sucked in good. Six months ago all I had was an HP 10811
and now I have another crystal oscillator, two rubidiums and a
Trimble GPS.
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
I see I'm coming to the party late, on the heels of Mike and Tom, but here's
some additional from playing with the numbers during lunch.
A mix of 30.4 us and 31.2 us periods (76 and 78 pic instr loops) in the
ratio of 1747 to 301 does it -- 32768Hz with a few percent fm-ing. With just
the two outer loops, abt 200usec of lag accumulates (after 53 msec) before
it gets pulled back. Some nesting can easily cut that excursion down some.
Ed
(just posted this from the wrong account, hope it doesn't dupe).
Divide 10 MHz by 250 to get 40 kHz, to be within range of the clock's
logic, then use a presettable counter loaded by the 1 PPS to count
off 32768 clocks per second.
David McGaw
At 11:30 AM 7/23/2008, you wrote:
I was faced with this problem a few years ago, too.
I essentially followed John's solution, but used the 1pps GPS pulse as
the PLL reference.
I then used the 32.768K vco output to injection-lock the 32.768K
crystal on the LCD clock.
Much to my surprise, it worked quite well. And, as pointed out already,
jitter isn't an issue for this application.
They said 'Windows or better'
so I used Linux.
John Franke wrote:
The only thing that comes to mind is to divide the 10 MHz by 2500000
(5x5x100000) and then use a phase locked loop to multiply by 8192. Of
course the PLL would best control a varactor with a clock crystal vice
controlling an RC oscillator. Other divisor multiplier pairs are:
1250000/4096, 625000/2048, 312500/1024, 156250/512, and 78125/256.
John WA4WDL
----- Original Message -----
From: "Max Skop" [1]mskop@bigpond.net.au
To: [2]time-nuts@febo.com
Sent: Wednesday, July 23, 2008 10:09 AM
Subject: [time-nuts] How to get 32.768KHz from 10MHz.
How does one get a 32.768KHz signal from our 10MHz reference.
There does not appear to be a nice divide ratio to do this.
With a locked 32.768KHz signal one could lock the oscillator of any of
the cheap (low cost) LCD clocks that are available with nice big digits,
temperature sensors and calendars, etc.
Any suggestions on how to do it??
Regards
Max
ps. I got sucked in good. Six months ago all I had was an HP 10811 and now
I have another crystal oscillator, two rubidiums and a Trimble GPS.
time-nuts mailing list -- [3]time-nuts@febo.com
To unsubscribe, go to
[4]https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
time-nuts mailing list -- [5]time-nuts@febo.com
To unsubscribe, go to
[6]https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
References
1. mailto:mskop@bigpond.net.au
2. mailto:time-nuts@febo.com
3. mailto:time-nuts@febo.com
4. https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
5. mailto:time-nuts@febo.com
6. https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
Correction - freq is high (lead builds up) for 53msec.
Ed
<snip> abt 200usec of lag accumulates
Since synchronization is more important than jitter in this
application it's easy to generate 32 kHz from 10 MHz.
A 10 MHz clock into a PIC gives a 400 ns/instruction time.
To produce 32.768 kHz you flip an output pin put every 38
instructions, except that 9632 times per second you make
it 39 instructions instead.
The result is 65536 bit flips per second (giving a frequency
of exactly 32768 Hz) consuming 2 500 000 instructions per
second. The output accuracy equals the input accuracy.
The output jitter is as most 400 ns.
/tvb
I just prototyped this PIC algorithm and it works perfectly:
Exactly 10 MHz in gives exactly 32.768 kHz out.
There are several ways to manage the variable 38 vs. 39
instruction cycle duration of the output waveform.
The crude way, for every 65536 half-cycles, is to generate the
first 9632 using 39 instructions and the remaining 55904 using
38 instructions. This uses a total of (963239) + (5590438) =
2500000 instructions (10 MHz) to generate a 32768 Hz output
clock.
But if you note that 2500000 / 65536 = 38.14697265625 and
think about leap years, there are cute ways to distribute these
"leap cycles" more evenly throughout successive one second
periods, if that is desired.
/tvb
If you use a DDS then it pays to use the Analog Devices design tool.
It is at this URL
[1]http://designtools.analog.com/dtDDSWeb/dtDDSMain.aspx
You can open multiple instances in different browser windows. Also,
there is an area under the graphs called DISPLAY which allows for some
selections. One of them is for a filter. If you click on the blue
configure to the right of the filter selection it allows you to set the
parameters for the filter.
It is interesting to note just how imprecise these DDS devices really
are ! For instance, the tendency to use the house standard (i.e., 10
MHz) as the DDS source clock produces the following values for 32 KHz
clock.
AD9850 DDS {32 bit tuning/10 bit output} with 10 MHz clock
produces: 32768.00038293 Hz
AD9956 DDS {48 bit tuning/14 bit output} with 10 MHz clock
produces: 32767.999999983 Hz
You would think scaling the clock by [sub] multiples would make no
difference. However, this is not true. You would think using a clock
that was a binary multiple, just like the 32 KHz number, would make it
come out precisely. As well, this was not the case !
Experiment with the better 48 bit DDS and varying the clock from 10 MHz
down with the following results:
* CLOCK FREQUENCY
*
* 0.01 MHz 32768.0000000000 Hz perfect but no output ! See Mr.
Nyquest.
*
* 0.1 MHz 32768.0000000001 Hz
*
* 0.2 MHz 32768.0000000001 Hz
*
* 0.3 MHz 32768.0000000004 Hz
*
* 0.4 MHz 32768.0000000001 Hz
*
* 0.5 MHz 32768.0000000008 Hz
*
* 0.6 MHz 32767.9999999994 Hz
*
* 0.7 MHz 32767.9999999990 Hz
*
* 0.8 MHz 32767.9999999987 Hz
*
* 0.9 MHz 32768.0000000004 Hz
*
* 1 MHz 32768.0000000008 Hz
*
* 2 MHz 32767.9999999972 Hz
*
* 3 MHz 32767.9999999972 Hz
*
* 4 MHz 32768.0000000044 Hz
*
* 5 MHz 32768.0000000008 Hz
*
* 6 MHz 32767.9999999972 Hz
*
* 7 MHz 32768.0000000115 Hz
*
* 8 MHz 32768.0000000044 Hz
*
* 9 MHz 32767.9999999972 Hz
*
* 10 MHz 32767.9999999830 Hz
What is interesting is there were few repetitive values. Also
surprising is the lower the clock the closer to the correct output.
BUT BIG SURPRISE ! Dont forget Mr. Nyquest. To get a reasonable wave
form you really need to have the clock 3 times the highest output. So
that leaves us with 100 KHz as the minimum practical clock frequency.
The error at 100 KHz is quite small and essentially beyond the range of
the DDSs 48 bit tuning word.
Of course one should be mindful of the spurious responses out of the
DDS. The 200 KHz selection { an easy sub of 10 MHz} would be better
based on the Analog Devices program after setting the filter factors.
I certainly am no expert but the Elliptical filter, which I have some
small familiarity with, seemed to be the best choice for the frequency
range.
Bill....WB6BNQ
References
At 04:17 PM 7/23/2008, Tom Van Baak wrote...
I just prototyped this PIC algorithm and it works perfectly:
Exactly 10 MHz in gives exactly 32.768 kHz out.
TPIWWSC.
(This Post Is Worthless Without Source Code)
:-)
Start:
NOP
NOP
NOP
...
NOP
flip_bit
NOP
NOP
NOP
...
flip_bit
JUMP Start
(details omitted for clarity)
:-)
Didier KO4BB
---- Mike S mikes@flatsurface.com wrote:
At 04:17 PM 7/23/2008, Tom Van Baak wrote...
I just prototyped this PIC algorithm and it works perfectly:
Exactly 10 MHz in gives exactly 32.768 kHz out.
TPIWWSC.
(This Post Is Worthless Without Source Code)
:-)
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
Another approach is to divide the 10MHz by 5^7 (78125) and then use an
injection locked multiplier chain to generate 32768 Hz from the
resultant 128Hz output.
It may even be possible to do the 256x multiplication using a single
injection locked 32768Hz injection locked multiplier.
When designed correctly the close in phase noise of an injection locked
oscillator is determined by that of the injection source whereas the
phase noise floor is determined by that of the oscillator being locked.
To optimise the performance the oscillator to be injection locked should
be designed to facilitate injection locking.
Bruce
At 05:42 PM 7/23/2008, Bruce Griffiths wrote...
Another approach is to divide the 10MHz by 5^7 (78125) and then use an
injection locked multiplier chain to generate 32768 Hz from the
resultant 128Hz output.
It may even be possible to do the 256x multiplication using a single
injection locked 32768Hz injection locked multiplier.
You're missing the point. The application is to drive a common, readily
available consumer clock. Simple and cheap. It can be done with a
single $1 PIC. You could spend $20 or $100 and not get better results
for the application. If you can describe a way of doing it for $0.50,
please do.
At 03:01 PM 7/23/2008, Mike S wrote:
At 05:42 PM 7/23/2008, Bruce Griffiths wrote...
Another approach is to divide the 10MHz by 5^7 (78125) and then use an
injection locked multiplier chain to generate 32768 Hz from the
resultant 128Hz output.
It may even be possible to do the 256x multiplication using a single
injection locked 32768Hz injection locked multiplier.
You're missing the point. The application is to drive a common, readily
available consumer clock. Simple and cheap. It can be done with a
single $1 PIC. You could spend $20 or $100 and not get better results
for the application. If you can describe a way of doing it for $0.50,
please do.
But this is time-nuts... Any approach that doesn't have the
performance of a hydrogen maser or cryogenic sapphire resonator just
isn't good enough. Why, we haven't even started on how to build a
radial ruling engine to make sure the clock face is precisely divided
into 60 segments to ppb accuracy.
Based on the clocks I've taken apart, dividing the 10MHz down to 1 Hz
is probably your best bet, rather than trying to hit 32768. However,
I don't know of a non-programmable single chip solution that will do
a divide by 1E7. If you want programmable chips, there's countless
ways, some more elegant than others.
Mike S,
I think you missed the point ! One does not ask the question "How does
one get a 32.768KHz signal from our 10MHz reference ?" and not expect
it to cost both in terms of money and effort. There was no statement
of doing it cheap, re-read the original Email.
Bill....WB6BNQ
Mike S wrote:
At 05:42 PM 7/23/2008, Bruce Griffiths wrote...
Another approach is to divide the 10MHz by 5^7 (78125) and then use
an
injection locked multiplier chain to generate 32768 Hz from the
resultant 128Hz output.
It may even be possible to do the 256x multiplication using a
single
injection locked 32768Hz injection locked multiplier.
You're missing the point. The application is to drive a common,
readily
available consumer clock. Simple and cheap. It can be done with a
single $1 PIC. You could spend $20 or $100 and not get better
results
for the application. If you can describe a way of doing it for
$0.50,
please do.
_______________________________________________
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to
[1]https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
References
A more practical offshoot of this concept is to subsample the
32 kHz oscillator at 128 Hz (ie a sampling phase detector) and use a slow
loop to tune the 32768 kHz oscillator. The biggest problem here is that
you have to have a tunable oscillator. Attempting to get around
this by injection locking a non-tunable oscillator is probably not
going to work very well, since the frequency tolerance is likely
to be larger than the small amount of frequency pulling you can
get with injection locking. Basically, if the oscillator tolerance
is 0.01%, and it has a Q of >>10,000, it will be hit or miss depending
on luck.
Rick N6RK
Bruce Griffiths wrote:
Another approach is to divide the 10MHz by 5^7 (78125) and then use an
injection locked multiplier chain to generate 32768 Hz from the
resultant 128Hz output.
It may even be possible to do the 256x multiplication using a single
injection locked 32768Hz injection locked multiplier.
When designed correctly the close in phase noise of an injection locked
oscillator is determined by that of the injection source whereas the
phase noise floor is determined by that of the oscillator being locked.
To optimise the performance the oscillator to be injection locked should
be designed to facilitate injection locking.
Bruce
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
An oscillator can be injection locked to at frequency that is a rational
number (M/N where M, N are integers ) multiplier of the injection frequency.
Thus, in principle, a 32768Hz oscillator can be injection locked
directly to a 10MHz signal (32768Hz = (256/78125)*10MHz) without
requiring any external dividers or multipliers.
In practice this will only be practical with a 32768Hz crystal
oscillator whose frequency determining crystal is tuned sufficiently
closely to 32768Hz.
Note this is not quite the same as tuning the free running oscillator
frequency.
The sensitivity to the injected signal can be optimised if the 32768Hz
oscillator is suitably designed.
The 32768Hz injection locked oscillator output can be used to injection
lock another 32768Hz crystal oscillator whose design cannot be optimised
for direct injection locking to a 10MHz signal.
Bruce
Rick Karlquist wrote:
A more practical offshoot of this concept is to subsample the
32 kHz oscillator at 128 Hz (ie a sampling phase detector) and use a slow
loop to tune the 32768 kHz oscillator. The biggest problem here is that
you have to have a tunable oscillator. Attempting to get around
this by injection locking a non-tunable oscillator is probably not
going to work very well, since the frequency tolerance is likely
to be larger than the small amount of frequency pulling you can
get with injection locking. Basically, if the oscillator tolerance
is 0.01%, and it has a Q of >>10,000, it will be hit or miss depending
on luck.
Rick N6RK
The drawback of all injection locked oscillator schemes is that the
injection locked oscillator needs to be tunable.
However a simple trimmer cap may suffice if the temperature excursion of
the oscillator isnt too large and the occasional readjustment to
compensate for aging is acceptable.
Bruce
Bruce Griffiths wrote:
An oscillator can be injection locked to at frequency that is a rational
number (M/N where M, N are integers ) multiplier of the injection frequency.
Thus, in principle, a 32768Hz oscillator can be injection locked
directly to a 10MHz signal (32768Hz = (256/78125)*10MHz) without
requiring any external dividers or multipliers.
In practice this will only be practical with a 32768Hz crystal
oscillator whose frequency determining crystal is tuned sufficiently
closely to 32768Hz.
Note this is not quite the same as tuning the free running oscillator
frequency.
The sensitivity to the injected signal can be optimised if the 32768Hz
oscillator is suitably designed.
The 32768Hz injection locked oscillator output can be used to injection
lock another 32768Hz crystal oscillator whose design cannot be optimised
for direct injection locking to a 10MHz signal.
Bruce
The major problem with this approach is the extremely small (<<1ppm)
locking range achievable.
Thus it isnt likely to be practical with standard 32768Hz crystals, as
even a relatively small temperature change will perturb the tuning
sufficiently to make locking to the desired frequency impossible.
Bruce
At 04:17 PM 7/23/2008, Tom Van Baak wrote...
I just prototyped this PIC algorithm and it works perfectly:
Exactly 10 MHz in gives exactly 32.768 kHz out.
TPIWWSC.
(This Post Is Worthless Without Source Code)
:-)
Hi Mike,
Yeah, I thought I provided enough information in that posting so
that anyone that's programmed a uC before, or has seen the
free source code to the 1PPS PIC divider would get the idea.
By the way it's almost the 10th anniversary of that PIC divider:
http://www.leapsecond.com/pages/ppsdiv/
OK, you asked about the prototype for the 32 kHz algorithm. See:
http://www.leapsecond.com/tools/10m32k.c
The basic idea is as I described a few hours ago; with a correct
combination of 38 and 39 cycle instruction code paths, you get
a 32 kHz output that has some jitter in phase but has perfect
frequency accuracy from one second to infinity. This is similar
to the case of the special 100 kHz output of the PPS divider.
The cute algorithm that I prototyped is one that is inspired by the
way we handle leap years. The result is that all the "leap cycles"
are as evenly spaced throughout the second as possible, both
minimizing jitter to the extent possible with a 400 ns PIC cycle
time, and maintaining an absolute division of the 10 MHz to
32.768 kHz, as averaged over any multiple of 1 second.
There are comments in the C code. Note this is not PIC code; it
is simply my proof-of-concept (compiles under windows or unix)
for isochronous PIC assembler code that can (will?) be written.
If I know you PIC'ers with spare time out there (not me right now)
it will be done by tonight. It should be end up on the order of 40
lines of careful isochronous assembler code. I assume the AVR
would work too.
The result will be a $1, 8-pin, single-chip, 10 MHz to 32 kHz, low
(not zero) jitter frequency divider, suitable for driving cheap digital
or analog clock and watch movements from a 10 MHz source.
Extra credit for the 5 MHz version.
/tvb
Quoting Tom Van Baak tvb@LeapSecond.com, on Wed 23 Jul 2008 06:27:30 PM PDT:
The result will be a $1, 8-pin, single-chip, 10 MHz to 32 kHz, low
(not zero) jitter frequency divider, suitable for driving cheap digital
or analog clock and watch movements from a 10 MHz source.
Extra credit for the 5 MHz version.
Or, with a bit of work, you could make a sidereal clock (handy for
astronomers) or a Mars clock (handy for a very small set of people who
want to keep Mars time).
One might also be able to do a tide clock of some sort too, but it
would probably require a variable speed.
Jim
On Wed, 23 Jul 2008 15:22:08 -0700, Jim Lux James.P.Lux@jpl.nasa.gov wrote:
At 03:01 PM 7/23/2008, Mike S wrote:
You're missing the point. The application is to drive a common, readily
available consumer clock. Simple and cheap. It can be done with a
single $1 PIC. You could spend $20 or $100 and not get better results
for the application. If you can describe a way of doing it for $0.50,
please do.
But this is time-nuts... Any approach that doesn't have the
performance of a hydrogen maser or cryogenic sapphire resonator just
isn't good enough. Why, we haven't even started on how to build a
radial ruling engine to make sure the clock face is precisely divided
into 60 segments to ppb accuracy.
Yep. There's turd polishing and then there is time nuts turd polishing. Going
for the angstrom finish on the turd. The latter sometimes makes me grit my
teeth....
Based on the clocks I've taken apart, dividing the 10MHz down to 1 Hz
is probably your best bet, rather than trying to hit 32768. However,
I don't know of a non-programmable single chip solution that will do
a divide by 1E7. If you want programmable chips, there's countless
ways, some more elegant than others.
Seems to me that all the solutions proposed so far are a bit complex, trying
to go for the 32khz frequency when that's not necessary. The quartz analog
clockworks has a one or two winding stepper motor. The SIMPLEST solution is
to drive those coils directly with the PIC output and scrap the rest of the
circuitry.
With some clever fiddling, one could use one of the 8 pin PICs and that WOULD
get the solution cost down to around 50 cents :-)
John De Armond
See my website for my current email address
http://www.neon-john.com
http://www.johndearmond.com <-- best little blog on the net!
Tellico Plains, Occupied TN
Save the whales, collect the whole set!
At 04:22 PM 7/28/2008, you wrote:
On Wed, 23 Jul 2008 15:22:08 -0700, Jim Lux James.P.Lux@jpl.nasa.gov wrote:
Based on the clocks I've taken apart, dividing the 10MHz down to 1 Hz
is probably your best bet, rather than trying to hit 32768. However,
I don't know of a non-programmable single chip solution that will do
a divide by 1E7. If you want programmable chips, there's countless
ways, some more elegant than others.
Seems to me that all the solutions proposed so far are a bit complex, trying
to go for the 32khz frequency when that's not necessary. The quartz analog
clockworks has a one or two winding stepper motor. The SIMPLEST solution is
to drive those coils directly with the PIC output and scrap the rest of the
circuitry.
Actually, it's not even that complex... it's often an
electromagnet/solenoid driving a conventional escapement type clock
mechanism. Why use 2 coils when you don't ever need to go backwards?
One advantage of generating 32kHz (averaged over 1 second) is that
you don't have to build the power driver stage to actuate that
electromagnet.. (since it's built into the single dirt-cheap chip in
the clock in the first place)
With some clever fiddling, one could use one of the 8 pin PICs and that WOULD
get the solution cost down to around 50 cents :-)
And, one could probably figure out a way to use the original 32kHz
crystal AND run at different speeds..
FYI,
Quartz analogue clocks almost universally use a bipolar motor, a two
pole
magnetic circuit with the minimum reluctance axis displaced from the
direction
of the energised field.
When activated the 2 pole magnetic rotor aligns with the magnetic
field, when the field collapses,
the magnetic rotor moves a little towards the position of greater
self attraction, so that it is
set up for a move in the right direction when the reverse field is
applied.
To drive these motors as clock displays you either replicate the
alternate 1.5 volt 20mS pulses, or connect a capacitor,
about 10 - 100 mfd in series and drive them with a 0.5 hertz square
wave of about 1.5 volt amplitude.
The drive voltage and pulse duration should be adjusted for each type
of motor, or else
the voltage and capacitor size so that reliable stepping occurs.
Overdrive can stop some types as the rotor "poles".
just in case you were interested,
cheers, Neville Michie
On 29/07/2008, at 9:35 AM, Jim Lux wrote:
At 04:22 PM 7/28/2008, you wrote:
On Wed, 23 Jul 2008 15:22:08 -0700, Jim Lux
James.P.Lux@jpl.nasa.gov wrote:
Based on the clocks I've taken apart, dividing the 10MHz down to
1 Hz
is probably your best bet, rather than trying to hit 32768. However,
I don't know of a non-programmable single chip solution that will do
a divide by 1E7. If you want programmable chips, there's countless
ways, some more elegant than others.
Seems to me that all the solutions proposed so far are a bit
complex, trying
to go for the 32khz frequency when that's not necessary. The
quartz analog
clockworks has a one or two winding stepper motor. The SIMPLEST
solution is
to drive those coils directly with the PIC output and scrap the
rest of the
circuitry.
Actually, it's not even that complex... it's often an
electromagnet/solenoid driving a conventional escapement type clock
mechanism. Why use 2 coils when you don't ever need to go backwards?
One advantage of generating 32kHz (averaged over 1 second) is that
you don't have to build the power driver stage to actuate that
electromagnet.. (since it's built into the single dirt-cheap chip in
the clock in the first place)
With some clever fiddling, one could use one of the 8 pin PICs and
that WOULD
get the solution cost down to around 50 cents :-)
And, one could probably figure out a way to use the original 32kHz
crystal AND run at different speeds..
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/
time-nuts
and follow the instructions there.
On Mon, 28 Jul 2008 16:35:53 -0700, Jim Lux James.P.Lux@jpl.nasa.gov wrote:
Seems to me that all the solutions proposed so far are a bit complex, trying
to go for the 32khz frequency when that's not necessary. The quartz analog
clockworks has a one or two winding stepper motor. The SIMPLEST solution is
to drive those coils directly with the PIC output and scrap the rest of the
circuitry.
Actually, it's not even that complex... it's often an
electromagnet/solenoid driving a conventional escapement type clock
mechanism. Why use 2 coils when you don't ever need to go backwards?
The clockworks that I've taken apart almost all have 2 coils. One brand has
one. They all drive a permanent magnet rotor that turns 90 degrees on each
tick. I'm not sure what the single coil design does to make sure the rotor
always turns the right direction. Or maybe it doesn't matter if the rotor
turns a cam and ratchet mechanism. I've never taken one apart far enough to
know.
One advantage of generating 32kHz (averaged over 1 second) is that
you don't have to build the power driver stage to actuate that
electromagnet.. (since it's built into the single dirt-cheap chip in
the clock in the first place)
No driver needed. Each coil has about a bazillion (bazillion.000000 for time
nuts) turns of wire so fine I can't see it without my 7x OptiVisor. I've
never bothered to measure but the resistance has to be in the hundreds of ohms
or more. It has to be that high to get over a year's operation from an AA
battery. Duck soup for a PIC output pin driver.
Funny how this works. I've been thinking about this same type problem for a
few days independent of reading this list. I'm old-fashioned and like analog
clocks much better than digital. I also like the precision of
radio-controlled clocks. I've bought several different WWVB analog clocks,
all of which seem to use the same cheap ChiCom movement. They uniformly suck
(to use a technical term) at receiving WWVB where I live. The digital
versions have no problem receiving but I don't like the looks.
What I've been thinking about is a modern version of the Simplex master/slave
clock system. A GPS disciplined master clock sending out operating pulses to
slave clocks around my house and shop.
I thought about wireless, including synthesizing my own WWVB signal but I know
that I'll not get enough round tuits to do that. What I'm working toward is
just about what I described above, except that the master clock will drive 4
conductor telephone station wire and the slave clocks will contain no
electronics. Only the clockwork and the coils. All the clocks will be wired
in parallel.
This is an open-loop system that assumes all the clocks are in the same
mechanical position when the master is activated. Perfectly acceptable, given
the relatively few number of clocks and the small area involved.
This architecture should give me what I want - REALLY simple, no electronics
in the individual clocks, "atomic" accuracy, automatic DST correction and
perfect synchronism.
Comments?
John De Armond
See my website for my current email address
http://www.neon-john.com
http://www.johndearmond.com <-- best little blog on the net!
Tellico Plains, Occupied TN
No one can be right all of the time, but it helps to be right most of the time. -Robert Half
At 05:04 PM 7/28/2008, you wrote:
FYI,
Quartz analogue clocks almost universally use a bipolar motor, a two
pole
magnetic circuit with the minimum reluctance axis displaced from the
direction
of the energised field.
When activated the 2 pole magnetic rotor aligns with the magnetic
field, when the field collapses,
the magnetic rotor moves a little towards the position of greater
self attraction, so that it is
set up for a move in the right direction when the reverse field is
applied.
To drive these motors as clock displays you either replicate the
alternate 1.5 volt 20mS pulses, or connect a capacitor,
about 10 - 100 mfd in series and drive them with a 0.5 hertz square
wave of about 1.5 volt amplitude.
The drive voltage and pulse duration should be adjusted for each type
of motor, or else
the voltage and capacitor size so that reliable stepping occurs.
Overdrive can stop some types as the rotor "poles".
just in case you were interested,
cheers, Neville Michie
The ones I have here have a single solenoid with a sort of wishbone
shaped thing around it. A curved metal rod with a thicker center
portion is connected between the arms of the wishbone. The rod goes
through the center of the solenoid, and it looks like when the
current pulse is applied to the solenoid, the armature is pulled through.
Imagine a sort of pendulum with the solenoid at the bottom.
In any case, faking the 32.768 is going to be easiest, because the
clock mfr has already fooled with figuring out the right voltages,
currents, and pulse widths.
Only the clockwork and the coils. All the clocks will be wired
in parallel.
Traditionally, such systems had all the slave coils in series.
I suspect you will find that the better way; less room for weirdness.
Otherwise, I like it!
Tom Frank
Max Skop wrote:
How does one get a 32.768KHz signal from our 10MHz reference.
There does not appear to be a nice divide ratio to do this.
With a locked 32.768KHz signal one could lock the oscillator of any of the cheap (low cost) LCD clocks that are available with nice big digits, temperature sensors and calendars, etc.
Any suggestions on how to do it??
I would consider locking a 8,192 MHz crystal to the 10 MHz. The
comparator frequency of 16 kHz using a division of 625 from the 10 MHz
and a 512 from the 8,192 MHz oscillator. The 32,768 kHz output can be
generated by first dividing by 125 and then a division by 2 for propper
50% pulse ratio.
Not too complex and the comparator frequency is high enought for a nice
filter should be able to do it. I would use a SR flip-flop for phase
detector. For this kind of work they work very well IMHO.
Cheers,
Magnus
Hi John:
All the quartz clocks I've taken apart have a single coil, for example see:
http://www.prc68.com/I/QuartzClk.shtml
The drive to that coil is bi-polar and is from a single AA cell, so the driver
IC must use an H-bridge. If you want to drive a clock like this at 1 PPS from
a 10 MHz source you will need to use some kind of conversion circuit. That's
why it's easier to generate the 32768 Hz signal and just drive the xtal pins on
the clock's IC.
Have Fun,
Brooke Clarke
http://www.prc68.com/P/Prod.html Products I make and sell
http://www.prc68.com/Alpha.shtml All my web pages listed based on html name
http://www.PRC68.com
http://www.precisionclock.com
http://www.prc68.com/I/WebCam2.shtml 24/7 Sky-Weather-Astronomy Web Cam
Neon John wrote:
On Mon, 28 Jul 2008 16:35:53 -0700, Jim Lux James.P.Lux@jpl.nasa.gov wrote:
Seems to me that all the solutions proposed so far are a bit complex, trying
to go for the 32khz frequency when that's not necessary. The quartz analog
clockworks has a one or two winding stepper motor. The SIMPLEST solution is
to drive those coils directly with the PIC output and scrap the rest of the
circuitry.
Actually, it's not even that complex... it's often an
electromagnet/solenoid driving a conventional escapement type clock
mechanism. Why use 2 coils when you don't ever need to go backwards?
The clockworks that I've taken apart almost all have 2 coils. One brand has
one. They all drive a permanent magnet rotor that turns 90 degrees on each
tick. I'm not sure what the single coil design does to make sure the rotor
always turns the right direction. Or maybe it doesn't matter if the rotor
turns a cam and ratchet mechanism. I've never taken one apart far enough to
know.
One advantage of generating 32kHz (averaged over 1 second) is that
you don't have to build the power driver stage to actuate that
electromagnet.. (since it's built into the single dirt-cheap chip in
the clock in the first place)
No driver needed. Each coil has about a bazillion (bazillion.000000 for time
nuts) turns of wire so fine I can't see it without my 7x OptiVisor. I've
never bothered to measure but the resistance has to be in the hundreds of ohms
or more. It has to be that high to get over a year's operation from an AA
battery. Duck soup for a PIC output pin driver.
Funny how this works. I've been thinking about this same type problem for a
few days independent of reading this list. I'm old-fashioned and like analog
clocks much better than digital. I also like the precision of
radio-controlled clocks. I've bought several different WWVB analog clocks,
all of which seem to use the same cheap ChiCom movement. They uniformly suck
(to use a technical term) at receiving WWVB where I live. The digital
versions have no problem receiving but I don't like the looks.
What I've been thinking about is a modern version of the Simplex master/slave
clock system. A GPS disciplined master clock sending out operating pulses to
slave clocks around my house and shop.
I thought about wireless, including synthesizing my own WWVB signal but I know
that I'll not get enough round tuits to do that. What I'm working toward is
just about what I described above, except that the master clock will drive 4
conductor telephone station wire and the slave clocks will contain no
electronics. Only the clockwork and the coils. All the clocks will be wired
in parallel.
This is an open-loop system that assumes all the clocks are in the same
mechanical position when the master is activated. Perfectly acceptable, given
the relatively few number of clocks and the small area involved.
This architecture should give me what I want - REALLY simple, no electronics
in the individual clocks, "atomic" accuracy, automatic DST correction and
perfect synchronism.
Comments?
John De Armond
See my website for my current email address
http://www.neon-john.com
http://www.johndearmond.com <-- best little blog on the net!
Tellico Plains, Occupied TN
No one can be right all of the time, but it helps to be right most of the time. -Robert Half
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
Hi Brooke,
The drive for the coils is really not very critical. All you need is
a cmos inverter and a couple of capacitors:
~1PPS--[>o---+----[>o-------|(-----+
~ | |
~ | MOTOR
~ | |
~ +--------------|(-----+
~
Yes, it is just that easy.
-Chuck Harris
Brooke Clarke wrote:
Hi John:
All the quartz clocks I've taken apart have a single coil, for example see:
http://www.prc68.com/I/QuartzClk.shtml
The drive to that coil is bi-polar and is from a single AA cell, so the driver
IC must use an H-bridge. If you want to drive a clock like this at 1 PPS from
a 10 MHz source you will need to use some kind of conversion circuit. That's
why it's easier to generate the 32768 Hz signal and just drive the xtal pins on
the clock's IC.
Have Fun,
Brooke Clarke
Chuck Harris wrote:
Hi Brooke,
The drive for the coils is really not very critical. All you need is
a cmos inverter and a couple of capacitors:
~1PPS--[>o---+----[>o-------|(-----+
~ | |
~ | MOTOR
~ | |
~ +--------------|(-----+
~
Yes, it is just that easy.
Actually, when I spend just another minute thinking about it, it is even
easier:
~1PPS-----[>o-----|(------+
~ |
~ MOTOR
~ |
~ ///
-Chuck Harris
Brooke,
Here's what I did with a PIC (or Basic Stamp, etc.):
Current limit the coil to two pins of your microcontroller and
configure both as inputs (high Z).
Then for about 50 ms each second make the pins output; for
even seconds set the pins to 0 and 1; odd seconds 1 and 0.
/tvb
----- Original Message -----
From: "Brooke Clarke" brooke@pacific.net
To: "Discussion of precise time and frequency measurement" time-nuts@febo.com
Sent: Thursday, September 04, 2008 12:25 PM
Subject: Re: [time-nuts] How to get 32.768KHz from 10MHz.
Hi John:
All the quartz clocks I've taken apart have a single coil, for example see:
http://www.prc68.com/I/QuartzClk.shtml
The drive to that coil is bi-polar and is from a single AA cell, so the driver
IC must use an H-bridge. If you want to drive a clock like this at 1 PPS from
a 10 MHz source you will need to use some kind of conversion circuit. That's
why it's easier to generate the 32768 Hz signal and just drive the xtal pins on
the clock's IC.
Have Fun,
Brooke Clarke
http://www.prc68.com/P/Prod.html Products I make and sell
http://www.prc68.com/Alpha.shtml All my web pages listed based on html name
http://www.PRC68.com
http://www.precisionclock.com
http://www.prc68.com/I/WebCam2.shtml 24/7 Sky-Weather-Astronomy Web Cam
Neon John wrote:
On Mon, 28 Jul 2008 16:35:53 -0700, Jim Lux James.P.Lux@jpl.nasa.gov wrote:
Seems to me that all the solutions proposed so far are a bit complex, trying
to go for the 32khz frequency when that's not necessary. The quartz analog
clockworks has a one or two winding stepper motor. The SIMPLEST solution is
to drive those coils directly with the PIC output and scrap the rest of the
circuitry.
Actually, it's not even that complex... it's often an
electromagnet/solenoid driving a conventional escapement type clock
mechanism. Why use 2 coils when you don't ever need to go backwards?
The clockworks that I've taken apart almost all have 2 coils. One brand has
one. They all drive a permanent magnet rotor that turns 90 degrees on each
tick. I'm not sure what the single coil design does to make sure the rotor
always turns the right direction. Or maybe it doesn't matter if the rotor
turns a cam and ratchet mechanism. I've never taken one apart far enough to
know.
One advantage of generating 32kHz (averaged over 1 second) is that
you don't have to build the power driver stage to actuate that
electromagnet.. (since it's built into the single dirt-cheap chip in
the clock in the first place)
No driver needed. Each coil has about a bazillion (bazillion.000000 for time
nuts) turns of wire so fine I can't see it without my 7x OptiVisor. I've
never bothered to measure but the resistance has to be in the hundreds of ohms
or more. It has to be that high to get over a year's operation from an AA
battery. Duck soup for a PIC output pin driver.
Funny how this works. I've been thinking about this same type problem for a
few days independent of reading this list. I'm old-fashioned and like analog
clocks much better than digital. I also like the precision of
radio-controlled clocks. I've bought several different WWVB analog clocks,
all of which seem to use the same cheap ChiCom movement. They uniformly suck
(to use a technical term) at receiving WWVB where I live. The digital
versions have no problem receiving but I don't like the looks.
What I've been thinking about is a modern version of the Simplex master/slave
clock system. A GPS disciplined master clock sending out operating pulses to
slave clocks around my house and shop.
I thought about wireless, including synthesizing my own WWVB signal but I know
that I'll not get enough round tuits to do that. What I'm working toward is
just about what I described above, except that the master clock will drive 4
conductor telephone station wire and the slave clocks will contain no
electronics. Only the clockwork and the coils. All the clocks will be wired
in parallel.
This is an open-loop system that assumes all the clocks are in the same
mechanical position when the master is activated. Perfectly acceptable, given
the relatively few number of clocks and the small area involved.
This architecture should give me what I want - REALLY simple, no electronics
in the individual clocks, "atomic" accuracy, automatic DST correction and
perfect synchronism.
Comments?
John De Armond
See my website for my current email address
http://www.neon-john.com
http://www.johndearmond.com <-- best little blog on the net!
Tellico Plains, Occupied TN
No one can be right all of the time, but it helps to be right most of the time. -Robert Half
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
For those still interested in the 10 MHz to 32 KHz divider issue, I
offer the PIC source to a tested divider that runs in an 8-pin DIP
package device:
http://www.ni6e.com/time/10M32K.html
Regards,
Peter
Tom Van Baak wrote:
Since synchronization is more important than jitter in this
application it's easy to generate 32 kHz from 10 MHz.
A 10 MHz clock into a PIC gives a 400 ns/instruction time.
To produce 32.768 kHz you flip an output pin put every 38
instructions, except that 9632 times per second you make
it 39 instructions instead.
The result is 65536 bit flips per second (giving a frequency
of exactly 32768 Hz) consuming 2 500 000 instructions per
second. The output accuracy equals the input accuracy.
The output jitter is as most 400 ns.
/tvb