Digital circuit and method for measuring AC voltage values
View Patent ↗An AC measurement circuit includes a rectifier for receiving an AC signal; a peak detection circuit; and a voltage divider, interconnected with an output of the rectifier, and the input of the peak detection circuit to provide the peak detection circuit with a voltage value equal to a fraction of the AC signal. An analog to digital converter, has its analog input interconnected with an output of the peak detection circuit, for providing a digital output corresponding to its analog input. A summing circuit sums n samples of the digital output. The voltage divider is configured so that the summing circuit calculates an average measurement of the AC signal by summing n samples and without floating point division.
1. An AC measurement circuit to provide an average measurement of an AC signal, the circuit comprising:
a rectifier for receiving said AC signal and providing a rectified output, the AC signal having an expected voltage range;
a peak detection circuit for detecting peak values of an input voltage;
an analog to digital converter, having its analog input interconnected with an output of said peak detection circuit, for providing a digital output corresponding to detected peak values of said input voltage and to provide n samples of said digital output, n having been selected based on a ratio of the maximum peak value of said expected voltage range and the dynamic range of said analog input;
a voltage divider, interconnected with an output of said rectifier, and the input of said peak detection circuit to provide said peak detection circuit with said input voltage equal to a fraction of said rectified output, said fraction being a reciprocal of a multiple of n; and
a processing circuit to calculate said average measurement of said AC signal by summing said n samples of said digital output.
2. The AC measurement circuit of claim 1 , wherein said processing circuit calculates said average measurement without floating point operation.
3. The AC measurement circuit of claim 1 , wherein said average measurement is an average root mean square measurement of the voltage of said AC signal, said fraction equals η, and wherein η and n are chosen so that the ratio
1
2
·
n
·
η
approximates an integer.
4. The AC measurement circuit of claim 1 , wherein said average measurement is an average peak voltage measurement of said AC signal, said fraction equals η, and wherein η and n are chosen so that the ratio
1
n
·
η
approximates an integer.
5. The AC measurement circuit of claim 1 , wherein said processing circuit is calibrated to account for any voltage drop across said rectifier.
6. The AC measurement circuit of claim 1 , further comprising a circular buffer in communication with said analog to digital converter to store said n samples of said digital output.
7. The AC measurement circuit of claim 6 , wherein said processing circuit sums values stored in said circular buffer.
8. The AC measurement circuit of claim 1 , wherein said processing circuit and said analog to digital converter form part of a processor.
9. A method of determining an average measurement of an AC signal, the method comprising:
providing said AC signal to a rectifier to provide a rectified output, the AC signal having an expected voltage range;
providing said rectified output to the input of a voltage divider that outputs a fraction of said rectified output;
detecting a peak of said output of said voltage divider over time;
sampling said peak of said output at an analog to digital converter to produce at least n digital values, n having been selected based on a ratio of the maximum peak value of said expected voltage range and the dynamic range of said analog input;
summing n of said digital values to calculate said average measurement of said AC signal by at least one processor;
wherein said voltage divider is configured so that said fraction is a reciprocal of a multiple of n.
10. The method of claim 9 , wherein said average measurement of said AC signal is calculated without floating point operations.
11. The method of claim 9 , wherein said detecting said peak, said sampling and said summing are repeated.
12. The method of claim 9 , wherein said average measurement is an average root mean square measurement of the voltage of said AC signal, said fraction equals η, and wherein η and n are chosen so that the ratio
1
2
·
n
·
η
approximates an integer.
13. The method of claim 9 , wherein said average measurement is an average peak voltage measurement of said AC signal, said fraction equals η and wherein η and n are chosen so that the ratio
1
n
·
η
approximates an integer.
14. The method of claim 9 , wherein said summing accounts for any voltage drop across said rectifier.
15. The method of claim 9 , wherein said n of said digital values are stored in a circular buffer.
16. The method of claim 14 , wherein said summing n of said digital values by at least one processor comprises summing values stored in said circular buffer.