[time-nuts] Re: measuring the mains frequency

Andy Talbot andy.g4jnt at gmail.com
Tue Feb 28 08:03:59 UTC 2023


I use the CCP module in a 16F628 PIC microcontroller.   Measuring the time
for four cycles of the mains and then calculating its frequency.  My
version gives a resolution of about 0.002Hz, but by changing the number of
cycles, clock frequency etc. this can be tweaked for even higher resolution

In the UK the frequency variation is allowed to be an absolute maximum  of
+/-0.5Hz, beyond which automatic load shedding kicks-in.  This happened on
9 August 2019 when two near-simultaneous failures occurred on the National
Grid.
https://www.ofgem.gov.uk/sites/default/files/docs/2019/09/eso_technical_report_-_final.pdf


Andy
www.g4jnt.com



On Tue, 28 Feb 2023 at 05:14, Demetrios Matsakis via time-nuts <
time-nuts at lists.febo.com> wrote:

> A few years ago I talked with Prof. Liu at Univ of Tennessee.  She and her
> students had measurements all over the USA. Here is an interesting recent
> paper of hers: https://par.nsf.gov/servlets/purl/10234030, which has
> references to still other papers.  Her bio at the end tells a little more
> about her activities.
>
> > On Feb 27, 2023, at 2:23 PM, folkert via time-nuts <
> time-nuts at lists.febo.com> wrote:
> >
> > Hi,
> >
> > Has anyone experimented with measuring the net frequency? (50Hz in
> > Europe, 60Hz in the USA)
> >
> > Me and a friend are trying to do this as accurate and precise as
> > possible. His solution can do that with only a 0.0006Hz error, mine
> > sofar does +/- 2Hz.
> > Deviations of max. 0.150Hz are allowed (according to
> > https://www.mainsfrequency.com/ ) so 2Hz is useless.
> >
> > I tried the following:
> >
> > - use the hardware comparator of an AVR328 (Arduino Nano) together with
> >  a 10kHz clock-source and then count the number of external clock-ticks
> >  between 2 falling edges.
> >
> > - I used something like
> >
> https://www.botnroll.com/en/outros/4301-230vac-voltage-sensor-for-arduino.html
> >  to make the 230V into a 5V (DC) sine wave and connected that to D6 of
> >  the Arduino. D7 is connected to a voltage divider to get a 2.5V
> >  voltage reference (should be the zero-crossing voltage of the 230V
> >  input).
> >
> > - connected a PicDiv from Tom (a PD03) to an OXCO and the other end to
> >  pin D2 (ext interrupt) of the Arduino.
> >
> > +/- 2Hz (that's 80PPk right?) is way too much. So i'm curious if someone
> > has a suggestion on how to improve this?
> >
> >
> >
> > Regards,
> >
> >
> > Folkert van Heusden.
> >
> > p.s. the source code is at https://vanheusden.com/permshare/50hz.ino
> > _______________________________________________
> > time-nuts mailing list -- time-nuts at lists.febo.com
> > To unsubscribe send an email to time-nuts-leave at lists.febo.com
>
> _______________________________________________
> time-nuts mailing list -- time-nuts at lists.febo.com
> To unsubscribe send an email to time-nuts-leave at lists.febo.com
>




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