Apparatus and method for sampling signals synchronous with analog to digital converter
First Claim
Patent Images
1. In an electronic device including an analog to digital converter (ADC) having result registers and a central processor unit (CPU), the method consisting of the steps of:
- a) providing a CPU program consisting of steps and loops,b) operating said ADC and CPU synchronously,c) continuously producing digital samples of analog signals every "t" cycles,d) storing said samples in said result registers,e) updating at least one of said result registers with new digital samples every "r" clock cycles, andf) reading said result registers integral multiples of "r'"'"'" clock cycles after said result registers are updated, wherein "r'"'"'" is not greater than "r",g) providing an ADC controller having continuous scan control bits, result register control bits, and input channel select bits,h) selecting analog signals by setting said input channel select bits,i) setting said continuous scan control bits to obtain ADC conversions in a continuous round robin fashion,j) directing digital samples to selected ones of said result registers by selection of said result register control bits, for sampling a selected analog signal on integral multiples of "t" clock cycles,k) adding do-nothing operations as required to make the run time for each step and each loop of said CPU program an integral multiple of "t" clock cycles, andl) obtaining samples of said selected analog signal by reading a selected result register during said steps and said loopsthereby maximizing the sampling rate of the selected analog signal and whereby said ADC and CPU programs operate synchronously to obtain digital samples of said analog signals.
0 Assignments
0 Petitions
Accused Products
Abstract
This invention provides various methods and techniques for providing a synchronous programming of a microcontroller and its associated analog to digital converter for a maximum rate of taking digital samples of alternating current analog signals which techniques are selectively combined to provide microcontroller based controls and protective relays such as for use with electric utilities.
-
Citations
21 Claims
-
1. In an electronic device including an analog to digital converter (ADC) having result registers and a central processor unit (CPU), the method consisting of the steps of:
-
a) providing a CPU program consisting of steps and loops, b) operating said ADC and CPU synchronously, c) continuously producing digital samples of analog signals every "t" cycles, d) storing said samples in said result registers, e) updating at least one of said result registers with new digital samples every "r" clock cycles, and f) reading said result registers integral multiples of "r'"'"'" clock cycles after said result registers are updated, wherein "r'"'"'" is not greater than "r", g) providing an ADC controller having continuous scan control bits, result register control bits, and input channel select bits, h) selecting analog signals by setting said input channel select bits, i) setting said continuous scan control bits to obtain ADC conversions in a continuous round robin fashion, j) directing digital samples to selected ones of said result registers by selection of said result register control bits, for sampling a selected analog signal on integral multiples of "t" clock cycles, k) adding do-nothing operations as required to make the run time for each step and each loop of said CPU program an integral multiple of "t" clock cycles, and l) obtaining samples of said selected analog signal by reading a selected result register during said steps and said loops thereby maximizing the sampling rate of the selected analog signal and whereby said ADC and CPU programs operate synchronously to obtain digital samples of said analog signals. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. In an electronic device including a central processor unit (CPU) operating at a constant clock frequency, the method comprising the steps of:
-
a) providing a program for said CPU consisting of program steps and program loops each operating in an integral multiple of a number of clock cycles, "t", b) summing said integral for each said step and each turn of said loop starting said sum at a first selected time and ending said sum at a second selected time, c) providing an analog to digital converter (ADC) for converting AC signals to digital samples, said ADC having an analog to digital conversion time equal to "t", d) reading digital samples at a first AC signal from said ADC with said program steps and said program loops operating synchronously with analog to digital conversions of said ADC, e) selecting a change in polarity of said first AC signal as said starting time, f) selecting the same change in polarity of a later cycle of said first AC signal as the ending point whereby said sum is a measure of the frequency of said AC signal. - View Dependent Claims (15, 16)
-
-
17. Apparatus for digitizing alternating current (AC) signals, each AC signal coming from a first and second signal terminal with the potential of said first terminal being the ground reference for said signal and with the signal potential of said second terminal alternating about said reference potential comprising, in combination,
a) clocking means providing clock cycles, b) analog-to-digital converter means (ADC) operable by said clocking means and having a conversion period equal to a predetermined number "t" of clock cycles, said ADC having at least one analog input, having a low and a high reference voltage input and having a range of operation starting with zero for an analog input equal to said low reference input voltage, c) processor means also operable by said clocking means, d) multiple result register means for storing digital samples converted by said ADC, e) said processor means running said ADC in a continuously scanning mode with conversions of the data of any selected analog input in a round robin fashion for storing in said multiple result registers wherein digital samples of each said AC signal are updated in integral numbers of clock cycles, f) means for connecting a high ADC reference voltage means to said high reference input, g) each of said second signal terminal being connected to a selected ADC analog input resulting in signals on said second terminals having a selected polarity which is the same as the polarity of said ADC high voltage reference, h) said ADC having said low reference input connected to a ground reference terminal to set the change of signal polarity to said ADC zero, i) said processor means containing programming steps which selectively repeat with said programming steps operating in integral multiples "m" of said "t" clock cycles and said programming steps operating synchronously with said continuous scanning mode of said ADC, j) said ADC providing periodic non-zero digital samples proportional to said AC signals whenever the polarity of said AC signal is the same as said high reference voltage and providing digital samples which are zero whenever said AC signals are not of the selected polarity, and k) means for processing said non-zero digital samples to make measurements to obtain parameters of said AC signals.
-
18. Apparatus for controlling and protecting electric power apparatus in response to measurement of volts per hertz in alternating current (AC) signals, three said AC signals being of the same frequency and representing the three phases voltages of a three phase circuit, comprising, each signal coming from a pair of terminals with the potential of one terminal being the ground reference for said signal and with the signal potential of the second terminal alternating about said reference potential, said apparatus comprising in combination,
a) means for providing clock cycles, b) a central processing unit (CPU) means operable by said clock cycles, c) an analog-to-digital converter means (ADC) operable by said clock cycles and having a conversion period equal to a predetermined number "t" of clock cycles, said ADC having at least one analog input, having a low and a high reference voltage input and having a range of operation starting with zero for an analog input equal to said low reference input voltage, d) means for connecting said three AC signals to said ADC means, e) means for setting said ADC to perform consecutive conversions on said three signals, f) means for connecting a high ADC reference voltage means to said high voltage reference input, g) means for connecting said ADC low reference input to each said AC signal ground reference terminal to set the change of signal polarity to ADC zero, h) said processor means operating said ADC in a continuously scanning mode to sequentially convert a selected one of said three AC signals into digital data and store said data in a round-robin fashion into multiple result registers, i) said processor means containing programming means consisting of steps which selectively repeat and with said programming steps operating in integral "m" multiples of "t" clock cycles to thereby operate synchronously with the continuous scanning mode of said ADC, j) said ADC means providing periodic non-zero digital samples proportional to said selected AC signals whenever the polarity of said selected AC signal is the same as said high reference voltage and providing digital samples which are zero whenever said AC signal is not of the selected polarity, and i) said processor means receiving and processing said digital samples to selectively determine the maximum amplitude among the three phase voltages, to enable determination of said AC signal frequency and said volts per hertz from which desired control and protection output signals may be obtained.
-
19. Apparatus for measuring, controlling and protecting electric power equipment in response to measurement of frequency comprising, in combination,
a) means for digitizing at least one alternating current (AC) signal, each said signal coming from a first and second terminal with the potential of said first terminal being the ground reference for said signal and with the signal potential of said second terminal alternating about said reference potential, b) a clocking means providing clocking cycles, c) an analog-to-digital converter means (ADC) operable by said clocking means, having at least one analog input, having a low and a high voltage reference input and having a range of operation starting with zero for an analog input equal to said low reference input voltage, d) a processor means operably responsive to said clocking means, e) multiple result register means for storing conversions of said ADC, f) said processor means operating said ADC in a continuously scanning mode with conversions of the data on any selected analog input in a round-robin fashion for storing in said multiple result registers wherein AC signals are updated on integral multiples of said conversion time of "t" clock cycles, g) means for providing a high ADC reference voltage to said ADC high voltage reference input, h) means for connecting at least one of said second AC signal terminal to a selected ADC analog input resulting in the signals on said associated second terminal having a selected polarity which is the same as the polarity of said ADC high reference voltage, i) said ADC means having said low voltage reference input connected to each said AC signal ground terminal to set a change of signal polarity to said ADC zero, j) said processor containing programming means consisting of steps which selectively repeat and with said programming steps operating in integral multiples of "t" clock cycles thereby forming a programming which operates synchronously with said continuous scanning mode of said ADC, k) said ADC means providing periodic non-zero digital samples proportional to said AC signals whenever the polarity of said AC signal is the same as said high reference voltage and providing zeros whenever said AC signal is not of the selected polarity, l) said processor means receiving and processing said digital samples to determine the approximate frequency from the time difference between changes from zero to non-zero samples at the start of two selected half cycles of said selected polarity, m) means for determining the maximum amplitude of each said selected half cycle, and n) means for processing the first non-zero sample of each said selected half cycle together with said maximum amplitudes of said selected half cycle to enhance the accuracy of the measurement of frequency of said AC signal.
-
20. Apparatus for digitizing alternating current (AC) signals comprising, in combination,
a) auxiliary transformer means with a center tapped secondary winding having a center tap terminal and with a first and a second terminal providing first and second signals of opposite polarity each of said first and second signals representing said AC signal and with the potential of said center tap terminal being the ground reference for said signal and with the signal potential of the first and the second terminal alternating about said reference potential, b) said auxiliary current transformer means having a primary winding coupled to receive one AC signal, c) analog-to-digital converter means (ADC) having at least one analog input representing said AC signal having a low and a high reference voltage input and having a range of operation starting with zero for an analog input equal to said low reference input voltage, d) a high ADC reference voltage connected to said high reference input, e) each said first and second terminals being connected to said ADC analog inputs resulting in signals on said first and second terminals having selected polarities which are the same as the polarity of said ADC high reference voltage, f) said ADC having said low reference input connected to each said AC signal center tap terminal to set the change of signal polarities to said ADC zero, g) said ADC providing periodic non-zero digital samples proportional to each said AC signal whenever the polarity of said AC signal is the same as said high reference voltage and providing zeros whenever said AC signal is not of the selected polarity, and h) means for receiving and processing said digital samples to make a desired measurement of said signals using only samples proportional to the selected polarity whereby each entire AC signal is digitized and zero crossings identified.
-
21. In an electronic device including an analog to digital converter (ADC) and a central processor unit (CPU) having a common clock, said ADC having result registers, ADC controller scan control bits, result register control bits, and analog channel select bits, the method comprising the steps of:
-
a) selecting analog signals by setting said analog channel select bits, b) setting said scan control bits to obtain ADC conversions in a continuous round robin fashion, c) taking digital samples from said ADC using program loops operating in an integral "n" multiple, together with program steps operating in an integral "m" multiple, of the number of clock cycles "t" required for an analog to digital conversion, and d) summing said integral for each said step and each turn of said loop starting said sum at a first selected time and ending said sum at a second selected time whereby said sum becomes a measure of the time interval from said starting time to said ending time.
-
Specification