Help needed for Crystal Clock - Page 1
Forum section: electronics / projects

author: _rushin_or_draggin_
author_rank: Regular Contributor
timestamp: July 24, 2022, 11:47:13 pm
content: Hello everyone!I have been wanting to create a Sidereal clock for astronomy for quite awhile now. I’ve gone through choices such as getting a mechanical clock and regulating it to be at sidereal time, ive designed my own mechanical clock, and some other things. I want to create an electronic clock but I’m having trouble making a clock circuit. The thing is I first wanted to do a 555 style clock but I’m not sure if it’ll be accurate enough. Now I want to do a crystal oscillator (not even sure if that’s the smartest idea) as it can be regulated to an acceptable precision (with the +/- ppm in mind of course). Sadly it’s not as easy as taking a readily available 32.768 kHz crystal and dividing it down to 1 hz. Since a sidereal day is slightly shorter than solar day (about 23 hours 56 minutes and 4 seconds) it has a weird frequency. Doing math I’ve found that I need the output of my clock to be 1.00273790943031 hz (give or take resolution). Does anyone have any idea how I could make that possible? I could do a custom quartz crystal but I’m trying to do this with readily made components such as standard crystals. I’ve seen programmable oscillators but have never messed with them.Thanks!Josh

author: Someone
author_rank: Super Contributor
timestamp: July 25, 2022, 12:30:42 am
content: The clock ratio would be:86164.0905/86400So then its a matter of finding some "normal" crystal pairs that are that close together... and in a range that you can find a clock to run from.RC model crystals would be an obvious place to start as they come in very finely spaced frequencies. Do you know any clocks that run on 27,35,40, or 72 point something MHz ? (there are probably other series too)Or build a clock using any of the example microcontroller projects that divide down a high speed oscillator and adjust their divider/counter to suit an odd crystal that gets close enough (there are some oscillators that have a trim voltage to fine tune the last ppms)

author: coromonadalix
author_rank: Super Contributor
timestamp: July 25, 2022, 01:36:10 am
content: An dds signal generator ?? they can be precise in the micro hertz range ??

author: _rushin_or_draggin_
author_rank: Regular Contributor
timestamp: July 25, 2022, 02:05:00 am
content: I’m not sure how you would pair crystals together, never looked into it. Could you explain that a little more please?I’ll have to look into the RC crystals, maybe something will be close enough. Hard to find anything close to what I need.Yeah I could do a microcontroller. Was trying to stay away from doing that but if that’s all I can do then I may have to do that.Thanks!

author: _rushin_or_draggin_
author_rank: Regular Contributor
timestamp: July 25, 2022, 02:06:18 am
content: I’m trying to make this a contained unit so I don’t think an external function generator would help me. Would be the perfect solution if I wasn’t though!

author: Someone
author_rank: Super Contributor
timestamp: July 25, 2022, 02:20:11 am
content: Quote from: _rushin_or_draggin_ on July 25, 2022, 02:05:00 am1) find a clock that uses a 27MHz (or one of the other RC frequencies) crystal2) swap the crystal for one that is 1.0027379 times fasterThere arent many crystals easily available with such close frequencies, but RC models do have very closely spaced frequencies so you can find one with only a slight difference. 27MHz is a common frequency in some timing/clocks, where an RC 27.075 MHz half band crystal gets very close to your sidereal speed.

author: ejeffrey
author_rank: Super Contributor
timestamp: July 25, 2022, 02:44:19 am
content: You just need a programmable divider instead of a fixed power of 2. A counter with synchronous load can be programmed for whatever frequency division you need to generate your 1.002... Hz clock.

author: RJSV
author_rank: Super Contributor
timestamp: July 25, 2022, 03:14:48 am
content: Might take a bit of research. First, maybe try contact a few observatories, as that's an Astronomy related problem, that I would guess, has been subject of a magazine article, in professional Astronomy magazines.I think basics, you will need a micro-controller, and with some Floating Point math capability. Ever hear of a 'Crystal Oven' ? That item gets you those last, few parts-per-million accuracy, and stability. National Bureau of Standards and 'WWV' World clock does a lot.The oven setup controls temperature, I guess at some low temperature, (like 110°degrees ?).What's wrong with just buying something, maybe a PC APP, that does the differing standard 'day'. There's got to be others, with your same need, in Astronomy, right ?(BTW, I hate 555 ICs, better to use Lm311 or LM 339, to do any hardware timer.)

author: Someone
author_rank: Super Contributor
timestamp: July 25, 2022, 03:30:38 am
content: Quote from: RJHayward on July 25, 2022, 03:14:48 amprecision clocks or ovenized crystals are often big, expensive, and/or power hungry. Cheaper to put in a GPS module these days!Quote from: RJHayward on July 25, 2022, 03:14:48 amThere are easier sources:https://qrp-labs.com/clocknhttps://github.com/la3za/Multi-Face-GPS-Clock/wiki

author: David Hess
author_rank: Super Contributor
timestamp: July 25, 2022, 04:33:52 am
content: The series resonant frequency is below the parallel resonant frequency. I just did the calculation and for a 32.768 kHz crystal it came out to 1.0025 low, which yields 32.686 which is very close to the needed 32.678. So put a crystal cut for parallel resonance (Colpitts) into a series resonant oscillator circuit like the Pierce. Then use that to replace the crystal in the existing clock circuit.

author: _rushin_or_draggin_
author_rank: Regular Contributor
timestamp: July 25, 2022, 04:37:36 am
content: Quote from: RJHayward on July 25, 2022, 03:14:48 amNothings wrong with that at all, In fact that’s what I have now! I’m just kinda a nerd and want to build something ya know? Always loved the observatories with a dedicated clock instead of a computer program or phone app. Just something I think would be cool to have, plus can say I built it

author: _rushin_or_draggin_
author_rank: Regular Contributor
timestamp: July 25, 2022, 04:42:59 am
content: Quote from: ejeffrey on July 25, 2022, 02:44:19 amI’m somewhat new to these clock circuits so what exactly do you mean by a synchronous load? Is that the same as a synchronous counter or are there differences. I really like the idea of a programmable divider!

author: RJSV
author_rank: Super Contributor
timestamp: July 25, 2022, 05:00:23 am
content: I think he means a Synchronous Load will do a load, but it will be pending, for that brief little time, until next clock edge comes (like rising edge). That will be a fraction of one clock.The load, might have to go across several counter ICs, such as for 12 bits, when using 4-bit Synchronous counters. (Async counters just load right immediately.). At 12 bits, that's divide by 4096, maybe still not enough, but you might be able to 'pre-divide', with your customized value, such as 4, 024, and then divide the rest as a power of two (no preload).That's going to be a LOT of ICs right there, where a controller IC can use internal registers, for your custom divisor.IC Cd4020 has 14 binary stages, but no custom preload.

author: ejeffrey
author_rank: Super Contributor
timestamp: July 25, 2022, 05:14:41 am
content: A synchronous load is only ever found with a synchronous counter (not a ripple counter) but not all counters have this feature.Synchronous load means that the counter has digital inputs and a "load enable" pin. On the rising edge of the clock, if the LE pin is active instead of counting it loads the counter register from the input pins. An example is the SN74LS161 4 bit counter and several similar parts.So the way you would do this is to chain 4 of those logic chips to make a 16 bit counter. The carry output of each counter goes to the enable of the next chip. However, the carry output of the last chip goes to the load enable of all 4 chips. Now you have made a 16 bit counter that every time it wraps, instead of going to zero it loads a specified value. You can just program that value with pin strapping.If you choose a preset value appropriately you can make a divide by 32679. This plus a 32.768 kHz watch crystal oscillator will give you within 20 ppm of the desired sidereal clock frequency. You take the final stage carry out / load enable signal as your pulse per second output. The only small caveat is that the pulse width is only a single clock cycle.The performance will be limited by the accuracy of common watch crystals anyway. It will drift by a few minutes per year. If you have a more accurate base clock, such as a GPS signal or an accurate OCXO it might be worth it to build a better divider.

author: bd139
author_rank: Super Contributor
timestamp: July 25, 2022, 07:21:15 am
content: Worth reading this article in detail for mathematical inspiration:http://www.hanssummers.com/images/stories/sidereal/files/baa.pdfYou've already calculated the ratio between solar and sidereal time which is good. Ultimately the article above used the US mains at 60Hz and counted 1461 pulses (4x 365.25) and added another 4. This gave a total error of 1.8 seconds a year on sidereal time which is pretty good for a dumb solution.I'm sure you can do similar things with other frequency sources (consider GPS disciplined OCXO for a very accurate source)

