Considering how to measure / calculate RMS power in an AC line I've got the concept: The rms value results from squaring the values over intervals of time, finding their average value, and taking the square root of it.
Thinking of measuring power used by a common appliance connected to 220 V AC monophasic using a PIC for the measurement and calculation, I understand I should do this:
a - Measure V and simultaneously I (well, as close in time as possible to each other!!).
b - Multiply V * I to get instantaneous value of power.
c - Add succesive instantaneous values of power.
d - Calculate the square root of their sum
e - Repeat the process for the next cycle.
My questions:
1 - How many times per full period (or per second) should I measure instantaneous V and I to make this reasonably precise? I could not find a suggested figure in the so many places talking about true RMS.
2 - Is the zero crossing information a must to start counting the above or could I use a precise timer to trigger the next pair of measurements plus the calculation?
2 - Is it wrong to do this kind of measurement/calculation for one of every two full periods? Am I cheating the reasult in that way?
3 - A 10-digits ADC is it enough if taking the output from current / voltage transformers with adequated down scaling?
4 - Even if the above is a yes, could the 18F452 (which I've just started to work with) be useful here? (Quite an improvement over the 16F877 :!: )
You can, but you gotta keep in mind that the PIC would have its ground on neutral instead of earth ground.
The shunt would have to be between the load and the neutral in this strategy, the "low side shunt". That's problematic in some cases.
You don't want any exposed metal surface or interface cables to be exposed to the line's neutral. You can use serial comm and optoisolators to fix this. Once it's opto'ed you could do a high side shunt if you needed to.
1. Depends on how accurate you want to be. Also there's a lot more to power quality than just the power factor.
2. The system may be able to find the zero crossing out of the ADC readings.
3. Probably not, but I don't know why you'd skip periods at all.
4. 10-bit with +/-180v (150v rms) full scale is 350mV resolution, sounds pretty good.
5. Absolutely.
Hey you can also calculate harmonic content of the voltage/current, just look up some source code.
Considering how to measure / calculate RMS power in an AC line I've got the concept: The rms value results from squaring the values over intervals of time, finding their average value, and taking the square root of it.
Mains is sine wave, so there's no need to do complicated RMS conversions, simply read the voltage and current at the peaks of the mains cycles.
Thinking of measuring power used by a common appliance connected to 220 V AC monophasic using a PIC for the measurement and calculation, I understand I should do this:
a - Measure V and simultaneously I (well, as close in time as possible to each other!!).
b - Multiply V * I to get instantaneous value of power.
1 - How many times per full period (or per second) should I measure instantaneous V and I to make this reasonably precise? I could not find a suggested figure in the so many places talking about true RMS.
2 - Is the zero crossing information a must to start counting the above or could I use a precise timer to trigger the next pair of measurements plus the calculation?
No difference, the 16F877 is fine, the UK magazine EPE have done two projects like this, the first (about 1998?) used a 16C84 with an external 8 bit A2D - I built this years ago, it works great!. They've recently updated the design using a 16F877, and they use this to give two independent channels, rather than the one of the original.