Sunday, May 4, 2014

Measure the Power Grid

I got interested in measuring the frequency stability of the power grid and thought that the Arduino would be a good platform. After a bit of searching I found at site in the Netherlands HERE that contained what I needed. The code was setup for a LCD but I just modified it for writes to the Serial device. That way I can collect the data in either the Arduino serial port monitor or use PuTTY in logging mode. I didn't have the exact parts for the measurement probe but thought the simple 2N3904 circuit below may work just as well.
 I did a few tests and I am getting good readings. I do plan to look at it on a scope just to verify it at some point and may try the opto-coupler circuit too. The frequency measurement do change rather frequently and I was thinking maybe my probe is not as good as the opto-coupler method, so I thought if I drive the pulses from the probe into two different Arduinos it will tell me if they are getting the same data. I would expect the data to be very similar but off by some constant since the clocks are not the same from one Arduino to another. Here are my results:
As you can see they have the same curve with just a slight offset as expected. This was encouraging, so I decided to do a longer collection period. The code is set to count 3600 pulses of the 60 hz grid frequency (60 seconds at 60 hz). So the sample rate is every one minute period.
This was on Saturday for about 10 hours. I did have an issue were a nine (9) minute period [Bad Data on the graph - I just copied the previous minute data 9 times] had erroneous readings of like 61, 65 and even 70 hz which just can not be possible. The grid is usually accurate to one half of one percent. The assumption is that when the grid dips below 60 hz it is under heavy load and when it is higher that 60 hz more capacity is being added on.

I plan to do some long term captures over days or weeks to see if trends are visible, particularly in the summer with hot days, etc.

No comments:

Post a Comment