Electric Grid Monitoring

June 2022

We were having an issue with some of our solar panels going off line during peak production (middle of the day during peak production season, which is typically the second quarter of the year). We noticed that the voltage at one of our outlets seemed it bit high during that time. Some research indicated that the acceptable voltage range for an outlet in the US is 120 VAC, +/- 5%, which works out to 114 VAC to 126 VAC, or, for the 240 grid, 228 VAC to 256 VAC. We decided it would be nice to be able to track the grid voltage at our house vs. production and display it on our Solar web pages.

Monitoring the Grid Voltage vs. Solar Production

After some searching online, we found a JavaScript script that could duplicate the meter readings of a particular DMM (Digital Multi Meter - a General Tools, model TS-04) and display it on a website page. The particular DMM was fairly inexpensive, and the author of the script has made it available for anyone to play around with, so we gave it a try. Currently, this only works using the Chrome browser, as it has the Web Bluetooth extensions by default. So, here is what we setup (Rube Goldberg is either rolling in his grave, or is somewhat impressed).

First, we downloaded the JavaScript code from this site. , Currently, the Chrome browser requires that any Bluetooth code that uses its web Bluetooth extension be a secure (https) site, so we set up an Apache web server with an https site on a spare computer and created a web page that would use it. We then tweaked things until the site was able to connect to the TS-04 DMM via Bluetooth. The Apache web server, and the Chrome browser displaying the data, are running on the same machine. This produces a basic web page that will display how the DMM is configured, and its displayed output:

Pairing the meter with the web page.

Web page displaying the DMM output, with probes plugged into an outlet

Once this was working, we needed to modify the meter a bit to:
   1) run it off of a wall wart instead of a battery, so it could run 24/7, and,
   2) modify the probes to terminate in a standard 120 VAC plug.

We dug up an old 9 volt wall wart and wired it directly into the battery compartment of the meter:

9 volt wall wart wired into the battery compartment.

We then spliced a standard replacement lamp cord onto the probe wires to allow us to safely plug the meter into a wall outlet:

Lamp cord spliced onto the probe cables.

The Bluetooth web page basically writes a text file to the root of the solar page on the actual web page, and the value saved there is periodically saved to the MySQL database along with the current production. The database is updated every 15 minutes during daylight hours when the panels should be producing. The value being saved is the voltage as measured at an outlet, so we are approximating the grid by doubling this value. This assumes that the two 120 VAC legs of the 240 VAC grid are fairly balanced, but this is generally the case.

Once we learn some more about JavaScript, we would like to streamline this a bit, but so far, it is working reasonably well. Results can be seen on the solar pages on this web site - Current Statistics, here and Historical Statistics, here.