{"id":3595,"date":"2024-07-16T17:49:00","date_gmt":"2024-07-17T00:49:00","guid":{"rendered":"https:\/\/digitalnigel.com\/wordpress\/?p=3595"},"modified":"2024-10-27T21:58:56","modified_gmt":"2024-10-28T04:58:56","slug":"grid-frequency-measurement","status":"publish","type":"post","link":"https:\/\/digitalnigel.com\/wordpress\/?p=3595","title":{"rendered":"Grid Frequency Measurement"},"content":{"rendered":"\n<p>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.<\/p>\n\n\n\n<p>Of course, there are wonderful resources already available, like <a href=\"https:\/\/fnetpublic.utk.edu\/frequencymap.html\">FNET\/GridEye at the University of Tennessee<\/a>, but I tend to be inclined to want to make my own projects for the fun of it.<\/p>\n\n\n\n<p>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.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-medium\"><a href=\"https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/10\/IMG_1333-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"225\" height=\"300\" src=\"https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/10\/IMG_1333-225x300.jpg\" alt=\"\" class=\"wp-image-3596\" srcset=\"https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/10\/IMG_1333-225x300.jpg 225w, https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/10\/IMG_1333-768x1024.jpg 768w, https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/10\/IMG_1333-113x150.jpg 113w, https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/10\/IMG_1333-1152x1536.jpg 1152w, https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/10\/IMG_1333-1536x2048.jpg 1536w, https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/10\/IMG_1333-scaled.jpg 1920w\" sizes=\"auto, (max-width: 225px) 100vw, 225px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p>It&#8217;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.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/07\/Schematic.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"556\" src=\"https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/07\/Schematic-1024x556.png\" alt=\"\" class=\"wp-image-3600\" srcset=\"https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/07\/Schematic-1024x556.png 1024w, https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/07\/Schematic-300x163.png 300w, https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/07\/Schematic-150x81.png 150w, https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/07\/Schematic-768x417.png 768w, https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/07\/Schematic-1536x834.png 1536w, https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/07\/Schematic-2048x1112.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>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.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/10\/Grid_Freq_Chart.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"273\" src=\"https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/10\/Grid_Freq_Chart-1024x273.png\" alt=\"\" class=\"wp-image-3597\" srcset=\"https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/10\/Grid_Freq_Chart-1024x273.png 1024w, https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/10\/Grid_Freq_Chart-300x80.png 300w, https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/10\/Grid_Freq_Chart-150x40.png 150w, https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/10\/Grid_Freq_Chart-768x204.png 768w, https:\/\/digitalnigel.com\/wordpress\/wp-content\/uploads\/2024\/10\/Grid_Freq_Chart.png 1491w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &hellip; <a href=\"https:\/\/digitalnigel.com\/wordpress\/?p=3595\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,4],"tags":[],"class_list":["post-3595","post","type-post","status-publish","format-standard","hentry","category-electronics","category-random"],"_links":{"self":[{"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3595","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3595"}],"version-history":[{"count":3,"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3595\/revisions"}],"predecessor-version":[{"id":3602,"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3595\/revisions\/3602"}],"wp:attachment":[{"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3595"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3595"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}