WO2010129071A1 - Reduced parts count isolated ac current switching and sensing - Google Patents

Reduced parts count isolated ac current switching and sensing Download PDF

Info

Publication number
WO2010129071A1
WO2010129071A1 PCT/US2010/001383 US2010001383W WO2010129071A1 WO 2010129071 A1 WO2010129071 A1 WO 2010129071A1 US 2010001383 W US2010001383 W US 2010001383W WO 2010129071 A1 WO2010129071 A1 WO 2010129071A1
Authority
WO
WIPO (PCT)
Prior art keywords
coil
load
voltage
sensing circuit
electrical
Prior art date
Application number
PCT/US2010/001383
Other languages
French (fr)
Inventor
Martin J. Bodo
Robert A. Rosenbloom
Oleg Strelnikov
Original Assignee
Computer Performance, Inc.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Computer Performance, Inc. filed Critical Computer Performance, Inc.
Priority to US13/381,958 priority Critical patent/US8975787B2/en
Publication of WO2010129071A1 publication Critical patent/WO2010129071A1/en

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R15/00Details of measuring arrangements of the types provided for in groups G01R17/00 - G01R29/00, G01R33/00 - G01R33/26 or G01R35/00
    • G01R15/14Adaptations providing voltage or current isolation, e.g. for high-voltage or high-current networks
    • G01R15/142Arrangements for simultaneous measurements of several parameters employing techniques covered by groups G01R15/14 - G01R15/26
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R15/00Details of measuring arrangements of the types provided for in groups G01R17/00 - G01R29/00, G01R33/00 - G01R33/26 or G01R35/00
    • G01R15/14Adaptations providing voltage or current isolation, e.g. for high-voltage or high-current networks
    • G01R15/18Adaptations providing voltage or current isolation, e.g. for high-voltage or high-current networks using inductive devices, e.g. transformers
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R21/00Arrangements for measuring electric power or power factor
    • G01R21/06Arrangements for measuring electric power or power factor by measuring current and voltage