author: srb1954
author_rank: Super Contributor
timestamp: July 25, 2022, 07:52:08 am
content: Quote from: _rushin_or_draggin_ on July 24, 2022, 11:47:13 pmAn important factor that needs to be determined very early on is the amount of error you are prepared to accept in your master clock source. This error is composed of the initial frequency error and any subsequent drift of the clock oscillator frequency. The initial error can be trimmed out with some oscillator configurations but the drift is not so easily controlled. The drift requirements will generally drive your selection of the oscillator type.As a very, very rough guide (order of magnitude figure) the drift per year that can be expected from different oscillator types is:Basic crystal oscillator 10-5Temperature compensated crystal oscillator (TXCO) 10-6Basic oven controlled crystal oscillator (OCXO) 10-7High performance double oven crystal oscillator 10-8Rubidium frequency standard 10-10Cesium frequency standard 10-12GPS disciplined oscillator (GPSDO) Potentially equivalent stability to international cesium frequency standardsOnce you have decided the type of master oscillator which, for the higher performance devices, will typically output a 5MHz or 10MHz clock you can then determine the type of divider needed to derive your approx 1pps for your clock. If you really need a clock specified to an accuracy of 1.00273790943031 Hz then you need to start looking for cesium frequency standards or the much cheaper GPSDO option.

author: jpanhalt
author_rank: Super Contributor
timestamp: July 25, 2022, 09:22:35 am
content: Horowitz and Hill, "The Art of Electronics," 2nd edition show a sidereal clock they built for the Harvard observatory. It uses 60 Hz mains frequency for a standard. See: Section 8.31, page 548. You might get some pointers there. This later link may give further inspiration:https://aapt.scitation.org/doi/abs/10.1119/1.3471938(you have to belong or pay to get the whole article).

author: Zenith
author_rank: Frequent Contributor
timestamp: July 25, 2022, 09:34:08 am
content: Quote from: _rushin_or_draggin_ on July 24, 2022, 11:47:13 pmWhat is this for? Are you looking for long term accuracy over the course of a year, or would it be good enough were it accurate to within a few seconds in a 6 hour period, say for astrophotograpy? If you've been experimenting with a mechanical clock it suggests the latter.On the face of it, I'd be inclined to use a reasonable quality standard crystal and divide it down with a microcontroller to give the pulse timing you need.You could use a mechanical clock with a pendulum and adjust the pendulum. It seems rather clumsy in the modern age, but there were pendulum clocks of considerable sophistication when there was no alternative. You'd need to find a way to produce electrical pulses from the pendulum, but several ways occur.

author: Zero999
author_rank: Super Contributor
timestamp: July 25, 2022, 11:44:56 am
content: How important is jitter? An ordinary crystal and microcontroller will do, if jitter/short term stability isn't critical. Use a standard 215Hz crystal and add in extra counts to some of the pulses, to make the frequency close to the desired value.

author: mycroft
author_rank: Regular Contributor
timestamp: July 25, 2022, 12:10:06 pm
content: Take a look athttp://www.leapsecond.com/pic/picdiv.htmand search for PD28 -- 10 MHz to sidereal 1PPS divider, with sync and milli-step.

author: CaptDon
author_rank: Super Contributor
timestamp: July 25, 2022, 01:21:08 pm
content: An old ham radio guy would find a nice 'double oven' crystal oven that incorporates both the crystal and oscillator in one unit. I owned one made by Technical Material Corporation. It was a super precise 10mhz frequency reference in a rack mount form for lab use. Then you would use the original crystal and grind it. Me personally, I would find several samples of the FT-243 10mhz crystals because chances are you may kill the crystal when grinding. You only have to go up about 2khz which should be easy to do with a glass plate and toothpaste for the grinding operation. This is old school and may take a year of amateur radio hamfesting or a month of ebay shopping to find what you need but you would be the envy of your sidereal clock friends!! I wish I still owned that old TMC master oscillator / frequency standard! I built a TTL 7490 divider chain to get 1PPS with the final 7490 wired to give a square wave and put it inside the TMC unit and added an extra BNC connector. BTW, it was interesting to compare the time drift of the TMC 1PPS output vs. the local 60Hz a.c. line divided by 60 and squared up.

author: _rushin_or_draggin_
author_rank: Regular Contributor
timestamp: July 25, 2022, 04:37:23 pm
content: Quote from: Zero999 on July 25, 2022, 11:44:56 amI saw something similar to this by “back feeding” the output of a divider back into the divider chain to which I believe will add extra pulses as they are at different frequencies. I’ll attach a photo below if possible. The reason I haven’t done it is because I can’t figure out how they subtracted part of the frequency.

author: profdc9
author_rank: Frequent Contributor
timestamp: July 26, 2022, 02:06:11 am
content: You could use a SI5351A and use the fractional PLL to get a very accurate divided frequency. You could even substitute the 25 MHz crystal for a 25 MHz TCXO if you want < 0.5 ppm precision. You can even get GPSDO clocks that you could derive the fractional PLL signal from.