[time-nuts] Mains Frequency -again

Dan Kemppainen dan at irtelemetrics.com
Wed Feb 24 13:49:07 UTC 2021


Andy,

Perhaps one of the little openlog units from sparkfun, or one of the 
clones would work for logging?

https://www.sparkfun.com/products/13712

Honestly, I have two and a pair of 32Gb Cards, but have not tried them 
yet. Seems like a good solution for a project like this. I don't know 
how they buffer writes to the microSD, or what the write life on an 
SDcard would be like.

Dan


On 2/24/2021 7:35 AM, time-nuts-request at lists.febo.com wrote:
> 
> My monitor uses a 16F628A PIC device clocked from a 10MHz TCXO.   50Hz
> mains is fed to the  capture/compare module which is set to measure the
> number of periods of the prescaled clock in every fourth cycle of the
> mains.  A simple integer division and the answer is the mains frequency in
> milliHz units..  I only measure to about 0.002Hz resolution as the
> variation is so wide (~~ 0.2Hz RMS) this is quite enough .
> Completely separately, a four bit counter is incremented by this divided
> mains signal every 80ms, and also decremented every 80ms by the divided
> down clock.   Software is written so that increment and decrement cannot
> clash.
> 
> The result is a 32 bit twos-complement count, to 80ms resolution, of mains
> timing difference from that of the TCXO.   A bit of arithmetic and the
> answer can be shows as a timing discrepancy in seconds on the display.
> 
> It would be a matter of just a few minutes of extra code writing to add a
> serial output to transfer data to a logger .   Which I may yet do, but that
> would require getting an old laptop out of storage and leaving it on 24/7
> to do the logging - don't keep my main PCs on continuously.
> 
> Not sure this list passes-through attachments;  if not the oicture is here
> http://www.g4jnt.com/DropF/img2783.JPG
> 
> Andy
> www.g4jnt.com




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