Sidereal Time, cont.

I’ve been looking for an electronics project, so I’ve been dredging up old shelved ones, and sidereal time made it back into my consciousness.

I posted about this last year, but decided to add some more thoughts.

First, according to Wikipedia, the length of the “tropical year” (the one most people quote as approximately 365.25 days) is 365d 5h 48m 45s (=365.2421875 days of 86400s each).

The sidereal year is one day longer.

The length of one sidereal day, then, is 86400 * (365… / 366…) = 86164.09053 seconds. This is a ratio of 1 to 1.00273790935.

If using a 32768Hz crystal (used as “clock” crystals because of their nifty interaction with 16-bit registers), then you need to instead produce 32857.715… ticks/sec instead. A whole set of calculations helps to correct the extra 89.715… ticks down to an accurate-enough algorithm.

If you want to produce 32768 ticks per sidereal second (a worthy goal; this would allow the circuit to be a drop-in replacement for the normal 32768 clock crystal), then this is the way to go.

If you want to produce a 1Hz sidereal time base, though (one tick per sidereal second), then it’s a whole different set of calculations.

If you want to do 32768 ticks/sec but the buffer you’re filling is 8-bit, that adds a bit of fun to the mix, too.

And, in the final analysis, would you rather be running the chip at 4, 8, 16, or 20MHz instead of 32kHz? Then there’s enough time to do the whole “toggle the clock circuit” plus a bunch of other work in between.

One pictures this circuit being the basis for a sidereal wall clock, but could also be used to drive a telescope mount or an orrey or… so it would be nice to use the extra processing power, since the chip has the capability anyway. I could imagine having a 1Hz output on one pin, 32kHz on another, 0.5Hz on another (for a full off-on signal in 1sec), with a stepper motor frequency (which?) on another, …

Note: Roman Black (may the sun always shine on him!) has developed a really nice way to produce very accurate timebases out of an interrupt routine on a µC This looks like a pretty straightforward way to produce the timebase I’m looking for.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *