Hi,
That was exactly my question - is there a way to take phase into account using a second DS2438?
I just answered myself though: ds2438 can only measure DS current.
I'll go look at the arduino.
cheers
Hello Simon,
You need to stop thinking in terms of phase angle. A phase angle measurement will work in a perfect world where your supply voltage and current consumption are sinusoidal. I assure you this isn't the case in your home. Have a look at the end of the paper that you referenced "However a note about non-linear loads" explains why simple phase angle measurement won't work.
As previously mentioned, devices like the Kill-A-Watt and the Brultech operate by simultaneously sampling the voltage and current waveforms without regard to phase. This sampling is performed at 50 to 100 times the frequency of interest (in your case 50 hz). The samples are used to construct a VA (volt amp) curve over a period. Since the voltage and current measurements are simultaneous VA=Watts. The average power being consumed is then calculated by calculating the area of the VA curve over 1, or multiple, periods.
The sample rate, period measurement, and sample skew (time between Voltage and Current measurements) all affect the power measurement. You can construct a simple spreadsheet simulation to estimate these effects.
The plot below was constructed in Excel using the following formulas:
Voltage (120 V RMS)= 120/0.707 * Sin(2*Pi*f*t) Where f=60 Hz and t=0.0005 (2000 Hz sample rate)
Current (10 A RMS) = 10/0.707 * Sin(2*Pi*f*t)
VA (Instantaneous Power) = Voltage * Current (at each sample period).
Average Power calculation (area calculation) : Approximate the area under the curve for each instantaneous VA measurement
VA estimate = VA measured (height of the rectangles below) * 0.0005 (sample period: width of the rectangles below).
One cycle Average power = (Sum of VA measurements over 1 period)/ t (60 Hz period in seconds or 1/60)
Using the above technique, the spreadsheet calculates and average power of 1212 watts. The actual power is 1200 watts (error of 1%). The error is a combination of the area approximation (sample rate or "rectangle width") and the fact that the sample rate and wave form period do not align perfectly (calculation is performed over slightly less than 1 60 Hz period). Increasing the sample rate to 10,000 samples/sec produces a computed value of 1197.8 Watts (0.19 % error). This does not take into account sample skew (time delay between the voltage and current measurement).
I've gotten the impression that you want to proceed with this project regardless of whether there are existing devices available on the market. If that is the case, the above is the basic technique that is used. There are many other factors that will affect the accuracy of the measurement (A/D accuracy and resolution, noise (internal and external), and general component tolerances).
If you do proceed with this project, I would highly recommend that you buy an inexpensive "true power meter" that uses power factor correction (we use devices like the Kill-A-Watt in the States). These devices are reasonably accurate for "most" applications and serve as a reference while you are perfecting your device. No matter the outcome of your project (win, loose or draw) you will likely learn far more practical information than you'll get from a book.
Also - Rest assured that this technique is far easier than the old electro-mechanical solution (unless you happen to be an expert in magnetic field theory and material properties).
IM