Some recent conversations with a friend regarding instability of the power grid, and particularly the issues they are facing regularly down in California, got me interested in setting up some logging of the local grid frequency.
Of course, there are wonderful resources already available, like FNET/GridEye at the University of Tennessee, but I tend to be inclined to want to make my own projects for the fun of it.
In contrast to many of my projects, which are cleanly built on custom circuit boards, this one is an example of classic throwing it together with the parts I had on-hand.
It’s an AC-AC wall wart transformer, feeding into a full bridge rectifier. Then it splits with a forward diode to a large capacitor and some series diodes to feed the VIN of the ESP32 dev board. The second path goes to a basic op-amp zero-crossing detector.
The ESP32 timestamps the zero-crossing pulses, averages them over a few different time windows, and outputs frequency measurements. The measurements get uploaded over wifi to my central data-collection system and I generate graphs of the data.