Thinking out loud about timing resolution and accuracy:
The DS3231's 32kHz TCXO (and TCXO's in general) is good to +/-2ppm, or about +/-0.17s per day. I think this is adequate for my purposes, at least for the moment, since I'm not expecting my relatively-light pendulum operating in open air to be much better than that. For comparison, Bateman claimed +/-0.5s per day for his heavier and enclosed pendulum. If I did bump up against the TCXO's limit, an OCXO could be used instead.
Now, if the Arduino samples that asynchronously at 16MHz, an uncertainty of +/-32ns per sample is added that can be nullified to below the TCXO's native stability by counting say 1000 32kHz ticks. This is easily done well within the ~1.8s period my pendulum has (about 57k ticks). So for basic timing measurements (e.g. for the purposes of operation as a clock) I think the combination should be fine.
Note that this delivers the relatively-high long-term accuracy of the TCXO (over that of the native Arduino), but not extreme resolution. For the DS3231, that is limited by the 32kHz frequency of its output. This would yield about a 31us least count or under 0.002% for a 1.8s period, which doesn't sound especially bad for my purposes either.
To obtain more resolution requires a faster clock. At that point, an OCXO could be used. For convenience, a CMOS or TTL output is preferred, and these are available down to about 5ppb. However, prescaling would be needed for use with an Arduino, since the 10 MHz+ frequencies of these OCXO's (from what I've found) are too fast. Prescaling down to maybe 1MHz should be OK to drive an Arduino's hardware counter. But to realize the higher accuracy, the amount of averaging would need to be about 16,000 times higher too, and realistically some other solution (e.g. picpet) would be better over-all.
Since I have it wired up already, I think I'll try the DS3231's 32kHz clock feeding the Arduino's hardware counter, and average the asynchronous sampling over the pendulum's period. The advantage of this is that there would be no need to explicitly calibrate the Arduino's internal clock against an outside one (e.g. a 1 pulse per second clock).
The Arduino has so little memory that it can't do much more than tell time. Logging may also be problematic, as Dave pointed out, but I'll probably try it. Maybe I could implement a single-pass running S.D. calculation on the period, too. What else would be useful or interesting that could be displayed in real time?
(Eh, I probably won't be able to resist getting an OCXO anyway. 😉 )
Edited By S K on 19/09/2023 22:07:57