Definitions

  • the present disclosure relates generally to controlling alternating current (“AC") flowing through a load, and more particularly an AC control circuit which also permits simultaneously sensing electrical current flowing through the load.
  • AC alternating current
  • the monitoring circuit must be electrically isolated from the AC power supplied to the load.
  • Conventional electrically isolated AC monitoring circuits generally include either:
  • an optical isolator consisting of a photodiode combined with a LED connected in series with the AC power source and the load;
  • a current sensing transformer having a winding that is wired in series with the AC power source and the load;
  • a hall effect sensor that includes a magnetic field detector located nearby a high current conductor connected in series with the AC power source and the load,- or
  • a high impedance differential amplifier which provides a high degree of virtual isolation through the use of large value series resistors connected to both sides of a resistive shunt connected in series with the AC power source and the load.
  • United States Patent nos. 5,528,134 entitled “AC Power Analyzer” discloses computer software that performs spectrum analysis on the resampled points of an AC power waveform to reduce to zero artifacts at the harmonic intervals of the AC power frequency.
  • An electrically isolated relay circuit for switching AC power to a load on and off that also permits sensing electrical current flowing through the load while avoiding use of an optical isolator, a current sensing transformer or an operational amplifier with large value resistors would be economically advantageous.
  • an isolated AC switching and sensing circuit that requires fewer parts increases the practicality of sensing AC power, particularly for those applications in which the complexity or cost of a separate electrically isolated current sensor would otherwise be too expensive.
  • the economic advantage of being able to sense electrical current flowing through a load while avoiding an additional optical isolator, transformer or operational amplifier increases even more if the current sensing components can be timeshared among several different loads. Disclosure
  • Yet another object of the present invention is to increase the practicality of sensing AC current flowing through a load, particularly for those applications in which the complexity and/or cost of a separate electrically isolated current sensor would otherwise be prohibitive.
  • Another object of the present disclosure is to provide an isolated AC current switching and sensing circuit that is more compact.
  • Yet another object of the present invention is to provide an electrical appliance that senses AC electrical current flowing through the load while avoiding use of:
  • Yet another object of the present invention an electrical appliance that timeshares sensing of AC electrical current flowing through several different loads while avoiding use of:
  • control and sensing circuit for selectively supplying AC electrical power to a load.
  • the disclosed control and sensing circuit includes a relay that has : 1. at least one set of contacts that are connectable in series between a source of AC electrical power and the load; and
  • an electromagnet that includes a coil of insulated wire which upon supplying an electrical current to the coil changes the set of contacts between: a. a closed state in which the load receives AC electrical power; and b. an open state in which the load does not re- ceive AC electrical power.
  • the disclosed control and sensing circuit also includes a coil energizing switch connected in series with the coil and with a source of relay energizing electrical power.
  • the coil energizing switch when in: 1. a first state does not supply electrical current to the coil; and
  • a second state supplies electrical current to the coil for changing the set of contacts between the open state and the closed state.
  • the disclosed control and sensing circuit includes an AC voltage sensing circuit coupled to the coil for measuring an AC voltage induced in the coil by an alternating magnetic field resulting from AC electrical current flowing through the set of contacts and the load when the set of contacts are in the closed state in which the load receives AC electrical power from the AC power source.
  • an electrical appliance whose operation is energized by AC electrical power.
  • the electrical appliance includes : 1. a load that receives AC electrical power,- and 2. the disclosed control and sensing circuit.
  • a method for selectively supplying AC electrical power to a load is also disclosed. The method includes the steps of supplying AC electrical current to the load through at least one set of relay contacts.
  • the relay's set of contacts are connectable in series between a source of AC electrical power and the load,
  • the relay also includes an electromagnet that has a coil of insulated wire which upon receiving an electrical current changes the set of contacts between :
  • the disclosed method also includes the step of supplying electrical current to the coil of the relay via a coil energizing switch connected in series with the coil and with a source of relay energizing electrical power.
  • the coil energizing switch is operable to be in:
  • the disclosed method includes the step of measuring an AC voltage induced in the coil by AC electrical current flowing through the set of contacts and the load when the set of contacts are in the closed state in which the load receives AC electrical power from the AC power source.
  • FIGs. 1 is an elevational view of an electrical appliance for switching AC loads on and off that benefits significantly by concurrently monitoring AC electrical power supplied to one or more AC loads;
  • FIGs. 2A and 2B are respectively relay side and microprocessor side plan views, and FIG. 2C is an elevational view of a printed circuit board included in the electrical appliance depicted in FIG. 1;
  • FIG. 3 is a schematic diagram depicting an isolated AC switching and sensing circuit of the type implemented on the printed circuit board depicted in FIGs. 2A-2C in accordance with a present disclosure's preferred embodiment in which electrical current for energizing an AC power control relay- flows from a transistor through the relay's coil and a series connected resistor to circuit ground;
  • FIG. 3A is a schematic diagram depicting an opto isolator circuit that may replace a transformer included in the schematic diagram of FIG. 3;
  • FIG. 4 is a schematic diagram depicting an isolated AC switching and sensing circuit in accordance with an alternative embodiment of the present disclosure in which electrical current for energizing an AC power control relay flows from the relay's coil through only transistor to circuit ground;
  • FIG. 5 is a schematic diagram depicting an isolated AC switching and sensing circuit' in accordance with another embodiment of the present disclosure in which electrical current for energizing an AC power control relay from the relay's coil through a series connected resistor and transistor to circuit ground;
  • FIG. 6 is a flow diagram depicting the preferred method for determining AC current, voltage and power factor for AC electrical power supplied to a load via a set of closed relay contacts from voltage induced in the relay's coil by current flowing through the closed contacts;
  • FIG. 7 is a flow diagram depicting the preferred method for determining compensation to be applied to voltage measurements collected while determining AC current, voltage and power factor for AC electrical power supplied to a load.
  • FIG. 1 depicts an elevational view of a rack-mountable electrical appliance for remotely controlling a supply of AC power that is sold by Digital Loggers, Inc. of Santa Clara, California, and that is referred to herein by the general reference character 20.
  • the electrical appliance 20 Using a web browser and communicating via the Internet, the electrical appliance 20 permits starting or stopping any type of remotely located AC powered electrical equipment such as servers perhaps in a server farm, routers, firewalls, network devices, cell phone sites, ATM machines, kiosks, HVAC, industrial machinery and industrial process equipment.
  • the electrical appliance 20 includes one (1) AC power input cable 22.
  • the electrical appliance 20 also preferably includes a total of sixteen (16) NEMA 5-15R outlet plugs 24 from which external electrical equipment receives AC power.
  • the electrical appliance 20 permits remotely controlling AC power to four (4) sets of four
  • the electrical appliance 20 depicted in FIG. 1 is useful for eliminating service calls • and increasing the reliable operation of remotely located equipment. Accessed via the Internet using a Web browser, the electrical appliance 20 permits remotely monitoring AC voltage, AC current, and AC power supplied individually to loads that connect via sets of the outlet plugs 24 to busses included in the electrical appliance 20. Four (4) full digital voltage and current "meters" included in the electrical appliance 20 permit monitoring AC voltage, AC current/ and AC power on each buss. To facilitate energy conservation, the electrical appliance 20 also permits remotely balancing phasing and load factor of AC power supplied to the remotely located equipment. A number of different functions that the electrical appliance 20 performs include eliminating overloads, brown-outs, blown circuit breakers and detecting other power problems before they occur.
  • FIGs. 2A through 2C respectively depict alternative views of a printed circuit board assembly 42 which is included in the electrical appliance 20 depicted in FIG. 1.
  • the printed circuit board assembly 42 has mounted thereon all the electrical components needed for a control and sensing circuit that selectively supplies AC electrical power to loads connected to the four (4) sets of outlet plugs .24 included in the electrical appliance 20.
  • the most pertinent components included in the printed circuit board assembly 42 are four (4) relays 44 and a microcontroller 46.
  • each relay 44 includes at least one set of contacts 52 that are connectable in series between:
  • Each of the relays 44 also includes an electromagnet formed by a coil 54 of insulated wire. Supplying an appropriate electrical current to the coil 54 of the relay 44 generates a magnetic field that changes the- set of contacts 52 between:
  • the microcontroller 46 is preferably a Texas Instruments Incorporated ("TI”) Piccolo Microcontroller model TMS320F28027. This particular microcontroller includes a single 12-bit analog-to-digital converter (“ADC") that receives signals from two (2) sample-and-hold circuits.
  • ADC analog-to-digital converter
  • the preferred microcontroller 46 provides sixteen (16) multiplexed inputs to the sample-and-hold circuits to equip the microcontroller with thirteen (13) general purpose analog input channels.
  • the microcontroller 46 also includes sixteen (16) individually addressable registers for storing conversion results of analog- to-digital conversions produced by the ADC.
  • the preferred microcontroller 46 also includes a set of multiplexed general purpose input/output (“GPIO”) pins. The GPIO pins of the microcontroller 46 are programmable to function either in:
  • the printed circuit board assembly 42 also includes a DC power supply 58 for energizing operation of various components included in the electrical appliance 20 including the relays 44 and the microcontroller 46.
  • the schematic diagram of FIG. 3 depicts essential aspects of a preferred embodiment of a control and sensing circuit in accordance with the present disclosure respectively incorporated into each buss included in the electrical appliance 20.
  • the schematic diagram of FIG. 3 depicts a load 72 connected to one of the outlet plugs 24 included in the electrical appliance 20.
  • an AC neutral wire included in the AC power input cable 22 connects directly through the electrical appliance 20 via the outlet plug 24 to the load 72.
  • An AC line wire also included in the AC power input cable 22 connects to one of the set of contacts 52 included in the relay 44.
  • the other of the set of contacts 52 connects via the outlet plug 24 to the load 72.
  • the relay 44 depicted in FIG. 3 preferably has a normally open set of contacts 52 so that if a component failure occurs in the electrical appliance 20 ' electrical power will not be supplied to the outlet plug 24.
  • the control and sensing circuit depicted in the schematic of FIG. 3 also includes an NPN transistor 82 having an emitter 84 that collects to a first terminal 86 of the coil 54.
  • the emitter 84 of the NPN transistor 82 also connects to a cathode 92 of a protection diode 94.
  • An anode 96 of the protection diode 94 connects to circuit ground 102.
  • a collector 104 of the NPN transistor 82 connects to a particular source of positive polarity direct current (“DC") electrical power 106, VCC, supplied by the DC power supply 58 that is reserved exclusively for energizing operation of relays 44.
  • a second terminal 112 of the coil 54 connects via a resistor 114 to circuit ground 102.
  • DC direct current
  • An output terminal 122 of a level shifting amplifier 124 connects to a base 126 of the NPN transistor 82 while an input terminal 132 of the level shifting amplifier 124 connects to a GPIO pin 134 of the microcontroller 46.
  • the NPN transistor 82 functions as a 5 coil energizing switch that is connected in series:
  • the microcontroller 46 includes a non-volatile memory 136 stores a computer program that is executed by a processor 138 also included in the microcontroller 46. This configuration for the control and sensing circuit permits the computer program to transmit a signal via the GPIO pin 134 and the level
  • processor 138 turn the NPN transistor 82 on, the NPN transistor 82 supplies electrical current to the coil 54 to change , the normally open set of contacts 52 of the relay 44 between their open state and their closed stat'e. While the schematic diagram of FIG. 3 depicts a single NPN transistor 82, a product such
  • the electrical appliance 20 that implements the disclosed control and sensing circuit preferably includes an integrated circuit ("IC") that provides several relay drivers each of which includes an NPN transistor and a diode, for example the ULN2803A "8CH Darlington Sink. Driver” marketed by Toshiba
  • a capacitor 142 connects between a junction of the resistor 114 with the second terminal 112 of the coil 54 and an input pin 144 of an ADC 146 that as described above is included in the preferred microcontroller 46. Configured in this way, the capacitor 142 couples the AC voltage present at the junction of the resistor 114 with the second terminal 112 of the coil 54 to the input pin 144 thereby permitting the ADC 146, at specified times determined by the computer program executed by the processor 138, to measure the AC voltage induced in the coil 54 by AC electrical current flowing through the set of contacts 52.
  • the AC line wire connected to one of the set of contacts 52 includes a loop of wire 152 wrapped around the coil 54 of the relay 44. Juxtaposing the loop of wire 152 with the coil 54 of the relay 44 increases the amplitude of the AC voltage induced across the coil 54 by AC electrical current flowing through the set of contacts 52. Increasing the amplitude of the voltage induced across the coil 54 by wrapping the loop of wire 152 around the coil 54 eliminates any need for an amplifier connected in series with the input pin 144 for supplying an output signal produced by the coil 54 to the ADC 146. Consequently, the loop of wire 152 wrapped around the coil 54 is merely an expedient and cost effective way of eliminating an amplifier and its associated circuitry from each buss included in the electrical appliance 20.
  • the control and sensing circuit depicted in FIG. 3 also includes a transformer 162.
  • the transformer 162 includes primary winding 164 that is connected across the AC neutral and line wires included in the AC power input cable 22.
  • One end of a secondary winding 166 of the transformer 162 connects to circuit ground 102 while another end of the secondary winding 166 connects through a capacitor 172 to an input pin 174 of the ADC 146.
  • the AC voltage applied to the input pin 174 by the transformer 162 via the capacitor 172 supplies an AC reference signal to the ADC 146.
  • Digitized values of the AC reference signal produced by the ADC 146 are used by the computer program executed by the processor 138 in conjunction with digitized values for AC voltage applied to the input pin 144 from the coil 54 for accurately determining pertinent characteristics of AC electrical current flowing through the load 72.
  • the computer program executed by the processor 138 preferably:
  • the pertinent characteristics of AC electrical current flowing through the load 72 determined by the computer program executed by the processor 138 preferably include: 1. root mean square (“RMS”) AC electrical current flowing through the load 72;
  • RMS root mean square
  • Real power represents the capacity of the circuit for performing work in a particular time.
  • Apparent power is the product of the current and voltage of the circuit.
  • FIG. 3A depicts an alternative opto isolator circuit 182 that may be used instead of the transformer 162 for supplying AC voltage to an input pin of the ADC 146.
  • Those elements of the opto isolator circuit 182 depicted in FIG. 3A that are common to the illustration of FIGl 3 are identified by the same reference numeral distinguished by a prime ("'") designation.
  • the opto isolator circuit 182 includes a light emitting diode (“LED") 184 that connects in series with a resistor 186 to the AC neutral and line wires included' in the AC power input cable 22'. Light emitted by the LED 184 impinges upon a photo-transistor 192 having an emitter 194 connected to circuit ground 102'.
  • LED light emitting diode
  • a collector 196 of the photo- transistor 192 connects through a resistor 202 to- a particular source of positive polarity DC electrical power 204, VCC, supplied by the DC power supply 58 that is reserved exclusively for energizing logic circuits included in the control and sensing circuit depicted in FIG. 3 such as the microcontroller 46 and the level shifting amplifier 124.
  • the opto isolator circuit 182 depicted in FIG. 3A produces an AC voltage at the junction between the collector 196 of the photo-transistor 192 and the resistor 202 that is in phase with ' AC voltage across the AC neutral and line wires included in the AC power input cable 22' . Similar to the AC voltage produced by the secondary winding 166 of the transformer 162 depicted in FIG.
  • the AC voltage present at the junction between the collector 196 of the photo-transistor 192 and the resistor 202 depicted in FIG. 3A is coupled through a capacitor 172 ' to the input pin 174 ' of the microcontroller 46'.
  • the opto isolator circuit 182 costs less and is physically smaller than the transformer 162.
  • using the opto isolator circuit 182 results in an AC power measurement system which is less accurate at monitoring AC voltage supplied to the electrical appliance 20 than the control and sensing circuit depicted in FIG. 3 that uses the transformer 162.
  • the NPN transistor 82 supplies to the coil 54 the changing magnetic flux produced by AC current flowing through the set of contacts 52 that couples into the coil 54 generates a voltage that appears as an AC modulation superimposed upon a constant DC voltage that is present across the resistor 114. Because the changing magnetic flux produced by AC current flowing through the set of contacts 52 appears as a modulation superimposed upon the constant DC voltage present across the resistor 114, the positive polarity DC electrical power 106 supplied by the DC power supply 58 is preferably well regulated and has as little AC ripple as practicable.
  • FIG. 4 depicts essential aspects of an alternative embodiment control and sensing circuit in accordance with the present disclosure as might be respectively incorporated into each buss included in the electrical appliance 20.
  • Those elements depicted in FIG. 4 that are common to the illustration of FIG. 3 are identified by the same reference numeral distinguished by a double prime ( » " » ) designation.
  • Significant differences between the control and sensing circuit depicted in FIG. 3 and the alternative circuit depicted in FIG. 4 include omission of:
  • control and sensing circuit depicted in the schematic diagram of FIG. 4 and the preferred control and sensing circuit depicted in FIG. 3 compel a different operating procedure in obtaining digitized values for induced AC voltage supplied from the coil 54" to the input pin 14 ' 4" of the microcontroller 46". Because in the control and sensing circuit depicted in FIG. 4 energizing the coil 54" to close the set of contacts 52" for supplying AC power to the load 72" requires that the NPN transistor 82" be turned on and in a low impedance state, while the NPN transistor 82" is turned on AC current flowing through the set of contacts 52" induces little or no AC voltage at the second terminal 112" of the relay 44".
  • a timing diagram 222 included in FIG. 4 depicts a signal 224 that the processor 138" supplies to the base 126" of the NPN transistor 82" via the GPIO pin 134" during an interval in which the set of contacts 52" are closed and the load 72" receives AC power.
  • the signal supplied to the base 126" of the NPN transistor 82" includes repetitive brief interruptions 226 during which the NPN transistor 82" turns off.
  • each of the brief interruptions 226 are so short that the remanent electromagnetic field generated by the coil 54" and the mechanical inertia of the set of contacts 52" maintain a continuous supply of AC power to the load 72".
  • the ADC 146" of the microcontroller 46" measures the induced AC voltage supplied from the second terminal 112" of the coil 54" to the input pin 144" .
  • FIG.' 5 depicts essential aspects of yet another alternative embodiment control and sensing circuit in accordance with the present disclosure as might be respectively incorporated into each buss included in the electrical appliance 20.
  • Those elements depicted in FIG. 5 that are common to the illustrations of FIG. 3 and 4 are identified by the same reference numeral distinguished by a triple prime (""'") designation.
  • the only significant difference between the control and sensing circuit depicted in FIG. 4 and the alternative embodiment circuit depicted in FIG. 5 is the addition of a resistor 232 connected between the junction of the cathode 92"' of the protection diode 94"' with the collector 104"' of the NPN transistor 82" ⁇ and the second terminal 112" • of the relay 44"'.
  • the ADC 146 digitizes a voltage which is the sum of a DC voltage that results from relay energizing current that the NPN transistor 82 supplies to the coil 54 plus the AC voltage induced in the coil- 54 by AC electrical current flowing through the set of contacts 52 and the load 72 when the set of contacts 52 are in the closed state.
  • the flow diagram of FIG. 6 depicts the preferred method for determining AC current, voltage and power factor for AC electrical power supplied to loads 72 via the set of contacts 52 from voltage induced in the coil 54 by current flowing through the closed set of contacts 52.
  • the preferred method begins at a start block 252 which the computer program executed by the processor 138 enters shortly after AC power is applied to the electrical appliance 20.
  • the method in processing block 254 initialized input/output ("I/O") registers included in the microcontroller 46 and assigns initial values to variables that are used in determining AC current, voltage and power factor for AC electrical power supplied to loads 72 via the set of contacts 52. Having initialized the I/O registers and variables, the method in processing block 256 then initializes both the ADC 146 and a timer included in the microcontroller 46 whose operation determines moments in time at which the ADC 146 measures the AC voltage induced in the coil 54 by AC electrical current flowing through the set of contacts 52.
  • I/O input/output
  • operation of the timer causes the ADC 146 to measure AC voltage induced across each of the coils 54 two-hundred and fifty-six (256) times during each cycle of the AC power.
  • the timer causes the ADC 146 to measure AC voltage induced across each of the coils 54 two- hundred and fifty-six (256) times during a 16.67 msec interval, i.e. 1.0 second/60 cycles.
  • the computer program executed by the processor 138 is now ready to begin repetitively determining AC current, voltage and power factor for AC electrical power supplied to loads 72 via the set of contacts 52 from voltage induced in the coil 54 by current flowing through the closed set of contacts 52.
  • the processor 138 preferably executes a multi-tasking real time operating system that permits concurrently executing a number of independent computer program threads.
  • the computer program executed by the processor 138 begins concurrently running five (5) instances of the method depicted along the right-hand side of FIG. 6.
  • Four (4) instances of the method depicted along the right-hand side of FIG. 6 are respectively assigned to processing voltage induced across one of the four (4) coils 54.
  • the fifth (5th) instances of the method depicted along the right-hand side of FIG. 6 processes the reference AC voltage signal supplied to the microcontroller 46 by the transformer 162.
  • Determining AC current, voltage and power factor for AC electrical power supplied to loads 72 via the set of contacts 52 from voltage induced in the coil 54 by current flowing through the closed set of contacts 52 begins in processing block 262 with individual computer program threads respectively determining the phase of AC voltage that the microcontroller 46 receives from the transformer 162 or from each of the coils 54.
  • the computer program repetitively measures voltage until AC voltage crosses zero. The instant at which AC voltage crosses zero becomes a zero (0) reference point for two-hundred and fifty-six (256) measurements of voltage from the transformer 162 or from a coil 54 that occur throughout one cycle of AC power. It is important to note that for the electrical appliance 20 depicted in FIGs.
  • each of the two- hundred and fifty-six (256) voltage measurements occurring throughout the method depicted along the right-hand side of FIG. 6 is, in fact, computed by averaging sixteen (16) indepen- dent voltage measurements made by the ADC 146 throughout an interval that, depending upon clock speed of the preferred microcontroller 46, does not exceed eight (8) microseconds.
  • processing block 264 collects two-hundred fifty- six (256) voltage measurements throughout an entire cycle of AC power.
  • two hundred and fifty-six (256) measurements are collected at processing block 264 throughout a 16.67 msec interval of time.
  • the preferred method for determining AC current, voltage and power factor for AC electrical power supplied to loads 72 via the set of contacts 52 in processing block 266 compensate the voltage measurements for characteristics either of the transformer 162 or for coupling between AC electrical current flowing through the set of contacts 52 and the coil 54 of the relay 44.
  • a preferred method for determining compensation to be applied to the voltage measurements appears in FIG. 7 and is described in greater detail below.
  • the preferred method for determining AC current, voltage and power factor for AC electrical power supplied to loads 72 via the set of contacts 52 in processing block 268 multiplies or integrates the voltage measurements to obtain RMS values respectively for voltage supplied to the microcontroller 46 by the transformer 162 or for current flowing through the set of contacts 52 of each of the relays 44.
  • processing block 272 the preferred method for determining AC current, voltage, power factor and actual true power dissipation for AC electrical power supplied to loads 72 via the set of contacts 52 reports current, voltage and power factor for each of loads 72, and any alarms for electrical power being supplied to the electrical appliance 20, or being supplied to any of loads 72 during a single cycle of that electrical power.
  • each of the threads being of the computer program being executed by the processor 138 returns to processing block 262 to process the next cycle of the AC power.
  • FIG. 7 depicts the preferred method for determining compensation to be applied to measurements of AC voltage that are subsequently used in processing block 266 depicted in FIG. 6.
  • the dummy resistive load preferably permits programming two-hundred and fifty-six (256) different resis- tances with only a single dummy resistive load being connected in series with all the set of contacts 52 of all relays 44 included in the electrical appliance 20.
  • a computer readable calibrated ammeter and calibrated phase meter are connected to the electrical appliance 20 while determining compensation to be applied to AC voltage measurements. Lastly, before determining actual compensation values to be applied to AC voltage measurements and storing the compensation values into the non-volatile memory 136 of the microcontroller 46:
  • the values of one (1.0) are used in processing block 266 by the computer program executed by the processor 138 while executing the method depicted in FIG. 6.
  • FIGs. 1-7 do not illustrate any of the additional equipment required for determining compensation to be applied to measurements of AC voltage.
  • Determining compensation to be applied to measurements of AC voltage that are used in processing block 266 depicted in FIG. 6 begins in start block 302 that is immediately followed in processing block 304 which disconnects all resistance from the outlet plugs 24 of the electrical appliance 20, i.e. sets to zero (0) the current that the dummy resistive load simulates as flowing through each of the set of contacts 52.
  • the computer program for determining compensation to be applied to measurements of AC voltage that are used in processing block 266 enters for the first time processing block 312 which increases by one step the AC current flowing through the set of contacts 52 of the relay 44 and the dummy resistive load.
  • the computer program determining compensa- tion to be applied to measurements of AC voltage in processing step 314 reads the actual current flowing through the set of contacts 52 and the dummy resistive load from the external calibrated ammeter.
  • the computer program determining compensation to be applied to measurements of AC voltage in processing step 316 reads from the external calibrated phase meter the actual phase shift of AC current flowing through the set of contacts 52 and the dummy resistive load.
  • the computer program determining compensation to be applied to measurements of AC voltage in processing step 322 using the ADC 146 reads the AC voltage being supplied to the microcontroller 46 by the set of contacts 52 ' of relays 44.
  • the computer program executed by the processor 138 in processing block 324 then computes a correction factor that when multiplied by the AC voltage and phase as measured by the ADC 146 would set the products equal to the AC current and phase read respectively in processing blocks 314 and 316.
  • the computer program proceeds to decision block 328.
  • decision block 328 the computer program determines that the current for which a correction factor was just computed is less than the maximum current that can be supplied to a load 72 via the outlet plug 24, then the computer program returns to processing block 312 in order to determine a correction factor for the next greater current to flow through the set of contacts 52 and the dummy resistive load.
  • ADC_VOLTAGE_RESOLUTION System: .ADC_MAX_VOLTAGE/4096. OF,
  • ADC_MAX_PP_VOLTAGE System: ⁇ ADC_MAX_VOLTAGE ; /**
  • CalibrationTable ct *reinterpret_cast ⁇ CalibrationTablePtr> (0x3F0000) ;
  • Flash_CallbackPtrType * Variables allocated by program in run-time
  • Flash_CallbackPtrType *reinterpret_cast ⁇ Uint32*> (0x000D04)
  • typedef void *Flash_CallbackPtrType (void)
  • Flash_CallbackPtrType& Flash_CallbackPtrRef
  • ADConverter :ADConverter(Systemic s) : system(s) ,
  • rAdcRegs . INTSEL7N8. bit. INT7SEL SOC; system. rAdcRegs .ADCSOCFRCl .all
  • mask; // ⁇ force next conversion /* wait for ADC start */ while (system.
  • ADCINT5 1;
  • ADConverter& adc,- public static const char HEADERU; char const* createLine (AmpsChannel const& channel) const; char const* createLine (VoltageChannel const& channel) const; char const* createTemperatureLine ( ) const; char const* createl2VMonLine ( ) const; char const* createBatteryLine ( ) const;
  • ADCResults (ADConverterSc c) ; static unsigned const LINE — LENGTH; ⁇ ; //class ADCResults
  • ADCResults :: ADCResults (ADConverter& c) : adc(c) ⁇ ⁇ //ADCResults : :ADCResults
  • AmpsChannel const& channel const ⁇ digits (channel. P, 1000. Of, 4, tADCResults : : AMPS_LINE [P_POS] ) ; digits (channel. PF, O.lf, 2, kADCResults : :AMPS_LINE [PF_POS] ) ; return this- >createLine (channel, ADCResults : :AMPS_LINE, 10. Of, 3) ; ⁇ //ADCResults :: createLine ()
  • *P2 + *p ⁇ * (*p2) ;
  • AmpsChannel S (triples [j ] . third] . P) / triples [j] [0] .Vrms / triples [j] [k] .Vrms;
  • AmpsChannel S [triples [j ] . third] . PF) ) ;
  • serial ->sendBytes (adcs .create12VMonLine ( ) ) ; system. serial ->sendBytes (adcs .createBatteryLine ( ) ) ; ⁇ //sendToSenal ( )
  • nextConvertUsec + MEASUREMENT_PERIOD_USEC) while (system. timer () .getUsec () ⁇ nextConvertUsec); system. adc- >getCurrentVoltages (t ⁇ 1, s) ; while (system. timer () .getUsec () ⁇ nextConvertUsec +
  • control and sensing circuits respectively depicted in FIGs. 3, 4 and 5 include the transformer 162 to provide an accurate reference signal for AC power received by the electrical appliance 20, the computer program executed by the processor 138 can numerically assess less accurately phase difference between:
  • a control and sensing circuit in accordance with the present disclosure may omit the transformer 162.
  • the loop of wire 152 juxtaposed with the coil 54 increases magnetic coupling between AC current flowing through the set of contacts 52 and the load 72.
  • the relays 44 are mounted on a printed circuit board, the AC current flowing through the set of contacts 52 can be routed instead through one or more PCB traces that are:
  • the relay 44 preferably has a normally open set of contacts 52 so a load 72 receives AC electrical power only if the electrical appliance 20 operates properly.
  • an equivalently safe circuit can be implemented using a relay 44 having a normally closed set of contacts 52 if the set of contacts 52 connect to the source of electrical power in series with another relay having normally open contacts.
  • Sensing AC electrical current flowing through a load and a set of normally closed set of contacts 52 included in a circuit such as that depicted in FIGs. 4 or 5 provides a better voltage signal from the coil 54 to the microcontroller 46 because the NPN transistor 82 will be turned off when AC electrical current flows through the load 72 thereby leaving the second terminal 112 of the coil 54 electrically coupled to only the input pin 144 of the microcontroller 46.
  • Another alternative is a electrical appliance 20 in accordance with the present disclosure that also includes outlet plugs 24 which provide AC power that cannot be controlled remotely to devices that must always operate.
  • the electrical appliance 20 may also include front panel switches for selectively locking AC electrical power either on or off to sets of outlet plugs 24 that are remotely controllable .

Abstract

An appliance's control and sensing circuit selectively applies AC electrical power to a load (72). The circuit includes a relay (44) having contacts (52) connected in series between an AC power source and the load (72). When energized, the relay's electromagnetic coil (54) changes the contacts (52) to supplying electrical power to the load (72) or conversely. The control and sensing circuit measures AC voltage induced in the coil (54) by an alternating magnetic field produced by AC electrical current supplied to the load (72) through the relay's contacts (52). A microcontroller (46) included in the control and sensing circuit:1. measures the AC voltage produced by the coil (54); 2. compensates the measured voltage for inductive coupling between the AC current flowing through the contacts (52) and the coil (54); and 3. determines various characteristics of the AC power supplied to the load (72).

Description

REDUCED PARTS COUNT ISOLATED AC CURRENT SWITCHING AND SENSING
Technical Field The present disclosure relates generally to controlling alternating current ("AC") flowing through a load, and more particularly an AC control circuit which also permits simultaneously sensing electrical current flowing through the load.
Background Art
There exist numerous AC switching applications, such as power controllers, uninterruptable power supplies, and motor controls, that require:
1. switching an AC load on and off; and 2. that benefit significantly by simultaneously monitoring electrical current flowing through the AC load.
For most AC monitoring applications, the monitoring circuit must be electrically isolated from the AC power supplied to the load. Conventional electrically isolated AC monitoring circuits generally include either:
1. an optical isolator consisting of a photodiode combined with a LED connected in series with the AC power source and the load; 2. a current sensing transformer having a winding that is wired in series with the AC power source and the load;
3. a hall effect sensor that includes a magnetic field detector located nearby a high current conductor connected in series with the AC power source and the load,- or
4. a high impedance differential amplifier which provides a high degree of virtual isolation through the use of large value series resistors connected to both sides of a resistive shunt connected in series with the AC power source and the load.
Processing a digitizing AC power signal to determine the phase of the AC power signal is well known. For example, United States Patent nos . 4,077,061 entitled "Digital Processing and Calculating AC Electric Energy Metering System" discloses a metering system for electric utility power line AC power measurements that digitizes randomly sampled AC voltage and current signals, and computes therefrom electric energy parameters. Similarly, United States Patent nos. 5,260,647 entitled "Measuring an AC Signal Value with Sampling When the Sampling Interval Does Not Exactly Divide the AC Signal's Period" discloses computer software that processes a digitally sampled AC waveform to accurately measure a sampled AC voltage. The disclosed computer software accurately measures a sampled AC voltage:
1. even though the available sampling intervals do not exactly divide the period of the AC signal to be measured; and
2. without averaging over a plurality of periods which is exactly divisible (or nearly so) by the sampling interval .
Also, United States Patent nos. 5,528,134 entitled "AC Power Analyzer" discloses computer software that performs spectrum analysis on the resampled points of an AC power waveform to reduce to zero artifacts at the harmonic intervals of the AC power frequency.
An electrically isolated relay circuit for switching AC power to a load on and off that also permits sensing electrical current flowing through the load while avoiding use of an optical isolator, a current sensing transformer or an operational amplifier with large value resistors would be economically advantageous. For many applications, an isolated AC switching and sensing circuit that requires fewer parts increases the practicality of sensing AC power, particularly for those applications in which the complexity or cost of a separate electrically isolated current sensor would otherwise be too expensive. The economic advantage of being able to sense electrical current flowing through a load while avoiding an additional optical isolator, transformer or operational amplifier increases even more if the current sensing components can be timeshared among several different loads. Disclosure
An object of the present disclosure is to provide an isolated AC current switching and sensing circuit that requires fewer electrical components. Another object of the present disclosure is to provide an electrically isolated relay circuit for switching AC power to a load that also permits sensing AC electrical current flowing through the load while avoiding use of:
1. an optical isolator; 2. a current sensing transformer; or
3. an operational amplifier together with large value resistors .
Yet another object of the present invention is to increase the practicality of sensing AC current flowing through a load, particularly for those applications in which the complexity and/or cost of a separate electrically isolated current sensor would otherwise be prohibitive.
Another object of the present disclosure is to provide an isolated AC current switching and sensing circuit that is more compact.
Yet another object of the present invention is to provide an electrical appliance that senses AC electrical current flowing through the load while avoiding use of:
1. an optical isolator; 2. a current sensing transformer; or
3. an operational amplifier together with large value resistors . ■
Yet another object of the present invention an electrical appliance that timeshares sensing of AC electrical current flowing through several different loads while avoiding use of:
1. an optical isolator;
2. a current sensing transformer; or
3. an operational amplifier together with large value resistors. Briefly, in one aspect disclosed herein is a control and sensing circuit for selectively supplying AC electrical power to a load. The disclosed control and sensing circuit includes a relay that has : 1. at least one set of contacts that are connectable in series between a source of AC electrical power and the load; and
2. an electromagnet that includes a coil of insulated wire which upon supplying an electrical current to the coil changes the set of contacts between: a. a closed state in which the load receives AC electrical power; and b. an open state in which the load does not re- ceive AC electrical power.
The disclosed control and sensing circuit also includes a coil energizing switch connected in series with the coil and with a source of relay energizing electrical power. The coil energizing switch when in: 1. a first state does not supply electrical current to the coil; and
2. a second state supplies electrical current to the coil for changing the set of contacts between the open state and the closed state. Lastly, the disclosed control and sensing circuit includes an AC voltage sensing circuit coupled to the coil for measuring an AC voltage induced in the coil by an alternating magnetic field resulting from AC electrical current flowing through the set of contacts and the load when the set of contacts are in the closed state in which the load receives AC electrical power from the AC power source.
Also disclosed is an electrical appliance whose operation is energized by AC electrical power. The electrical appliance includes : 1. a load that receives AC electrical power,- and 2. the disclosed control and sensing circuit. Finally, a method for selectively supplying AC electrical power to a load is also disclosed. The method includes the steps of supplying AC electrical current to the load through at least one set of relay contacts. The relay's set of contacts are connectable in series between a source of AC electrical power and the load, The relay also includes an electromagnet that has a coil of insulated wire which upon receiving an electrical current changes the set of contacts between :
1. a closed state in which the load receives AC electrical power; and 2. an open state in which the load does not receive AC electrical power.
The disclosed method also includes the step of supplying electrical current to the coil of the relay via a coil energizing switch connected in series with the coil and with a source of relay energizing electrical power. The coil energizing switch is operable to be in:
1. a first state in which the coil does not receive electrical current; and
2. a second state in which the coil receives electrical current for changing the set of contacts between the open state and the closed state .
Finally, the disclosed method includes the step of measuring an AC voltage induced in the coil by AC electrical current flowing through the set of contacts and the load when the set of contacts are in the closed state in which the load receives AC electrical power from the AC power source.
These and other features, objects and advantages will be understood or apparent to those of ordinary skill in the art from the following detailed description of the preferred embodiment as illustrated in the various drawing figures.
Brief Description of Drawings
FIGs. 1 is an elevational view of an electrical appliance for switching AC loads on and off that benefits significantly by concurrently monitoring AC electrical power supplied to one or more AC loads;
FIGs. 2A and 2B are respectively relay side and microprocessor side plan views, and FIG. 2C is an elevational view of a printed circuit board included in the electrical appliance depicted in FIG. 1;
FIG. 3 is a schematic diagram depicting an isolated AC switching and sensing circuit of the type implemented on the printed circuit board depicted in FIGs. 2A-2C in accordance with a present disclosure's preferred embodiment in which electrical current for energizing an AC power control relay- flows from a transistor through the relay's coil and a series connected resistor to circuit ground; FIG. 3A is a schematic diagram depicting an opto isolator circuit that may replace a transformer included in the schematic diagram of FIG. 3;
FIG. 4 is a schematic diagram depicting an isolated AC switching and sensing circuit in accordance with an alternative embodiment of the present disclosure in which electrical current for energizing an AC power control relay flows from the relay's coil through only transistor to circuit ground;
FIG. 5 is a schematic diagram depicting an isolated AC switching and sensing circuit' in accordance with another embodiment of the present disclosure in which electrical current for energizing an AC power control relay from the relay's coil through a series connected resistor and transistor to circuit ground;
FIG. 6 is a flow diagram depicting the preferred method for determining AC current, voltage and power factor for AC electrical power supplied to a load via a set of closed relay contacts from voltage induced in the relay's coil by current flowing through the closed contacts; and
FIG. 7 is a flow diagram depicting the preferred method for determining compensation to be applied to voltage measurements collected while determining AC current, voltage and power factor for AC electrical power supplied to a load.
Best Mode for Carrying Out the Disclosure FIG. 1 depicts an elevational view of a rack-mountable electrical appliance for remotely controlling a supply of AC power that is sold by Digital Loggers, Inc. of Santa Clara, California, and that is referred to herein by the general reference character 20. Using a web browser and communicating via the Internet, the electrical appliance 20 permits starting or stopping any type of remotely located AC powered electrical equipment such as servers perhaps in a server farm, routers, firewalls, network devices, cell phone sites, ATM machines, kiosks, HVAC, industrial machinery and industrial process equipment. As depicted in FIG. 1 the electrical appliance 20 includes one (1) AC power input cable 22. The electrical appliance 20 also preferably includes a total of sixteen (16) NEMA 5-15R outlet plugs 24 from which external electrical equipment receives AC power. The electrical appliance 20 permits remotely controlling AC power to four (4) sets of four
(4) outlet plugs 24 with each set of sets of four (4) outlet plugs 24 receiving AC electrical power from a separately controllable buss.
The electrical appliance 20 depicted in FIG. 1 is useful for eliminating service calls and increasing the reliable operation of remotely located equipment. Accessed via the Internet using a Web browser, the electrical appliance 20 permits remotely monitoring AC voltage, AC current, and AC power supplied individually to loads that connect via sets of the outlet plugs 24 to busses included in the electrical appliance 20. Four (4) full digital voltage and current "meters" included in the electrical appliance 20 permit monitoring AC voltage, AC current/ and AC power on each buss. To facilitate energy conservation, the electrical appliance 20 also permits remotely balancing phasing and load factor of AC power supplied to the remotely located equipment. A number of different functions that the electrical appliance 20 performs include eliminating overloads, brown-outs, blown circuit breakers and detecting other power problems before they occur.
FIGs. 2A through 2C respectively depict alternative views of a printed circuit board assembly 42 which is included in the electrical appliance 20 depicted in FIG. 1. The printed circuit board assembly 42 has mounted thereon all the electrical components needed for a control and sensing circuit that selectively supplies AC electrical power to loads connected to the four (4) sets of outlet plugs .24 included in the electrical appliance 20. For purposes of the present disclosure, the most pertinent components included in the printed circuit board assembly 42 are four (4) relays 44 and a microcontroller 46. As is readily apparent to those skilled in the relevant art, each relay 44 includes at least one set of contacts 52 that are connectable in series between:
1. a source of AC electrical power connected to the AC power input cable 22; and
2. a load connected to one of the outlet plugs 24. Each of the relays 44 also includes an electromagnet formed by a coil 54 of insulated wire. Supplying an appropriate electrical current to the coil 54 of the relay 44 generates a magnetic field that changes the- set of contacts 52 between:
1. a closed state in which the load receives AC electrical power via one of the outlet plugs 24; and
2. an open state in which the load does not receive AC electrical power. As is also readily apparent to those skilled in the relevant art, whether supplying electrical current to the coil 54 supplies electrical power to the load or removes electrical power from the load depends upon the particular configuration of the set of contacts 52. If the relay 44 has a normally open set of contacts 52, supplying electrical current to the coil 54 causes the set of contacts 52 to close thereby supplying AC power to the load. Conversely, if the relay 44 has a normally closed set of contacts 52, supplying electrical current to the coil 54 causes the set of contacts, 52 to open thereby removing AC power from the load.
The microcontroller 46 is preferably a Texas Instruments Incorporated ("TI") Piccolo Microcontroller model TMS320F28027. This particular microcontroller includes a single 12-bit analog-to-digital converter ("ADC") that receives signals from two (2) sample-and-hold circuits. The preferred microcontroller 46 provides sixteen (16) multiplexed inputs to the sample-and-hold circuits to equip the microcontroller with thirteen (13) general purpose analog input channels. The microcontroller 46 also includes sixteen (16) individually addressable registers for storing conversion results of analog- to-digital conversions produced by the ADC. The preferred microcontroller 46 also includes a set of multiplexed general purpose input/output ("GPIO") pins. The GPIO pins of the microcontroller 46 are programmable to function either in:
1. an input state that receives a digital signal;
2. an output state that transmits a digital signal; or 3. a high impedance state which disables the pin from performing either an input or an output function. The printed circuit board assembly 42 also includes a DC power supply 58 for energizing operation of various components included in the electrical appliance 20 including the relays 44 and the microcontroller 46.
The schematic diagram of FIG. 3 depicts essential aspects of a preferred embodiment of a control and sensing circuit in accordance with the present disclosure respectively incorporated into each buss included in the electrical appliance 20. The schematic diagram of FIG. 3 depicts a load 72 connected to one of the outlet plugs 24 included in the electrical appliance 20. Specifically, an AC neutral wire included in the AC power input cable 22 connects directly through the electrical appliance 20 via the outlet plug 24 to the load 72. An AC line wire also included in the AC power input cable 22 connects to one of the set of contacts 52 included in the relay 44. The other of the set of contacts 52 connects via the outlet plug 24 to the load 72. The relay 44 depicted in FIG. 3 preferably has a normally open set of contacts 52 so that if a component failure occurs in the electrical appliance 20' electrical power will not be supplied to the outlet plug 24.
The control and sensing circuit depicted in the schematic of FIG. 3 also includes an NPN transistor 82 having an emitter 84 that collects to a first terminal 86 of the coil 54. The emitter 84 of the NPN transistor 82 also connects to a cathode 92 of a protection diode 94. An anode 96 of the protection diode 94 connects to circuit ground 102. A collector 104 of the NPN transistor 82 connects to a particular source of positive polarity direct current ("DC") electrical power 106, VCC, supplied by the DC power supply 58 that is reserved exclusively for energizing operation of relays 44. A second terminal 112 of the coil 54 connects via a resistor 114 to circuit ground 102. An output terminal 122 of a level shifting amplifier 124 connects to a base 126 of the NPN transistor 82 while an input terminal 132 of the level shifting amplifier 124 connects to a GPIO pin 134 of the microcontroller 46. Configured in this way, the NPN transistor 82 functions as a 5 coil energizing switch that is connected in series:
1. with the coil 54; and.
2. with the positive polarity DC electrical power 106 that provides a source of electrical power for energizing operation of the relay 44.
10 The microcontroller 46 includes a non-volatile memory 136 stores a computer program that is executed by a processor 138 also included in the microcontroller 46. This configuration for the control and sensing circuit permits the computer program to transmit a signal via the GPIO pin 134 and the level
15 shifting amplifier 124 to the NPN transistor 82 for turning the NPN transistor 82 on and off. When the computer program executed by the processor 138 turn the NPN transistor 82 off, the NPN transistor 82 does not supply .electrical current to the coil 54. Conversely, when the computer program executed by the
20 processor 138 turn the NPN transistor 82 on, the NPN transistor 82 supplies electrical current to the coil 54 to change , the normally open set of contacts 52 of the relay 44 between their open state and their closed stat'e. While the schematic diagram of FIG. 3 depicts a single NPN transistor 82, a product such
25 as the electrical appliance 20 that implements the disclosed control and sensing circuit preferably includes an integrated circuit ("IC") that provides several relay drivers each of which includes an NPN transistor and a diode, for example the ULN2803A "8CH Darlington Sink. Driver" marketed by Toshiba
30. Corporation. As described above, when the set of contacts 52 are in a closed state the load 7.2 receives AC electrical power via the outlet plug 24.
When the set of contacts 52 are in their closed state and the load 72 receives AC electrical power, AC electrical current
35 flowing through the set of contacts 52 induces an AC voltage across the terminals 86, 112 of the coil 54. Due to the configuration of the' control and sensing circuit depicted in FIG. 3, the AC voltage induced across the terminals 86, 112 of the coil 54 appears as an AC modulation superimposed on a DC voltage that is present across the resistor 114 when electrical current flows through the coil 54.
As depicted in FIG. 3, a capacitor 142 connects between a junction of the resistor 114 with the second terminal 112 of the coil 54 and an input pin 144 of an ADC 146 that as described above is included in the preferred microcontroller 46. Configured in this way, the capacitor 142 couples the AC voltage present at the junction of the resistor 114 with the second terminal 112 of the coil 54 to the input pin 144 thereby permitting the ADC 146, at specified times determined by the computer program executed by the processor 138, to measure the AC voltage induced in the coil 54 by AC electrical current flowing through the set of contacts 52. For the preferred embodiment of the control and sensing circuit depicted in FIG. 3, the AC line wire connected to one of the set of contacts 52 includes a loop of wire 152 wrapped around the coil 54 of the relay 44. Juxtaposing the loop of wire 152 with the coil 54 of the relay 44 increases the amplitude of the AC voltage induced across the coil 54 by AC electrical current flowing through the set of contacts 52. Increasing the amplitude of the voltage induced across the coil 54 by wrapping the loop of wire 152 around the coil 54 eliminates any need for an amplifier connected in series with the input pin 144 for supplying an output signal produced by the coil 54 to the ADC 146. Consequently, the loop of wire 152 wrapped around the coil 54 is merely an expedient and cost effective way of eliminating an amplifier and its associated circuitry from each buss included in the electrical appliance 20.
To permit most accurately determining pertinent characteristics of AC electrical current flowing through the load 72, the control and sensing circuit depicted in FIG. 3 also includes a transformer 162. As depicted in FIG. 3, the transformer 162 includes primary winding 164 that is connected across the AC neutral and line wires included in the AC power input cable 22. One end of a secondary winding 166 of the transformer 162 connects to circuit ground 102 while another end of the secondary winding 166 connects through a capacitor 172 to an input pin 174 of the ADC 146. The AC voltage applied to the input pin 174 by the transformer 162 via the capacitor 172 supplies an AC reference signal to the ADC 146. Digitized values of the AC reference signal produced by the ADC 146 are used by the computer program executed by the processor 138 in conjunction with digitized values for AC voltage applied to the input pin 144 from the coil 54 for accurately determining pertinent characteristics of AC electrical current flowing through the load 72.
In determining pertinent characteristics of AC electrical current flowing through the load 72, the computer program executed by the processor 138 preferably:
1. averages digital measurement produced by the ADC 146;
2. reduces noise present in the digital measurement produced by the ADC 146; and
3. compensates for characteristics of coupling between: a. AC electrical current flowing through the set of contacts 52 of the relay 44; and b. the coil 54.
The pertinent characteristics of AC electrical current flowing through the load 72 determined by the computer program executed by the processor 138 preferably include: 1. root mean square ("RMS") AC electrical current flowing through the load 72;
2. RMS AC voltage across the load 72;
3. actual AC electrical power dissipated in the load 72; 4. phase difference between: a. the voltage of AC power supplied to the electrical appliance 20 via the AC power input cable 22; and b. AC current flowing through the series connected set of contacts 52 and the load 72; and
5. power factor of AC electrical power being supplied to the load 72. As is known to those skilled in the art, the power factor ("pf") of AC electric power being supplied to any load is defined as the ratio of:
1. the real AC power flowing to the load: divided by 2. the apparent AC power supplied to the load.
Real power represents the capacity of the circuit for performing work in a particular time. Apparent power is the product of the current and voltage of the circuit. Power factor is a dimensionless number between 0 and 1 that is frequently expressed as a percentage, e.g. 0.5 pf = 50% pf . Due to energy stored in the load and returned to the source of AC power, or due to a non- linear load that distorts the wave shape of the current drawn from the source of AC power, apparent power exceeds real power. In an AC electric power system, for the same amount of useful work a load with low power factor draws more AC current than a load with a high power factor. Drawing more AC current :
1. increases the energy loss in the AC power distribution system, e.g. the AC power input cable 22; and 2. therefore requires larger wires and other equipment in the AC power distribution system.
Due to the expense of larger equipment and wasted electrical energy, electrical utilities usually charge industrial or commercial customers that have a low power factor more for AC power. Knowledgeable industrial or commercial customers seeking to minimize their AC power expense install additional electrical equipment to compensate for the power factor of their actual loads so the customer' exhibit a power factor near 1.0 to the electrical utility from which they purchase AC power.
FIG. 3A depicts an alternative opto isolator circuit 182 that may be used instead of the transformer 162 for supplying AC voltage to an input pin of the ADC 146. Those elements of the opto isolator circuit 182 depicted in FIG. 3A that are common to the illustration of FIGl 3 are identified by the same reference numeral distinguished by a prime ("'") designation. The opto isolator circuit 182 includes a light emitting diode ("LED") 184 that connects in series with a resistor 186 to the AC neutral and line wires included' in the AC power input cable 22'. Light emitted by the LED 184 impinges upon a photo-transistor 192 having an emitter 194 connected to circuit ground 102'. A collector 196 of the photo- transistor 192 connects through a resistor 202 to- a particular source of positive polarity DC electrical power 204, VCC, supplied by the DC power supply 58 that is reserved exclusively for energizing logic circuits included in the control and sensing circuit depicted in FIG. 3 such as the microcontroller 46 and the level shifting amplifier 124. The opto isolator circuit 182 depicted in FIG. 3A produces an AC voltage at the junction between the collector 196 of the photo-transistor 192 and the resistor 202 that is in phase with'AC voltage across the AC neutral and line wires included in the AC power input cable 22' . Similar to the AC voltage produced by the secondary winding 166 of the transformer 162 depicted in FIG. 3, the AC voltage present at the junction between the collector 196 of the photo-transistor 192 and the resistor 202 depicted in FIG. 3A is coupled through a capacitor 172 ' to the input pin 174 ' of the microcontroller 46'. In general, the opto isolator circuit 182 costs less and is physically smaller than the transformer 162. However, using the opto isolator circuit 182 results in an AC power measurement system which is less accurate at monitoring AC voltage supplied to the electrical appliance 20 than the control and sensing circuit depicted in FIG. 3 that uses the transformer 162.
In the control and sensing circuit depicted in FIG. 3, due to the electrical current which the NPN transistor 82 supplies to the coil 54 the changing magnetic flux produced by AC current flowing through the set of contacts 52 that couples into the coil 54 generates a voltage that appears as an AC modulation superimposed upon a constant DC voltage that is present across the resistor 114. Because the changing magnetic flux produced by AC current flowing through the set of contacts 52 appears as a modulation superimposed upon the constant DC voltage present across the resistor 114, the positive polarity DC electrical power 106 supplied by the DC power supply 58 is preferably well regulated and has as little AC ripple as practicable.
The schematic diagram of FIG. 4 depicts essential aspects of an alternative embodiment control and sensing circuit in accordance with the present disclosure as might be respectively incorporated into each buss included in the electrical appliance 20. Those elements depicted in FIG. 4 that are common to the illustration of FIG. 3 are identified by the same reference numeral distinguished by a double prime (»"») designation. Significant differences between the control and sensing circuit depicted in FIG. 3 and the alternative circuit depicted in FIG. 4 include omission of:
1. the level shifting amplifier 124;
2. the capacitor 142; and 3. the loop of wire 152.
Significant topological differences between the control and sensing circuit depicted in FIG. 3 and the alternative circuit depicted in FIG. 4 include connecting:
1. the first terminal 86" of the coil 54" directly to the positive polarity DC electrical power 106";
2. the collector 104" of the NPN transistor 82" to the junction of : a. the cathode 92" of the protection diode 94"; and b. the second terminal 112" of the relay 44";
3. the emitter 84" of the NPN transistor 82" to circuit ground 102";
4. the input pin 144" of the microcontroller 46" directly to the junction of: a. the cathode 92" of the protection diode 94"; b. the second terminal 112" of the relay 44"; and c. the collector 104" of the NPN transistor 82"; and
5. the base 126" of the NPN transistor 82" directly to the GPIO pin 134" of the microcontroller 46".
Yet Another significant difference between the control and sensing circuit depicted in FIG. 3' and the alternative circuit depicted in FIG. 4 is the addition of a resistor 212 connected between the positive polarity DC electrical power 204" and the junction between the base 126" of the NPN transistor 82" and the GPIO pin 134" of the microcontroller 46".
The component and topological differences between the control and sensing circuit depicted in the schematic diagram of FIG. 4 and the preferred control and sensing circuit depicted in FIG. 3 compel a different operating procedure in obtaining digitized values for induced AC voltage supplied from the coil 54" to the input pin 14'4" of the microcontroller 46". Because in the control and sensing circuit depicted in FIG. 4 energizing the coil 54" to close the set of contacts 52" for supplying AC power to the load 72" requires that the NPN transistor 82" be turned on and in a low impedance state, while the NPN transistor 82" is turned on AC current flowing through the set of contacts 52" induces little or no AC voltage at the second terminal 112" of the relay 44". However, induced AC voltage supplied from the coil 54" to the input pin 144" of the microcontroller 46" immediately becomes significant upon turning the NPN transistor 82" off. Consequently, a timing diagram 222 included in FIG. 4 depicts a signal 224 that the processor 138" supplies to the base 126" of the NPN transistor 82" via the GPIO pin 134" during an interval in which the set of contacts 52" are closed and the load 72" receives AC power. As depicted in the timing diagram 222, the signal supplied to the base 126" of the NPN transistor 82" includes repetitive brief interruptions 226 during which the NPN transistor 82" turns off. The duration of each of the brief interruptions 226 are so short that the remanent electromagnetic field generated by the coil 54" and the mechanical inertia of the set of contacts 52" maintain a continuous supply of AC power to the load 72". However, during each of the brief interruptions 226 while the NPN transistor 82" does not does not supply electrical current to the coil 54", the ADC 146" of the microcontroller 46" measures the induced AC voltage supplied from the second terminal 112" of the coil 54" to the input pin 144" .
While the alternative embodiment control and sensing circuit in accordance with the present disclosure depicted in FIG. 4 permits measuring an AC voltage induced in the coil 54" by AC electrical current flowing through the set of contacts
52" and the load 72" when the set' of contacts 52" are in the closed state, in comparison with the control and sensing circuit depicted in FIG. 3 repetitively turning the NPN transistor 82" off and then on during each of the brief interruptions 226 introduces a significant amount of electrical noise into AC voltage measurements produced by the ADC 146".
The schematic diagram of FIG.' 5 depicts essential aspects of yet another alternative embodiment control and sensing circuit in accordance with the present disclosure as might be respectively incorporated into each buss included in the electrical appliance 20. Those elements depicted in FIG. 5 that are common to the illustrations of FIG. 3 and 4 are identified by the same reference numeral distinguished by a triple prime (""'") designation. The only significant difference between the control and sensing circuit depicted in FIG. 4 and the alternative embodiment circuit depicted in FIG. 5 is the addition of a resistor 232 connected between the junction of the cathode 92"' of the protection diode 94"' with the collector 104"' of the NPN transistor 82" and the second terminal 112" of the relay 44"'. Adding the resistor 232 between the junction of the cathode 92"' of the protection diode 94"' with the collector 104" of the NPN transistor 82 "' and the second terminal 112"' of the relay 44"' permits AC current flowing through the set of contacts 52"' to induces a significant AC voltage at the junction between the second terminal 112"' of the relay 44"' and the resistor 232 while the NPN transistor 82"' is turned on. Consequently, operation of the alternative embodiment control and sensing circuit depicted if FIG. 5 may dispense with the brief interruptions 226"' in the timing diagram 222"' depicting the signal 224"' applied to the base 126"' of the NPN transistor 82"'
While, in principle both of ■ the alternative embodiment control and sensing circuits depicted respectively in FIGs. 4 and 5 will operate properly without the capacitor 142 included in the circuit depicted in FIG. 3, adding the capacitor 142 to the circuits depicted in FIGs. 4 and 5 ensures that the full sensitivity of the ADC 146 is available for digitizing the AC voltage induced in the coil 54. Omitting the capacitor 142 from the control and sensing circuit depicted respectively in FIGs. 4 and 5 means that the ADC 146 digitizes a voltage which is the sum of a DC voltage that results from relay energizing current that the NPN transistor 82 supplies to the coil 54 plus the AC voltage induced in the coil- 54 by AC electrical current flowing through the set of contacts 52 and the load 72 when the set of contacts 52 are in the closed state. The flow diagram of FIG. 6 depicts the preferred method for determining AC current, voltage and power factor for AC electrical power supplied to loads 72 via the set of contacts 52 from voltage induced in the coil 54 by current flowing through the closed set of contacts 52. The preferred method begins at a start block 252 which the computer program executed by the processor 138 enters shortly after AC power is applied to the electrical appliance 20. First, the method in processing block 254 initialized input/output ("I/O") registers included in the microcontroller 46 and assigns initial values to variables that are used in determining AC current, voltage and power factor for AC electrical power supplied to loads 72 via the set of contacts 52. Having initialized the I/O registers and variables, the method in processing block 256 then initializes both the ADC 146 and a timer included in the microcontroller 46 whose operation determines moments in time at which the ADC 146 measures the AC voltage induced in the coil 54 by AC electrical current flowing through the set of contacts 52. Preferably, operation of the timer causes the ADC 146 to measure AC voltage induced across each of the coils 54 two-hundred and fifty-six (256) times during each cycle of the AC power. For 60 Hz AC power, the timer causes the ADC 146 to measure AC voltage induced across each of the coils 54 two- hundred and fifty-six (256) times during a 16.67 msec interval, i.e. 1.0 second/60 cycles. Having completed initialization of the microcontroller 46, the computer program executed by the processor 138 is now ready to begin repetitively determining AC current, voltage and power factor for AC electrical power supplied to loads 72 via the set of contacts 52 from voltage induced in the coil 54 by current flowing through the closed set of contacts 52. The processor 138 preferably executes a multi-tasking real time operating system that permits concurrently executing a number of independent computer program threads. Thus, after completing the initialization described in the preceding paragraph, for the electrical appliance 20 depicted in FIGs. 1 and 2A-2C, the computer program executed by the processor 138 begins concurrently running five (5) instances of the method depicted along the right-hand side of FIG. 6. Four (4) instances of the method depicted along the right-hand side of FIG. 6 are respectively assigned to processing voltage induced across one of the four (4) coils 54. The fifth (5th) instances of the method depicted along the right-hand side of FIG. 6 processes the reference AC voltage signal supplied to the microcontroller 46 by the transformer 162.
Determining AC current, voltage and power factor for AC electrical power supplied to loads 72 via the set of contacts 52 from voltage induced in the coil 54 by current flowing through the closed set of contacts 52 begins in processing block 262 with individual computer program threads respectively determining the phase of AC voltage that the microcontroller 46 receives from the transformer 162 or from each of the coils 54. In determining the phase of AC voltage being digitized by the ADC 146, the computer program repetitively measures voltage until AC voltage crosses zero. The instant at which AC voltage crosses zero becomes a zero (0) reference point for two-hundred and fifty-six (256) measurements of voltage from the transformer 162 or from a coil 54 that occur throughout one cycle of AC power. It is important to note that for the electrical appliance 20 depicted in FIGs. 1 and 2A-2C each of the two- hundred and fifty-six (256) voltage measurements occurring throughout the method depicted along the right-hand side of FIG. 6 is, in fact, computed by averaging sixteen (16) indepen- dent voltage measurements made by the ADC 146 throughout an interval that, depending upon clock speed of the preferred microcontroller 46, does not exceed eight (8) microseconds. After determining the zero (0) reference point, i.e. phase (φ) = 0 in processing block 262, determining AC current, voltage and power factor for AG electrical power supplied to loads 72 then proceeds to processing block 264 which collects two-hundred fifty- six (256) voltage measurements throughout an entire cycle of AC power. For the presently preferred embodiment of the electrical appliance 20 operating with 60 Hz AC electrical power, two hundred and fifty-six (256) measurements are collected at processing block 264 throughout a 16.67 msec interval of time.
After collecting two-hundred fifty-six (256) measurements of AC voltage either from the transformer 162 or from the coil 54 of the relay 44 throughout an entire cycle of AC power, the preferred method for determining AC current, voltage and power factor for AC electrical power supplied to loads 72 via the set of contacts 52 in processing block 266 compensate the voltage measurements for characteristics either of the transformer 162 or for coupling between AC electrical current flowing through the set of contacts 52 and the coil 54 of the relay 44. A preferred method for determining compensation to be applied to the voltage measurements appears in FIG. 7 and is described in greater detail below.
Having obtained compensated voltage measurements in processing block 266, the preferred method for determining AC current, voltage and power factor for AC electrical power supplied to loads 72 via the set of contacts 52 in processing block 268 multiplies or integrates the voltage measurements to obtain RMS values respectively for voltage supplied to the microcontroller 46 by the transformer 162 or for current flowing through the set of contacts 52 of each of the relays 44. Having obtained RMS values respectively for voltage supplied to the microcontroller 46 by the transformer 162 or for current flowing through the set of contacts 52 of each of the relays 44, in processing block 272 the preferred method for determining AC current, voltage, power factor and actual true power dissipation for AC electrical power supplied to loads 72 via the set of contacts 52 reports current, voltage and power factor for each of loads 72, and any alarms for electrical power being supplied to the electrical appliance 20, or being supplied to any of loads 72 during a single cycle of that electrical power. As depicted in FIG. 6, after the preferred method for determining AC current, voltage and power factor for AC electrical power supplied to loads 72 via the set of contacts 52 each of the threads being of the computer program being executed by the processor 138 returns to processing block 262 to process the next cycle of the AC power.
The flow diagram of FIG. 7 depicts the preferred method for determining compensation to be applied to measurements of AC voltage that are subsequently used in processing block 266 depicted in FIG. 6. The method depicted in FIG. 7, which is used solely for calibrating the electrical appliance 20 prior to its installation, requires additional equipment that is not included in the electrical appliance 20. Accordingly, while determining compensation to be applied to measurements of AC voltage a programmable dummy resistive load is connected to the outlet plugs 24. The dummy resistive load preferably permits programming two-hundred and fifty-six (256) different resis- tances with only a single dummy resistive load being connected in series with all the set of contacts 52 of all relays 44 included in the electrical appliance 20. Also a computer readable calibrated ammeter and calibrated phase meter are connected to the electrical appliance 20 while determining compensation to be applied to AC voltage measurements. Lastly, before determining actual compensation values to be applied to AC voltage measurements and storing the compensation values into the non-volatile memory 136 of the microcontroller 46:
1. values of one (1.0) are stored in the non-volatile memory 136; and
2. during determination of compensation to be applied to measurements of AC voltage, the values of one (1.0) are used in processing block 266 by the computer program executed by the processor 138 while executing the method depicted in FIG. 6.
FIGs. 1-7 do not illustrate any of the additional equipment required for determining compensation to be applied to measurements of AC voltage. Determining compensation to be applied to measurements of AC voltage that are used in processing block 266 depicted in FIG. 6 begins in start block 302 that is immediately followed in processing block 304 which disconnects all resistance from the outlet plugs 24 of the electrical appliance 20, i.e. sets to zero (0) the current that the dummy resistive load simulates as flowing through each of the set of contacts 52. After setting the current to zero (0), the computer program for determining compensation to be applied to measurements of AC voltage that are used in processing block 266 enters for the first time processing block 312 which increases by one step the AC current flowing through the set of contacts 52 of the relay 44 and the dummy resistive load. After increasing the AC current by one step, the computer program determining compensa- tion to be applied to measurements of AC voltage in processing step 314 reads the actual current flowing through the set of contacts 52 and the dummy resistive load from the external calibrated ammeter. Immediately after reading the AC current flowing through the set of contacts 52 and the dummy resistive load, the computer program determining compensation to be applied to measurements of AC voltage in processing step 316 reads from the external calibrated phase meter the actual phase shift of AC current flowing through the set of contacts 52 and the dummy resistive load. Having in the preceding way determined accurately both the AC current flowing through the set of contacts 52 and the dummy resistive load and the phase of that current flow with respect to the AC power being supplied to the electrical appliance 20, the computer program determining compensation to be applied to measurements of AC voltage in processing step 322 using the ADC 146 reads the AC voltage being supplied to the microcontroller 46 by the set of contacts 52' of relays 44. Having thus obtained an AC voltage and phase thereof induced in the coil 54 by AC current flowing through the set of contacts 52 and the dummy resistive load, the computer program executed by the processor 138 in processing block 324 then computes a correction factor that when multiplied by the AC voltage and phase as measured by the ADC 146 would set the products equal to the AC current and phase read respectively in processing blocks 314 and 316. After computing the correction factor for a particular value of current flowing through the set of contacts 52, the computer program proceeds to decision block 328. If in decision block 328 the computer program determines that the current for which a correction factor was just computed is less than the maximum current that can be supplied to a load 72 via the outlet plug 24, then the computer program returns to processing block 312 in order to determine a correction factor for the next greater current to flow through the set of contacts 52 and the dummy resistive load.
If in decision block 328 the computer program determines that the current for which a correction factor was just computed in processing block 324 equals the maximum current that can be supplied to a load 72 via the outlet plug 24, then computer program execution proceeds to processing block 332 where a curve is fit to the set of correction factors determined by performing the operations specified for processing blocks 312 through 324. After fitting a curve to the set of correction factors, the computer program executed by the processor 138 in processing block 334 stores the correction curve into the non-volatile memory 136 of the microcontroller 46:
1. thereby completing determination of compensation to be applied to measurements of AC voltage that are used in processing block 266 depicted in FIG. 6; and
2. immediately thereafter terminating computer program execution in end block 338.
Set forth below is a computer program written in C++ that is executed by the processor 138.
* FILE: PowerControl . cpp
* PURPOSE: Measurements and calculations for power control
*
* CREATED BY: Oleg Strelnikov, Sep 18 2009
* CONFIDENTIAL * Proprietary Information of Digital Loggers, Inc. * Copyright (c) Digital Loggers, Inc., 2009-2010
* All rights reserved.
*
#define far
#include <cmath>
#undef far
#include "Units. h" ^include "TimeManagement .h"
#include "System. h"
^include "Serial h" ttinclude "lcd.h"
# include " ut i l . h" tf include "ADC h" tf include "arrayπi h"
^include "MeasurementChannel . h" ftinclude " log . h"
#include <Flash2802x_API_Library .h>
unit const TIME_SLOT_MSEC = 100, //< time slot duration in msec unit const SAMPLE_PERIOD_MSEC = I,- //<time period between AD converts unit const SAMPLES_PER_TIME_SLOT = TIME_SLOT_MSEC / SAMPLE_PERIOD_MSEC;
/** * Volts per ADC's output least significant bit
* According to the C2000 documentation */ float const ADC_VOLTAGE_RESOLUTION = System: .ADC_MAX_VOLTAGE/4096. OF,
/** * Square of ADC_VOLTAGE_RESOLUTION
*/ float const ADC_SQ_VOLTAGE_RESOLUTION =
ADC_VOLTAGE_RESOLUTION * ADC_VOLTAGE_RESOLUTION; /** * Size of one sector of internal flash memory
* according to the C2000 documentation */ unsigned const FLASH_SECTOR_SIZE_X16BIT = 8*1024;
/**
* Maximum peak-to-peak voltage on ADC input
* Since min ADC input is OV pp voltage is the same as max voltage
*/ static float const ADC_MAX_PP_VOLTAGE = System: ■ ADC_MAX_VOLTAGE ; /**
* Max RMS voltage from max pp voltage */ Static float const ADC_MAX_RMS_VOLTAGE
= ADC_MAX_PP_VOLTAGE / std : : sqrt (8. OF) ; /** * Constant that RMS voltage stored in calibration table should be
* multiplied to to increase accuracy
* Since calibration table reserves 2 bytes for RMS voltage,
* maximum RMS voltage should maximum value of 2 -byte number
* l. e. 65535. */
Static float const ADC_PACK_FACTOR = 65535. OF / ADC_MAX_RMS_VOLTAGE ;
/**
* Maximum calibration table size is 256 values for 1 channel */ unsigned const CALIBRATION_VALUES_PER_CHANNEL = 256; /**
* Calibration table entry structure:
* RMS value calculated from ADC's samples and * precise value obtained from DMM multimeter
*/ struct CalibrationTableEntry { unsigned c; //<calculated unsigned p; //<precise } ; //struct CalibrationTableEntry /**
* Entry length relative to Uintlδ
* This length is required because data
* are stored to flash memory by Uintl6 units */ unsigned const ENTRY_LENGTH
= sizeof (CalibrationTableEntry) / sizeof (Uintlβ); /**
* How many channels may store theirs calibration data * to one sector of flash memory
*/ unsigned const MEASUREMENT_CHANNELS_PER_FLASH_SECTOR = FLASH_SECTOR_SIZE_X16BIT
/ CALIBRATION_VALUES_PER_CHANNEL / ENTRY_LENGTH; /**
* How many channels will store theirs calibration data
* in the sector of flash memory.
* If all channels of the device are fit in one sector than this value
* will the total number of measurement channels, * otherwise this number will the maximum number of channels that
* can be stored in one sector * This Crick allow statically (in compile time) prevent situations
* when calibration table cannot fit in one sector of flash memory
*/ unsigned const MEASUREMENT_CHANNELS_PER_TABLE = ( MEASUREMENT_CHANNELS_PER_FLASH_SECTOR
< MeasurementChannel : :MEASUREMENT_CHANNELS ?
MEASUREMENT_CHANNELS_PER_FLASH_SECTOR : MeasurementChannel: : MEASUREMENT_CHANNELS ) ; /** * Calibration table data type:
* pointer to the 2D array of entries constants
*/ typedef CalibrationTableEntry const (ScCaIibrationTable)
[MeasurementChannel : IMEASUREMENT-CHANNELS] [CALIBRATION_VALUES_PER_CHANNEL] ;
/**
* Pointer to the calibration table data type */ typedef CalibrationTableEntry const (*CalibrationTablePtr) [MEASUREMENT_CHANNELS_PER_TABLE]
[CALIBRATION_VALUES_PER_CHANNEL] ; /**
* The calibration table
* ct is just reference to the data that are placed at 0x3F0000, * l. e. in sector D of flash memory
* The type of the calibration table is CalibrationTable and
* has to be equal to dereference of CalibrationTablePtr data type */
CalibrationTable ct = *reinterpret_cast<CalibrationTablePtr> (0x3F0000) ;
unsigned ctNextEntry [MeasurementChannel : :MEASUREMENT_CHANNELS] ; float const EURISTIC_PRECISED_AMPS = 10. Of; float const EURISTIC_FACTOR_OHMS = O.lf;
//float const EURISTIC_PRECISED_VOLTS = 100. Of; //float const EURISTIC_FACTOR_REL = 0.005f;
/**
* Variables allocated by program in run-time */ Uint32& Flash_CPUScaleFactorRef = *reinterpret_cast<Uint32*> (0x000D04) ; typedef void (*Flash_CallbackPtrType) (void) ; Flash_CallbackPtrType& Flash_CallbackPtrRef =
*reinterpret_cast<Flash_CallbackPtrType*> (0x000D02) ;
/**
* GEL related variables */ unsigned* GEL_PreciseValues = reinterpret_cast<unsigned*> (0x008f80) ,- unsigned^ GEL_isPreciseValuesReady
= *reinterpret_cast<unsigned*> (0x008f8e) ,- unsigned* GEL_CalculatedValues = reinterpret_cast<unsigned*> (0x008f90) ,
/**
* Global variables
*/ bool isCalibrated = false,- //<whether device is already calibrated static bool willCalibrate = false,- /*<whether a value
* will be written to ct
*/ static Log log,- //<the application log for debug purpose
/**
* Check where is the end of calibration table:
* the constant Oxffff that is equal to erased flash memory
*/ void calculateNextEntry () { for (unsigned chan = 0 ,- chan < MeasurementChannel : :MEASUREMENT_CHANNELS,- ++chan) { for (ctNextEntry [chan] = 0,-
( CtNextEntry [chan] < CALIBRATION_VALUES_PER_CHANNEL ) && ( ct [chan] [ctNextEntry [chan] ] .p != Oxffff ) ,-
++ctNextEntry [chan] ) ,- } //for chan } //calculateNextEntry ()
/**
* Stores five last measurements to calculate the average value */ struct CalculationResults { static unsigned const LAST_MEASUREMENTS_NUMBER = 5 ; float Vrms [MeasurementChannel : :MEASUREMENT_CHANNELS]
[LAST_MEASUREMENTS_NUMBER] ; unsigned n,- CalculationResults () ; float getValue (unsigned channel); void next ( ) ,- void add(unsigned channel, float value); void analyze (unsigned ch, float*, float*); } lastResults,-
/**
* Constructor: initializes the structure * /
CalculationResults : :CalculationResults (.) : n(0) { } //CalculationResults: :CalculationResults ()
/**
* Calculates the maximum (worst) variance of measurements */ void CalculationResults : :analyze (unsigned const ch, float* const pmu_2_max, float* const worst) { float s = Stat : :mu (Vrms [ch] ,
CalculationResults: : LAST_MEASUREMENTS_NUMBER, 2) ; if (s > *pmu_2_max) { *pmu_2_max = s ; for (unsigned i = 0,- i < CalculationResults: :LAST_MEASUREMENTS_NUMBER; ++i) worst [i] = Vrms [ch] [i] ; } }
} //CalculationResults : :analyze ()
/**
* Calculate average value of last five measurements */ float CalculationResults : :getValue (unsigned channel) { float s = 0.0F; for (unsigned i = 0; i < LAST_MEASUREMENTS_NUMBER; ++i) { s += Vrms [channel] [i] ;
} return s / LAST_MEASUREMENTS_NUMBER; } //CalculationResults : :getValue ()
/* *
* Start new measurement
*/ void CalculationResults : :next () {
++n %= LAST_MEASUREMENTS_NUMBER; } //CalculationResults : :next ()
/** * Adds the measurement result to storage
*/ void CalculationResults :: add (unsigned channel, float value) { this- >Vrms [channel] [n] = value,- } //CalculationResults : :add( )
/** * Adds one entry to the calibration table
* during calibration process
*/ void addCalibrationTableEntry (unsigned mchan, unsigned precised) { if (ctNextEntry [mchan] == CALIBRATION_VALUES_PER_CHANNEL) { return;
} lastResults . analyze (mchan, &log.mu_2_max, log. worst); CalibrationTableEntry entry,- entry. c = lastResults .getValue (mchan) * ADC_PACK_FACTOR; entry. p = precised; if (precised == 65535) { entry. C = EURISTIC_PRECISED_AMPS * EURISTIC_FACTOR_OHNS
* ADC_PACK_FACTOR ; entry. p = EURISTIC_PRECISED_AMPS * 1000. Of;
}
Umtlδ* entryAddr = reinterpret_cast<Uintl6*> ( const_cast<CalibrationTableEntry*> (
&(ct [mchan] [ctNextEntry [mchan] ] ) ) ) ; FLoASH-ST state;
Uintlβ status = Flash_Program (entryAddr, reinterpret_cast<Umtl6*> (&entry) , ENTRY_LENGTH, &state) ++ctNextEntry [mchan] ; } //addCalibrationTableEntry
/**
* The table containing the AD convert results
*/ static struct Sample { unsigned voltage [3], unsigned timestamp,- } voltages [TRIPLE_NUMBER] [SAMPLES_PER_TIME_SLOT] ;
/** * The table storing results in the floating-point format
* to speed up their processing
*/ static float fvoltages [3] [SAMPLES_PER_TIME_SLOT] ;
/**
* Constructor, initializes the ADConvertor class */
ADConverter : :ADConverter(Systemic s) : system(s) ,
RSLT(&system.rAdcResultRegs .ADCRESULTO) { } /**
* ADConverter internal constants
*/ float const ADConverter: : RESOLUTION_BAT = 8.Of / 4096. Of; float const ADConverter : : RESOLUTION_12V = 15.Of / 4096. Of; unsigned const ADConverter :: SOC-BAT
= MeasurementChannel ::ADCCHAN (MeasurementChannel :: B, 6) ; unsigned const ADConverter: :SOC_12V = MeasurementChannel :: ADCCHAN (MeasurementChannel :: B, 4) ;
/**
* Get the battery monitor value */ inline float ADConverter : :getBattery () const { return ADConverter :: RESOLUTION_BAT * this- >getADCValue (SOC_BAT) ; }
/** * Get the 12V adapter monitor value
*/ inline float ADConverter : :getl2V( ) const { return ADConverter :: RESOLUTION_12V * this->getADCValue (SOC_12V) ;
}
/**
* AD convert
* According to the algorithm described in C2000 documentation */ inline unsigned ADConverter : :getADCValue (unsigned SOC) const { unsigned result;
EALLOW; unsigned mask = (1 << SOC) ,-
/* SOC/EOC for A channel to trigger ADCINT7 to fire */ this->system.rAdcRegs. INTSEL7N8.bit . INT7SEL = SOC; system. rAdcRegs .ADCSOCFRCl .all |= mask; //<force next conversion while (system. rAdcRegs .ADCSOCFLGl . all & mask); //<wait for ADC start
/* wait for EOC(A) === ADCINT7 */ while (system. rAdcRegs.ADCINTFLG. bit .ADCINT7 == 0); result = RSLT[SOC]; //<read voltage as ADC result
/* clear ADCINT7 interrupt flag */ system. rAdcRegs. ADCINTFLGCLR. bit .ADCINT7 = 1;
EDIS; return result; } //ADConverter: :getADCValue () / * *
* AD convert
* According to the algorithm described in C2000 documentation
*/ inline void ADConverter : rgetCurrentVoltages (int triple, int sample) { EALLOW ; for (unsigned i = 0,- i < 3; ++i) { int SOC = triples [triple] [l] .ADCCHANO ; int mask = (1 << SOC); /* SOC/EOC for A channel to trigger ADCINT7 to fire */ system. rAdcRegs . INTSEL7N8. bit. INT7SEL = SOC; system. rAdcRegs .ADCSOCFRCl .all |= mask; //<force next conversion /* wait for ADC start */ while (system. rAdcRegs .ADCSOCFLGl .all & mask); /* wait for EOC(A) === ADCINT7 */ while (system. rAdcRegs. ADCINTFLG. bit.ADCINT7 == 0) ; /* read voltage as ADC result */ voltages [triple] [sample] .voltage [i] = RSLT[SOC]; /* clear ADCINT7 interrupt flag */ system. rAdcRegs. ADCINTFLGCLR. bit .ADCINT7 = 1; } // for i EDIS; unsigned rem = system. timer () .getTimestamp () % 5; if (rem > log .maxRem) { log maxRem = rem;
} vol tages [ t riple ] [ sample] . t imestamp = sys tem . t imer ( ) . getTimes tamp ( ) ; } / /getCurrentVol tages ( )
/ * *
* AD convert of B5 ADC channel: for ADC calibration
* According to the algorithm described in C2000 documentation */ unsigned ADConverter : :getCurrentVoltageB5 () { //SOC13/INT5 static unsigned result,
EALLOW ;
/* wait for ADC start */
//while (system. rAdcRegs. ADCSOCFLGl. bit. SOC13 == 0) ; system. rAdcRegs .ADCSOCFRCl .bit .SOC13 = 1; //<force next conversion /* wait for ADC start */ while (system. rAdcRegs.ADCSOCFLGl. bit. SOC13 != 0) ;
/* wait for EOC13 === ADCINT5 */ while (system. rAdcRegs.ADCINTFLG. bit .ADCINT5 == 0) ;
/* read voltage as ADC result */ result = system. rAdcResultRegs .ADCRESULT13 ;
/* clear ADCINT5 interrupt flag */ system. rAdcRegs. ADCINTFLGCLR. bit. ADCINT5 = 1;
EDIS; return result; } //getCurrentVoltageB5 ()
/**
* AD convert of A5 channel and translate value to Celsius
* According to the algorithm described in C2000 documentation
*/ int ADConverter : :getCurrentTemperature ( ) { //SOC14/INT6 float const ADC_CELSIUS_RESOLUTION = 0.18F; float const ADC_CELSIUS_0 = 1750. OF * ADC_CELSIUS_RESOLUTION; static int result;
EALLOW ; /* wait for ADC start */
//while ( system. rAdcRegs .ADCSOCFLG1. bit .SOC14 == 0); system. rAdcRegs .ADCS0CFRC1.bit .SOC5 = 1; //<force next conversion
/* wait for ADC start */ while (this->system. rAdcRegs .ADCSQCFLG1.bit .SOC5 != 0) ; /* wait for EOC14 === ADCINT6 */ while (this->system. rAdcRegs. ADCINTFLG. bit .ADCINT6 == 0); result = ADC_CELSIUS_RESOLUTION*system.rAdcResultRegs.ADCRESULT5 - ADC_CELSIUS_0; //<read temperature
/* clear ADCINT6 interrupt flag */ system. rAdcRegs. ADCINTFLGCLR. bit.ADCINTβ = 1 ;
EDIS; return result; } //getCurrentTemperature ( )
/**
* ADC calibration
* According to the C2000 documentation */ void ADConverter : :Zero_Offset_Cal () {. unsigned offset = 0; EALLOW ; system. rAdcRegs .ADCOFFTRIM. all = 0x50; system. rAdcRegs .ADCCTLl .bit .VREFLOCONV = 1; EDIS; for (int i = 0; i < 32; ++i) { offset += getCurrentVoltageB5 ( ) ;
}
EALLOW ; system. rAdcRegs. ADCOFFTRIM. all = (0x50 - (offset >> 5)); EDIS;
} //Zero_Offset_Cal () /* *
* Converts value calculated from ADC samples
* to the value of the calibration table entry
*/ float calculateByCalibrationTable (MeasurementChannel const& chan, float adc) { unsigned mchan = chan. MCHAN; unsigned n = ctNextEntry [mchan] ; if (n < 2) { return 0.0f;
} adc *= ADC_PACK_FACTOR ; unsigned c, f; float cur, ce, fl; bool hasFloor = false, hasCeil = false; for (unsigned i = 0; i < n,- ++i) { cur = ct [mchan] [i] . C; if (cur <= adc && (IhasFloor || cur > fl)) { hasFloor = true; f = i; fl = cur;
} if (cur > adc && ( IhasCeil | | cur < ce) ) { hasCeil = true; c = i; ce = cur;
float result; if (IhasCeil) { result = adc * ct [mchan] [f] .p / fl; } else if (IhasFloor) { result = adc * ct [mchan] [c] .p / ce; } else { result = ct [mchan] [f] .p + (ct [mchan] [c] .p - ct [mchan] [f] . p)* (adc - fl)/(ce - fl) ; } return result; } //calculateByCalibrationTable ()
/**
* Convert ADC's RMS voltage value to real physical value */ float calculateValue (MeasurementChannel constSc chan, float adc) return calculateByCalibrationTable (chan, adc) / chan. CHANNEL-SCALE-FACTOR; } //calculateValueO
unsigned calculateScaledValue (MeasurementChannel const& chan, float adc) { return calculateByCalibrationTable (chan, adc); } //calculateScaledValue ()
/** * AD convert result for sending via serial port
*/ class ADCResults { static char AMPS-LINE [] static char AMPS_OVER[] static char SRCV-LINE [] static char TEMP-LINE [] static char M12V_LINE[] static char B3V3_LINE[] static const int MCHAN_POS = 0; static const int M12V_POS = 5; static const int BAT_POS = 5; static const int CHAN_POS = 17; static const int A_V_POS = 2;
//static const int NAME-POS = 21; static const int VRMS_POS = 20; static const int P_POS = 14; static const int PF_POS = 9; static const int HZ-POS = 9; static const int TEMP-POS = 3; static const int TEMP-DIFF-POS = 8; char const* createLine (MeasurementChannel const& channel, char* const LINE, float, unsigned) const;
ADConverter& adc,- public : static const char HEADERU; char const* createLine (AmpsChannel const& channel) const; char const* createLine (VoltageChannel const& channel) const; char const* createTemperatureLine ( ) const; char const* createl2VMonLine ( ) const; char const* createBatteryLine ( ) const;
ADCResults (ADConverterSc c) ; static unsigned const LINELENGTH; } ; //class ADCResults
const char ADCResults: : HEADER [] = "F/W VER " ; char ADCResults: : AMPS LINEU = "X=XX. XA .XXPF XXXXW XXX\r\n" ; char ADCResults: :AMPS_OVER [] = "****** 'OVER RANGE *****\r\n",- char ADCResults: :SRCV_LINE[] = "X=XXX.xv XX.XXHz X: XXX\r\n"; char ADCResults: :TEMP_LINE[] = "T= XXC\r\n"; char ADCResults: :M12V_LINE[] = "12V= XX.XV\r\n"; char ADCResults: :B3V3_LINE[] = "BAT= X.XXV\r\n"; unsigned const ADCResults : :LINE_LENGTH = lengthof (ADCResults : :AMPS_LINE) ;
ADCResults :: ADCResults (ADConverter& c) : adc(c) { } //ADCResults : :ADCResults
char const* ADCResults :: createTemperatureLine () const { float currentTemperature = adc .getCurrentTemperature ( ) ; digits (currentTemperature, 10. Of, 2, 5-ADCResultS: : TEMP_LINE [ADCResults: :TEMP_POS] ) ; return ADCResults: : TEMP-LINE; } //ADCResults: : createTemperatureLine ()
char const* ADCResults : :createl2VMonLine () const { digits(adc.getl2V() , 10. Of, 3, iADCResultS: :M12V_LINE [ADCResults: :M12V_POS] ) ; return ADCResults: :M12V_LINE; } //ADCResults : :createl2VMonLine ()
char const* ADCResults :: createBatteryLine () const { digits (adc. getBattery (), l.Of, 3,
&ADCResultS: : B3V3_LINE [ADCResults : :BAT_POS] ) ; return ADCResults : :B3V3_LINE; } //ADCResults : : createBatteryLine ( )
inline char const* ADCResults :: createLine (
AmpsChannel const& channel) const { digits (channel. P, 1000. Of, 4, tADCResults : : AMPS_LINE [P_POS] ) ; digits (channel. PF, O.lf, 2, kADCResults : :AMPS_LINE [PF_POS] ) ; return this- >createLine (channel, ADCResults : :AMPS_LINE, 10. Of, 3) ; } //ADCResults :: createLine ()
inline char const* ADCResults :: createLine (
VoltageChannel const& channel) const { digits (channel. frequency, 10. Of, 4, &ADCResults : : SRCV_LINE [HZ_POS] ) ; SRCV_LINE[CHAN_POS] = digit (channel .MCHAN) ; return this- >createLine (channel , ADCResults :: SRCV_LINE, 100. Of, 4 ) ; } //ADCResults :: createLine ()
inline char const* ADCResults :: createLine (
MeasurementChannel const& channel, char* const LINE, float const first, unsigned const dgs) const { float value = calculateValue (channel , channel .Vrms) ; digits (channel. Vrms, O.lf, 3, &LINE [VRMS-POS] ); const char* name = channel .ADCName (); LINE [MCHAN_P0S] = channel . sign; digits (value, first, dgs, &LINE [A_V_POS] ) ; return LINE; } //ADCResults : :createLine ()
void calculateDFTlOO (unsigned k, float const* const samples, float* const re, float* const im) ;
/**
* Calculate frequency using DFT */ float calculateFrequency (float const* const samples, float const DC, float const RMS) { /* static float const ALFA = 2.Of; Return should be: return FO +- DF*std: : sqrt ( 1.0 - std: :pow (dft [DFT] [1] , ALFA*0.5f)); Since ALFA*0.5f == 1, return was optimized the following way: FO +- DF*Std: :sqrt (1.0 - Std : : pow (dft [DFT] [1] , ALFA*0.5f)) == == FO +- DF*Std: :sqrt (1.0 - Std : :pow (dft [DFT] [ 1] , 1.Of)) == == FO +- DF*std: :sqrt (1.0 - dft [DFT] [I]) See below
*/ static float const DF = 6.Of; static unsigned const FREQS = 7; //<'10-70Hz with 10Hz step static unsigned const F50HZ = 4, F60HZ = 5; float re, im, dft [FREQS] [2] ;
for (unsigned k = 0 ; k < FREQS; ++k) { calculateDFTlOO (k + 1, samples, &re, &im) ; dft [k] [0] = re,- dft [k] [1] = im;
} dft [F50HZ] [1] = dft [F50HZ] [0] *dft [F50HZ] [0] + dft [F50HZ] [1] *df t [F50HZ] [1] ; dft [F60HZ] [1] = dft [F60HZ] [0] *dft [F60HZ] [0] + dft [F60HZ] [1] *df t [F60HZ] [1] ; unsigned const DFT = df t [F50HZ] [1] > df t [F60HZ] [1] ? F50HZ : F60HZ; float const FO = ( DFT == F50HZ ? 50.Of : 60. Of) ; dft [DFT] [I] /= 50.0f*RMS - 0.5f*DC*DC; if (dft [DFT] [I] < 0.5f) { return 0.Of; } if (dft [DFT] [1] > 1.Of) { dfC [DFT] [1] = 1.Of ;
} bool first = ( (dft [0] [0] - df t [1] [0] ) > 0.Of) ; for (unsigned i = 1; i < DFT; ++i) { if (first != ( (dft[i] [0] - df t [i + I] [O] ) > 0.Of)) { return FO - DF*std: : sqrt (1.0 - dft [DFT] [1] ) ;
} } return FO + DF*std : : sqrt (1.0 - dft [DFT] [1] ); } //calculateFrequency ( )
/** * Calculate the power of two channels
* as sum of products of amps by voltage */ void calculatePower (unsigned triple, float* const Pl, float* const P2) float *pθ = fvoltages [0] , *pl = fvoltages [1] , *p2 = fvoltages [2] ; *pθ = static_cast<float> (voltages [triple] [0] .voltage [0] ); *pl = static_cast<float> (voltages [triple] [0] .voltage [1] ),- *p2 = static_cast<float> (voltages [triple] [0] .voltage [2] ); *P1 = *pθ * (*pl) ; *P2 = *pθ * (*p2) ; ++pθ, ++pl, ++p2; for (int 1 = 1; i < SAMPLES_PER_TIME_SLOT; ++i, ++pθ, ++pl, ++p2) *pθ = static_cast<float> (voltages [triple] [i] .voltage [0] ); *pl = static_cast<float> (voltages [triple] [i] .voltage [1] ); *p2 = static_cast<float> (voltages [triple] [i] .voltage [2] ); *P1 += *pθ * (*pl) ;
*P2 += *pθ * (*p2) ;
}
*P1 *= ADC_SQ_VOLTAGE_RESOLUTION / (float ) SAMPLES_PER_TIME_SLOT; *P2 *= ADC_SQ_VOLTAGE_RESOLUTION / (float ) SAMPLES_PER_TIME_SLOT; } //calculatePower ()
/**
* Process samples of AD convert,
* l. e. calculate DC and RMS values */ void processSamples (unsigned const j, unsigned const k, float* const vrms, float* const rms, unsigned long* const dc, float* const vdc, float const* const fv) { *rms = 0.0F; *dc = OL,- float const* pv = fv,- for ( int 1 = 0 ; i < SAMPLES_PER_TIME_SLOT ; ++ i , ++pv) { *dc += vol tages [3 ] [1 ] . voltage [k] ; *rms += *pv * ( *pv) ; } / /for 1 *vdc = *dc ,-
*vrms = std : : sqrt (
*rms*SAMPLES_PER_TIME_SLOT - *vdc**vdc ) / SAMPLES_PER_TIME_SLOT * ADC_VOLTAGE_RESOLUTION; *vdc *= ADC_VOLTAGE_RESOLUTION / (float ) SAMPLES_PER_TIME_SLOT; }
/**
* Process the results of AD converts
*/ void calculateResults (Systems system) { unit globalUsec = system. timer () .getUsec (); unit nowUsec ,- for (int : = 0; ] < TRIPLE_NUMBER; ++]) { nowUsec = system. timer () .getUsec (); calculatePower (j , & (AmpsChannel :: S [triples [3]. second] . P) ,
& (AmpsChannel : : S [triples [j ] . third] . P) ) ; nowUsec = system. timer () .getUsecSinceUsec (nowUsec) ; if (nowUsec > log .maxCalculatePowerUsec) { log .maxCalculatePowerUsec = nowUsec ; } for (unsigned k = 0; k < 3; ++k) {
MeasurementChannel& chan = triples []] [k] ; nowUsec = system. timer () .getUsec (); processSamples (3 , k, & (chan. Vrms) , &(chan.RMS), &(chan.DC), &(chan.Vdc), fvoltages [k] ) ; nowUsec = system. timer () .getUsecSinceUsec (nowUsec) ; if (nowUsec > log .maxProcessSamplesUsec) { log.maxProcessSamplesUsec = nowUsec ;
> if (k) { //AmpsChannel
/**
* Exclude the part of the power added by DC
* to satisfy ADC input range
*/ (k == 1 ? AmpsChannel : :S [triples []]. second] . P :
AmpsChannel . :S [triples [j ] . third] . P) -= triples [3] [0] . Vdc*triples [j J [k] .Vdc,- /**
* Calculate the power factor as the ration of the power * and product of amps and volts
*/ (k == 1 ? AmpsChannel : :S [triples (j ]. second] . PF :
AmpsChannel : : S (triples [j ] . third] . PF) = (k == 1 ? AmpsChannel : :S [triples [j ]. second] . P :
AmpsChannel : : S (triples [j ] . third] . P) / triples [j] [0] .Vrms / triples [j] [k] .Vrms;
/** * Remove 90 degrees phase shift from power factor
*/
(k == 1 ? AmpsChannel :: S [triples [j ]. second] . PF : AmpsChannel : :S [triples [j] .third] .PF) =
1 - (k == 1 ? AmpsChannel :: S [triples []]. second] . PF
AmpsChannel: : S [triples [j ] .third] .PF) * (k == 1 ? AmpsChannel : :S [triples [j ]. second] . PF :
AmpsChannel : :S [triples [3] . third] . PF) ; (k == 1 ? AmpsChannel : :S [triples [j ]. second] . PF :
AmpsChannel : :S [triples [j ]. third] . PF) = ( (k == 1 ? AmpsChannel : :S [triples [j] .second] . PF :
AmpsChannel : :S [triples []]. third] . PF) < 0. Of ? 0.0f : std: :sqrt (k == 1 ? AmpsChannel : :S [triples [j ]. second] . PF :
AmpsChannel : : S [triples [j ] . third] . PF) ) ;
} //if AmpsChannel unsigned mchan = triples!]] [k] .MCHAN; nowUsec = system. timer () .getUsec (); if (mchan < MeasurementChannel : : MEASUREMENT_CHANNELS ) { if (GEL_isPreciseValuesReady && ! willCalibrate) { lastResults .add (mchan, chan.Vrms) ; GEL_CalculatedValues [mchan] = calculateScaledValue (chan, lastResults .getValue (mchan) ) ;
} system. lcdcontrol->setChannel (mchan, calculateValue (chan, chan.Vrms) ) ; if (mchan < 2 && 3 < 2) { //voltage channel chan .'frequency = calculateFrequency (fvoltages [k] , chan. DC, chan . RMS) ; float dFreq = chan. frequency/ 10. Of - static_cast<unsigned> (chan. frequency/10. Of ); if (dFreq > 0.5f) { dFreq -= 0.5f; } else if (dFreq < 0.Of) { dFreq += 0.5f; } if (dFreq* 10. Of > log.maxFreguencyDeviation) { log.maxFrequencyDeviation = dFreq*10. Of ;
}
} //if voltage channel } //if measurement channel nowUsec = system. timer () .getUsecSinceUsec (nowUsec) ; if (nowUsec > log.maxCalculateFreqυencyUsec) { log .maxCalculateFrequencyUsec = nowUsec ;
>
} //for k } //for ] if (VoltageChannel: :VOLTAGE_CHANNELS >= 2 && std : : fabs (VoltageChannel : : S [0] . frequency -
VoltageChannel: .S[I] .frequency)
> std: : fabs (log. worstFrequencyA - log.worstFrequencyB) ) { log. worstFrequencyA = VoltageChannel : :S [0] . frequency; log.worstFrequencyB = VoltageChannel : :S [1] . frequency;
} globalUsec = system. timer () .getUsecSinceUsec (globalUsec) ; if (globalUsec > log.maxCalculateUsec) { log.maxCalculateUsec = globalUsec;
} system. lcdcontrol- >tick ( ) ;
//todo: Check beep issues // if (system. lcdcontrol- >isAlarm( )) { // system, led- >bnghtenBacklight (); // } else { // system. lcd->dimBacklight ();
// ) lastResuIts .next ( ) ; } //calculateResultsO
/**
* Sends the result of calculations via serial port */ void sendToSerial (Systems system) { system. serial- >sendVT100ClsHome ( ) ; system, serial- >sendBytes (ADCResults : : HEADER) ,- system, serial ->sendBytes (System: :FW_VER) ,- system. serial- >sendBytes ( "\r\n" ) ; ADCResults adcs (*system.adc) ,• for (VoltageChannel const* pchan = VoltageChannel :: S; pchan ' = VoltageChannel : :S +
VoltageChannel: : VOLTAGE_CHANNELS; ++pchan) { char const* toStream = adcs . createLine (*pchan) ; system serial->sendBytes (toStream) ; for (AmpsChannel const* pchan = AmpsChannel : :S; pchan != endof (AmpsChannel :: S) ; ++pchan) { char const* toStream = adcs .createLine (*pchan) ; system. serial ->sendBytes (toStream) ; } system. serial- >sendBytes (adcs .createTemperatureLine ( ) ) ; system. serial ->sendBytes (adcs .create12VMonLine ( ) ) ; system. serial ->sendBytes (adcs .createBatteryLine ( ) ) ; } //sendToSenal ( )
void handlelntegrityError ( ) { } //handlelntegrityError ()
/** * Add one calibration table entry for each channel
*/ void calibrate (System& system) { for (unsigned i = 0; i < MeasurementChannel : :MEASUREMENT_CHANNELS; ++i) addCalibrationTableEntry (i, GEL_PreciseValues [i] ) ;
> } //calibrate ()
inline unsigned ADCSOCCTL (unsigned trigger, unsigned channel, unsigned acqps) { return (trigger << 11) | (channel << 6) | (acqps); } //ADCSOCCTLO
/** * Initialize the controller
*/ void prepareHandle (SystemSt system) { unit const WAITING_BEFORE_ADC_USEC = 1000; unsigned const SW_TRIG = 0; //<by software unsigned const MIN_ACQPS = 6; //<min ACQPS value
EALLOW;
/* ADCINT trips after AdcResults latch */ system. rAdcRegs. ADCCTLl. bit. INTPULSEPOS = 1; /* Wire temperature sensor output to ADCINA5 */ system. rAdcRegs .ADCCTLl. bit .TEMPCONV = 1,-
static volatile unsigned* const SOCCTL = Scsystem. rAdcRegs . ADCSOCOCTL all ; for (unsigned i = 0; i < 16; ++i) {
SOCCTL[I] = ADCSOCCTL(SW TRIG, l, MIN ACQPS); } system. rAdcRegs . INTSEL7N8. bit. INT7E = l; //<Enabled ADCINT7 system. rAdcRegs . INTSEL7N8. bit. INT7CONT = 0; /*<Disable ADCINT7 * Continuous mode
*/
/**
* Program SOC13 for ADC-B5 (to adjust zero offset bias) . , */ system. rAdcRegs. INTSEL5N6.bit . INT5E = 1; //<Enabled ADCINT5 system. rAdcRegs. INTSEL5N6. bit. INT5CONT = 0; /*<Disable ADCINT5
* Continuous mode */ /* setup EOC13 to trigger ADCINT5 to fire */ system. rAdcRegs. INTSEL5N6. bit. INT5SEL = 13;
/**
* Program SOC13 for ADC-A5 (temperature sensor) */ system. rAdcRegs. INTSEL5N6. bit. INT6E = 1; //<Enabled ADCINT6 system. rAdcRegs. INTSEL5N6. bit. INT6CONT = 0; /*<Disable ADCINT6
* Continuous mode
*/ /* setup EOC14 to trigger ADCINT6 to fire */ system. rAdcRegs. INTSEL5N6. bit. INT6SEL = 5;
EDIS; unit adcWasInitialized = system. timer () .getUsec( ); system. serial->mitSerial ();
Uintlβ* q = &Flash28_API_RunStart; for (Uintlβ const* p = &Flash28_API_LoadStart ; p != &Flash28_API_LoadEnd; ++p) { *q = *p; ++q;
}
Flash_CPUScaleFactorRef = SCALE_FACTOR ; Flash_CallbackPtrRef = 0; calculateNextEntry ( ) ; ftifdef FPDU if (ctNextEntry [0] > 0) { isCalibrated = true,- delete system. lcdcontrol; delete system. led; system. led = new LCD(system); system. lcdcontrol = new LCDControl (* (system. led) , system); #endi f
GEL_isPreciseValuesReady = Oxffff,- willCalibrate = false,- while (system, timer () .getUsecSmceUsec (adcWasInitialized) <
WAITING_BEFORE_ADC_USEC) ; system. adc->Zero_Offset_Cal ( ) ; } //prepareHandle ( )
/**
* The main program loop
*/ void start (Systems system) {
//static unit const SCHEDULE_CONVERT_MSEC = 100; static unit const SCHEDULE_CONVERT_USEC = 10000; //10 ms static unit const SCHEDULE_BEEP_U$EC = 500000; Static unit const MEASUREMENT_PERIOD_USEC = 1000; //1 msec log.maxIterationEndUsec = SCHEDULE_BEEP_USEC,- prepareHandle (system) ; while (system. timer () .getUsec () <= SCHEDULE_BEEP_USEC) ; unit nowUsec ; while (true) {
//0ms - beep off while (system. timer () .getUsec () >= SCHEDULE_BEEP_USEC) ; system, led- >turnBeeperOff (),-
//10ms - 250ms - measurement (convert) nowUsec = system. timer () .getUsec (); if (log .maxConvertStartUsec < nowUsec) { log.maxConvertStartUsec = nowUsec ; } if (nowUsec > SCHEDULE_CONVERT_USEC) { while (system. timer () .getUsec () > SCHEDULE_CONVERT_USEC) ;
} unit nextConvertUsec = SCHEDULE_CONVERT_USEC; for (unsigned t = 0; t < TRIPLE_NUMBER >> 1; ++t) { for (unsigned s = 0; s < SAMPLES_PER_TIME_SLOT;
++s, nextConvertUsec += MEASUREMENT_PERIOD_USEC) while (system. timer () .getUsec () < nextConvertUsec); system. adc- >getCurrentVoltages (t << 1, s) ; while (system. timer () .getUsec () < nextConvertUsec +
(MEASUREMENT_PERIOD_USEC >> I)); system. adc- >getCurrentVoltages (1 | (t << 1), s) ; } ) calculateResults (system) ;
//500ms - beep, handle / calculations while (system. timer ( ) . getUsec O < SCHEDULE_BEEP_USEC) ; if ( system . lcdcontrol - >isAlarm ( ) ) { system . led- >turnBeeperOn ( ) ;
} nowUsec = system, timer () .getUsec O; sendToSerial (system) ; if ( !GEL_isPreciseValuesReady) { willCalibrate = true;
} else if (Oxffff != GEL_isPreciseValuesReady) { --GEL_isPreciseValuesReady; if (willCalibrate) { unit tCalibration = system, timer () .getUsec O; calibrate (system) ; tCalibration = system. timer () .getUsecSinceUsec (tCalibration) ; if (log.maxCalibrationUsec < tCalibration) { log .maxCalibrationUsec = tCalibration;
} willCalibrate = false,- }
} nowUsec = system. timer () .getUsecSinceUsec (nowUsec) ; if (nowUsec > log .maxStreamTimeUsec) { log.maxStreamTimeUsec = nowUsec ; } unit nowUsec = system. timer () .getUsec (); if (log.maxIterationEndUsec >= SCHEDULE_BEEP_USEC && log.maxIterationEndUsec < nowUsec) { log.maxIterationEndUsec = nowUsec; } else if (log.maxIterationEndUsec < SCHEDULE_BEEP_USEC && nowUsec < SCHEDULE_BEEP_USEC && log.maxIterationEndUsec < nowUsec) { log.maxIterationEndUsec = nowUsec ;
} else if (log.maxIterationEndUsec >= SCHEDULE_BEEP_USEC && nowUsec < SCHEDULE_BEEP_USEC) { log.maxIterationEndUsec = nowUsec,
}
} //while true } //start ()
Industrial Applicability
Although the present invention has been described in terms of the presently preferred embodiment, it is to be understood that such disclosure is purely illustrative and is not to be interpreted as limiting. For example, while the control and sensing circuits respectively depicted in FIGs. 3, 4 and 5 include the transformer 162 to provide an accurate reference signal for AC power received by the electrical appliance 20, the computer program executed by the processor 138 can numerically assess less accurately phase difference between:
1. the voltage of AC power supplied to the electrical appliance 20 via the AC power input cable 22; and
2. AC current flowing through the series connected set of contacts 52 and the load 72.
Therefore, sacrificing precision a control and sensing circuit in accordance with the present disclosure may omit the transformer 162.
As described above for the control and sensing circuit depicted in FIG. 3, the loop of wire 152 juxtaposed with the coil 54 increases magnetic coupling between AC current flowing through the set of contacts 52 and the load 72. If as depicted in FIGs. 2A- 2C the relays 44 are mounted on a printed circuit board, the AC current flowing through the set of contacts 52 can be routed instead through one or more PCB traces that are:
1. near the mounting location of the relays 44: and
2. arranged with respect to the coil 54 to increase coupling between the magnetic field produced by the AC current flowing through the set of contacts 52 and the load 72.
For increased safety the relay 44 preferably has a normally open set of contacts 52 so a load 72 receives AC electrical power only if the electrical appliance 20 operates properly. However, an equivalently safe circuit can be implemented using a relay 44 having a normally closed set of contacts 52 if the set of contacts 52 connect to the source of electrical power in series with another relay having normally open contacts. Sensing AC electrical current flowing through a load and a set of normally closed set of contacts 52 included in a circuit such as that depicted in FIGs. 4 or 5 provides a better voltage signal from the coil 54 to the microcontroller 46 because the NPN transistor 82 will be turned off when AC electrical current flows through the load 72 thereby leaving the second terminal 112 of the coil 54 electrically coupled to only the input pin 144 of the microcontroller 46.
Another alternative is a electrical appliance 20 in accordance with the present disclosure that also includes outlet plugs 24 which provide AC power that cannot be controlled remotely to devices that must always operate. To prevent unexpected shutdowns or start-ups, the electrical appliance 20 may also include front panel switches for selectively locking AC electrical power either on or off to sets of outlet plugs 24 that are remotely controllable .
Consequently, without departing from the spirit and scope of the disclosure, various alterations, modifications, and/or alternative applications of the disclosure will, no doubt, be suggested to those skilled in the art after having read the preceding disclosure. Accordingly, it is intended that the following claims be interpreted .as encompassing all alterations, modifications, or alternative applications as fall within the true spirit and scope of the disclosure.

