KhaledOsmani
Full Member level 6
- Joined
- May 4, 2014
- Messages
- 384
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 18
- Activity points
- 3,933
Hi,
@Brian:
I should have read your post #135 more carefully. You gave all the information.
But somehow i missed it.
With U and I at the ADC, then the microcontroller has all information it needs. No need to input averag_power.
Non simultaneous ADC sampling.
The higher the sampling frequency (interleaved U and I) the lower the error.
And the error is known, so it is simple mathematics to compensate it. It is a fixed phase angle.
Klaus
Isn't a 3x3 keypad necessary such that a user can manually enter the apparent power? Does 74LS86 does that instead in analog mode?
betwixt said that I should enter the two waveforms to XOR, does that mean I take a parallel line from PORTA.0 (the one supposed to be an ADC of voltage) and enter it at pin #1 of the XOR logic gate, and similarly take another parallel line from PORTA.1 (the one supposed to be an ADC of current) and enter it at pin #2 of the XOR logic gate, then take pin #3 of the XOR to PORTA.2 ??
- - - Updated - - -
1. measure voltage with one ADC input
2. measure current with a second ADC input.
3. XOR (use a logic gate such as 74LS86 or equivalent) the two waveforms, feed it through a low pass filter and measure the resulting voltage through a third ADC input.
As long as you 'square up' the voltage and current waveforms using an op-amp or comparator before feeding them to the XOR gate, it's output will be a pulse with width equal to the phase difference in the signals. If you filter it to find the average, you get an analog voltage proportional to the phase shift.
It isn't using the zero crossing method at all but it will allow you to measure V, I, apparent power and phase displacement using simple math.
Brian.
Dear Brian,
How to XOR the two wave forms? and what are the specs of the low pass filter? How to know pf from the resulting voltage of the XOR gate?
- - - Updated - - -
* measure voltage and calculate RMS_voltage
* measure current and calculate RMS_current
* multiply RMS_voltage x RMS_current and get apparent_power
* at every maesurement calculate actual_current x actual_voltage and get true_power
* Now just divide true_power / appareant_power and get cos(phi)
getting RMS voltage would take integral calculation as well as square root for that integral, can't the user input the apparent power by using a keypad?