I've built the clockk and all is well, but I'm hoping to change the rate at which the clock runs. I would like it to track sidereal time: the time it takes for the stars to move across the sky. To do this, I have to make the clock run at a rate where 1 day is 23:56:4.091, so 1 sideral second = 0.997270 regular seconds. Could someone suggest a fix for changing the rate?
I've got my USBTiny and everything is reading/writing properly, but not sure what to do in the firmware that would allow me to change the rate like that. I've read the fourms and found minor adjustments (for accuracy), but this is a pretty big change. Any suggestions?
Trying to modify for sidereal rate
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: Trying to modify for sidereal rate
which clock?
- rschmit
- Posts: 8
- Joined: Mon Jan 03, 2011 12:48 pm
Re: Trying to modify for sidereal rate
Sorry... The Ice Tube Clock.
I've looked for clocks that would do this, and while there are PC-based alternatives, I'm hoping to find it in an actual clock.
When I called about the Ice Tube as a possibility, the guy I chatted with said the clock could be programmed to do that. Sounds like exactly what I'm looking for! "Oh, PROGRAMMED programmed. So, not like 'I programmed my VCR' programmed... Hmmm Well, I can do that... Let me get my FORTRAN card puncher out, and... D'oh!
Been a while since I coded (can you tell?)
I've looked for clocks that would do this, and while there are PC-based alternatives, I'm hoping to find it in an actual clock.
When I called about the Ice Tube as a possibility, the guy I chatted with said the clock could be programmed to do that. Sounds like exactly what I'm looking for! "Oh, PROGRAMMED programmed. So, not like 'I programmed my VCR' programmed... Hmmm Well, I can do that... Let me get my FORTRAN card puncher out, and... D'oh!
Been a while since I coded (can you tell?)
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: Trying to modify for sidereal rate
first thing you'll need to do is get it to run on a more precise clockbase. the built in clock is not very precise. search the forum for people who have connected a chronodot to the ice tube. thats a temp compensated clock.
-
- Posts: 310
- Joined: Sun Mar 21, 2010 6:10 pm
Re: Trying to modify for sidereal rate
A WWVB receiver or maybe a GPS would be even better, since those will give you the UT1-UTC correction, especially if certain groups in the ITU get their way and let UTC drift without leapseconds.
- rschmit
- Posts: 8
- Joined: Mon Jan 03, 2011 12:48 pm
Re: Trying to modify for sidereal rate
Thanks, but for this one, I'm not going for high precision. If I can get this first one to work, I'll look to the GPS mod to make the next one more precise. To get started, I just want to dial in that sidereal rate.
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: Trying to modify for sidereal rate
the rate is less than the error of the built in RTC, you -do- need precision!
- rschmit
- Posts: 8
- Joined: Mon Jan 03, 2011 12:48 pm
Re: Trying to modify for sidereal rate
OK. I'll take another look at the chronodot.
- stinkbutt
- Posts: 593
- Joined: Wed Feb 17, 2010 2:40 am
Re: Trying to modify for sidereal rate
How does this rate differ from ordinary time by less than the accuracy of the Ice Tube Clock? According to his definition of Sidereal time, he's running fast by 3 minutes and 56 seconds a day. The stock Ice Tube's more accurate than that.
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: Trying to modify for sidereal rate
he wants
23:56:04.091
note the 3 extra digits -after- the seconds. that is a lot more precision than we have!
23:56:04.091
note the 3 extra digits -after- the seconds. that is a lot more precision than we have!
- rschmit
- Posts: 8
- Joined: Mon Jan 03, 2011 12:48 pm
Re: Trying to modify for sidereal rate
Oh, good point. Let me clarify: 3 min 56 seconds faster each day would be adequate for my application. I've read the other posts regarding accuracy over a week, and I'm fine with that. Thanks!
- stinkbutt
- Posts: 593
- Joined: Wed Feb 17, 2010 2:40 am
Re: Trying to modify for sidereal rate
OK, in that case the next question is: What do you want the time to be?
Do you want:
a) The time to read hours, minutes, and seconds accurately, and then flip over from 23:56:03 to 00:00:00
or
b) The time to read hours, minutes, and seconds inaccurately, skipping a second every ~6:06, a total of 236 times per day, and then flip from 23:59:59 to 00:00:00?
Either way is doable, it's just a question of how you'll need to handle the math.
Do you want:
a) The time to read hours, minutes, and seconds accurately, and then flip over from 23:56:03 to 00:00:00
or
b) The time to read hours, minutes, and seconds inaccurately, skipping a second every ~6:06, a total of 236 times per day, and then flip from 23:59:59 to 00:00:00?
Either way is doable, it's just a question of how you'll need to handle the math.
- rschmit
- Posts: 8
- Joined: Mon Jan 03, 2011 12:48 pm
Re: Trying to modify for sidereal rate
It's b). The celestial clock is a 24 hour clock, it just runs at a different rate. Just have to change the rate so 1 sidereal second is faster than 1 solar second.
- stinkbutt
- Posts: 593
- Joined: Wed Feb 17, 2010 2:40 am
Re: Trying to modify for sidereal rate
In that case, check these two posts out:rschmit wrote:It's b). The celestial clock is a 24 hour clock, it just runs at a different rate. Just have to change the rate so 1 sidereal second is faster than 1 solar second.
http://forums.adafruit.com/viewtopic.ph ... 764#p63721
http://forums.adafruit.com/viewtopic.php?f=41&t=12720
The first one is the implementation of an idea discussed in the second. Originally, this was intended as a way to make the clocks more accurate, and you'll probably need to refactor the code to make the calibration factor add more than just the couple of seconds per day it was designed for in the posts, but that's how you'd do it.
Check out iv.c in Digisage's firmware and find the relevant code. He doesn't do too bad a job commenting his BANNED, so it shouldn't be that hard.
- rschmit
- Posts: 8
- Joined: Mon Jan 03, 2011 12:48 pm
Re: Trying to modify for sidereal rate
Yep, I looked at that post previous to writing, and I thought this would be a show stopper:
If that's the limit to the range of values for cal_factor, then a full range value only buys me 0.366 seconds per day. At least that's how I was reading it.-128 <= cal_factor <= 127
Please be positive and constructive with your questions and comments.