Claims

The ClaimsWhat is claimed is:
1. A control and sensing circuit for selectively- supplying alternating current ("AC") electrical power to a load, the control and sensing circuit comprising: a. a relay that includes: i . at least one set of contacts that are connectable in series between a source of AC electrical power 'and the load; and ii. an electromagnet that includes a coil of insulated wire which upon supplying an electrical current to the coil changes the set of contacts between :
A. a closed state in which the load receives AC electrical power; and
B. an open state in which the load does not receive AC electrical power; b. a coil energizing switch connected in series with the coil and with a source of relay energizing electrical power which coil energizing switch: i. in a first state does not supply electrical current to the coil; and ii. in a second state supplies electrical current to the coil for changing the set of contacts between the open state and the closed state; and c . an AC voltage sensing circuit coupled to the coil for measuring an AC voltage induced in the coil by AC electrical current flowing through the set of contacts and the load when the set of contacts are in the closed state in which the load receives AC electrical power from the source thereof.
2. The control and sensing circuit of claim 1 wherein the AC voltage sensing circuit measures the induced AC voltage during a brief interval throughout which the coil energizing switch does not does not supply electrical current to the coil.
3. The control and sensing circuit of claim 1 wherein measurement of the induced AC voltage by the AC voltage sensing circuit is synchronized with AC electrical power supplied by the source of AC electrical power.
4. The control and sensing circuit of claim 1 wherein the AC voltage sensing circuit also receives an AC reference signal that is in phase with voltage of the source of AC electrical power thereby permitting the control and sensing circuit to determine any phase difference between AC electrical current flowing through the load and voltage of the source of AC electrical power. •
5. The control and sensing circuit of claim 1 wherein the AC voltage sensing circuit determines from the measurement of induced AC voltage a characteristic of AC electrical power supplied to the load selected from a' group consisting of: a. root mean square ("RMS") AC electrical current flowing through the load; b. RMS AC voltage across the load; c. power factor of AC electrical power being supplied to the load; and d . AC electrical power dissipated in the load.
6. The control and sensing. circuit of claim 1 wherein the measurement of AC electrical current produced by the AC voltage sensing circuit is compensated for characteristics of coupling between AC electrical current flowing through: a. the set of contacts of the relay; and b. the coil of the relay'.
7. The control and sensing circuit of claim 1 wherein the AC voltage sensing circuit includes an analog- to-digital converter ("ADC") that is coupled to the coil for measuring the induced AC voltage.
8. The control and sensing circuit of claim 7 wherein the AC voltage sensing circuit further includes a capacitor connected in series between the coil and the ADC.
9. The control and sensing circuit of claim 7 further including a processor that processes digital measurements produced by the ADC of the induced AC voltage by performing an operation selected from a group consisting of: a. averaging the digital measurement; b. reducing noise present in the digital measurement; c. compensating for characteristics of coupling between : i. AC electrical current flowing through the set of contacts of the relay; and ii. the coil of the relay; d. determining a characteristic of AC electrical power supplied to the load selected from a group consisting of : i. RMS AC electrical" current flowing through the load; ii. RMS AC voltage across the load; iii. AC electrical power dissipated in the load; iv. power factor of AC electrical power being supplied to the load; and v. actual true power dissipation measured in units selected from a group consisting of watt-hours and kilowatt -hours, the actual true power dissipation being determined using the deter- mined power factor.
10. The control and sensing circuit of claim 1 wherein the set of contacts are in the closed state when the coil energizing switch supplies electrical current to the coil .
11. The control and sensing circuit of claim 10 further comprising a length of electrically conductive material connected in series with the set of contacts that is juxtaposed with the coil for increasing coupling between the coil and AC electrical current flowing through the set of contacts and the load .
12. The control and sensing circuit of claim 1 wherein the set of contacts are in the open state when the coil energizing switch supplies electrical current to the coil.
13. An electrical appliance whose operation is energized by AC electrical power, the electrical appliance comprising: a. a load that receives AC electrical power; and b. a control and sensing circuit for selectively supplying AC electrical power to the load, the control and sensing circuit including: l. a relay that includes:
A. at least one set of contacts that are connectable in series between a source of AC electrical power and the load; and
B. an electromagnet that includes a coil of insulated wire which upon supplying an electrical current to the coil changes the set of contacts between: I. a closed state in which the load receives AC electrical power; and II. an open state in which the load does not receive AC electrical power; ii. a coil energizing switch connected in series with the coil and with a source of relay energizing electrical power which coil energizing switch:
A. in a first state does not supply electrical current to the coil; and B . in a second state supplies electrical current to the coil for changing the set of contacts between the open state and the closed state; and iii. an AC voltage sensing circuit coupled to the coil for measuring an AC voltage induced in the coil by AC electrical current flowing through the set of contacts and the load when the set of contacts are in the closed state in which the load receives AC electrical power from the source thereof.
14. The control and sensing circuit included in the electrical appliance of claim 13' wherein the AC voltage sensing circuit measures the induced AC voltage during a brief interval throughout which the coil energizing switch does not does not supply electrical current to the coil .
15. The control and sensing circuit included in the electrical appliance of claim 13 wherein measurement of the induced AC voltage by the AC voltage sensing circuit is synchronized with AC electrical power supplied by the source of AC electrical power.
16. The control and sensing circuit included in the electrical appliance of claim 13, wherein the AC voltage sensing circuit also receives an AC reference signal that is in phase with voltage of the source of AC electrical power thereby permitting the control and sensing circuit to determine any phase difference between AC electrical current flowing through the load and voltage of the source of AC electrical power.
17. The control and sensing circuit included in the electrical appliance of claim 13 wherein the AC voltage sensing circuit determines from the measurement of induced AC voltage a characteristic of AC electrical power supplied to the load selected from a group consisting of : a. root mean square ("RMS") AC electrical current flowing through the load; b. RMS AC voltage across the load; c. power factor of AC electrical power being supplied to the load; and d. AC electrical power dissipated in the load.
18. The control and sensing circuit included in the electrical appliance of claim 13- wherein the measurement of AC electrical current produced by the AC voltage sensing circuit is compensated for characteristics of coupling between AC electrical current flowing through: a. the set of contacts of the relay; and b. the coil of the relay. .
19. The control and sensing circuit included in the electrical appliance of claim 13 wherein the AC voltage sensing circuit includes an ADC that is coupled to the coil for measuring the induced AC voltage.
20. The control and sensing circuit included in the electrical appliance of claim 19 wherein the AC voltage sensing circuit further includes a capacitor connected in series between the coil and the ADC.
21. The control and sensing circuit' included in the electrical appliance of claim 19 further including a processor that processes digital measurements produced by the ADC of the induced AC voltage by performing an operation selected from a group consisting of : a. averaging the digital, measurement ; b. reducing noise present in the digital measurement; c. compensating for characteristics of coupling between: i . AC electrical current flowing through the set of contacts of the relay; and ii . the coil of the relay-; d. determining a characteristic of AC electrical power supplied to the load selected from a group consist- ing of: i. RMS AC electrical- current flowing through the load; ii. RMS AC voltage across the load; iii. AC electrical power dissipated in the load; iv . power factor of AC electrical power being supplied to the load; and v. actual true power dissipation measured in units selected from a group consisting of watt-hours and kilowatt-hours, the actual true power dissipation being' determined using tfie""deter- mined power factor.
22. The control and sensing circuit included in the electrical appliance of claim 13 wherein the set of contacts are in the closed state when the coil energizing switch supplies electrical current to the coil.
23. The control and sensing circuit included in the electrical appliance of claim 22 further comprising a length of electrically conductive material connected in series with the set of contacts that is juxtaposed with the coil for increasing coupling between the coil and AC electrical current flowing through the set of contacts and the load.
24. The control and sensing circuit included in the electrical appliance of claim 1,3 wherein the set of contacts are in the open state, when the coil energizing switch supplies electrical current to the coil .
25. A method for selectively supplying AC electrical power to a load, the method comprising the steps of: a. supplying AC electrical current to the load through at least one set of contacts of a relay, the set of contacts being connectable in series between a source of AC electrical power and the load, the relay also including an electromagnet that includes a coil of insulated wire which upon receiving an electrical current changes the set of contacts between: i . a closed state in which the load receives AC electrical power;. and ii. an open state in which the load does not receive AC electrical power; b. supplying electrical current to the coil of the relay via a coil energizing switch connected in series with the coil and with a source of relay- energizing electrical power, the coil energizing switch being operable: i . in a first state in which the coil does not receive electrical current; and ii. in a second state in which the coil receives electrical current for changing the set of contacts between the open state and the closed state; and c. measuring an AC voltage induced in the coil by AC electrical current flowing through the set of contacts and the load when the set of contacts are in the closed state in which the load receives AC electrical power from the source thereof.
26. The method of claim 25 wherein measuring the AC voltage induced in the coil by AC electrical current flowing through the set of contacts occurs during a brief interval throughout which the coil energizing switch does not does not supply electrical current to the coil.
27. The method of claim 25 wherein measuring induced AC voltage by the AC voltage sensing circuit is synchronized with AC electrical power supplied by the source of AC electrical power .
28. The method of claim 25 wherein receiving an AC reference signal that is in phase with voltage of the source of AC electrical power by the AC voltage sensing circuit permits the control and sensing circuit to determine any phase difference between AC electrical current flowing through the load and voltage of the source of AC electrical power.
29. The method of claim 25 further comprising the step of the AC voltage sensing circuit determining from the measurement of induced AC voltage a characteristic of AC electrical power supplied to the load selected from a group consisting of: a. root mean square ("RMS") AC electrical current flowing through the load; b. RMS AC voltage across the load; c. power factor of AC electrical power being supplied to the load; and d. AC electrical power dissipated in the load.
30. The method of claim 25 further comprising the step of compensating the measurement' of AC electrical current produced by the AC voltage sensing circuit for characteristics of coupling between AC electrical current flowing through: a. the set of contacts of the relay; and b. the coil of the relay.
31. The method of claim 25 further comprising the step of coupling an ADC to the coil for measuring the induced AC voltage .
32. The method of claim 31 further comprising the step of coupling a capacitor in series between the coil and the ADC.
33. The method of claim 31 further comprising the step of coupling a processor to the ADC for performing an operation selected from a group consisting of: a. averaging the digital measurement; b. reducing noise present in the digital measurement; c. compensating for characteristics of coupling between: i. AC electrical current flowing through the set of contacts of the relay,- and ii. the coil of the relay; d. determining a characteristic of AC electrical power supplied to the load selected from a group consisting of : i . RMS AC electrical current flowing through the load; . ii . RMS AC voltage across the load; iii. AC electrical power dissipated in the load; iv. power factor of AC electrical power being supplied to the load and v. actual true power dissipation measured in units selected from a group consisting of watt-hours and kilowatt -hours, the actual true power dissipation being determined using the determined power factor.
34. The method of claim 31 further comprising the step of connecting a length of electrically conductive material in series with the set of contacts and juxtaposing the length of electrically conductive material with the coil for increasing coupling between the coil and AC electrical current flowing through the set of contacts and the load.
PCT/US2010/001383 2009-05-08 2010-05-10 Reduced parts count isolated ac current switching and sensing WO2010129071A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US13/381,958 US8975787B2 (en) 2009-05-08 2010-05-10 Reduced parts count isolated AC current switching and sensing

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US21571309P 2009-05-08 2009-05-08
US61/215,713 2009-05-08

