[time-nuts] latest version of arduino solar clock

Jim Lux jimlux at earthlink.net
Mon Jan 20 18:01:13 UTC 2014


On 1/20/14 9:48 AM, Bob Camp wrote:
> Hi
>
> There are *lots* of ways to do any sort of code. I can’t think of any practical problem that has a single unique “best” way to do it. All I’m trying to say is that there is a way to get the job done (to much better accuracy than you need) with what you have. If there’s one way, there must be other ways as well.
>
> Bob
>

Yep..

what I was trying to avoid was trying to count cycles and implement an 
add/drop scheme (which is sort of a feedback loop scheme), and have a 
more "forward only".

The way the Arduino Timer1 library works is that the onchip timer 
generates an interrupt (and resets) when it is equal to a comparison 
register.  This is convenient, because it means that you can set the 
comparison register while the timer is counting, without starting a new 
counting cycle (as opposed to a scheme where you reload a countdown 
timer on each interrupt).



I think the real errors are going to be things like whether tvb's 
algorithm for EOT is "good enough" for leap years, for instance.

Right now, if you integrate the rates over a whole year of hours (hmm, 
have to try that) you should come back to zero, but if you stick in an 
extra day, you'll wind up 30 seconds off (because it's changing fast at 
that time of year).


Now I'm going to start working on what the "rate equation" needs to be 
for sunrise/sunset at 6'o clock, given latitude.

I have the EOT for Mars, as well, and some of the previous posts have 
given references from which I can generate an EOT for other heavenly 
bodies if needed.


(of course, if someone had a cheap source for "clock" displays that have 
absolute positioning (e.g. something like a synchro), that would make 
life easier.

All of this generating pulse streams for a relative positioning device 
(basically a stepper motor) has enormous potential for cumulative 
errors, not to mention the power fail issue.  There's a reason why those 
centrally controlled clocks have the "sync" pulse mechanism at the top 
of the hour, and why my old floppy drives have a track zero sensor.

However, if one stays with stepper motor clocks, there's an enormous 
selection at places like Ikea, which are nice looking and cheap.




More information about the Time-nuts_lists.febo.com mailing list