Mains frequency display

in hacks by | 6 comments

fowkc has just published his latest project the mains frequency display:

I wanted to make a display that could show the mains frequency to 3 decimal places. I’d be using the same seven-segment display modules that I used in my UNIX clock, so all I had to do was design the part that would work out the frequency.

This entry was posted in hacks and tagged , .

1. Peter says:

The mains frequency is supposed to be tightly controlled. According to the wikipedia article, it goes up and down ~100 PPM throughout the day but they adjust it to achieve the correct number of cycles per day (50 Hz × 60 sec × 60 min × 24 hours = 4,320,000 cycles per day). Supposedly they are accurate down to the cycle.

The deviations measured are not what I imagined– much larger. The area under the curve should exactly equal the area under the curve but that does not seem to be the case. Have you tried counting the total number of cycles per day? Another thing is that the cycle accounting is supposed to balance at 8:00 AM Swiss time.

• fowkc says:

I’m in the UK, so we’re not on the European grid, though we probably have similar requirements.

If I read Wikipedia right, the +/- a few hundred PPM target is for the average frequency over a day, not the frequency at a particular time (which has a much larger variation).

I could try cycle-counting, if I get a chance to go back the project.

2. Peter says:

Should be area over the curve and area under the curve (wrt 50Hz).

3. AMS says:

You might want to go with a GPS-disciplined clock for this as there’s many ways to make the RTC chip inaccurate that will mess up your frequency count.

• fowkc says:

The RTC I’m using is the Maxim DS3231 (http://datasheets.maximintegrated.com/en/ds/DS3231.pdf).

The last graph on page 7 of the datasheet shows a +/-2ppm for 0-40C operation (+/- 3.5ppm for extended temperature range).

What other factors should I be considering that might change that?

4. Grant says:

I think it will depend a bit on what country your from (and even what state / locality) as to how accurate your local supply is, but I know they do try to keep it close here.