the Moon Clock
This is Moon Clock 3, the third major iteration of my long-running line of Moon Clocks. It started as software-only, back in the late 1990s, various forms of a running display of the Moon phase, under Linux. I was fascinated, when I looked "under the hood" at freeware moon programs, that calculating the phase of the Moon is not a simple matter. It does not have exactly the same period, every lunar month, and assuming that it does (which is what I tried first!) leads to errors of more than one day in events such as Full Moon. The correct astronomical formula uses about six different sinusoidal components, and lots of floating-point math: perfect for AVR C!
My past hardware Moon Clocks have used discrete LEDs, which were multiplexed and PWM-modulated by the AVR software directly. In version 3, I am taking advantage of this great new technology which is now cheaply available: programmable RGB LEDs. adafruit.com sells a 1-meter string containing 60 LEDs (spacing 1.66cm), for about US$30. They call them "dotstars". This significantly simplifies the software, allowing more room for features and capabilities. Plus, I have switched to the ubiquitous ATmega328P. Older Moon Clocks were using the ATmega168, half the code size.
The older Moon Clocks relied mostly on text to convey the information. This one still has the 4-character alphanumeric display, but in addition, it has "permanent" displays of the Zodiac, with the current sign highlighted, and of the Moon, showing its current phase and changing colour above and below the horizon.
Instead of my clever-but-tedious single-button interface as on the older Moon Clocks, the user interface now consists of a rotary encoder with "push to select" functionality, plus a 3-position switch. The rotary encoder is used for setting the time and for all other menu-system operations. The switch determines how much information is displayed, while the clock is running. At one extreme, only the time is shown, in a fixed display. At the other extreme, the full collection of information is shown in a sequence: date, time, and the Moon info screens. In the middle, a reduced sequence of just the date and time is shown.


Comments
Post a Comment