Publications (1)

Publication Number Publication Date
WO2010129071A1 true WO2010129071A1 (en) 2010-11-11

Family

ID=43050341

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2010/001383 WO2010129071A1 (en) 2009-05-08 2010-05-10 Reduced parts count isolated ac current switching and sensing

Country Status (2)

Country Link
US (1) US8975787B2 (en)
WO (1) WO2010129071A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103149463A (en) * 2011-07-29 2013-06-12 特灵国际有限公司 System and method for heating ventilation and air conditioning component detection
CN104635112A (en) * 2015-01-30 2015-05-20 山东钢铁股份有限公司 Method and device for finding fault point of circuit breaker closing control loop
CN104678296A (en) * 2013-10-31 2015-06-03 李尔公司 System and method for monitoring relay contacts

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9257980B2 (en) 2011-10-06 2016-02-09 Microchip Technology Incorporated Measuring capacitance of a capacitive sensor with a microcontroller having digital outputs for driving a guard ring
US9252769B2 (en) 2011-10-07 2016-02-02 Microchip Technology Incorporated Microcontroller with optimized ADC controller
US9437093B2 (en) 2011-10-06 2016-09-06 Microchip Technology Incorporated Differential current measurements to determine ION current in the presence of leakage current
US9467141B2 (en) * 2011-10-07 2016-10-11 Microchip Technology Incorporated Measuring capacitance of a capacitive sensor with a microcontroller having an analog output for driving a guard ring
US9207209B2 (en) 2011-12-14 2015-12-08 Microchip Technology Incorporated Method and apparatus for detecting smoke in an ion chamber
US9176088B2 (en) 2011-12-14 2015-11-03 Microchip Technology Incorporated Method and apparatus for detecting smoke in an ion chamber
US9189940B2 (en) 2011-12-14 2015-11-17 Microchip Technology Incorporated Method and apparatus for detecting smoke in an ion chamber
US9823280B2 (en) 2011-12-21 2017-11-21 Microchip Technology Incorporated Current sensing with internal ADC capacitor
US9178447B2 (en) * 2013-11-22 2015-11-03 Emerson Electric Co. Control circuits for motors and related methods
US11092623B2 (en) * 2018-12-11 2021-08-17 Electronics And Telecommunications Research Institute Current sensor for measuring alternating electromagnetic wave and a current breaker using the same
US11709188B2 (en) * 2020-08-10 2023-07-25 Eaton Intelligent Power Limited Energy monitoring device
US11693035B2 (en) * 2020-08-10 2023-07-04 Abl Ip Holding Llc Sensing electrical characteristics via a relay coil

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5315527A (en) * 1992-01-03 1994-05-24 Beckwith Robert W Method and apparatus providing half-cycle digitization of AC signals by an analog-to-digital converter
US5457595A (en) * 1993-10-18 1995-10-10 Hubbell Incorporated Low-power relay operating circuit
US7212090B2 (en) * 2004-12-22 2007-05-01 International Controls And Measurements Corporation Relay with core conductor and current sensing

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS4942713B1 (en) 1970-11-09 1974-11-16
US4077061A (en) 1977-03-25 1978-02-28 Westinghouse Electric Corporation Digital processing and calculating AC electric energy metering system
US4182983A (en) 1978-07-11 1980-01-08 Westinghouse Electric Corp. Electronic AC electric energy measuring circuit
US4365302A (en) 1981-01-14 1982-12-21 Westinghouse Electric Corp. High accuracy AC electric energy metering system
US4578639A (en) 1984-03-02 1986-03-25 Westinghouse Electric Corp. Metering system for measuring parameters of high AC electric energy flowing in an electric conductor
DE3719298A1 (en) * 1987-06-10 1988-12-22 Bayerische Motoren Werke Ag METHOD FOR RELEASING THE CONTACTS OF AN ADHESIVE RELAY, AND CIRCUIT ARRANGEMENT FOR IMPLEMENTING THE METHOD
US4965755A (en) 1989-01-27 1990-10-23 Honeywell Inc. Method and apparatus for monitoring AC input signals
US5260647A (en) 1991-09-18 1993-11-09 Hewlett-Packard Company Measuring an AC signal value with sampling when the sampling interval does not exactly divide the AC signal's period
US5528134A (en) 1995-03-08 1996-06-18 Allen-Bradley Company, Inc. AC power analyzer
US5909064A (en) * 1997-07-16 1999-06-01 Siemens Electromechanical Components, Inc. Time delay relay circuit
US6445188B1 (en) 1999-04-27 2002-09-03 Tony Lutz Intelligent, self-monitoring AC power plug
US6661123B2 (en) * 2001-12-17 2003-12-09 Mitac International Corp. Power control circuit with power-off time delay control for microprocessor-based system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5315527A (en) * 1992-01-03 1994-05-24 Beckwith Robert W Method and apparatus providing half-cycle digitization of AC signals by an analog-to-digital converter
US5457595A (en) * 1993-10-18 1995-10-10 Hubbell Incorporated Low-power relay operating circuit
US7212090B2 (en) * 2004-12-22 2007-05-01 International Controls And Measurements Corporation Relay with core conductor and current sensing

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103149463A (en) * 2011-07-29 2013-06-12 特灵国际有限公司 System and method for heating ventilation and air conditioning component detection
CN103149463B (en) * 2011-07-29 2016-01-06 特灵国际有限公司 For the system and method that heating ventilation and air supply rate detect
CN104678296A (en) * 2013-10-31 2015-06-03 李尔公司 System and method for monitoring relay contacts
CN104635112A (en) * 2015-01-30 2015-05-20 山东钢铁股份有限公司 Method and device for finding fault point of circuit breaker closing control loop

