[LDX] first noticed the odd sounds coming out of his ceiling fan, regularly, on the hour and half-hour. Then he noticed that the lights were flickering as well. Figuring something was up, he built a logging power-line monitor to see if he could decode the shadowy signals and figure out what cryptic messages were being transmitted over the power lines. Naturally, he suspected the Illuminati were behind it.
[James] lives in the UK where the frequency of electricity is suppose to be 50Hz, but it tends to fluctuate based on supply and demand. He decided he wanted a display to track this.
Now, the National Grid Website shows a real-time graph of the last 60 minutes. But that’s way too easy. Time to bust out the soldering iron!
Armed with pencil and paper [James] scribbled down some ideas on how to count the frequency — he settled on counting 200 cycles, which means that at 50.000Hz, it would take exactly 4 seconds. The next problem was getting a timing source that was accurate enough for the job. An ATtiny84 wouldn’t do the trick (too inaccurate), nor would an external crystal (too expensive) — But a real-time clock? That’s the ticket! He’s using a DS3231 RTC chip, which at +/- 2ppm 32.768kHz is more than precise enough.
Some math, programming, and soldering later and the display is complete! He’s even added an up/down arrow to show the most recent trend of the electricity.
Nice one [James]! Last year [Ch00f] did a similar project, where he tore down a 194 discrete transistor clock kit to see how it worked — as an aside, he needed to know how accurate the 60Hz coming out of his wall was!