Adafruit makes these neat "CharlieWing" displays that allow you to control a 15x7 LED matrix using the I2C bus. I2C uses two signal wires (called SDA and SCL, for Serial DAta and Serial CLock), and can connect multiple devices as long as they have different addresses.
I noticed that the bigger brother of this device, with a whopping 144 LEDs, could be configured for 4 different I2C addresses, while this one could only be configured for 2.
Or could it?
For my clock, I want automatic handling of Daylight Saving Time. However, CircuitPython doesn't build in any distinction between local and UTC time, and fitting in the entire Python3 datetime module or an Olson time zone database is simply not going to happen. What can we do that is simple enough to fit, but can represent the reality of timezones where I live?
The DS3231 and PCF8523 real time clocks (RTCs) can both be calibrated by writing various register values. To follow the calibration procedures you'll need a frequency counter you trust, with at least 6 digits to calibrate the PCF8523 and 7 digits to calibrate the DS3231. (It also has to operate at the comparatively low frequency of 32.768kHz; a common inexpensive 8-digit frequency counter such as the "SANJIAN STUDIO" has a minimum of 100kHz so it's not usable for this purpose) I use an old HP 5315B universal counter that has been calibrated against GPS time.
I have used two different RTCs in the Feather form factor. One has the PCF8523, and the other has the DS3231. The former has an SD card slot while the latter has higher precision including a temperature-compensated crystal oscillator.
WWVB timecode generator written in C. Unfortunately, this timecode generator did not have a clear license permitting modification or redistribution, so I felt I was unable to incorporate it into a project of my own.
Thus was born my own timecode generator, called wwvbpy. Its primary output mode is compatible with the "wwvb2.c" that inspired it. It also has a few features that wwvb2.c didn't: automatic handling of DST, DUT1, and leap seconds. DST is handled according to the operating system's rules for Denver. DUT1 and leap seconds are handled using data from IERS (As a result, my program's DUT1 does not exactly match past broadcast data on WWVB, as the data NIST broadcasts is "an average value for an extended range of dates").
It also has a set of tests of interesting times, such as the first and second days after a DST change, the last and last-but-one days of leap and non-leap years, a historical leap second, etc. (where possible, these test vectors were originally generated by wwvb2; however, some of the tests—such as the DST tests—had to be hand-generated, as wwvb2 couldn't generate them; besides this limitation, I also uncovered a bug in wwvb2 where non-leap years were treated as having 364 days and leap-years were treated as having 365!)
An option to output the timecode data to a serial device is contemplated but not finished; ultimately, this would work together with an Arduino/AVR firmware to produce a logic-level and/or 60kHz modulated version of the signal for testing hardware devices.
wwvbpy is covered by the GNU GPL v2+. It can be obtained from my public git repository: http://git.unpy.net/view?p=wwvbpy.git;a=summary.
Chris asks what advantage GPS has over WWVB for my clock project. I don't have a good answer for that (except that having enough controls to select one of 4 mainland US timezones and whether to apply DST is undesirable). However, this did prompt me to do some googling about WWVB. I found some interesting links about generating WWVB signals at home.
A few years ago, I made a CCFL light clock using an Arduino with a custom shield containing a transformer (to get a reliable 60Hz timebase) and a triac (for solid-state switching of the lamp). By having a simple 7-day alarm calendar (set at compile time), the clock seldom requires interaction except for the reading lamp function.
However, the design has two main problems:
I got an e-mail request for this board. You may use this eagle (4.x) library, schematic, and board under the GNU GPL version 2 or later, or CC-BY-SA.
All older entries
Website Copyright © 2004-2018 Jeff Epler