Also Published As

Publication number Publication date
US8975787B2 (en) 2015-03-10
US20120112728A1 (en) 2012-05-10

Similar Documents

Publication Publication Date Title
WO2010129071A1 (en) Reduced parts count isolated ac current switching and sensing
JP5893052B2 (en) Wire manager with current and voltage sensing
US6708126B2 (en) Method and system for measuring current
US7493222B2 (en) High density metering system
US20100207604A1 (en) Branch current monitor with calibration
US10274572B2 (en) Calibration system for a power meter
US9435835B2 (en) Validation of electric power system monitoring systems
US7502699B2 (en) System and method for monitoring power in a front end rectifier power system
US9804211B2 (en) Indicators for a power meter
Yoeseph et al. Smart energy meter based on Arduino and internet of things
CN112485498A (en) Non-contact voltage measurement sensor and working method thereof
CN106483397B (en) A kind of electric energy quality detection device and measurement method of high-precision high bandwidth
US8744787B2 (en) Dynamic load estimation of multiple branch circuits
CN214041522U (en) Non-contact voltage measurement sensor
CN103913660A (en) Large-current intelligent digital welding system verification and calibration method
CN101387696B (en) Calibration system and method for digital alternating current-direct current tester
CN115932385A (en) Residual current monitoring method and system and single-phase intelligent electric energy meter
CN109375134A (en) Generator outlet voltage transformer internal fault on-line monitoring method and system
US11293955B2 (en) Energy metering for a building
AU2018301511B2 (en) Energy monitor
RU2739717C1 (en) Timer - mobile portable three-phase electric meter with data transmission radio channel
RU195905U1 (en) Timer - portable three-phase electric meter
CN102608561A (en) Electricity meter power consumption tester
Tobin et al. Remote current sensing on overhead power lines
JP6541068B2 (en) Circuit determination method, circuit determination system, and program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10772400

Country of ref document: EP

Kind code of ref document: A1

DPE1 Request for preliminary examination filed after expiration of 19th month from priority date (pct application filed from 20040101)
NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 13381958

Country of ref document: US

122 Ep: pct application non-entry in european phase

Ref document number: 10772400

Country of ref document: EP

Kind code of ref document: A1