Abstract:
An oil well instrumentation system for measuring the pressure and temperature at various depths during drill stem tests. The measurements may be hydrodynamically analyzed to map the geological structure of an oil field in order to select drilling locations. The measurements may also be utilized to calculate properties of an existing oil well such as total production and optimum production rate and to determine the geologic properties of the structure in which the well is drilled such as porosity. The system includes a pressure sensor, a temperature sensor and a microprocessor based device receiving the outputs of the pressure and temperature sensors for displaying and recording periodic measurements. The display and recording device is powered by a rechargeable battery, and the condition of the battery is internally monitored and an indication of its condition is displayed. Oil well measurements are relatively short in duration, but they are normally made over a relatively long period of time so that a substantial period of time elapses between measurements. In order to preserve the life of the battery between rechargings, the display and recording device is placed in a quiescent mode between measurements in which power is removed from most of the internal components including the microprocessor.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates to oil well instrumentation systems, and more particularly, to a system for measuring, recording and displaying the pressure and temperature at various depths in an oil well drill stem. 
     2. Description of the Prior Art 
     Oil well drilling is extremely expensive and thus it is desirable to choose drilling locations which have a relatively good possibility of providing sufficient yields to justify the drilling costs. In order to select optimum drilling locations it is necessary to know the properties of the subsurface geological structure. These properties are determined by measuring pressure at various depths in a test hole to generate pressure versus depth plots. The plots are then hydrodynamically analyzed to determine the continuity or discontinuity, both laterally and vertically, of pressure systems within the geologic column. Pressure is normally measured during a stabilized shut-in pressure buildup. In this technique, the pressure and temperature sensors are lowered through the drill stem and a packer is placed above the transducer to seal the drill stem. Pressure below the packer then rises to a stabilized level and the measurements are taken. Measurements are then repeated at a different depth with the packers moved to seal off different geologic zones. After samples are recovered from the drill stem at various depths, the hydrocarbon recoveries can be related to their respective hydrodynamic systems in order to approximate the location of the gas/water or oil/water contact. 
     Various types of geographical representations of pressure data can then be generated. A potentiometric surface map shows the potential of a given horizon to support a column of free-standing water of known density at a given point expressed in feet of water. A potentiometric surface map generally defines areas of continuous permability and indicates the presence of possible barriers between these areas which may constitute stratigraphic traps. A barrier to fluid migration is indicated by a rapid change in potentiometric values. 
     Another type of geographic representation of pressure data is the pressure deflection map. This is a map of pressure values at various points with respect to a key hydrodynamic system. Barriers to fluid migration may be inferred by sudden changes in the pressure deflection values. 
     The contour interval selected for either the potentiometric surface map or the pressure deflection map is limited largely by the measurement error inherent in the pressure measuring device. With conventional pressure measuring devices it is not possible to measure pressures with sufficient accuracy to allow relatively small contour intervals. This limitation may reduce the reliability and usefulness of such geographical representations of pressure data. 
     Drill stem pressure tests are also performed in order to measure the properties of an oil well and the surrounding structure in order to calculate the total production of the well as well as the optimum production rate. According to this technique, a packer is utilized to seal a drill stem and the subsequent pressure increase below the packer is measured. The rate of pressure increase provides an indication of the porosity of the structure the oil is in as well as the production rate. Also, flow from the well can be increased until pressure starts to drop thereby providing a good indication of the rate at which flow can be sustained. 
     In an interference test, pressurized water is injected into a first well and the pressure response in a different well is measured. In a pulse testing mode, the water is injected into a stimulus well at periodic intervals and the pressure is recorded in an observation well. Although pulse testing theory is well developed, the lack of an extremely sensitive pressure gauge has always limited practical applications because the effects of pressure at the observation well are usually small. The most important advantage of pulse testing is that transients observed as a result of the pulse stimulus are easily distinguished even in the presence of unrelated dynamic reservoir pressure behavior. The results of the pulse tests allow the calculation of in situ permability and formation thickness between wells. 
     The most common device currently used for oil well pressure tests are analog pressure transducers connected to conventional strip-chart recorders. These devices are not sufficiently accurate to be useful in many applications and it is difficult to accurately correlate the position of the markings on the strip-chart with time. 
     Another commonly used device is a self-contained pressure transducer and recorder which is lowered into the drill stem. The primary disadvantage of this device is that the pressure measurements cannot be read until the recording medium is processed at a distant location. 
     Although pressure is the most important measured property, temperature is also measured in order to normalize or calibrate the pressure measurements and to measure properties of fluids in the drill stem. For example, the pressure increase in the drill stem depends not only on the production rate of the well but also on the viscosity of the oil. In order to determine the true porosity of the structure surrounding the well and the oil well production rate, it is necessary to know the viscosity of the oil which can be inferred from knowing the temperature of the oil. Also, a knowledge of the characteristics of temperature variations can indicate the presence of a gas rather than a fluid. 
     SUMMARY OF THE INVENTION 
     It is an object of the invention to provide a system for measuring temperature and pressure with extreme accuracy. 
     It is another object of the invention to provide a system for measuring temperature and pressure in real time so that measurements are displayed outside the drill stem at the same time as they are being made. 
     Another object of the invention is to provide a battery powered system having an extremely low quiescent current to allow periodic temperature and pressure measurements over a relatively long period of time. 
     It is still another object of the invention to provide a battery powered system for measuring temperature and pressure having means for internally monitoring and displaying the condition of the battery. 
     These and other objects of the invention are accomplished by a microprocessor based device receiving the output of a commercially available, extremely accurate pressure transducer positioned in an oil well drill stem. If desired, the microprocessor based device may also receive the output of a conventional analog temperature transducer also positioned in the drill stem. The recording and display device is battery powered so that it may be used in the field. In order to conserve battery life during the relatively long period over which the measurements are made, circuitry is provided for removing power from most of the internal components of the device when measurements are not being made. This powering down function is accomplished by a conventional MOS alarm clock circuit having internal timing means for powering up the system when a measurement is to be made. The alarm clock circuit is programmed at the start of each quiescent period by the microprocessor. Circuits are also provided for synchronizing the random access memories as power is applied to and removed from the circuits in order to prevent the entry of spurious data during the power-up period. 
    
    
     BRIEF DESCRIPTION OF THE FIGURES OF THE DRAWINGS 
     FIG. 1 is a top plan view of the microprocessor based device for recording and displaying the outputs of peripheral devices which are illustrated in isometric. 
     FIG. 2 is a schematic of the block diagram of the oil well instrumentation system. 
     FIG. 3 is a schematic of the interval counter for determining the frequency of the signal from the output of the pressure transducers. 
     FIG. 4a is a schematic of the processor unit, random access memories and keyboard of the device. 
     FIG. 4b is a schematic of the read only memory and address decoder circuitry. 
     FIG. 4c is a schematic of the circuitry for displaying pressure measurements, temperature measurements and battery condition. 
     FIG. 5 is a schematic of the circuits for supplying power to the device. 
     FIG. 6a is a schematic of digital-to-analog converters for driving external analog recorders, analog to digital converters for receiving the outputs of the temperature transducers and circuitry for receiving the output of a direct memory recorder. 
     FIG. 6b is a schematic of the circuitry for timing the length of a quiescent period and for reapplying power to the device. 
     FIG. 6c is a schematic of the circuitry for driving the printer for recording data. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     The oil well instrumentation system as utilized in the field is illustrated in FIG. 1. The system 10 receives inputs from and provides outputs to a variety of peripheral devices 12 as explained hereinafter. The front panel of the system 10 includes a numeric key pad 14 for entering data into the system and a function selection key pad 16 for controlling the operation of the system 10. The specific control function corresponding to each key of the key pad 16 is designated by the markings 18a, b positioned above and below the key pad 16, respectively. The system 10 includes two output devices, namely, a conventional printer 20 and an optical display 22. An AC power input 24 is located at the upper left-hand corner of the panel along with a fuse receptacle 26 placed in series with the AC power input 24 and a master power switch 28 for applying battery power to the internal circuitry as explained hereinafter. 
     The peripheral devices 12 are connected to the system through connectors 30-38. Briefly, the digital memory recorder connector 30 receives data from a direct memory recorder 40 which has been placed in the memory recorder 40 over a relatively long period of time, often while the recorder 40 is placed in an oil well drill stem. The analog outputs 32, 34 drive conventional Rustrak analog recorders 42, 44, respectively. The recorders 42, 44 are conventional strip chart recorders, and the end limit and scale factors for the recorders 42, 44 are manually selected on the key pad. The transducer input connectors 36, 38 each receive the output of a pressure and temperature transducers 46, 48, respectively. The pressure sensing portions of transducers 46, 48 are specially adapted for insertion in the drill stem and are manufactured by Paroscientific, Inc. of Redmond, Wash. These transducers include a diaphragm which transmits a force proportional to the pressure on the diaphram to a force transducer described in U.S. Pat. Nos. 3,470,400 and 3,479,536. Briefly, these force transducers include a crystal oscillator operating at a frequency which is related to the force imparted to the crystal by the pressure sensing diaphragm by the following equation: 
     
         P=A(1-T.sub.0 /T)-B(1-T.sub.0 /T).sup.2 
    
     where P equals pressure, A, B and T 0  are calibration coefficients which characterize the transducer, and T is the period of the signal at the output of the transducer. 
     The calibration coefficients A, B, T 0  depend upon the physical parameters of each individual transducer with which the system is used, and thus vary from one transducer to another. It will be noted that the physical variable, namely pressure, measured by the transducer is non-linear so that the value of the physical variable is not directly proportional to a time related characteristic of the output signal, such as the signal&#39;s period of frequency. The temperature sensing portions of transducers 46, 48 are available from Analog Devices of Norwood, Mass. 
     A block diagram of the system 10 is illustrated in FIG. 2. The apparation of the entire system is illustrated in FIG. 2. The operation of the entire system is controlled by a processor unit 100 which is tied to the various other subsystems through a data bus 102, a control bus 104 and an address bus 106. The data bus 102 is a bi-directional conduit composed of several signal lines on which data can flow between the processor unit 100 and the other systems such as a program memory 108, a data memory 110 and interface circuits 112, 114, 116 for the printer 20, display 22 and key pads 14, 16, respectively. The data bus 102 is also connected to interface and conversion circuits 118, 120, 122, 124 which are connected to the peripheral devices 40, 46a and 48a, 42 and 44, 46b and 48b, respectively. The data bus 102 is also connected to an alarm clock 126 which, as explained hereinafter, powers down the system when measurements are not being made in order to preserve battery life. 
     The address bus 106 is a uni-directional group of signal lines on which signals originating at the processor unit 100 identify a particular memory location in the program memory 108 or data memory 110. 
     The control bus 104 is a uni-directional set of lines in which signals originating at the processor unit 100 control the operation of the various subsystems such as the 108, 110 printer 20, display 22, key pads 14, 16, DMR 40 and pressure interface 120, the D-to-A and A-to-D converters 122, 124, respectively, and the alarm clock 126. The number of signal lines in a given bus is determined by the number of bits which characterize the various devices used in the system. 
     The processor unit 100 operates in accordance with the plurality of instructions which are stored in the program memory 108 which may be a read only memory (ROM). The processor unit 100 contains an instruction counter which is incremented to sequentially execute the various instructions stored in the program memory 108. The program memory 108 makes available at the data bus 102 the instructions stored at the memory location designated by the address bus 104 when the program memory 108 is selected by the control bus 106. The instruction memory is non-volatile so that the data contained therein is not affected by the loss of power to the system. 
     The data memory 110 is provided for storing the calibration coefficients A, B, T 0  entered into the system by the key pad 114, and for storing data received from the processor unit 100. The data memory 110 stores data presented on the data bus in a memory location designated by the memory address on the address bus responsive to appropriate signals on the control bus 106, and it makes available to the data bus 102 data stored in memory locations selected on the address bus 104 responsive to appropriate signals on the control bus 104. The data memory 110 unlike the program memory 108, is a volatile memory and thus the data stored therein is erased when power is removed from the memory 110. 
     The entire system is powered from a battery pack 130 which is driven by a power supply 132 for recharging the battery pack 130 from a charger 134 on receipt of AC power through the power plug 24. 
     The pressure interface 120 is illustrated in FIG. 3. The output of the pressure transducers 46a, 48a are applied to an analog multiplex unit 202 through current limiting resistors 204. The signals at the inputs to the multiplex unit 202 are connected to plus and minus supply voltages through diodes in a diode array 206 in order to prevent the inputs to the multiplex unit 202 from exceeding the supply voltages. The output of the multiplex unit 202 is AC coupled to the input of an operational amplifier 208 through a capacitor 210. The particular pressure input, P1 or P2, connected to the amplifier 208 by the multiplex unit 202 is determined by the BCD outputs Q 1  . . . Q 3  of a latch 212. Thus the pressure transducer 46a, 48a applied to the amplifier 208 is selected by latching the data on the data bus lines DB0 . . . DB2 to the output of the latch 212 when the DS4 line from the control bus goes low. The latch 212 is cleared in order to select another transducer by a negative going signal on the CLR input. 
     The resistors 214, 216, 218 associated with the amplifier 208 provide hysteresis for the comparator 208 in order to prevent noise generated output signals. The amplifier 208 then drives an inverter 220 through a diode 222. The cathode of diode 222 is connected to ground through resistor 224. The diode 222 and resistor 224 are provided to transform the output of the amplifier 208 into appropriate logic levels for the inverter 220. Thus the output of the inverter 335 is a square wave having a frequency equal to the frequency of the pressure transducer output selected by the processor unit 100 through the data bus 102. The frequency of the square wave at the output of the inverter 220 is, of course, a known function of the pressure sensed by the selected pressure transducer 46 or 48a. 
     The output of the inverter 220 is received by an interval counter. The basic concept of the interval counter is to allow a first counter to count cycles at the output of the inverter 220 until a count equal to a predetermined power of 10 is reached. A second counter incremented at a known frequency then indicates the interval over which the given number of cycles at the output of inverter 220 were counted allowing the average period of the selected pressure transducer output to be computed. For example, for a pressure transducer output of 40 kHz, the first counter counts to 10,000 in 250 milliseconds. During this interval the second counter is incremented in a fixed, considerably faster rate, for example 10 mHz, so that in the 250 millisecond interval that the first counter counts to 10,000 the second counter counts to 2.5 million. Thus, for each cycle of the transducer output there are 250 cycles of the oscillator driving the second counter. The final count of the count interval as determined by the first counter may occur at any time during a counting cycle of the second counter, i.e., the 10,000 count of the first counter (the final count of the count interval) may occur on the 2,499,999.54 count of the second counter. Since the second counter increments in units the final count or fraction thereof for the second counter will generally be dropped. This &#34;roundoff error&#34; is a lower percentage error for larger final counts of the second counter, i.e., a count of 99.9 recorded as 99 is about a 0.9% error while the same 0.9 count error for a larger count, 999,000.9, recorded as 999,000 is only about a 0.00009% error. Thus the accuracy of the average period measurement is determined by the magnitude of the final count of the second counter. This is in turn determined by the length of the counting interval, (i.e. whether the first counter counts up to 10,000 or some higher or lower number) and the ratio between the operating frequency of the second counter and the operating frequency of the first counter. For a final count of the second counter of 2,500,000 the error is about 4×10 -5  %, or 1 part in 2.5×10 6 . The average period over the interval of 10,000 cycles of the transducer output can be calculated simply by dividing the count in the second counter by the count in the first counter and multiplying by the period of the oscillator signal driving the second counter. For example, the 2.5 million count of the second counter divided by the 10,000 count of the first counter times the 10 -7  period of the 10 mHz oscillator is equal to a 25 microsecond average period of the transducer output which corresponds to 40 kHz. It is important to note that since the interval during which the measurement is made is equal to a predetermined power of 10 cycles of the transducer output, the count of the second counter can be divided by the count of the first counter simply by shifting the decimal point of the count in the second counter. The counting cycle begins at the first leading edge of the square wave at the output of inverter 220 after a &#34;1&#34; is latched to the Q4 output of latch 212. At this time the Q output of flip-flop 226 goes low enabling NOR gates 228 and 230. As NOR gate 228 is enabled the pressure transducer signal at the output of inverter 220 is gated to BCD counter 232 through inverter 234. As NOR gate 230 is enabled the output of oscillator 236 is gated to the input of decade counters 238, 240 which are connected in series. As soon as the output of flip-flop 226 goes low decade counters 238, 240 begin incrementing. However, the logic &#34;1&#34; at the output of inverter 220 maintains a logic &#34;0&#34; at the output of NOR gate 228 which maintains the CLK input to the BCD counter 232 at logic &#34;1&#34;. After the next half cycle of the transducer signal, the CLK input goes low, but since the BCD counter 232 is leading edge triggered the counter 232 does not increment until the beginning of the next cycle of the transducer signal. At this time the output of inverter 220 goes high thereby producing a &#34;0&#34; to &#34;1&#34; at the output of inverter 234 which increments the counter 232. Thereafter the counter 232 increments once for each cycle of the transducer output signal. Thus the decade counters 238, 240 are incremented during one entire cycle of the transducer output before the decade counter 232 begins incrementing. The reason for this operation is to insure that at each point in time when the counter 232 is incremented the decade counters 238, 240 will have been incremented to a number equal to the product of the count of the first counter and the ratio of the period of the transducer output over the period of the signal from the oscillator 236. This procedure insures that when the counter 232 reaches a predetermined power of 10 the count of the decade counters 238, 240 divided by that number is proportional to the average period of the transducer output signal. If all of the counters 232, 238, 240 began incrementing together this would not be the case. For example, using the frequency examples given above, if both counters 232, 238 began incrementing simultaneously, the count in the counter 232 would be 1 at the same time the count in the decade counters 238, 240 was 1.  When the count in the counter 232 reached 2 the count in the decade counters 238, 240 would be 250. When the count in the counter 232 reached 3, the count in the decade counters 238, 240 would be 500. Note that dividing the count in the decade counters 238, 240 by the count in the counter 232 for each of these examples yields a different erroneous average period calculation. However, where the decade counters 238, 240 are permitted to increment for an entire cycle of the transducer output signal before the counter 232 is incremented, this erroneous result does not occur. 
     The 5 decade BCD counter 232 may be a MC 14534 real time 5-decade counter available from Motorola. The counter 232 is composed of 5-decade ripple counters having their respective outputs time multiplex using an internal scanner. Outputs for one counter at a time are selected by the scanner and appear on 4-BCD outputs D0, D1, D2, D3 only one of which, D0, is used in the instant application. The selected counter or decade is indicated by a &#34;1&#34; on the corresponding digit select output DS1, DS2, DS3, DS4, DS5. The counters and scanner may be independently reset by applying a logic &#34;1&#34; to the counter master reset input MR. The counter 232 initially presents the BCD value of the 5th decade at its output. Thus, when the counter 232 reaches 10,000, the D0 output rises to &#34;1&#34;. As the scanner clock input SCAN CLK is incremented, the counter 232 outputs the sequentially lower decades. At the same time, a logic &#34;1&#34; appears at the display scanner outputs DS5, DS4, DS3, DS2, DS1 in sequence to indicate which decade of the 5-decade BCD counter 232 is being outputed. Thus when the 5 th decade of the counter 232 is being outputed, the DS5 line is &#34;1&#34;. A leading edge of a signal at the SCAN CLK input then outputs the 4th decade of the counter 232 in BCD form, and a &#34;1&#34; appears at the DS4 output. The SCAN CLK input to counter 232 is initially triggered by the first transducer output signal at the output of NOR gate 228 through NOR gate 242 assuming, for the moment, that the other input to NOR gate 242 is &#34;0&#34;. Thus during the initial counts of the counter 232, the display scanner lines DS5, DS4 . . . DS1 are sequentially decremented. The display scanner outputs DS5, DS4 . . . DS1 are connected to an 8 channel multiplexer 244 which connects one of the scanner lines DS5, DS4 . . . DS1 to the Y OUTPUT and hence the other input to NOR gate 242. The particular scanner line DS5, DS4 . . . DS1 selected by the multiplexer 244 to apply to the Y OUTPUT is determined by a three bit data select word from the outputs Q1 . . . Q3 of a latch 246. Data on the data bus lines DB0 . . . DB2 are latched to the outputs Q1 . . . Q3 of the latch 246 when the DS5 input to the latch 246 from the control bus goes low. When the chosen digit select output DS5 . . . DS1 goes high, NOR gate 242 is disabled so that the scanner can no longer be clocked thereby causing the decade selected by the multiplexer 244 to be continuously present at the output D0. The &#34;1&#34; at the Y OUTPUT of the multiplexer 244 also enables NAND gate 248 so that when the least significant bit of the selected digit is reached, the &#34;1&#34; at the D0 output produces a &#34;0&#34; at the output of NAND gate 248 which clears flip-flop 226 and latch 212 and informs the processor unit 100 that the counting interval is over through driver 249. During the counting interval the &#34;1&#34; at the output of the driver 249 informs the processor unit 100 that a count is being made. 
     By selecting the appropriate digit select output DS1, DS2 . . . DS5, the multiplexer 244 can select a counting interval which is between 1 and 10,000 cycles of the pressure transducer output. A large sample time, in which a large number of cycles are sampled, produces more accurate results, but requires a relatively long period of time to complete the measurement. For example, a count interval of 10 is accomplished in about 250 microseconds while a count interval of 10,000 cycles requires 250 milliseconds. However, a count interval of 10 cycles only allows the counters 238, 240 to count to 2,500 compared to a 2,500,000 count for a 10,000 cycle count interval. Consequently, the percentage of error from rounding off the final count is 3 orders of magnitude greater than for the 10 cycle counting interval. The counting interval is selected by an instruction in the program itself and transmitted to the multiplexer 244 through the data bus and the latch 246. 
     After the end of the counting interval, the outputs of the decade counters 238, 240 are applied to tri-state buffers 250, 252 which are continuously accessible to the data bus when the DS8 line is actuated. The two most significant bits of the counter 240 increment a five decade BCD counter 254 through a NOR gate 256. Five decade BCD counter 254 is indentical to the BCD counter 232 except that different input and output functions are utilized. The count in the BCD counter 254 is sequentially applied to the tri-state buffers 252 by first actuating the SCAN RST line to apply the fifth decade in the counter 254 to the buffer 252. The SCAN CLK input is periodically actuated by the processor through the data bus and latch 246 to sequentially apply the fourth, third, second and first digit of the BCD counter 254 to the tri-state buffers 252. The processor unit 100 (FIG. 2) receives the interval count from the tri-state buffers 250, 252, and computes the length of the interval by moving the decimal point of the count from the counters 238, 240, 254 a number of digits depending upon the data select output DS1, DS2 . . . DS5 selected by the multiplexer 244. The processor unit 100 then utilizes the value of the interval to compute the pressure sensed by the pressure transducer. Another counting cycle then begins after a MR signal from the latch 246 resets the counters 238, 240, 254, 232 and the appropriate data bus code has been clocked through the latch 212 by a &#34;0&#34; on the DS4 line. 
     The processor unit 100, as illustrated in FIG. 1a, includes a central processing unit 300 which may be an 8080A Central Processing Unit available from the Intel Corporation of Santa Clara, Calif. The central processing unit 300 is a dynamic device, i.e. its internal storage elements and logic circuitry require a timing reference supplied by external circuitry to provide timing control signals. The Intel 8080 Central Processing Unit 300 requires two equal frequency phased offset clock signals φ1 and φ2 which are supplied by a clock 302 which may be an Intel model 8224 clock generator driver. The interfacing between the clock 302 and the central processing unit 300 includes the two clock signals φ1 and φ2, and a ready signal which causes the central processing unit 300 to suspend operation until external memory has been accessed. The clock 302 and central processing unit 300 also include RESET inputs which initialize the program counter to the first program instruction in response to RESIN becoming &#34;0&#34;. This reset occurs when power is initially applied to the system since capacitor 304, being initially discharged, holds the RESIN input to the clock 300 low when power is applied until the capacitor 304 is sufficiently charged through resistor 306. A diode 308 quickly discharges the capacitor 304 when power is removed from the system. 
     Data and control signals from the central processing unit 300 are routed through a bi-directional bus driver 310 which may be an Intel 8238 model. The bus driver 310 gates data on and off the data bus within the proper timing sequences as dictated by the operation of the central processing unit 300. The bus driver 310 also determines what type of device (e.g. memory or I/O) has access to the data bus by generating appropriate control signals. Data is loaded into the bus driver 310 from the central processing unit by a STSTB which occurs at the start of each machine cycle. The central processing unit 300 receives data through the bus driver 310 from a plurality of random access memories 312-322 at a memory location determined by the address generated on the address bus by the central processing unit 300. The random access memories 312-322 are volatile so that data stored therein is lost when power is removed. Thus some of the random access memories 312-320 are separately powered by voltage regulator 323 through diode 325. Since each of the random access memories 312-322 store only four-bit words, the random access memories are addressed in parallel so that one of the random access memories supplies the first four-bits of an eight-bit word and the other random access memories supply the remaining four-bits. Data is read into the memory when the MEMW at the output of the bus driver 310 goes low and the appropriate chip select line CS and RAM-EN enables the random access memory. Thus, when the MEMR and CS8 go low, data is read into random access memories 312, 318 at the address designated by the address bus AB0, AB1 . . . AB7. Similarly, data is read from the random access memories 312-322 when a particular address at a particular set of memories are addressed and the MEMR line at the output of the bus driver 310 goes low. The chip select signals CS0, CS1 . . . CS7 and CS8, CS9 are generated from the higher order address bits at decoders 324, 326, respectively. The control signals for the random access memories 316, 322 are generated from either the MEMW or MEMR signals by NAND gate 328. Similarly, device select signals DS0, DS1 . . . DSF are generated by decoders 330, 332 from the address bus and from either an I/OR or I/OW from the bus driver 310 through NAND gate 334. The instructions for controlling the operation of the central processing unit 300 are stored in read only memories 340-350. 
     The instructions stored at a specified address location are presented to the data bus when the appropriate chip select signal CS0, CS1 . . . CS5 is produced and the central processing unit 300 generates the appropriate address. The data outputs of the read only memories are either floating or ground so that a set of pull-up resistors 352 are provided to raise the voltage level to an appropriate voltage in a logic &#34;1&#34; condition. 
     The key pads 14, 16, each of which include a plurality of push-to-close switches, are wired in parallel so that the inputs to a 16-BCD decoder 370 go high whenever the corresponding switch for either key pad 14, 16 is actuated. The outputs of the decoder 370 are connected to the data bus through a bus driver 372 whenever the DS1 line goes low. When any of the switches in keypad 14 are actuated transistor 371 is saturated through diode 373. Transistor 371 is normally held at cutoff by resistor 375 so that the collector of transistor 371 is held low through resistor 377. Thus when a switch in keypad 14 is actuated a positive going pulse is sent to bus driver 372 (FIG. 4B) to inform the processor unit that it is the keypad 14 that is being addressed. Circuit 379 operates in a similar manner to inform the processor unit that keypad 16 is being addressed. In this manner two keypads 14, 16 are multiplexed through a common decoder 370. 
     The display 22, as illustrated in 4c, includes four LED modules 400-406 which may be series MAN 6600 displays available from Monsanto. Each of the modules 400-406 includes two light emitting diode arrays 400a,b-406,a,b. Each of the arrays 400a,b-406a,b are sequentially illuminated by sequentially switching on each of the transistors in transistor modules 408, 410 thereby sequentially illuminating each digit 400a-400b. The particular number displayed by each of the digits 400a-406 are determined by which of the lines from the display modules 400-406 are actuated by respective display driver latches 412-418. Display driver latches 412-418 may be model DS 8859J display drivers available from National Semi-Conductor which consist of a number of drive flip-flops clocked by a common strobe input. Note that the light emitting diode modules 400-406 are driven in pairs so that only one pair of modules may be actuated at a given time. The central processor 100 executes a display subroutine in which data from the data bus are stored in latches 420, 422. The outputs of the buffers 420, 422 actuate the driver latches 412-418 to allow current to flow through selected output lines of the display modules 400-406 whenever a DSR or DSQ signal is received from the decoder 326 (FIG. 4a). The particular digit of the display modules 400-406 which will be illuminated is determined by the transistor modules 408, 410 which are in turn controlled by latches 424, 426. Pullup resistor module 428 is provided to raise the output voltage from the latches 424, 426 to an appropriate drive level in a logic &#34;1&#34; condition. In operation, the first digit of the display module 400b is enabled by transmitting a &#34;1&#34; on data bus DB6 to the buffer 420. Thereafter the DSO line goes low storing the &#34;1&#34; in the latch 424 and forward biasing the transistor in transistor module 408. At this point the digit 400b is enabled. During the next processor cycle, appropriate signals are transmitted over the data bus to the buffers 420 &amp; 422 for producing outputs for driving the individual segments of the light emitting diode arrays which, when the DSR signal is received by the driver latches 412 &amp; 414 causes a preset combination of light emitting diodes in the array 400b to become illuminated. Thereafter, the remaining display modules 402a-406b are sequentially illuminated in the same manner. A variable resistor 431 is provided for adjusting the voltage to the IADJ inputs to the driver latches 412-418 for controlling the amount of current flowing through the light emitting diodes and hence the intensity of the display. 
     The leftmost digit of the display module 400a is utilized to indicate the condition and charging rate of the internal batteries powering the system. For this purpose appropriate currents are caused to flow through resistors 430-440 as explained hereafter. Briefly, the upper and lower sections of the display 400a correspond, respectively, to first and second batteries and associated chargers. The left and center segments of the digits are illuminated when the corresponding batteries are being charged but are not up to fully potential. The right most segments of the digits are illuminated when both of the batteries are fully charged. Thus, for example, a blank upper portion of the display indicates that one of the chargers is not functioning properly while segments illuminated to form the letter C indicate that both chargers are working properly but the batteries are not fully charged. When the segments are illuminated to form the letter O the display indicates that both batteries are fully charged. 
     The power supply circuitry illustrated in FIG. 5 charges a pair of internal batteries 500, 502, regulates the battery or power supply voltage to provide a large number of specified voltages and selectively removes power from the major portion of the system during a &#34;sleep&#34; mode as described hereinafter. 
     AC power is applied to a conventional power supply 504 which includes a battery charger for charging the batteries 500, 502. The power supply 504 also includes conventional voltage sensing circuits for providing signals CHG STATE #1 and CHG STATE #2 indicative of the charge of the batteries 500, 502, respectively. 
     The positive 8 and 16 volt outputs of the power supply 504 are applied to a switching circuit for applying power to the system and removing the power during the &#34;sleep&#34; mode. The basic concept of the &#34;sleep&#34; mode is to remove power from virtually the entire system during a period when measurements are not being made. As the system is used, measurements may be made for a brief period of time spaced apart by a considerably longer period of time. Consequently, since the system is often battery powered, it is important to reduce battery drain in order to conserve battery life. Thus a timer is utilized to remove power from the entire system except for the timer itself and the volatile memories during the period where measurements are not being made. 
     Power is initially applied to the system by actuating the on/off switch on the keyboard 16 thereby connecting the RT-COM line to the RT-16 through switch 16a. The 8 volt output from the capacitor 511, which charged in the &#34;OFF state through resistors 506 &amp; 509, is then applied to the RT-16 line through resistor 509. Resistor 509 and capacitor 511 provide a short duration pulse on the RT-16 line which saturates transistor 510 through resistor 512 allowing current to flow from capacitor 514 through the relay coil 508e. The relay 508 then switches the 16 and 8 volt outputs from the power supply 504 to voltage regulators 516, 518, respectively, which apply power to the entire system. The transistor 510 is normally held at cutoff by a resistor 520 extending between its base and emitter. Diode 522 is connected across the relay coil 508e to short circuit transients generated by the coil 508e to prevent damage to other components. 
     When the on/off switch of keyboard 16 is initially actuated, the 8 volt signal is also applied to a NOR gate 524 which is connected with NOR gate 524 to form a flip-flop. The logic &#34;1&#34; at the output of the NOR gate 524 then saturates transistor 526 through resistor 528 causing current to flow through resistors 530, 532 and saturating transistor 534. The 16 volt output of the power supply 504, which is filtered by capacitor 536, is then applied to a voltage regulator 538. 
     The output CLK PWR of the voltage regulator 538 is the power applied to the volatile memories and the timer during the sleep mode. When the system transitions to a sleep mode a logic &#34;1&#34; is transmitted to a latch 540 through the data bus bit DB0 when the DS3 goes low. The output of the latch 540 is applied to the base of a transistor 542 through resistor 544. Transistor 542, which is normally held at cutoff by a resistor 546 extending between the base and emitter of the transistor 542 is then saturated causing current to flow from the 16 volt output of the power supply 504 through resistors 548, 550, 552 and the collector to emitter of the transistor 542. The current through resistor 548 forward biases the base emitter junction of a transistor 552 allowing current to flow through relay coil 508f and resistor 554. The contacts of the relay 508 are then actuated to remove power from the regulators 516, 518. Thus, during the sleep period, power is removed from virtually the entire system including the microprocessor and display circuitry. It is important to note, however, that power from the voltage regulator 538 continues to be applied to the volatile memories and the internal timer through the CLK PWR output. At the conclusion of the sleep period a signal on the ALARM input is applied to transistor 510 through diode 556 and resistor 558 to saturate transistor 510 allowing current to flow through relay coil 508e and switch the contacts of the relay 508 to apply power to the regulators 516, 518. It is important to note that the ALARM signal does not originate at any microprocessor controlled device since during the sleep period the microprocessor is not powered and thus is not available for control purposes. 
     The power supply also includes circuitry for preventing spurious data from being read into the random access memories during the transient period as power is being applied to the system during a sleep period. The inputs to NOR gate 555 are connected to the collector of transistor 542 and the input of regulator 518 through diode 557 and resistor 559. Consequently, during a sleep period the output of NOR gate 555 is &#34;1&#34; so that RAM-EN at the output of NOR gate 561 is &#34;0&#34;. The &#34;0&#34; RAM-EN disables the random access memories as illustrated in FIG. 4a. At the end of the sleep period the output of NOR gate 555 goes low, but the output of NOR gate 561 does not go high until capacitor 563 has discharged through resistor 565. Thus the random access memories are not enabled until the other circuits in the system have stabilized. 
     Power is removed from the system by actuating the on/off switch of keyboard 16 which is sensed by the processor unit 100. The processor unit 100 then generates a logic &#34;1&#34; on the first two bits of the data bus which is latched to the Q1 and Q2 outputs of the latch 540. The CLOCK OFF output causes current to flow through resistors 560, 562 thereby saturating transistor 564 which causes current to flow through resistors 566, 568 from the memory power line MEM PWR thereby saturating transistor 570. As transistor 570 is saturated, the 8 volt output from the power supply 504 is applied to NOR gate 524 through resistor 572 causing the flip-flop formed by NOR gates 522, 524 to reset thereby removing power from the voltage regulator 538. At the same time the logic &#34;1&#34; signal at Q1 of latch 540 is applied to the base of transistor 522 causing transistor 552 to saturate and remove power from the regulators 516, 518 and disable the random access memories. A capacitor 576 guarantees a pulse of a sufficient period of time for current to flow through relay coil 508f. 
     The latch 540 is also used to apply power to the Rustrak recorders 42, 44. Accordingly, a logic &#34;1&#34; signal on either or both the third or fourth bit DB2 or DB3 of the data bus is latched to the output of latch 540 by receipt of a DS3 signal. The outputs are applied to identical regulator circuits 580, 582 through resistors 584, 586, respectively. The logic &#34;0&#34; at the output of the latch 540 places transistor 588 at cutoff thereby allowing current to flow through resistor 590 and the base-emitter junction of transistor 592 to regulator 594 after being filtered by capacitor 596. The output of the regulator 594 is filtered by capacitor 598 and applied to the recorder 42 (FIG. 1). 
     The circuitry for interfacing with the Rustrak recorders 42, 44 (FIG. 1), temperature sensors 46b, 48b and digital memory recorder 40 are illustrated in FIG. 6a. The signals driving the recorders 42, 44 are generated by digital to analog converters 700, 702 responsive to information on the data bus when device select signals DSA or DSB are received by the D/A converters 700, 702, respectively. The outputs of the converters 700, 702 are amplified by amplifiers 704, 706, respectively. The gains of the amplifiers 704, 706 are controlled by adjusting respective potentiometers 708, 710. Both of the D/A converters 700, 702 receive a voltage reference signal from a voltage regulator 712 through respective calibrating potentiometers 714, 716. The outputs of the amplifiers 704, 706 are connected to the Rustrak recorders 42, 44, respectively. 
     The outputs from the temperature sensors 46b, 48b as well as the two batteries 500, 502 (FIG. 5) are connected to a multiplexing unit 720 through resistors 722 and protective diodes 724. The multiplexer 720 selects one of the inputs to the resistors 722 as designated by the output of a latch 726 transmitted through a level shifter 728. The input designating signal from the latch 726 is received on the data bus and stored in the latch 726 along with a start signal for an analog to digital converter 730. The output of the multiplexer 720 is applied to a voltage follower circuit 732. The voltage divider ratio of resistor 734 to potentiometer 736 is adjusted to vary the scaling. The voltage reference from the voltage regulator 712 is also applied to the A/D converter, and a predetermined portion of the reference is generated between resistors 738, 740. Both reference inputs are filtered by capacitors 742, 744, respectively. The A/D converter 730 generates a 13 bit word whereas the data bus is only capable of receiving an 8 bit word. Consequently, the first 8 bits from the A/D converter 730 are applied to the data bus when a DST signal is received through inverter 746, and the remaining 5 bits are applied to the data bus when a DSU signal is received through inverter 748. Thus the output of the A to D converter is a digital signal indicative of the temperature or battery voltage as determined by the multiplexer 720. 
     The latch 726 also generates the master reset signal to the DMR 40 (FIG. 1) interface by applying a logic &#34;1&#34; signal to the base of transistor 750 through resistor 752. 
     Data is received from the digital memory recorder 40 (FIG. 1) through diodes 770 by level shifters 772-778 and read by the central processor through buffers 780-784, respectively, when appropriate device select signals DS10-DS14 are received by the buffers 780-784. The data is then transferred to the remainder of the system through the data bus. The cathodes of the diodes 770 are connected to ground through pull-down resistors 786. 
     A unique feature of the system is the ability to remove power from virtually the entire system during a &#34;sleep&#34; period as described above. For this purpose a conventional alarm clock module 800 is utilized to apply power to the system at the end of the sleep period. The module 800 includes an internal counter which is incremented by a continuously powered, 60 Hz oscillator 802. Power for the outputs only is applied to the module 800 by a transistor 804 having its base connected to the wiper of a voltage divider potentiometer 806. The potentiometer 806 is adjusted to vary the output voltage of the module 800. Information is transferred to the module 800 through a buffer 810 and a latch 812. Data on the data bus is transferred to the latch upon the occurrance of a DSC, and data is cleared from the latch 812 upon receipt of a RESET. The outputs of the clock module 800 are adapted to drive conventional 7-segment displays corresponding to the seconds, minutes and hours to which the module 800 is set. Other outputs include an alarm signal, a PM designating signal and a 1 Hz signal. The outputs drive bus drivers 814-818 through pull-down resistors 820. The outputs from the clock module 800 are presented to the data bus by the bus drivers 814-818 upon receipt of appropriate control signals DSF-DSD, respectively. The processor unit determines the time (i.e. seconds, minutes and hours) of the clock module 800 corresponding to which segments of a 7-segment display would be illuminated. 
     In operation, the latch 812 presents a logic &#34;1&#34; signal to the FAST SET input to the module 800 causing the hour counter in the clock module 800 to increment responsive to the oscillator signal. The minutes are then set in the clock 800 by producing a logic &#34;1&#34; on the SLOW SET input causing the minute counter to increment responsive to the signal from the oscillator 802. It should be noted that the hours must be set first since the minutes advance while the hours are being set. Finally, a signal is received on the ALARM DISPLAY input which allows the alarm to be set to a time which is a preset period after the time set in order to provide a predetermined sleep period. When the time is incremented to correspond to the alarm setting the ALARM output of the clock module 800 goes high thereby triggering the power supply circuits illustrated in FIG. 5. The clock module 800 is an MOS device which requires very little power. Since only the clock module 800, oscillator 802 and the random access memories are powered during the sleep mode the internal batteries are capable of conducting periodic tests over a relatively long period of time. 
     The circuitry for controlling the electronic printer is illustrated in FIG. 6c. Signals for driving a stepper motor in the conventional printer 20 (FIG. 1) are generated by a latch 900 and transmitted to the stepper motor through level shifters 902. Data is recorded by the latch 900 from the data bus responsive to a DS7 signal. The DS7 signal also actuates a one-shot 904 which clears the latch 900 after a predetermined period in order to terminate the stepper signals S1-S4 after a predetermined period thereby protecting the motor components against excessively long duration currents. The information printed by the printer is recorded by latches 906, 908 from the data bus responsive to a DS6 signal thereby driving data outputs through level shifters 902 and 910. At the same time a STROBE signal is produced by the latch 906. The printer utilizes a heat sensitive paper and a printer head which is connected to the stepper motor for moving the head across the surface of the paper. For each location of the head a predetermined combination of heater elements are enabled as determined from the ASCII data on the data lines D1-D7 and the heaters are actuated by the STROBE signal. 
     The program stored in the read only memories 340-350 is as follows: ##SPC1## ##SPC2## ##SPC3## ##SPC4## ##SPC5## ##SPC6## ##SPC7## ##SPC8## ##SPC9## ##SPC10## ##SPC11## ##SPC12## ##SPC13## ##SPC14## ##SPC15## ##SPC16##