Get the latest tech news
Measuring power network frequency using junk you have in your closet
Over the weekend starting on Saturday, the 8th of February 2025, the Baltic states’ electricity grid is switching from being synchronized with the Russian electric grid to being synchronized with the continental European electrical grid. This involves first disconnecting from the Russian grid, then operating a while as an island system, regulating the frequency alone and doing various tests, and finally, synchronizing frequency and phase with the EU grid and throwing the breaker.
The proper way to do this would probably be to step down line voltage to something more manageable and then just record that signal directly and find the dominant frequency component in that. Most of the script is boilerplate “record audio and put it into a ringbuffer” stuff, the more interesting part is a bit of basic DSP: Fortunately, some people from Sympower, a power market company with offices in Estonia recently built their own, somewhat less hacky frequency monitoring tool, and it has a convenient API that lets you retrieve their data over some period of time.
Or read this on Hacker News