Personal project, just for fun. How much does the power line frequency vary? If you do a little web searching, you'll get a bunch of answers, all of which say it varies, but with a lot of disagreement on how much, when, why.
Here in the US, the nominal frequency is 60 Hz and the nominal voltage might be 120 RMS Volts. The electric utilities on the east coast (Eastern Interconnection - Wikipedia, the free encyclopedia) are all tied together (the grid) and run in lock-step -- all the sine-waves cresting at the same time.
When you turn on a light, you add some load to the grid. When your car is loaded heavier, going up a hill, it slows down, slightly, then the cruise-control compensates with a bit more gas. The utilities do the same thing, throwing another log on the fire for the steam engine, or adjusting the reactor control rods. So the rotating machinery that generates the 60 Hz waveform slows down, slightly, when you turn on the light. The frequency has to change, at least a little, before it can be corrected. (Although, in a 1960s-era VW-beetle, going down to the bottom of a hill, it was important to start stepping on the gas before the next hill-climb began. Sometimes these things are predictable.)
An air conditioner uses a lot more power than a typical light. On a hot afternoon, a lot of air conditioners are running. Does the power line frequency drop? How much?
DO NOT CONNECT ANYTHING TO THE POWER OUTLET. USE A TRANSFORMER TO SAVE YOUR LIFE.
This project uses an Arduino and a Raspberry Pi to capture some data and upload it to a server. The Arduino does the real-time data capture using its internal clock as a time base for sampling the 60 Hz wave form. The Raspberry buffers the data from the Arduino and some other sensors and uploads it to a server, far away. The server has a mySql database to collect the data from the Raspberry as well as a script that collects tweets from a twitter stream for the database. A PHP script on the server makes a CSV file to download to JMP.
In the following charts, be aware that the Arduino clock frequency is not calibrated. Most likely the clock is off by about the amount the data seems not centered on 60 Hz (about .03 Hz/60 Hz, or .05%).
Here's a picture where all the high-lighted Hz readings belong to a colder part of the day.
and here's the hotter part of the day.
It looks like a shift. It looks like the grid slows down when it is hot outside.
Here's a fit that seems to suggest there are two underlying frequencies, .02 Hz apart.
Reading further on the web, it sounds like the .02 Hz may be the amount the utility intentionally shifts the frequency to catch up or slow down your ancient analog wall clock over the course of a day. Most clocks no longer depend on the line frequency for their time base.
Since making the graphs above, more data has collected, including an outlier. Wonder what that is?
Here's the row.
You can see the clear, red, green, blue sensors are picking up very little light at 9:34 PM. There is more data for the wave form (stored in a matrix in an expression column); here's the fascinating part.
There's a lot going on here. First, the Y-scale is in arbitrary units from the voltage sensor (actually 0..1023 from the Arduino analog input) and the red lines are probably about 130 V RMS. Next, the X-scale is in 2080 ns units. The distance from 675 to 700 is 25*2080ns, or about .05 seconds for about 3 cycles. 3/.05 is 60 Hz. This graph shows a brief power outage (it reset the oven clock but not the microwave clock) of 200*2080 ns ... about 4/10 of a second. I'm not a EE, but here's my interpretation of the 4/10 second: the wind caused two wires to touch, drawing an arc. Automatic breakers turned the power off for 2/10 second. Not sure what left the residual signal. The automatic restart at 2/10 second failed, perhaps because the wires were still in contact. A second restart 2/10 second later succeeded. Look how ugly the wave forms are on the right, after the restart succeeds. The left side is more sine-shaped, the right is more of a triangular wave form. Every air conditioner compressor is trying to start up at the same time; I think the power factor for all those loads is distorting the shape. (It does go back to normal in less than another second or so.)
The Hz value for each 10-second slice of wave form data is calculated with a simple zero-crossing detector (where zero is around 475 on the Y-axis). When the amplitude dropped to near-zero, the rapid oscillations that remained appeared to be extra cycles to the zero-crossing detector, creating the outlier Hz value.
More later. My indoor temperature varies over a couple of degrees, with the outdoor temperature. I need to make sure the Arduino clock is not overly affected by the indoor temperature. There are also wifi signal strength readings, barometric pressure, humidity, and twitter data to look at.