The present invention relates generally to electronic measurement, and more particularly to voltage measuring circuits, suitable for measuring root-mean square voltages and other metrics of a time varying voltages.
Many practical applications require measuring the magnitude of an AC voltage signal.
For example, universal power supplies (UPS) often measure source voltages with great precision. Likewise alarm systems often monitor AC mains to sense power outages.
Typical techniques require the AC voltage signal to be sampled continuously. From the sampling, the zero crossing of the assessed may be assessed and a root-mean-square (RMS) voltage value may be calculated as the square root of the arithmetic mean of the squares of the sampled values. Alternatively, for known periodic waveforms, the peak value of the signal may be assessed, and an RMS voltage may be calculated—for example for a perfectly sinusoidal signal, the RMS voltage may be calculated as the peak voltage divided by the square root of two (√2). Yet other techniques involve rectifying the AC voltage signal and filtering the resulting rectified signal as a proxy for the amplitude of the AC voltage signal.
Typical measuring circuits include a voltage divider used to sample the AC voltage signal of interesting. However, isolating the measuring circuit from the remainder of the circuit proves to be costly, and is usually accomplished using an isolation transformer, or an analog to digital converter, powered by an isolated power source.
Accordingly, there is a need for a new AC voltage measurement circuit that may be more inexpensively isolated, and method.
Exemplary of an embodiment of the invention, a voltage measuring circuit includes a rectifier to receive an alternating current (AC) voltage to be measured and to provide a rectified output; a comparator for comparing the rectified output and producing therefrom a square wave having a pulse width indicative of the rectified output exceeding a threshold; a calculation circuit for converting a measurement of the pulse width into a measurement of the voltage and optionally an opto-isolator interconnecting the comparator to the calculation circuit. The rectifier may provide operating power to the comparator and an input side of the opto-isolator, from the AC voltage signal being measured. The remainder of the measuring circuit may powered by a source isolated from the voltage to be measured.
In accordance with an aspect of the present invention, there is provided method of measuring the magnitude of an AC voltage signal. The method comprises: rectifying the AC voltage signal to provide a rectified output; comparing the rectified output and producing therefrom a square wave having a pulse width indicative of the rectified output exceeding a threshold; converting a measurement of the pulse width into a measurement of the magnitude of the AC voltage signal.
Other aspects and features of the present invention will become apparent to those of ordinary skill in the art upon review of the following description of specific embodiments of the invention in conjunction with the accompanying figures.
In the figures which illustrate by way of example only, embodiments of the present invention,
As illustrated in
The output of rectifier 18 is provided to a voltage divider 20 and the output of rectifier 18 is further used to power downstream components, as detailed below.
Voltage divider 20 includes resistor R3 30 and resistor R6 32 that provide fractional voltage
VRECT to the input of a comparator 22.
Comparator 22 may be formed using a conventional operational amplifier 24 whose inverting input is driven by a reference source 36, that provides a reference DC voltage Vi. The non-inverting input of operational amplifier 24 acts as the input to comparator 22 that receives the divided voltage
as depicted in
As will be appreciated, the output of amplifier 24 acts as a comparator output that drives opto-isolator 28. The output of comparator 22 will be high any time VCOMP
equals or exceeds V1, and low otherwise, as depicted in
As such, the output of opto-isolator 28 may be provided to a calculation circuit 16 that may translate the width of the PWM square wave to a signal representative of the magnitude of AC voltage source 12, measured for example as a peak or RMS voltage, and optionally the frequency of VIN. As well, the absence of a square wave output voltage at opto-isolator 28 may be interpreted as low or no output voltage fault or condition.
Specifically, the output of operational amplifier 24 drives opto-isolator 28 through resistor 26. Now, by measuring the width u of the square wave, it is possible to determine Vpk and/or the RMS voltage (VRMS) of source 12, and/or the frequency of VIN.
In particular, as illustrated in
where to represents the time of intersection of VIN and Vi.
From this, Vpk may be determined:
Expressed in terms of u, the width of the PWM square wave (i.e. the time it is on) depicted in
Noting that u may be interrelated to the period of VIN, Tf, as:
T
f=2·(u+w) (4)
where w represents the time the PWM square wave is off.
Substituting equation (4) into equation (3), yields:
For a sine wave, the RMS voltage may be calculated from Vpk by observing,
The output of opto-isolator 28 may feed an input to a processing/calculation circuit 16. In one embodiment, calculation circuit 16 may take the form of a processor 42, in the form of a controller, microprocessor, digital signal processor (DSP) or the like, under program control, as depicted in
Processor 42 may sample the output of opto-isolator 28 to determine values of w and u. For example, the processor 16 may sample the output of opto-isolator 28 to calculate w and u. For example, processor 16 may calculate the magnitude of the voltage Vpk as
or the RMS voltage VRMS as
Typically, an average VRMS value is of interest. The average may be determined as the sum of RMS values during n cycles divided by n.
That is, the average RMS voltage may be determined as:
Circuit 14 may perform the calculation above. For convenience, Vi may be arbitrarily chosen based on the operating voltage of amplifier 24. Vi is typically chosen as less than the operating voltage. In the depicted embodiment, Vi may be chosen as 1.24V, which is a typical reference voltage. Now, K will need to be chosen based on the minimum voltage to be measured. That is, KVi should be chosen to be less than or equal to the minimum voltage to be measured. If, for example, the lowest VRMS to be measured VRMS
Additionally or alternatively, the calculation may be simplified to reduce the number of multiplications and divisions performed. This may, for example, be done by choosing a specific number of samples (n), based on the chosen values of Vi and K, and adjusting K as required. That is, for any particular chosen Vi, n may be chosen as an integer approximation of K/√2. This simplification helps when calculating the RMS averaging. If a proper n and K are chosen, the averaging operation may be reduced to a summing operation instead of summing and division. However, this is only to decreases the required computational power.
That is, for the example minimum detection of VRMS of 57V, and Vi chosen as 1.24 V, and K=45.9677, a choice of n around 32.5 would reduce multiplication/division. This choice of n and K eliminates the need to multiply and divide. The number of samples (represented by the integer value of “n”) determines how many samples must be added together to produce an average value of the input RMS voltage
However, as n represents the number of samples, n must be an integer. Thus n may be chosen as n=32 (related to averaging of 32 samples). K may in turn be adjusted/chosen to be K=√{square root over (2)}·32=45.2548. Put another way, to simplify division and multiplication, choice of K and n may be made such that the ration of K/√(2·n) equals one (1) or some other integer.
In turn, R3 and R6 may be chosen as
using standard available resistor values.
Continuous sampling over multiple cycles may be averaged to determine the average RMS voltage.
Conveniently, processing/calculation circuit 16 may further determine AC frequency, and/or a fault condition. For example, processing/calculation circuit 16 may monitor the output of opto-isolator 28 for each cycle to assess a fault. For example, if the output remains in high impedance (or logic high, if biased) for half of an AC cycle (i.e. no square wave output), a fault may be sensed, and optionally signalled. Likewise the AC frequency of VIN may be sensed as
Processor 42 may provide separate digital outputs Vout, FREQU_OUT, FAULT_OUT, indicative of measured voltage, frequency or generate a fault flag.
Rectifier 18 (
Circuit 14 may be formed using discrete or integrated components, or possibly using one or more microcontrollers, digital signal processors (DSPs), or a combination thereof.
Conveniently, the circuit of
In an alternative embodiment, processing/calculation circuit 16 may take the form of an integrator as depicted in
Of course, the above described embodiments are intended to be illustrative only and in no way limiting. The described embodiments of carrying out the invention are susceptible to many modifications of form, arrangement of parts, details and order of operation. The invention, rather, is intended to encompass all such modification within its scope, as defined by the claims.
The present application claims priority from U.S. Provisional Patent Application No. 61/577,303, filed Dec. 19, 2011 the contents of which are hereby incorporated by reference.
Number | Date | Country | |
---|---|---|---|
61577303 | Dec 2011 | US |