A Low Cost Sidereal Clock

OverviewCircuit

Introduction

The inspiration for this project was a letter appearing in the 'Ask Silicon Chip' section of the July 2015 issue of Silicon Chip magazine. The letter writer was inquiring about using the 1pps (one pulse per second) output of a GPS module to synchronise a sidereal clock. Because a sidereal second is shorter than a normal second (which I shall call a UTC second), the 1pps had to be converted to 1.002738Hz to create sidereal seconds.

This seemed like a straightforward job for a microprocessor, and I saw it as a challenge to implement the conversion in a PIC16F628A processor as I had them available along with a suitable programmer. But, as is often the case, the devil is in the detail. What was the relationship between the input and output? Would the user wait until a sidereal second started at the same time as a UTC second to power up the conversion, something which occurs about every 6 minutes? Or was an error of up to half a second acceptable? How accurate did the conversion need to be (1.002738Hz is an approximation)? How would the user determine the setting of the sidereal clock?

Some research revealed that Sidereal Time comes in different flavours, mean and apparent. And the basis is UT1, a different time to UTC. UTC (Coordinated Universal Time) is the time base for civil clocks world wide including the GPS and is based on atomic vibrations, whereas UT1  based on the actual rotation period of the earth. The two are kept in reasonable agreement by inserting (or deleting if necessary) leap seconds. The conclusion is that any simple sidereal clock would not be accurate, even if it were synchronised by GPS. However, the relationship between UT1 and UTC, and the relationship between mean and apparent sidereal time, is published and changes slowly. So the time from a clock based on UTC can be used to provide an accurate sidereal time, by applying the correction.

The conclusion was that a sidereal second synchronised to the UTC second would be useful. An approximate sidereal time can be computed using the formula:

LMST = 280.46061837 + 360.98564736629 * d + Long

Where LMST is Local Mean Sidereal Time expressed in degrees, d = UT days since J2000.0, including parts of a day, Long is the longitude of the locality.

Time in degrees is converted to time in seconds by reducing the degrees to an angle between 0 and 360, then multiplying by 240.

Fortuitously, almost all GPS receivers can provide all the information required for the calculation, in a $GPRMC NMEA message. This fixes the relationship between 1pps input and sidereal second pulses output, which may not be accurate but would have a known error. Also, since the result of the calculation was sidereal time, the data could be used to drive a clock directly, and require no manual intervention. This then became the aim of the project, to create a GPS synchronised sidereal clock. With one more condition ... 'cheaply'. There was no point in spending a lot of money to build something that could be bought off the shelf for a little more, or was available as an app on an $80 smart phone.