About me I've been a computer programmer since I first started typing in program listings on a Commodore Vic 20 when I was about 8. My hobbies include electronics, CNC manufacturing, photography, beer and winemaking.
I live with my wife and lots of left-over parts from unfinished projects in Lincoln, Nebraska, USA.]
Blog
17 July 2020, 21:37 UTCMinimal Time-Zone Handling for CircuitPython
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?
16 July 2020, 18:22 UTCCalibrating the DS3231 and PCF8523 RTCs
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.
16 July 2020, 15:12 UTCHelpful Scripts for CircuitPython & Real Time Clocks (RTCs)
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.
5 January 2012, 23:12 UTCTime to finish that languishing clock project!
A leap second has been announced at the end of June 2012.23 June 2011, 21:38 UTCSide track: wwvb links
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.
Minimal Time-Zone Handling for CircuitPython
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?
Calibrating the DS3231 and PCF8523 RTCs
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.
Helpful Scripts for CircuitPython & Real Time Clocks (RTCs)
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.
Time to finish that languishing clock project!
A leap second has been announced at the end of June 2012.
Side track: wwvb links
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.
All older entries
Website Copyright © 2004-2024 Jeff Epler