A11100 =1=14411 PUBLICATIONS

NBSIR 81-2285

Using Microcomputers to Monitor

the Field Performance of

Residential Heat Pumps

Center for Building Technology

National Engineering Laboratory

U S. Department of Commerce

National Bureau of Standards

Washington, DC 20234

June 1981

Sponsored by

11 S. Department of Energy

00 Independence Avenue, S.W.

100 ishington, DC 20585

.1156

81-2235

1981

c. 2

NBSIR 81-2285

USING MICROCOMPUTERS TO MONITOR

THE FIELD PERFORMANCE OF

RESIDENTIAL HEAT PUMPS

Charles W. Hurley and George E. Kelly

Building Equipment Division

tfATlONAl, BintsAll or •TAVS&BOS

' MBBAST

AUG 1 8 1981

Octo'c

Paul A. Kopetka

Building Thermal Performance Division

Center for Building Technology

National Engineering Laboratory

U.S. Department of Commerce

National Bureau of Standards

Washington, DC 20234

June 1981

Sponsored by

U.S. Department of Energy

1000 Independence Avenue, S.W.

Washington, DC 20585

U.S. DEPARTMENT OF COMMERCE, Malcolm Baldrige, Secretary

NATIONAL BUREAU OF STANDARDS, Ernest Ambler, Director
• x-

'f ; r ny,.
ABSTRACT

Field data on the heating and cooling performance of residential heat pumps

were gathered for the purpose of verifying and refining laboratory testing

procedures. This report describes the procedures, instrumentation, and

microprocessor-based data acquisition system (DAS) used for evaluating the

field performance of three residential heat pumps located in the Washington, D.C.

area. The instrumentation, signal conditioning unit and DAS are described

in detail since the designs employed are applicable to future testing

projects of this type in both small and large scale field studies.

To avoid the large capacities of the DAS and data reduction facility required

for on-line monitoring, a strategy was developed which used the on-line

microcomputer in the field to reduce and analyze the raw data and record the

calculated results. This reduced the amount of recorded data to an acceptable

level and thereby extended the time period between data collection.

This report discusses the selection of the heat pumps utilized in this field

study and the design and selection of the instrumentation and DAS. The

requirements for scanning data and recording the results are also

discussed.

The basic equations and the software for processing the data at the field

units and for reducing and editing the raw data disks at a central microcomputer are described. Examples of printouts taken directly at the field

units and from the data disks are shown.

Key Words: Analog signal conditioning; data acquisition system; field

data acquisition; field instrumentation; field performance

of heat pumps; heat pumps; heat pump test methods; microcomputer .

iii
TABLE OF CONTENTS

Page

ABSTRACT iii

DISCLAIMER vii

1. INTRODUCTION 1

1.1 Selection of Field Units for Tests 2

2. DESIGN OF INSTRUMENTATION AND DATA ACQUISITION SYSTEMS 4

2.1 Design Objectives 4

2.2 Data Scanning and Recording Requirements 4

2.3 Data Acquisition System Selection 6

2.4 Block Diagram of Instrumentation and Data Acquisition Systems . . 6

2.5 Role of a Central Microcomputer 8

3. MEASUREMENTS AND INSTRUMENTATION 8

3.1 Air Flow Measurement 8

3.2 Dew Point Measurement 10

3.3 Direct Temperature Measurements 11

3.4 Barometric Pressure 13

3.5 Temperature Differential Across the Indoor Coil 14

3.6 Electrical Energy Input Measurements 15

3.7 Condensate Metering 15

3.8 Detectors for the Mode of Operation of the Heat Pumps 18

4. DESCRIPTION OF SIGNAL CONDITIONING UNIT 20

4.1 Analog Signal Conditioning Circuits 20

4.1.1 Air Flow 22

4.1.2 Differential Temperature 22

4.1.3 Direct Temperature Mesurement Signal Conditioning 25

4.1.4 Dew-Point Measurement Signal Conditioning 28

4.1.5 Barometric Pressure 28

4.2 Pulse Counting Circuits 28

4.3 Encoder Circuit Board 32

5. DESCRIPTION OF THE MICROCOMPUTER 34

5.1 Housing the Basic Components and "Mother" Board 34

5.2 Memory Board 34

5.3 Clock 37

5.4 8PI0 Board 37

5.5 "TU-ART" Board 37

5.6 Analog Boards 38

5.7 Expansion Capabilities 38

5.8 Data Recorded at Field Test Units 38

5.9 Effects of Power Failures 39

5.10 Interference of Television Programs 40

IV
TABLE OF CONTENTS

Page

6. EQUATIONS USED FOR PROCESSING THE DATA IN THE FIELD UNITS 41

6.1 Analog Data 41

6.2 Digital Data 41

6.3 Data Reduction Equations 42

7. SOFTWARE 43

7.1 Main Routine "PUMP" 45

7.2 Subroutine "SYSTEM" 46

7.3 Subroutine "INIT" 46

7.4 Subroutine "PSCAN" 46

7.5 Subroutine "ENERGY" 46

7.6 Subroutine "ENABL & DISABL" 48

7.7 Subroutine "TIME" 48

7.8 Subroutine "MOTOR" 48

7.9 Subroutine "RESET" 48

7.10 Subroutine "SETUP" 48

7.11 Subroutine "ANALOG" 49

7.12 Subroutine "CURTIM" 49

7.13 Subroutine "SAVE" 49

7.14 Subroutine "CALC" 49

7.15 Subroutine "CHECK" 50

7.16 Subroutine "CONSOL" 50

7.17 Subroutine "CYCLE" 51

7.18 Subroutine "SERV" 52

7.19 Program "REDUCE" 53

7.20 Software for Editing Field Data, "DCEP" 54

8. SUMMARY 55

REFERENCES 56

APPENDIX A 57

APPENDIX B 62

APPENDIX C 65

APPENDIX D 109

v
LIST OF TABLES AND FIGURES

Page

Table 1. Sensors Used in Field Heat Pump Test Program 23

Table 2. Port Assignments for the 8-Port, Multi-Channel Parallel

Interface (8PI0) Board to Allow 12-Bit Parallel Interfacing 47

Figure 1. Simplified Block Diagram of Instrumentation and Data

Acquisition System Used in Heat Pump Field Study 7

Figure 2. Condensate Metering Device Shown Under the Return Air Duct

on the Right Side of One of the Field Test Units 17

Figure 3. Opto-Coupler Circuit Used in Monitoring Compressor and

Outdoor Fan 19

Figure 4. A Photograph Showing the Signal Conditioning Unit on the

Left Side of the Supporting Table with the Microcomputer

on the Right 21

Figure 5. Differential Pressure Signal Conditioning Circuit .... 24

Figure 6. Thermopile Signal Conditioning Circuit 26

Figure 7. Direct Temperature Measurement Signal Conditioning Circuit 27

Figure 8. Dew-Point Measurement Signal Conditioning Circuit .... 29

Figure 9. The Outdoor Unit at One of the Field Test Sites 30

Figure 10. Barometric Pressure Signal Conditioning Circuit 31

Figure 11. Block Diagram of Binary Counting Circuit 33

Figure 12. Diagram of Encoder Circuit Board 35

Figure 13. Block Diagram of Microcomputer Data Acquisition System . . 36

Figure 14. Simplified Block Diagram of Data Acquisition Program

Execution Sequence and Major Program Elements 44
DISCLAIMER

Certain commercial equipment and instrumentation and data acquisition systems

are identified by name in this paper in order to adequately describe the

capabilities and technical features of hardware used in the instrumentation

system. In no case does such identification imply recommendation or endorsement by the National Bureau of Standards, nor does it imply that the material

or equipment identified is necessarily the best available for the purpose.

vii
-
1 . INTRODUCTION

Methods of laboratory testing, rating and estimating the heating and cooling

seasonal performance of heat pumps have been established in previous research

performed at NBS *. This work formed the basis of test procedures for this

type^of consumer product, promulgated by the Department of Energy in December

1979 . The major objective of the research discussed in this report was

to gather actual field data on the heating and cooling performance of

residential heat pumps for the purpose of verifying and refining these

procedures, and to develop and document methods for evaluating the dynamic

performance of heat pumps installed in residences.

This report describes the development of the procedures, instrumentation,

and microprocessor-based data acquisition system used for evaluating the

field performance of three heat pumps located in the Washington, D.C. area. The instrumentation and data acquisition systems are described in detail,

since the basic designs which were employed are applicable to future testing

programs on the performance of central heating and cooling equipment in both

small and large-scale field programs. A second report, describing the

actual data obtained during this study, will be published after the

experimental phase of the program is completed.

At the onset of this project, an estimate was made of the amount of data

required to obtain the information needed for estimating the seasonal

performance of heat pumps. It soon became obvious that the raw data would

require a data storage system and a data reduction facility with capacities

much larger than warranted by a project of this type. To avoid this problem,

a strategy was developed which involved gathering of all necessary raw

data, using a microcomputer to reduce and analyze it in the field, and then

storing the calculated results. A large portion of the raw data was not

directly recorded. However, the raw data scans from every tenth on/off cycle

were saved. The latter provided some detailed performance data and served as

a check on the calculated results. This shifted the data reduction task

from a central facility to the data acquisition systems in the field and

reduced the amount of data stored to an acceptable level. An added benefit

of this approach was allowing the data from the field to be scanned quickly

and any erroneous results, due to improper operation of either the heat

pump or the data acquisition system, to be quickly detected. Prompt action

could then be taken to correct the problem and to minimize the amount of

good data lost.

1
The next subsection of this report, section 1.1, discusses the selection

of the heat pumps utilized in this field study, giving a brief description

of each unit. Section 2 discusses the design of the instrumentation and

data acquisition systems, giving the design objectives, the requirements of

scanning the units under test for data and recording the results, and the

selection of the data acquisition system. Section 3 describes the actual

measurements made on each unit and the instrumentation used. The signals

from the instrumentation required amplification, attenuation, and/or offsetting to allow the data acquisition system to process and record the data

with the maximum possible accuracy. Section 4 describes the signal conditioning

unit which performed this task, together with registering the pulses from

the pulsing type instruments, and continually monitored the unit for any

change in the mode of operation. A more detailed description of the microcomputer used as a data acquisition system in this project is given in section

5. Some of the problems encountered in the field-installed systems are

also discussed in this section. The equations used for processing the data

in the field units are described in section 6. Software for collecting and

processing the raw data at the field units and for reducing and editing the raw data disks at a central microcomputer are briefly described in section 7.

Examples of printouts made directly from the raw data disks are shown in

Appendix A. Typical examples of data available from the units in the field

using a portable terminal are illustrated in Appendix B. A complete printout of the software used by the microcomputers in the field units and by

the central microcomputer to categorize and display the engineering data

from the raw data disks is found in Appendix C.

1.1 SELECTION OF FIELD UNITS FOR TESTS

The heat pumps utilized in this field study were selected from those

belonging to NBS employees who volunteered to participate in the program.

The use of the homes of NBS employees reduced the administrative problems

involved in getting access to the homes and assured that the instrumentation

would be properly protected. Although over 25 volunteers responded to a notice posted in the weekly NBS "Technicalendar , " only 7 met the following

requirements for the program.

1. The heat pump model had to be available for procurement for

additional laboratory testing.

2. The system must have been installed properly and be operating

in a manner recommended by the manufacturer. (Units were

excluded for mechanical and operational alterations, such as attempts to supplement heating with wood furnaces and completely

disabling the auxiliary resistance heaters.)

3. There should be only a single heat pump in a dwelling, and

humidifiers must not have been installed in the supply duct,

since these things would make data analysis much more difficult.

The dwelling should be located in the local area in order to

avoid extra legal problems in the metering of electrical power

lines, and excessive travel time and costs.

2
4. The unit must be an air-source heat pump and not a water-source

heat pump.

5. There should be no indication that a volunteer would interfere with

instrumentation and/or demand to see the data prior to the

publication of the final report.

6. The unit must be located in quarters adequate for installation

of the necessary instrumentation without major remodeling.

The final selection of the units to be instrumented was based upon a desire

to obtain data on a variety of defrost control systems used by different

manufacturers. A brief description of the three units selected and

instrumented for the studv is given below:

One unit was a 2 1/2 ton, air-source, unitary heat pump with an outdoor

compressor/coil section and an indoor coil located in an air handler

containing the auxiliary heater elements (15 kW) . This unit utilized an air pressure differential defrost system. A pressure sensor was located

in the area between the outdoor coil and the outdoor fan. When the static

pressure difference between this area and the atmospheric pressure exceeds

0.5 inches (12.7 mm) of water, the defrost cycle is activated. In the defrost

mode, the power to the outdoor fan is turned off and the refrigerant reversing

valve is activated changing the unit into the cooling mode which allows the

hot gases to pass through the outdoor coil for defrosting. The defrost

cycle is terminated when a temperature-sensing bulb located near the outdoor

coil indicates a liquid refrigerant temperature of 65°F (18°C) . The

differential pressure switch is designed to operate when approximately

85 percent of the coil is blocked by frost accumulation.

A second unit \%ras an air-source, unitary heat pump consisting of an outdoor

fan-coil section, an indoor compressor section, and an indoor fan-coil

section containing the auxiliary electric heaters (15 kW) . This unit was designed to operate with a three-ton cooling capacity and utilized a time/

temperature defrost control system. In the heating mode, a defrost timer is

actuated every 90 minutes of compressor on-time. If the defrost thermostat

is closed (it closes when the temperature of the refrigerant in the outdoor

coil reaches 27 + 4°F [2.8 + 2.2°C]) when the timer is actuated, the unit

goes into a defrost mode until the defrost thermostat reaches 80 + 6°F

(26.7 + 3.3°C), or for a maximum of 10 minutes. During the defrost mode,

the outdoor fan stops, the reversing solenoid valve is energized to switch

the refrigeration system into the cooling mode, and an auxiliary electric

heating element is activated. At the end of the defrost period, the system

returns to the normal heating mode of operation.

A third unit was a three ton, air-source, unitary heat pump with an outdoor

section and an indoor section with auxiliary heaters (15 kW) . This unit

utilizes both the pressure differential across the outdoor coil and the

refrigerant temperature to initiate the defrosting process. When frost and

ice forms on the outdoor coil during the heating mode and the air flow is

restricted, the pressure differential defrost switch closes. If this switch

remains closed for 12 seconds (a delay to avoid the effect of wind gusts)

and the liquid refrigerant leaving the outdoor coil is 39°F (3.9°C) or lower, the defrost relay is energized. This relay energizes the reversing

valve to switch the unit to the cooling mode, stops the outdoor fan, and

energizes the first stage of the auxiliary heaters. The defrost cycle is

terminated when the liquid line temperature in the outdoor unit exceeds

3
75°F (23.9°C) or if it exceeds 45°F (7.2°C) for 5 minutes. The latter

condition allows the defrost cycle to tezminate if the wind velocity

does 2. not permit the liquid line temperature to reach 75°F (23.9°C).

DESIGN OF INSTRUMENTATION AND DATA ACQUISITION SYSTEMS

2.1 DESIGN OBJECTIVES

The design of the instrumentation and data acquisition system (DAS) installed

in the field was based on the objectives established at the onset of this

task including those listed below:

1. The instrumentation and the DAS systems were to be designed to

fall within a minimal practical cost range.

2. The systems to be installed at each field site should allow the raw data to be recorded and analyzed, and the analyzed data recorded,

with the precision required.

3. Any altering of the field units by the installation of the instrumentation must be small and have a negligible effect, if any, on

the performance of the unit.

4. All measurements necessary to determine the input and output of

each unit were to be made to allow the cyclic, daily and seasonal

performance of the units to be determined.

5. The instrumentation and DAS must be capable of continually

monitoring the mode of operation of the unit (i.e., on, off, or defrost). The actual time of each cycle, the compressor on-time,

and defrost time must also be monitored and recorded.

6. The instrumentation and DAS must monitor and record all fundamental

engineering measurements in such a manner that the malfunctioning

of any primary data channel would be readily detected upon observation

of the data. In addition, the design and installation of the

instrumentation must be carried out in such a manner that maintenance,

if any, is minimal.

7. Input data must include the indoor and outdoor ambient conditions

to allow the output of the system to be accurately determined as

a function of these variables.

2.2 DATA SCANNING AND RECORDING REQUIREMENTS

The data collected in laboratory tests of heat pumps ’ , and in a study

made to determine the^field performance of a residential heat pump in the

Washington, D.C. area , were reviewed to establish the desired periods of

scanning the raw data and for recording the raw data and the calculated

results. As a result of this review, a "cycle period" was defined as the

shortest time period meeting any one of the following conditions:

4
1. The end of one compressor-off period to the end of the next

compressor-off period. (i.e. - The start-up of the compressor

to the start-up of the compressor for the following cycle.)

2. The end of one compressor-off period to the end of the next defrost

period

3. The end of one defrost period to the end of the next compressoroff period. (i.e. - The end of one defrost period to the start-up

of the compressor for the next compressor-on period.)

4. The end of one defrost period to the end of the next defrost period.

These definitions provide adequate "cyclic data" to be obtained during

cooling, heating and defrost modes of operation. During long heating

periods, a defrost period will end a cycle and start another, avoiding

extremely long cycle periods. In very mild weather when the unit may not

be used for a long period, the energy consumed by the crankcase heater will

result in a cycle with a very low C.O.P.

In addition, the profiles of the continuous laboratory data on heat pump

performance indicated that the intervals of scanning the transducers and

recording the desired information could be expanded as the cycle progressed

without losing the desired accuracy. This allowed the total test period

that could be recorded on the storage media to be expanded, and also reduced

the amount of data processing required. In this project the intervals of

scanning the desired data were established as listed below:

1. every 10 seconds for the first 120 seconds of a cycle,

2. every 30 seconds for the next 240 seconds,

3. every 60 seconds for the next 360 seconds, and

4. every 300 seconds until the compressor turns off.

The intervals of scanning start over again (i.e., were reset to no. 1

above) under any of the following conditions:

1. The compressor starts indicating a new cycle.

2. The beginning of a defrost period.

3. The end of a defrost period.

The data from each scan, as listed above, were used in accumulating the

input and output of the heat pump for each cycle. The cyclic data were

recorded for each cycle. However, the data for the individual scans were

recorded every tenth cycle to provide additional space on the recording

media for the cyclic data.

5
In addition to the scan data and cyclic data, every half hour of each

day, a series of data were recorded to provide additional data for the

outdoor environment, the status of the heat pump, and supplemental data

for checking the functioning of the fundamental data channels of the

instrumentation and DAS.

Daily performance data were also accumulated and printed out and recorded

at midnight each day. The daily performance data represent a summation

of the cyclic data for the day. The daily performance data also include

the average outdoor dry bulb temperature and the average outdoor dew point

temperatures for the day. These average values were taken from the 48 half

hour data scans taken throughout the day.

Samples of computer printouts of scan, cyclic, half-hour, and daily data

recordings made from the raw data recorded in the field are shown in

Appendix A. These printouts were made using a central microcomputer located

at NBS and programmed to extract the specific type of data desired. The

software for performing this task will be discussed in section 7.19.

2.3 DATA ACQUISITION SYSTEM SELECTION

The method of recording the desired data introduced several problems — the more serious problem being cost. Numerous types of data recording systems

were investigated. The cost of any manufactured data acquisition system

(DAS) that would meet the requirements previously outlined far exceeded

the money allocated. Systems utilizing cassette tapes for recording were

also found to be out of the desired price range and required other components

(e.g., tape control devices, buffers, timers, etc.) which would have to be

designed and assembled in-house. However, when the cost and capabilities

of off-the-shelf components to produce a microcomputer system with a floppy

disk drive and controller were investigated, the capabilities of such a unit were found to exceed the requirements. In addition, the cost was well

within the acceptable range and the Cromemco Z-2D disk computer system was

selected over other systems because of cost, availability, versatility, and

previous NBS in-house experience.

This microcomputer-based DAS was capable of: 1) continuously scanning the

mode of operation of the unit; 2) recording, on the disk, raw and reduced

data at the desired time increments; 3) accepting any standard portable

console operating with a standard serial RS-232 interface (for the purpose

of monitoring, updating software, changing disks, repairing and checking

the functioning of all input channels, etc.); 4) accepting any manufacturer's

component card with the standard S-100 bus; and 5) accepting a "bootstrapping"

program that reinitiates the operating program in the event of a power

failure. The actual DAS system configuration is described in more detail

in the following section.

2.4 BLOCK DIAGRAM OF INSTRUMENTATION AND DATA ACQUISITION SYSTEMS

A simplified block diagram of the instrumentation and DAS systems is shown

in figure 1. A brief description of the components of the system follows.

A more detailed description of the instrumentation is given in section 3,

while the DAS is described in more detail in section 5,

6
CU 4J

c0

4-1 CO 33d

COdo

•H 3 U 3

cO •u

4-J CO d

<D 3 g r—

3 cu

5-i •H

4J CM

COd d, •H g3

CM

a

O

4-1

g cO

cO 05 M 32

60

CO

d

•H •H 3 3

CU

O CO o 3 1—1 g

<3 3 4-1 CU CO •H >6 CM CO •Hi—

d

d. 0 E •H

•H 4-1 CO •H

CO •H • 3 1—1 cr0

(1) cO

5-i 3

60

•H

Pm

CO CO 1—

CO

M 5-i cOM

CU a)

d CU 60 O a 0 a O 3 CU 3 •H CU 3

r-H "3 CO 3) 4-1 3 3

cO co <—

co cO

O CO

d

d 3 d 5-i s d

C CO

d cO CU co

5-1

M d. S-i

HH

O

H 7
The analog transducers continually monitored temperatures, differential

pressures, differential temperatures, dew points, and atmospheric pressure.

Pulse-type transducers included the watt-hour meters and the reciprocating

condensate pump metering the condensate from the indoor coil during the

cooling season. The operation mode transducers continually monitored the

compressor and outdoor fan operation and indicated the operational status

of the heat pump, i.e., on, off or defrost.

The signal conditioning unit accepts the outputs of the various transducers

and amplifies, attenuates, or otherwise conditions these signals to fall within

the acceptance ranges of the microcomputer, while maintaining the maximum

possible accuracy.

The microcomputer accepted the signals from the signal conditioning cards

and made the required translations and calculations specified in the

software. This unit also recorded the desired information on a single five

inch floppy disk at the end of a scan, cycle, day, or 1/2 hour period, as

the program directed. In addition, signals are sent back to the signal

conditioning unit to reset the pulse-counting components at the end of a cycle. The microcomputer was accessible by connecting a portable terminal

to monitor the functioning of the unit and all input channels. The disk

was replaced periodically to avoid overflow and was capable of storing data

for a period of 5 to 10 days, depending upon the activity of the unit.

2.5 ROLE OF A CENTRAL MICROCOMPUTER

A central microcomputer located at NBS was used to obtain the raw data from

the floppy disks recorded in the field. The central computer was programmed

to display on the monitor screen the desired data. This central computer

was also equipped with a printer to provide hard copies of any desired data.

The central microcomputer is a Cromemco Z-2D disk computer systems with two

5 1/4-inch floppy disk drives, a 64K static memory, and a CPU board utilizing

the Z-80 microprocessor. In addition to reducing the data recorded on

the raw data disks printed in the field, this central unit allowed the raw

data to be edited and the edited data recorded on a separate disk. This

feature allowed the edited data to be limited to those desired for a specific analysis, thereby providing space for 5 to 10 disks of raw data

on a single disk. Another primary feature of this editing stage is that

the raw data disk was left unchanged for any further analysis. The software for reducing and editing the data from the raw data disks is described

in sections 7.19 and 7.20.

3. MEASUREMENTS AND INSTRUMENTATION

3.1 AIR FLOW MEASUREMENT

Since these field tests were being performed on heat pumps in the homes of

NBS employees and any modification to the unit required restoration, the use of nozzles, air straighteners with multiple pitot tubes, or other means

of flow measurement which restricted air flow or required major modification

to the ducts was not practical. Such techniques would not only increase

the cost of this basic measurement, but would generally disrupt the normal

8
air flow in the duct and increase the noise level of the system.

A pitot tube was located in the return duct at a position that would give

the best possible flow conditions. Velocity measurements were made using

an inclined manometer attached to pitot tube at the centers of 30-35 equal areas in the return duct. The pitot tube was mounted at the location in

the duct which best approximated the average velocity of the total number

of locations sampled. Since the speed of the indoor fan often changes

between the heating and cooling modes of operation, another scan of the

velocities in the return duct was made at the beginning of each season and the position of the pitot tube changed, if necessary.

One of the three field test units utilized two return ducts. In this

case, the velocity profile was determined in each duct and a pitot tube was mounted at the appropriate point in each duct. Sections of tubing

of equal length were brought from the static and velocity legs of each

pitot tube to tees. The center outlet of the tees were then connected to

the differential pressure transducer.

The use of the simple pitot tube, however, was complicated by the search for

a reliable transducer to continually monitor the velocity pressure measured

by the pitot tube. In general, the cost of the majority of transducers

investigated exceeded the money allocated for all the instrumentation.

However, a very stable and accurate device was found that was designed to

operate from 0-10 inches (0-25.4 mm) of ^0. The range originally

selected for these field tests was from 0.01 to 0.20 inches (0.0254 to 0.508 mm)

of ^0. The specifications of the transducer located indicated a maximum

error of +0.05% of the reading plus 0.005% of the full-scale reading.

At 0.01 inches (0.0254 mm) this tolerance represented a maximum error of

+0.00055 inches (+-0014 mm) of water, which was well within an acceptable

range. Although the cost of these units exceeded that which had originally

been allocated for this instrument, they were purchased because of the time

and cost involved in designing and building a more suitable unit. The

pressure transducers purchased were listed as Type 590D-10T-2Q1-VIX-4D

manufactured by

Datametrics Inc.

340 Fordham Road

Wilmington, MA 01887.

These transducers were located in the field as close as possible to the

pitot tube and in an inconspicuous place - such as on a board nailed across

the two floor joists located above the pitot tube.

This transducer has an output of 0 to 10 VDC depending upon the differential

pressure involved. Since the full-scale reading is for a differential

pressure of 10 inches (254 mm) of ^0, the output signal for the range

encountered in the field was 0.01 to 0.20 volts. The input for this

particular transducer is specified by the manufacturer to be +20 to 33

volts DC or 20 to 30 volts AC, 50-400 Hz. Neither of these voltage supplies

were available from the DAS without adding other components. Since space

in the DAS hindered the addition of other components, a simple bypass of

a 12-volt regulator in the unit was made and the unit was powered directly

from the 12-volt DC regulated supply in the DAS, after carefully reviewing

the circuit diagram and consulting with an engineer at the manufacturer's

plant.

9
The pressure transducers operated on the variable capacitance principle

and utilized a well known bridge circuit and a balanced demodulator. As

the AP changes, a diaphragm deflects and changes the capacitance which

shifts the balance of the bridge. The resulting signal is demodulated and

amplified to give a DC voltage directly proportional to the AP across the

cell. All components of this transducer are shielded and the cell was corrosion

resistant to all gases and liquid vapors found in air.

3.2 DEW POINT MEASUREMENT

The measurement of the quantity of moisture in the air passing over the

indoor coil is needed to determine the mass flow rate of the air. The

moisture in the air outside the residence is required to obtain correlations

between the frosting of the outdoor coil and the ambient air conditions.

Several types of moisture sensing devices were investigated. However, most

of those found within a desirable cost range were found to be temperature

dependent. Several had temperature sensors adjacent to the sensor and

offered direct readouts with temperature compensation.

The characteristics of the Industrial Dew Point System offered by

Industrial Division

Yellow Springs Instrument Co., Inc.

Yellow Springs, OH 45387

appeared to meet the needs of this task. The Basic Dew Point Cell, Model

9400, and the Basic Transmitter (amplifier) Model No. 1394 were used.

Dew point cells were located in the return duct and in an outdoor weather

station mounted outside the residence from 8 to 12 feet (2.4 to 3.7 m)

above the ground (see figure 4.6). The transmitters were mounted in the

signal conditioning unit.

The output of these sensors is based on the crystal-liquid transition point

of lithium chloride. The cell is constructed as a single unit approximately

3/8 inch (9.5 mm) in diameter and 33/4 inches (95.3 mm) in length. Bifilar

heater electrodes were wound on a fiberglass wick surrounding a precision

platinum resistance temperature detector (RTD) . The wick was impregnated

with LiCl, a hydroscopic salt, which becomes increasing conductive as it

absorbs moisture from the surrounding atmosphere. When an AC voltage is

applied to the bifilar heater windings, moisture evaporates from the wick

until a heat-moisture equilibrium is reached. This temperature is sensed

by the RTD whose output is related to the dew point of the air adjacent

to the cell and is continually sensed by the signal conditioning unit.

In the event of a sudden change in the surrounding air or a power outage,

the cell becomes excessively wet and the system automatically switches to

the self-dry mode which de-energizes the bifilar windings and energizes the

RTD to dry out the wick. When the wick has evaporated the excess moisture,

the system automatically switches back to the normal mode of operation.

This feature of the system was found to be of great value in the field

tests where the equipment could not be under continuous surveillance.

10
When the dew-point cells were initially installed in the return duct of

each system, they became excessively wet each time the indoor fan was

energized. When this happened, the RTD often required a longer period to

sufficiently dry out the cell and switch to normal operation than the total

time the fan was operating. The manufacturer was consulted and suggested

that the upstream outlets in the housing of the cell be shielded. After this

minor modification was carried out, the units performed satisfactorily.

The dew point cells are designed to respond with a time constant of 0.9

minutes in still air. The response time in the return duct corresponded

to a time constant of less than 1 minute after the upstream outlets were

shielded. An initial series of calibration tests confirmed the specified

1 mV/°F (dew point temperature) output from the transmitter. However, minor

offsets were required in the DC voltage output of the transmitter to reflect

the correct value of the dew point.

3.3 DIRECT TEMPERATURE MEASUREMENTS

The temperatures of the air in the supply and return ducts and the outdoor

air temperatures were continuously monitored. The return duct temperature

was monitored to establish a base to be used in computing the temperature

difference across the indoor coil. The latter was measured using a thermopile

described in a following section. The actual temperature in both ducts

also served as a check on the data recorded from the thermopile. These

three temperatures were monitored using special thermistors designed to

respond in a relatively linear fashion. The thermistors in the ducts were

mounted on the supporting grid for the thermopile. The outdoor thermistor

was mounted in the weather station outside the house. (See figure 9, page 30.)

A typical thermistor is designed using a metal oxide, and functions with a negative response to temperature. Generally, a typical thermistor is used

in one leg of a Wheatstone bridge circuit. The bridge is arranged in such

a manner that an increase in temperature, which results in a decrease in

the resistance of that leg of the bridge containing the thermistor, will

indicate a positive response. Unfortunately, the typical thermistor is

nonlinear and the outputs require relatively complex mathematical expressions

to relate the output signal to the correct temperature.

The composite thermistors used in this project were desiged with oxides of

two metals, one mounted adjacent to the other, and encapsulated with three

leads extending from the bead. Special metal film resistors are supplied

with the units to complete the bridge circuit. By utilizing the different

negative responses of the two oxides and inserting the corresponding resistors

in the circuitry, the output was relatively linear. The manufacturer of this

device was

Industrial Division

Yellow Springs Instrument Co.

Yellow Springs, OH 45387

and it was called a "Thermilinear Thermistor Network, YSI Part No. 44201."

11
The various components of the network are interchangeable with a tolerance

of +0. 27°F (+0.15°C) from +32°F to 212°F (0°C to 100°C) . The deviation

from linearity was 0.36°F (+0.2°C) over this entire range. These units

can be used in a voltage mode or a resistance mode. To simplify the

circuitry, these devices were used in the voltage mode for this project.

The total cost of this entire "network" was only three times the cost of a typical nonshielded, nonlinear thermistor.

The circuit which is shown below had an output impedance of 10 Mfi.

Output

The specifications state that the output

the equation:

E = (+0.00297127 E. ) T

out m

where T is the temperature in °F and E^

Regardless, of its theoretical response,

along with its conditioning circuit over prior to installation in the field.

The response of these special thermistors is 10 seconds in still air,

which is well within the required limits. To satisfy the manufacturer’s

specification that the resistor R.. be mounted close to the encapsulated

bead, the resistor and the ends or three leads of the thermistor were

sealed in epoxy leaving the composite bead exposed without additional thermal

mass. This resulted in a hermetically sealed transducer and resistor which

were then mounted in the ducts and weather station. The resistor, R£

,

which could be mounted up to 100 feet (30.5 m) from the thermisotr, was located in the signal conditioning unit, since the longest lead for this

transducer was less than 50 feet (10.24 m) for any of the installations.

signal E

q

, is represented by

+ 0.03985 E.in

was set equal to unity (1 volt)

each thermistor was calibrated

the required range (or ranges)

12
Thermistors are often abused when used in the voltage mode. The E_^ voltage

is applied without giving consideration to the self-heating errors^hat

result. In the design of the circuitry for the thermistors used in this

project, the value of 1 volt was selected to minimize any self-heating errors.

The manufacturer's literature stated that a maximum of 2 volts could be

applied without self-heating errors when the thermistor is immersed in

stirred oil, where the dissipation constant is 8mW/°C. In air, the

dissipation constant is less and the applied voltage must be reduced to

avoid errors induced by self-heating. Heat sinks are often applied when

using higher voltages; however, such techniques are not recommended when

the medium of interest is air and a relatively short response time is

important.

3.4 BAROMETRIC PRESSURE

The barometric pressure at each of the field installations was continuously

monitored to compute the specific volume of the air passing over the coils

and the humidity ratio at saturation. These quantities are directly related

to the sensible heat released or absorbed by the indoor unit.

A suitable barometric pressure transducer and a transmitter were found

available from:

Industrial Division

Yellow Springs Instrument Co., Inc.

Yellow Springs, OH 45387.

The YSI - Sostman Model 2014 transducer with a range of 27.0-31,5 inches

(685.8-800.1 mm) of mercury was selected since it fell within the typical

ranges of atmospheric pressures encountered in the area and altitudes of

the field test units. A transmitter, Model 1354, was selected since the

signal conditioning unit could conveniently house this single circuit board.

The transmitter required a line voltage of 115 VAC and yields a linear

output of 0-5 VDC that is proportional to the barometric pressure. The

transducer monitors the barometric pressure by monitoring the motion of

a diaphragm capsule. Pressure changes activate the diaphragm which

moves a contact across a precision potentiometer. The specified accuracy

of the potentiometer is +0.3% of the range span. The resulting signal is

amplified by the transmitter. Prior to field installation, each unit was

calibrated using a mercury manometer.

It is of interest to note that the cost of the transmitter was less

expensive than the transducer and could have been designed to be an integral part of the signal conditioning unit. However, the manufacturer's

amplifier was purchased to reduce the complexity of the signal conditioning

circuit. If a larger number of field units were to have been instrumented,

the amplifier would probably have been included in the design of the signal

conditioning unit in order to reduce the total cost of the instrumentation.

13
3.5 TEMPERATURE DIFFERENTIAL ACROSS THE INDOOR COIL

Thermopiles were used to determine the temperature change of the air as it

passed through the heat exchanger of the indoor unit. In two of the three

field units (nos. 1 and 2), the area of a supply and a return duct was divided

into nine equal parts. A type T, copper-constantan thermocouple function

(assembled in accordance with reference 5) was located in the center of each

area. The supply and return thermocouple function were connected in series

to form an 18 function thermopile. The section of the supply and return

ducts in which the thermopile was mounted was carefully selected to avoid

any direct radiation from the auxiliary heaters and to be in an area where

the air flow was well mixed.

While these same procedures were followed in unit no. 3, a 40 function

thermopile was used in this installation because of the relatively large

area of the return plenum. In this unit, the air from the two return ducts

joined a return plenum at the base of the indoor unit from opposite sides.

The cross-sectional area in the plenum, above where the return ducts were

attached, was divided into 20 equal areas and a thermocouple function

placed at the center of each area. Twenty thermocouple functions were

mounted in the major supply duct at centers of nine equal areas — two

thermocouple functions were placed at the center of each area with two

additional functions located in the center of the duct. The supply and

return thermocouple functions were connected in series to form a thermopile.

Although the temperature measurement procedure used for unit no. 3 was

slightly different from the other units, numerous tests indicated that

there were no significant measurement errors. A special transducer channel

was also added to the instrumentation of unit no. 3 to continually monitor

the temperature of the air in a smaller secondary supply duct. A review

of the samples of recorded data for unit no. 3 indicated that the temperatures

in the primary and secondary supply ducts were virtually the same under all

operating conditions.

All thermocouples were mounted in the ducts with equal lengths of lead

wire exposed to the air within the duct to avoid errors induced by the

thermal conductivity of the thermocouple wire.

The output from each thermopile was checked at the maximum AT and at

AT equal to zero for both the heating and cooling mode of operation. The

procedure for changing the polarity and amplifiers when the heat pumps

shifted from heating to cooling is described in the section on the signal

conditioning unit.

A schematic diagram of the thermopile is shown below:

14
3.6 ELECTRICAL ENERGY INPUT MEASUREMENTS

The measurement of electrical energy consumption of the field test units

was made using watt-hour meters with pulse initiators. The pulse initiator

is activated by a gearing mechanism connected to the meter disk. The

pulse initiator in the watt-hour meters selected had mercury-wetted

bi-stable output relays which magnetically latch in one position and did

not change state until the initiator circuitry "told" the relay to change

state. The mercury-wetted contacts eliminate the majority of contact bounce,

which is often a serious problem in pulse-counting circuits. Since the

circuitry design for the signal conditioning unit was already available

for open-close type pulse-counting mechanisms, the pulse initiator was used

with a two-wire connection that employed the common and either of the other

two contacts connections. Both 1 watt-hour /pulse and 20 watt-hour /pulse

meters were used in this field study.

The outdoor unit at installations no. 1 and no. 3 and the outdoor and

compressor units at installation no. 2 were wired on a separate circuit

and the more sensitive meters (1 watt-hour /pulse) were employed. The indoor

units were on two separate circuits for units no. 1 and no. 2 and on a single

circuit for unit no. 3. Since these circuits were wired to carry the

auxiliary heating and the indoor fan loads, the meters yielding 20 watt-hours/

pulse were used to avoid excess overflow of the pulse-counting registers

in the signal conditioning unit.

All wiring alterations, including the installation of the watt-hour meters

were performed after permits were obtained from the local county office by

a registered electrician. All work was inspected by the county electrical

inspector and a seal of approval was placed on the service box at each of

the three residences.

The signals from the pulse initiators were summed in the signal conditioning

units and recorded at the end of each scan period. This is discussed in

more detail in the section 4.2.

3.7 CONDENSATE METERING

The condensate from the indoor coils was measured during the cooling season

to determine the latent energy output of the system for each cycle. Previous

laboratory tests indicated that typical f^ow rates would vary from 0 to

slightly over one gallon (0 to > .00379 m ) per hour depending upon the

temperature and moisture content of the air passing over the coils and the

cooling capacity of the heat pump. The relatively small heads available

at the condensate drains in the field did not permit a gravitational

measurement system to be used. A search for an inexpensive, reliable, and

accurate positive displacement pump led to the use of a solenoid metering

pump manufactured by:

Valcor Engineering Corp.

365 Carnegie Ave.

Kenilworth, NY 07033.

15
The series 500 pump (with the Buna-N elastomer) was recommended by the

manufacturer. A reservoir was built with a float that activates a timer

connected to the small pump. The timer served two purposes — it allowed

the pulse rate to be adjusted from 3 to 120 cycles/minute, and, it protected

the pump from overload since the maximum duty cycle of the pump was 50

percent with a maximum 6 seconds "on" time. Figure 2 is a photograph of the

heat exchanger unit showing the reservoir under the return duct.

The original design was made to allow an upper float to activate the timer

when the reservoir was full and the lower float to stop the pump when the

reservoir was empty. A false "full" signal was sent to the timer at the

end of each heat pump cycle period by a relay connected in the circuit.

Two basic problems surfaced after these units were calibrated and installed

in the field. First, the capacity of the reservoir was too large. During

the periods of heavy cooling loads, the pump might have only five minutes

to empty the reservoir while the compressor was off. The pump had been

carefully calibrated to displace 1 ml of condensate per stroke and at

120 strokes per minute, the pump could only displace 600 ml during a 5 minute compressor-off period. The reservoir was, however, designed with

a capacity of approximately 4 liters. This problem was solved by shorting

out the upper reservoir float and letting the overriding signal from the

lower float turn the pump on and off. This solution had one minor disadvantage.

It reduced the accuracy of this measurement from < 1 percent to approximately

1.5 percent. However, its major advantage was that it allowed the pump to

displace and monitor the condensate as it was released from the coil. This

allowed the pump to perform the vast majority of its work while the heat

pump was in operation and the "ticking" sound of the pump could not be heard

by the people in their homes. Using the original design, several minor

complaints had been voiced regarding the noise of the pump. Operating in

the modified mode, this problem was eliminated and the pump, typically,

displaced from 5 to 15 ml of condensate per "burst" of pulses, depending on

the rate of condensate flow and the sensitivity of the lower float.

The second basic problem that surfaced was an unexpected reaction of the

Buna-N "0" ring on the piston of the pump with the condensate. Within

three days after the pumps were installed in the field, the calibrations

of the pumps became erratic. When the pumps were examined, the "0" rings

on the piston were found to be enlarged and a black deposit was found on the inner surface of the stainless steel cylinders of the pump. The

manufacturer, when contacted, suggested that condensate was not

"normal" water, but water that made an excellent electrolyte for the

Buna-N to react with ions in the water from the copper fittings in our reservoir and the aluminum coil and fins of the indoor unit. The Buna-N

rubber "0" rings were replaced with ethylene propylene "0" rings, the

deposit removed from the cylinder of the pump and the pumps were recalibrated.

No further problems of this kind were encountered with the new "0" rings.

After the above problems were solved, the simple solenoid pumps functioned

very well. The displacement was checked as often as once each week until

adequate confidence was obtained in the calibration of the pump.

16
Figure 2. Condensate metering device shown under the return air duct on

the right side of one of the field test units. The condensate was diverted

into the metering reservoir and then forced by the positive displacement

pump into the original sump pump installed by the heat pump contractor.

The positive displacement pump can be seen on the right side of the

metering reservoir.

17
The slight loss in accuracy that was observed when the pump was controlled

only by the bottom float was related to the float displacing less than 1 ml

before being turned off. That is, when the float started the timer, the

pump would displace 1 ml per stroke until the float stopped the timer.

However, occasionally the float would cut off the power to the pump while

the pump was in the process of displacing its last ml of condensate for

that "burst." If the float cut the power to the pump within a few msec

after the pump was energized, the pump would not complete its stroke, but

the stroke would be registered by the counting circuit. Fortunately,

this did not occur very often and its effect is not believed to be

significant.

Plastic tubing was placed in the systems to allow the condensate to overflow

from the reservoirs into the original drains in the event of equipment

failure. The lack of the head available in the condensate drains required

a watertight system to be utilized. The reservoir was vented by an overflow

line leading to the normal condensate drain. If the condensate pumping

network should fail, the reservoir would fill and the condensate from the

coils would be released through the overflow line. Although heads as low

as 3 inches (76.2 mm) were encountered in the field to force the condensate

out the overflow lines from the reservoir, each overflow system was tested

and found to work satisfactorily.

The pump strokes were counted by the signal conditioning unit. In order

to avoid typical problems caused by inductive circuits, an optical coupler was used which is described in the following section.

3.8 DETECTORS FOR THE MODE OF OPERATION OF THE HEAT PUMPS

The definitions of the cycle period and scan periods presented in section 2.2

indicate the need for the DAS to continuously monitor the mode of operation

of the heat pump. In addition to the heating and cooling functions of the

unit, which were detected bv the DAS using the position of a manually controlled

switch, there are three normal modes of operation: the "on" mode (compressor

on, outdoor fan on); the "defrost" mode (compressor on, outdoor fan off);

and the "off" mode (compressor off, outdoor fan off). To avoid any possible

interference with the heat pump controls and to prevent possible errors in

signal detection, isolation transformers were used for connection with

the heat pump. One transformer was placed in parallel with the power

lines to the compressor and a second transformer was placed in parallel

with the power lines to the outdoor fan. In each case the transformer

consisted of a 230 VAC primary coil and a 24 VAC secondary coil. These

are relatively small transformers with an isolation resistance of 1500

VAC and an output rating of about 15 VA. With these transformers in

place, adequate power for signals was available when the respective power

lines were energized.

Since a DC signal was required by the signal conditioning unit, an optical

coupler was used. A schematic diagram of the circuit is shown in figure 3.

When the unit being monitored is energized, the secondary side of the isolation

transformer yields 24 VAC. The current from this potential source is

limited by the resistor R^, resulting in a maximum or peak forward current

of approximately 2 ma through the solid-state lamp in the opto-coupler

The light from this lamp energized the Darlington amplifier, which begins

to discharge the capacitor, C^ , and, within approximately 50 msec, drops

the potential at the signal point to less than 1.5 volts. During the reverse portion of the 60 Hz cycle, the reverse current passes through

18
Signal Conditioning

Unit

Figure 3. Opto-coupler circuit used in

monitoring compressor and outdoor fan

19
the external diode and the reverse voltage across the solid-state light

remains at approximately 0.5 V, which is well below the maximum rating.

When the power line to the unit being monitored is de-energized, the

potential at the signal point rises to +12 V within approximately 0.5

seconds. This provides a high signal level for the "off" mode and a low signal level for the "on" mode.

This same basic circuit was used in counting the number of times the

condensate pump was activated. The only differences were that the

isolation transformer was omitted and the value of was increased to

68K. This allows the opto-coupler and the reverse diode to be connected

across the solenoid pump's 115 VAC power lines. The 68K resistance reduced

the current and the reverse potential was limited by the diode. An isolation

transformer was not required in this case since all components (except the

pump itself) were located within a grounded enclosure.

4. DESCRIPTION OF SIGNAL CONDITIONING UNIT

The purpose of the signal conditioning unit, mentioned in section 2.4 and

shown in the block diagram in figure 1, was to receive the signals from

the various transducers and condition these signals to fall within ranges

that are acceptable to the microcomputer and allow the signals to be processed

and recorded with the maximum possible accuracy. The necessary power

supplies, and the components of several transducers already described

(e.g., transmitters for the dew-point sensors and transmitter for the

barometric pressure transducer) are contained in this unit. However, the

primary purpose of the unit is to house the specially designed printed

circuit boards used to condition the signals from all the input channels

(including the mode of operation) and present the conditioned signal to

the microcomputer upon request. Figure 4 is a photograph of the electrical

meters, the signal conditioning unit, and the microcomputer in one of the

field installations.

There are three types of these specially designed printed circuit boards:

analog, counting, and encoder. Each type is described briefly in the

following sections.

4.1 ANALOG SIGNAL CONDITIONING CIRCUITS

The signals from all analog transducers were conditioned to fall within

the input range of the A/D (analog to digital) converter in the microcomputer. The microcomputer requires all analog signals to be converted

into digital signals for processing. The A/D converter's signal input

range was from -2.56 to +2.54 volts and was divided into 256 increments

(20 millivolts per division). The signals from all the analog-type

transducers used required amplifying or attenuating, and offsetting to fall

within this required range. The analog signal conditioning circuits were

designed to yield an output voltage from -2.50 to +2.50 VDC over the expected

range of the input signal. By using these limits, a 5-volt swing was available for the normal operating range of the transducer. When the output

of the transducer was just outside the normal range, 60 millivolts or 3

increments were still available for recording and processing values below

the normal range and 40-millivolts or 2 increments were available on the

high end of the scale. By establishing limits in this fashion, a console

20
Figure 4. A photograph showing the signal conditioning unit on the left

side of the supporting table with the microcomputer on the right. The

floppy disk drive is located on the right side of the microcomputer and

is not visible. A portable terminal is shown on the top of the microcomputer.

The three pulsing watt-hour meters used for this project are mounted on

the wall in the background. The barometric pressure transducer and the

condensate pump control box are resting on the top of the signal conditioning

unit.

21
printout of -2.56 volts or +2.54 volts generally Indicated either a malfunctioning input channel or a channel which was not activated (such as the

output from the pitot tube when the indoor fan was off)

An instrumentation amplifier AD521, made by Analog Devices, was selected

for this task primarily because of its availability, wide range of gain,

linearity, stability, high input impedance, and built-in output offset

trim and gain trim features. The specifications for this amplifier are given in reference 6. Since only five basic conditioning circuits were

required, the analog conditioning circuit board was designed to accept

any one of the input signals and condition it in one of four different

areas on each board. Table 1 lists each of the channels in the signal

conditioning unit.

The five basic conditioning circuits and their applications are discussed

in the following subsections.

4.1.1 AIR FLOW

As described previously, the velocity of the air flow was determined by a pitot tube mounted in the return air duct. The outputs of the pitot tube

were connected by flexible tubing to a differential pressure transducer/

amplifier. The output of this amplifier was from 0 to 10 VDC for differential

pressure from 0 to 10 inches (0 to 254 mm) of F^O. Since the range of

interest in this study was from 0.01 to 0.20 inches (0.254 to 5.08 mm)

of H^O, the output from the differential pressure amplifier was approximately

10 to 200 millivolts. This signal required amplifying, offsetting, and,

because of minor turbulence in the air stream, damping. The circuit

which was designed to perform these functions is shown in figure 5.

Each pitot tube, pressure differential amplifier, and analog signal conditioning circuit was calibrated as a matched set using a laboratory air duct

and an inclined manometer prior to installation in the field. The gain

trim and offset features of the AD521 allowed the output of each network

to be adjusted to provide a signal from -2.50 V to +2.50 V over the velocity

range of interest.

4.1.2 DIFFERENTIAL TEMPERATURE

The instrumentation amplifer (AD521) was used in a differential mode to

amplify the "floating" output of the thermopile. Although this is a relatively simple application of the instrumentation amplifier, several

requirements should be noted. First, a return path must be provided for

the bias currents of the amplifier. In thjls design, 2Mfi resistors were

placed at both inputs to provide this path . Second, the amplitude of the

differential input range is greater in the heating mode than in the cooling

mode. To maintain maximum accuracy, two separate boards were assembled and

calibrated. Each board had an instrumentation amplifier for the differential

temperature circuit and the supply duct temperature, and the circuits were

basically the same except for the gain resistor R . When the heating and

cooling seasons changed, the boards were exchanged. The differential

temperature circuits were designed for a 0 to 130°F (0 to 72.7°C)

temperature differential in the heating season and a 0 to 50°F (0 to 27.7°C)

temperature differential in the cooling season. In addition to exchanging

the boards as the season changed, the polarity of the leads from the

22
thermopile was reversed to maintain the same relative potential at the input

pins of the instrumentation amplifer. The difference in the supply duct

temperature circuit is discussed in the next subsection. The signal

conditioning circuit for the thermopile is shown in figure 6. The values

of the gain resistor R for the units using the 18-function thermopile

was 510 ohms for the hlating season board and 180 ohms for the cooling

season board. The values of R for the heating and cooling boards for

the unit with 40-function thermopile were 1100 ohms and 340 ohms, respectively.

4.1.3 DIRECT TEMPERATURE MEASUREMENT SIGNAL CONDITIONING

The characteristics of the linear thermistor network used for direct

temperature measurements were described in section 3.3. The complete

circuit, consisting of the thermistor "network" and the signal conditioning

amplifier, is shown in figure 7.

The printed circuit board containing the thermopile conditioning circuit also

contains one of the circuits shown in figure 7 for heat pumps no. 1 and

2, and two of these circuits for heat pump no. 3 since the latter has two

supply-duct temperature transducers. As discussed previously, there are actually two "seasonal" printed circuit boards— one designed to function

with a temperature range from 50°F to 180°F (10°C to 82.2°C) for the supply

ducts during the heating season and the other designed for a supply

temperature range from 45°F to 95°F (72°C to 35°C) during the cooling season. The value of R was varied depending upon the gain required for the temperature

range covered §y the transducer.

A separate printed circuit board contained two additional temperature signal

conditioning circuits to handle the return duct temperature, which ranges

from 50°F to 95°F (10°C to 35°C) , and the outdoor temperature which ranges

from 0°F to 100°F (-17.8°C to 37.8°C).

g

The thermistor and the associated signal conditioning circuits were calibrated

in the laboratory prior to installation in the field. The values of R

were selected and the null and gain trim control potentiometers were

adjusted to function within the intended range of the thermistor. The

linearity of each unit was also checked and found to fall within the

manufacturer's specifications.

A future modification that would improve the design of the temperature

conditioning circuit would be to replace the divider used to obtain the

1 volt reference voltage with a voltage regulator similar to the LM317

This would establish a fixed reference voltage for these units and make

it independent of possible shifts in the 12 V supply voltage and the current

in the thermistor networks.

25
v+

VFigure 6. Thermopile signal conditioning circuit
v+

Figure 7. Direct temperature measurement

signal conditioning circuit

27
4.1.4 DEW-POINT MEASUREMENT SIGNAL CONDITIONING

The output signal of the dew point transmitters mounted within the signal

conditioning unit was amplified and offset by the signal conditioning

circuit shown in figure 8. The output of the transmitters was approximately

1 millivolt per °F dew point, as specified by the manufacturer.

One dew-point sensor was mounted in a weather station outside of each

residence. The signal conditioning circuit for this sensor was designed

and calibrated to produce an output voltage of -2.50 V to +2.50 V for a dew-point range of -40°F to 90°F (-40°C to 32.2°C). The second dew-point

sensor was mounted in the return duct and its signal conditioning circuit was designed and calibrated to produce the same output voltage span for a dew-point range of 20°F to 90°F (-6.7°C to 32.2°C). Although a complete

calibration over the entire range of each unit was not deemed necessary

or practical, a sufficient number of dew-point levels were used to determine

the slope and check the linearity of all sensors and conditioning circuits

at dew-point temperatures above 35°F (1.7°C). The offset trim potentiometer

adjacent to the instrumentation amplifier allowed the necessary offsets

to be performed without additional balancing of components. Figure 9 is a photograph of the outdoor unit and the weather station at one of the field

installations

4.1.5 BAROMETRIC PRESSURE

The signal from the barometric pressure transducer and transmitter was conditioned as shown in figure 10. Since the output of the transmitter

was 0 to 5 volts for the full range of the transducer, the input signal

to the instrumentation amplifier was offset using the circuit shown. An

alternative design to improve this offsetting circuit would be to use a voltage regulator on the negative input of the instrumentation amplifier

and use the amplifier in a differential mode. This technique would require

less components and retain the input potential within the +10 volt limits

of the differential amplifier.

The simple, but precise, design of the barometric pressure transducer

encourages combining the amplification circuit with the signal conditioning

circuit. However, prior to the time of procurement, the characteristics

of the transducer were undetermined and the transmitter was purchased

primarily to protect the transducer from possible damage by the signal

conditioning unit.

4.2 PULSE COUNTING CIRCUITS

The pulse counting circuits in the signal conditioning unit were designed

to allow the pulses from the watt-hour meters and the condensate pump to

be independently counted and to be transmitted to the microcomputer on

demand. Provisions were made to reset the count on each counting circuit

to zero by a reset signal from the microcomputer. A switch was also mounted

on the board to allow the counters to be reset manually during testing of

the printed circuit boards in the laboratory.

28
v+

Figure 8. Dew-point measurement signal

conditioning circuit

29
immmm

. ’jgm*V»» w>

. '

^ >. ^ y*,'" *

Figure 9. The outdoor unit at one of the field test sites. The weather

station containing a dew point sensor and a thermistor is shown mounted

on the fascia board on the house. The isolation transformers for energizing

the opto-couplers monitoring the compressor and outdoor fan are mounted

inside the outdoor unit's housing.

30
v+

Figure 10. Barometric pressure signal

conditioning circuit

31
A block diagram of the pulse-counting circuit is shown in figure 11. The

contacts in the watt-hour meter or the transistors in the opto-couplers

cause the amplifier to go into saturation and pulse the one-shot monostable

multivibrator to generate a square pulse for a predetermined time period.

This time period must be large enough to prevent contact bounce from

causing more than one count to be registered per contact closure, but small

enough to allow the fastest input pulse rate to be counted. This was not

a serious conflict in the application of these circuits for this project,

since the time period of the possible contact bounce was much shorter

than the time between pulses from the watt-hour meters or condensate pump.

A CMOS 12-stage binary count er/divider receives the pulse from the oneshot multivibrator. In this project, the divider was not used in any of

the pulse counting circuits and the pulse passed through the divider, which

was preset at unity, and registered directly on the 12 bit binary counter.

This counter is capable of registering up to 4095 pulses, with the 4096th

pulse simply resetting the counter to zero. If the counter should be

reset by this type of overflow during normal operation, the software in

the microcomputer was designed to automatically add 4096 to the count

recorded in memory.

At the end of each scan period, the binary count was recorded by the microcomputer. The microcomputer obtained the binary count through 12 parallel

lines from the counter after passing through buffers whose purpose was to

avoid disturbing the counter and provide the necessary driving power to

register the count in the microcomputer. The counter was reset to zero

by a reset pulse produced by the microcomputer at the end of each cycle.

Further details of this circuit are not presented since numerous combinations

of components can be used to function in the manner described. Each

printed circuit board designed for this task contained two of the counting

circuits shown in figure 11. Additional details on the 12-bit parallel

transmission of the count to the microcomputer are discussed in section 5.4.

4.3 ENCODER CIRCUIT BOARD

When the signal conditioning unit was first designed, the number of interrupt

signals from a heat pump which would be used in processing and recording

the data was not known. Therefore, an encoder board was designed which

allowed up to eight independent interrupt signals to be buffered into the

microcomputer. However, the final design for the instrumentation and

software allowed the microcomputer to function with only two interrupt

signals. These signals, which were from the opto-couplers on the compressor

and the outside fan, indicate the mode of operation of the unit (i.e., off,

on, defrost). Since there were only two signals, they were simply passed

directly through the encoder board to the microcomputer. A schematic of

the encoder circuit board is shown in figure 12 since future studies might

require the use of additional interrupt signals and the encoder board

shown will allow up to six more circuits to be added without further design

changes

32
+12 V

4-1 3

Q4-1 3O \

J-l 3 >-l o o X 4-1 1 CO

4-1 •H

4-t CO

u

CO 3 a) S cO r—i V4 a c H 3

•H o U o

CO o i 4-) o O CO 4-t cO u a 4-> <D o 3 4-) O CU 3 u a •rH

33

Figure

11.

Block

diagram

of

binary

counting

circuit
The encoder board shown in figure 12 receives any one of the eight external

interrupt signals as shown and places the corresponding operational amplifier

in saturation. The output of the operational amplifier passes through a buffer to the data bus of the microcomputer. This same signal is also

routed to a parity-checking integrated circuit. When the parity of the

input changes (even to odd or odd to even) the dual flip-flop circuit

operates accordingly and a signal is generated by a NOR circuit which is

routed to the interrupt terminal in the microprocessor, which then scans the

data bus and takes the appropriate action. A signal is returned from the

microprocessor to the voltage shifter which resets the dual flip-flops and

awaits another change from the external interrupt signal generating sources.

Up to eight interrupt signal sources can be monitored by this circuit.

5. DESCRIPTION OF THE MICROCOMPUTER

A brief description of the microcomputer used to monitor, process and record

the desired data was given in section 2.3 where it was mentioned that the

unit was capable of accepting any manufacturers’ component card designed

for the S-100 bus. A block diagram of the microcomputer used and its

various components is shown in figure 13. In this section, the purpose

and method of operation of the individual components in the microcomputer

will be discussed.

5.1 HOUSING THE BASIC COMPONENTS AND "MOTHER" BOARD

The basic "black box" used in the field for processing and recording data

is listed as a Cromemco Z-2D Disk Computer System manufactured by:

Cromemco Inc

280 Bernardo Ave.

Mountain View, CA 94040

This unit consisted of an S-100 bus mother board capable of holding a total of 21 circuit boards. The power supplies, cooling fan, reset and

power switches, single disk drive, 4-MHz CPU card (utilizing the Z-80A

microprocessor) , the disk controller board (capable of expansion and

standard RS-232 serial interface) , and other standard hardware items were

obtained as part of this basic unit.

Six additional boards were procured separately and added to the basic unit.

They are described in the following subsections. A photograph of the signal

conditioning unit and the microcomputer at one of the field installations

is shown in figure 4.

5 . 2 MEMORY BOARD

The memory board was purchased from:

Artec Electronics, Inc.

605 Old County Road

San Carlos, CA 94070.

34
Hex

Buffers (2)

Inputs

Reset

Signal

from TU-ART

Board

Reset Pulse

to Flip-Flop s

Voltage

Shifter

Section of

Hex Buffer

Interrupt

Input On

TU-ART Board

Figure 12. Diagram of encoder circuit board
Computer

S-100

Bus

rii

cn oo g o o

rH CO

CO

G

G <U < co I I I

MlG CO 0) »H G

CO 4-J

O i—1 cO CO G -H G

(X 4-J CL) •rH CO c

•H ^ i-

GC CO O G'

•H 0)

O

4-J TO CO

CO

O

G

u e a)

0) co. ao 1

COGo

coG

di

c/o

36

Figure

13.

Block

diagram

of

microcomputer

data

acquisition

system.
These boards were purchased in kit form with the components for 8K bytes

of memory. However, the boards were expandable to 32K bytes and the

additional memory chips were ordered separately and installed. The 32K

byte memory was necessary to meet the requirements of the software designed

for this project. Each of these boards was tested after assembly and

installation on the S-100 bus.

5 .

CLOCK

The "clock" board was manufactured by:

Mountain Hardware, Inc.

300 Harvey West Boulevard

Santa Cruz, CA 95060

This clock is capable of generating interrupt signals at intervals as fast

as 100 micro-seconds. In this project, the clock was programmed to present

the year, month, day, hour, minute and second, upon demand. This allowed

all events to be recorded showing the time to the nearest second that the

event occurred. The clock board is designed to hold a rechargeable 9-volt

NiCad battery with a built-in recharging circuit. This battery is capable

of keeping the clock running for a period of up to four days in the event of

a power failure.

5.4

8PI0 BOARD

The 8PI0 board was manufactured by Cromemco and is capable of handling

data from eight independent parallel input/output ports. These eight

bi-directional, 8-bit ports can be used either singly or coupled together

to form longer word lengths. In this project, four 12-bit words were

required by the binary pulse-counting circuits. Therefore, one-and-onehalf ports on this board were used for each pulse counting circuit. The

software addressed these parallel I/O ports to obtain the proper data for

processing in the microcomputer. Output data are automatically latched

into an "OUT" port when the CPU executes an output instruction to the 8PI0,

and the input data are latched into an 8PI0 "IN" port by a positive-going

signal transition on the "Latch Input" line. The latter is shown in the block

diagram coming from the TU-ART board.

5.5

"TU-ART" BOARD

The Cromemco TU-ART (Twin Universal Asynchronous Receiver and Transmitter)

board was capable of providing many types of direct input and output to

and from the S-100 bus. The primary features of this board used in this

project were providing the necessary "latch input" signal to the 8PI0 board

and the reset pulse at the end of each cycle for the four pulse counting

circuits in the signal conditioning unit. In addition, this board provided

access to the CPU for the mode-of-operation signals from the encoder board

monitoring the compressor and outdoor fan opto-couplers . The numerous

other features of this board are not used in this project and will not be

described in this report.

37
5.6

ANALOG BOARDS

The last two boards on the right side of the block diagram in figure 13 were "D+7AI/0" multi-channel microcomputer analog interface boards

manufactured by Cromemco. Each of these boards offers one 8-bit parallel

I/o channel and seven channels of 8 bit analog-to-digital conversion of

input data and seven channels of 8 bit digital-to-analog conversion of

output analog data. The analog signal range of these boards is -2.56 volts

to +2.54 volts in 20 millivolt increments for both the input and output.

In this project, since only the input data were being recorded and/or

processed, only the input feature of these boards was used. The maximum

input bias current is 2 microamps and the input impedance is 20M. These

features allowed the signal conditioning circuits to be designed without

concern for load problems. Briefly, the signals from the analog channels

are buffered on this board and the input multiplexing switch selects one

of the channels. The signal on this channel is connected to one input of an analog comparator. The other input to this comparator is derived from

the output of the D-to-A converter. A successive approximation shift register

receives the output of the analog comparator and outputs a successively

larger or smaller digital word to the D/A converter based on the output

of the comparator. When the conversion is complete, the 8-bit output of

the shift register is put on the CPU data input bus through the necessary

drivers. The multiplexing switches to the next channel and this process

is repeated. Since this project required a minimum of nine analog input

channels, two analog boards were used.

5.7

EXPANSION CAPABILITIES

It should be noted that the DAS system recording field data was capable of some expansion without additional hardware. For example, only 9 of the 14

available analog input channels were being utilized and only 6 of the 8PI0

channels were in use on the 8PI0 boards. In addition, the two digital

channels available on the analog boards were not being used. Also, six of the

eight interrupt channels are available for use. Although these additional

channels were available within the microcomputer, the software and the

necessary signal conditioning, pulse-counting, or interrupt transducer

circuits would be required. In general, the software would probably present

the most difficult task in expanding the present system to utilize its

full capabilities.

5.8

DATA RECORDED AT FIELD TEST UNITS

The periods of scanning and recording data were discussed in section 2.2.

Examples of printouts taken directly from the raw data are shown in

Appendix A. Examples of the printout received through a portable RS-232

console connected to a field unit as shown in figure 13 are shown in

Appendix B. A brief explanation of each of these types of printouts is

also given.

38
When the field units were first put on-line (March/ April 1980) , each data

scan was being recorded on the disk. It was soon discovered that the

capacity of the disk was too small to record data at this level of detail.

At this point, the software was modified so that data from each scan were

used in the calculations but only the scan data from every 10th cycle were

recorded on the disk. (Data summarizing the performance of the heat pump

during each cycle continued to be recorded as originally intended.) This

modification allowed the five-inch disk to retain from 5 to 10 days of

data, depending upon the activity of the heat pump. The cycles for which

the scan data were recorded provide the detail data on temperature

profiles and minute-by-minute operation that were needed for analyzing

certain aspects of the dynamic performance of heat pumps.

The software also allowed the frequency of recording the scan data to be

manually overridden through the portable console. This feature was extremely

valuable in making tests and observing the reaction of all input channels

during a field visit to check out both the instrumentation and the heat pump.

5.9 EFFECTS OF POWER FAILURES

The microcomputer utilized 32K of static memory. When the power is removed

from this type of memory (due to an electrical storm, power outage, etc.)

the entire contents of the memory is lost and only the data recorded on

the disk can be retrieved. To avoid the effects of losing the operating

programs used to direct the operation of the microcomputer, a "bootstrapping"

program was added to the system in a PROM (programmable read-only memory)

Since this memory is non-mobile, the bootstrap program allowed the operating

program to be reloaded from the disk when a power failure was over and for

the microprocessor to proceed in a normal fashion.

Although this bootstrapping method has been relatively successful in this

project, it leaves several items to be desired. For example, if the power

is lost for any reason, the bootstrapping procedure starts the instant the

power is resumed. This procedure takes about 15 seconds. If the power

is momentarily lost again within this period, the bootstrapping procedure

is stopped and the operating programs are not loaded in. If this should

occur, all data stored on the disk is normally lost if the file on the

disk has not been closed.

The momentary outages from electrical storms frequently occur in short

bursts and a situation such as described above is not uncommon. To avoid

losing a disk of data, the field microcomputer is checked for the loss

of the operational program prior to the removal of the disk. If the program

has been lost, the reset switch is activated and the bootstrapping program

is allowed to refresh the memory and allow the data file to be closed by

the console, thereby retaining the data prior to the loss of power. However,

no data will have been recorded for the period after the power outage.

39
To aovid this shortcoming, several steps were taken and additional ones were considered. One step considered was to modify the software, so that

a file is closed at the end of each recording and is reopened to record

additional data. This modification to the software will avoid the loss of

data if a disk should accidentally be removed without closing the filb.

An additional step under considered was to incorporate a delay in the start

of the bootstrapping program after a power outage. This would require an electro-mechanical device to be installed in the microcomputer to electrically

activate the reset switch only after a short period (10-30 sec.) has elapsed

from when the power is restored. This feature should overcome the effects

of short bursts of outages, allow the power supply to charge its capacitors

and supply the unit with the proper voltages, and allow the disk drive to reach

its required speed before the bootstrapping program is executed. Another

possibility considered was the installation of a "dead-man timer." The

microcomputer would be required to reset this timer before it timed out.

If it did not, the timer would reset the microcomputer and the operating

programs would automatically be reloaded from the disk.

5.10 INTERFERENCE OF TELEVISION PROGRAMS

Any microprocessor will cause television interference in the lower frequency

channels (channels 2 through 6) if it is close enough to the antenna of

the TV set and is not completely shielded. If this happens, the picture is

either superimposed by a variety of herringbone patterns (depending upon

the activity of the microcomputer) or completely "washed out." If the

antenna of the set is far enough (>30 feet) away from the microcomputer,

this interference is negligible. The interference is caused by very weak

high frequency radiation resulting from the fast switching and other

activity taking place in the microcomputer. Shielding is effective only

if the microcomputer is completely shielded for this high frequency radiation.

This is a very difficult task since any joint or opening in the shield will

amplify the radiation to escape unless the joint is electrically "sealed."

See reference 8 for further details.

Fortunately, this is a relatively weak signal and the antennas are generally

far enough away from the source to overcome these effects or at least

minimize them. However, in one of the field test homes, the television

room was directly above the microcomputer and the built-in antennas on the

television set were being utilized. The majority of the attempts to shield

the unit actually aggravated the situation because of radiation from the

"edge" of an incomplete shield. The best solution to this problem would

have been to supply the homeowner with an outdoor antenna. However, the

cost, liability, and other administrative problems prevented this action.

Several different types of television interference filters were obtained

and attached to the set. Each type reduced the extent of the problem but

none eliminated the problem completely. This problem was eventually

"solved" by the combination of an interference filter, finding a specific

location for the indoor antennas for each low frequency channel, and the

willingness of the homeowner to accept a very weak herringbone pattern

superimposed on the lower frequency channels.

40
6. EQUATIONS USED FOR PROCESSING THE DATA IN THE FIELD UNITS

The fundamental equations used in the software routines to convert the raw

data to meaningful engineering quantities are discussed in the following

subsections.

6 . 1 ANALOG DATA

In general, the analog data are processed by using the slope and offset

of the first order equation established during the calibration of the

transducers and signal conditioning circuits. Since the signal conditioning

circuits were designed to function within the range of -2.50 volts to +2.50

volts, the simple equation:

X = (Vm + 2. 50)a + b

was used, where

Vm = actual output voltage from the signal conditioning circuit,

a = slope of the straight line which is equal to the maximum value

of the engineering units divided by 5,

b = offset of the straight line corresponding to the engineering

value selected for the lower end of the voltage scale (i.e.,

engineering value at -2.50 volts),

X = the engineering value equivalent to a voltage of Vm from the

signal conditioning/ transducer circuit.

This basic equation required modification for the differential temperature

measurement obtained using the thermopile since the output (of the

thermopile) was not a straight line. The value of AT (degrees Fahrenheit) was obtained using the equation which follows:

During the heating season:

AT = 44.4919Amv - 0. 98659(Amv)

2

where Amv = 0.6134X - 1.5335, and

X = the actual voltage output of the signal conditioning circuit.

During the cooling season:

AT = 43.9624Amv + 1.2911 (Amv)

2

where Amv = 0.2242X + 0.5605, and

X = the actual output voltage of the signal conditioning circuit.

As discussed previously, the amplifier boards are changed as the season changes from heating to cooling and visa versa. The leads from the thermopile are also reversed to provide a positive output with the appropriate

gain for the selected range of AT (see table 1)

41
6 . 2 DIGITAL DATA

As described in the preceding sections, the digital data were taken directly

from the binary counting boards in the signal conditioning unit. The

following constants are used for each digital counter:

Digital counter no. 1, (The watt-hour meter registering energy consumed

by the compressor and outdoor fan.)

1 pulse = 1 watt-hour

Digital counter no. 2, (The watt-hour meter registering energy consumed

by indoor fan and first stage of auxiliary heaters.)

1 pulse = 20 watt-hours

Digital counter no. 3, (The watt-hour meter registering energy consumed

by second and third stages of auxiliary heaters.)

1 pulse = 20 watt-hours

Digital counter no. 4, (This counter registers the pulses or strokes

of the condensate pump.)

1 pulse = 1 ml

6. 3 DATA REDUCTION EQUATIONS

To conserve space on the raw data recording disk, many of the actual

engineering quantities were processed by the microcomputer in the field

to give the data of primary interest to the project. The equations used

in the software routines are listed below:

(0.02521) (460 + t c )(l + 1.6078 W ) 3 s

where V^" = specific volume

t^ = temperature of air (°F) in the return duct (sensor

no. 5)

,

P = barometric pressure (inches of mercury) (sensor no. 4),

and the constant 0.02521 has the units of ft /[(lb ) (°R)].

ma

2) In P* - 15.4638 - --

7j8

§

--

DP

s where P = partial pressure of saturated water vapor at T. of H ) , and

g

Tpp = dew point in °F (sensor no. 2).

DP

(inches

42
The above empirical forumula was taken from reference 7

where W

s = humidity ratio at the dew point of the air measured in

the return air duct (lb. of water vapor/lb. of dry air).

P^ = barometric pressure (inches of mercury) , and the constant

0.622 is the ratio of the molecular weights of water to

the molecular weight of dry air

4) V = 1096

V

v n + W

II

S

9

where V = volumetric flow rate in CFM in the return duct of the

air/water vapor mixture at the temperature and pressure

in the duct,

2

A = the cross sectional area in ft of the return duct at

the pitot tube and is a constant established for each

field unit,

= the velocity head in inches of obtained from the

pitot tube - (sensor no. 1).

5) Q

= VC AT At

Pa

60 V

" n

where C

pa

.240 + .444 W is the specific heat of air-water mixture,

Btu/ [ (lb )

• S

(°F)

ma

AT = the temperature difference across unit in °F (sensor

no . 7 ) , and

At = the time period of interest in seconds.

6) Q = (2.334 Btu/ml) • (number of ml of condensate collected in a given period)

,

where = latent cooling done during the same period.

7 . SOFTWARE

Figure 14 is a block diagram indicating the execution sequence and major

program elements of the data acquisition and calculation program. The

main routine "PUMP" is supported by a host of FORTRAN and assembly language

subroutines, each handling a specific program task. Assembly language

was used for some subroutines to facilitate handling of the interrupt

requests on the CPU, the initialization of the computer hardware, and

the monitoring of the mode-of-operation of the heat pump.

43
Figure 14. Simplified block diagram of data

acquisition program execution sequence

and major program elements.

44
The program execution follows basically a loop which consists of a number

of calls to the supporting subroutines. The console status is continuously

monitored for input and the time of day sampled to satisfy data computation

and storage needs. In addition, the mode-of-operation of the heat pump

system is queried to determine data scanning requirements.

Data common to many of the subroutines are made available in the program

common areas. The reduced data are recorded on the floppy disk in files

of 128 byte increments. Data are recorded on the disk in binary form and

retrieved for further processing at a later time by the data listing or analysis programs. A brief description of the "PUMP" routine and the

various subroutines is given in this section. Printouts of the software

programs are shown in Appendix C.

7.1 MAIN ROUTINE "PUMP"

The software routine "PUMP" is the main or principal module of the data

acquisition and calculation program. It is designed to initialize the

computer system and the peripherals after a cold start, monitor the state

of various program parameters, conduct heat pump system scan calculations,

and handle the program termination.

The program begins execution by first initializing the computer and sensor interface hardware with calls to appropriate subroutines. The system data

file, "PUMPDATA.DTA," is opened on the floppy disk and an attempt is made

to read the first (header) record. If the first record is not present in

the data file, as indicated by any end-of-file status being returned from

the disk read, the disk is assumed to be a new one and is set up for the

first data record. Numerous program variables, such as counters and heat

pump system on-off time, are initialized to their appropriate values before

beginning execution of the main program loop.

Statements in the main program loop are designed to allow the computer to

continually monitor the heat pump status, (compressor on-off and defrost)

and the portable console keyboard input when applicable. Various subroutines are called and executed depending on the status of the heat pump

and console status parameters. When the heat pump status indicates the

compressor has just turned on, the main program will call for sensors

scans. Some scans are handled in the main program while others are performed

in the supporting subroutines. Upon completion of the scan, the data are processed and the microcomputer will normally loop back and wait for the

signal for the next scan, end-of-cycle indication, compressor turn-off,

or program termination command status. When the compressor is de-energized,

the computer will cease waiting for the start of sensor scanning, and jump

to the beginning of the main program loop, and wait for the compressor to

be re-energized.

Upon reception of a termination command from either the console or the

file record counter indicating a full disk, the computer will close the

data file after emptying the buffer and execute a "pause" command. Control

of the computer system will then pass to the disk operating system (CDOS)

after the user at the console enters a carriage return to bring the program

out of the "pause" state.

45
7.2

SUBROUTINE "SYSTEM"

This is an assembly language subroutine and is designed to set up the

computer hardware and CPU interrupts. The address of the interrupt

service routine is stored in low memory. When an interrupt request has

been received by the CPU, the low memory locations are inspected to obtain

the address of the service routine. The appropriate interrupt /acknowledge

mode is set by this subroutine. In addition to the above actions, the

computer real-time clock and serial-parallel interface interrupts, and

the corresponding acknowledgements are disabled.

7.3

SUBROUTINE "INIT"

This assembly language subroutine will initialize the cycle and/or daily

summation data arrays, depending on the value of the variable "SET." When

this parameter is equal to one, only cycle data will be initialized (all

variable cycle data arrays are set equal to zero); when it is equal to two,

the daily data arrays will be similarly reset, and finally, when it is

equal to zero, the cycle as well as daily data will be reset. In addition,

whenever the cycle data is reset, the digital counters in the signal

conditioning unit are also reset.

7.4

SUBROUTINE "PSCAN"

This assembly language subroutine is designed to scan the eight 8-bit

parallel ports (six of which are used in this project to handle the four

12-bit pulse counters) on the computer parallel interface board and stuff

the raw data into four integer (16 bits or 2 bytes long) variables. This

task is initiated by updating the hardware counters and then latching their

respective outputs. The eight bytes of data are then read by the computer

and stored in memory. Manipulation of the data to set up the four-element

integer array is accomplished by shifting nibbles of data from one memory

location, through CPU registers, to another memory location. Table 2

indicates the parallel port assignments and the corresponding

byte and integer-array elements.

7.5

SUBROUTINE "ENERGY"

This FORTRAN language subroutine is responsible for monitoring and updating

the electrical energy input and latent energy output of the heat pump system.

This is accomplished by calling subroutine "PSCAN" to obtain the current

values of the pulse counters for comparison with previously collected values.

This is done to check for pulse counters exceeding their maximum capacity

of 4095 counts. When over-ranging first occurs, indicated by value "DIG"

being less than "LDIG," the quantity of 4096 will be added to "DIG" to

make "DIG" properly larger than "LDIG." Next, the value of "LDIG" is

replaced by "DIG." Subsequent comparisons of "DIG" and "LDIG" will then

always yield "DIG" less than "LDIG," until the current cycle is completed

and the pertinent hardware and software reset.

46
Table 2

Port assignments for the 8-port, multi-channel parallel interface (8PI0)

board to allow 12-bit parallel interfacing.

Counter

1A (compressor + outdoor fan) (DIG1)

IB (indoor fan + aux. heat) (DIG2)

2A (auxiliary heat) (DIG3)

2B (condensate pump) (DIG4)

8PI0 Board Port

Bit 0-7

Port 1

Port 0

Port 5

Port 4

Bit 8-11

upper 1/2 Port 2

upper 1/2 Port 3

lower 1/2 Port 2

lower 1/2 Port 3

Note:

1) Counters 1A, IB and 2A are pulsed by watt-hour meters. Counter 1A

represents 1 watt-hour per pulse. Counters IB and 2A represent 20

watt-hours per pulse. Counter 2B is pulsed by the condensate pump

and represents 1 ml per pulse.

2) Port 6 is not used in this project.

3) Port 7 is used for coding the heat pump unit number and indicates

a heating or cooling season.

47
Upon completion of the four counter comparisons, the three energy sums, the

compressor and supplemental heater energy consumption, and the latent heat

values are all updated. 7.6

SUBROUTINE "ENABL & DISABL"

The assembly language subroutines "ENABL" and "DISABL" simply enable and

disable the interrupt capability of the computer system clock, respectively.

7.7

SUBROUTINE "TIME"

This assembly language subroutine queries the computer system clock and

stores the time in a common data area. The time is collected only after

the transition of the 100 ysec time digit. This is to ensure that no digits change during the collection and storage period. Since this

routine was written in assembly language, speed is optimized and all the

time components are stored in less than 100 ysec. Nine digits are

reserved, which include the date and the time down to one second. Since

the data input is in BCD format, the routine completes the data manipulation

by masking off the high nibble of the data byte.

7.8

SUBROUTINE "MOTOR"

This simple assembly language subroutine turns the computer system floppy

disk drive motors off. This routine is used to extend the life of the

drives as well as the floppy disk magnetic media. This is accomplished

through a system (CDOS, Cromemco disk operations system) call. The drive

motors turn on automatically when the next "write" operation takes place.

7 .SUBROUTINE "RESET"

This simple assembly language subroutine resets the disk operating system

(the disks are logged off) and selects drive "A" as the default drive.

This routine is utilized whenever the data disk is changed, and is called

before the disk is removed. A new data disk is logged in the next time it

is accessed.

7.10

SUBROUTINE "SETUP"

This assembly language subroutine initiates the analog data scans. The

routine begins by first initializing the analog raw data area pointer.

The reduced data array is then set to zero to allow subsequent data

averaging. Status variables, one to indicate the number of analog scans,

and another the scanning status, are reset. Finally, the analog scans are started by setting and enabling the one milli-second clock interrupt.

48
7.11

SUBROUTINE ’’ANALOG"

This FORTRAN language subroutine collects and averages the analog data from

each analog channel as well as performs the preliminary data reduction.

The data collection is initiated by calling subroutine "SETUP." The raw

data, stored in array "ADATA," are averaged by monitoring the scanning

progress through variable count. To increase program efficiency, data

averaging progresses simultaneously with the raw data gathering. The

count variable indicates the number of completed analog scans. A total of

33 analog scans of each channel, one milli-second apart, are performed.

The one milli-second scan interval was chosen as a means of software

filtering any 60-Hertz noise which may be present on the analog data signal

inputs to the computer. The averaged data are processed with the appropriate

factors that are related to the season (cooling or heating) . The reduced

data are stored in a real data array "AD2" for use by other software

routines

7.12

SUBROUTINE "CURTIM"

This FORTRAN language subroutine collects the current time of day and the

current sequential day of the year. These are obtained by calling subroutine "TIME" and subsequently computing the time and day. The results

are stored in real variable T and integer variable day.

7.13

SUBROUTINE "SAVE"

This FORTRAN language subroutine handles the storage of reduced data on the

floppy disk. The data are buffered in memory before storage on the floppy

disk. Two calls to this routine will result in one data record being

stored in the data file on the floppy disk. This method was used to make

efficient use of the available space on the disk, and reduce the rate of

accesses to the disk. This routine is called to store four types of data;

periodic scan data, cycle data, daily data and half hour data. Examples of

each type of data recorded are listed in Appendix A. The data are stored

on the disk utilizing two data arrays, byte array A and real variable

array B. The data are written to the disk in binary form, totaling 128

bytes per record. A record counter is maintained by the program and stored

on the first record of the data file. In addition to this variable, the

heat pump unit number, the program version, the cycle storage indicator,

and the number of power failures are stored on the first record. This

record is read by the data acquisition program whenver a cold start is

implemented (e.g., when the computer is manually reset or a power outage

occurs). The first reocrd provides the program with the necessary information

to continue.

7.14

SUBROUTINE "CALC"

This FORTRAN language subroutine reduces the data from the analog scan

sequence. The routine begins by calling subroutine "ANALOG" to provide

current analog data. The current time and heat pump system mode of operation

49
are next checked. Finally, the required system variables, such as a flow

rate, density, and humidity, are computed and stored in a common area called

"RDATA.

7.15 SUBROUTINE "CHECK"

This FORTRAN language subroutine monitors the current time of day and

specifically checks for any one-half hour (minutes equal to zero or thirty)

or twenty-four hour (hour and minutes equal zero) times. Initially this

routine will update the energy consumption variables with a call to subroutine "ENERGY." Following this, the time is sampled and examined for a half-hour time. If a half-hour increment is not detected, the routine

exit sequence, consisting of a call to subroutine "CONSOLE," is

executed. If a half-hour time is detected a check is made to see if

data have already been processed for the same half-hour. If data have been

processed the exit sequence is executed. It it has not been processed,

the subroutine "CALC" is called and the average outdoor dry-bulb temperature

and outdoor dew-point temperature are updated. Next, a check is made to see if the hour and minutes correspond to hour twenty-four. The exit

sequence is executed if the twenty-four hour period is not present. Otherwise, the twenty-four-hour computations are completed. These involve

calculating average temperatures, energy consumption and the daily coefficient

of performance. The reduced data are then saved and the daily data arrays

re-initialized. The routine finally terminates with the exit sequence

previously defined.

7.16 SUBROUTINE "CONSOL"

This FORTRAN subroutine was designed to accept and execute the various

program commands delivered from the portable computer system console

used in the field. Six single-control character commands allow the user

to examine the analog, digital, cycle and daily data, check and modify

the program status parameters, change data disks, and terminate the

program.

The program begins execution by checking the console status port to see

if a command character has been entered. If a character is available it

is read in and program execution continued. The character is next compared

to the preprogrammed commands to test for a possible match. When a match

is detected, a jump to the routine corresponding to the particular command

is executed.

One or more routines, incorporated entirely within subroutine "CONSOL,"

are performed for each of the six console commands.

The first routine outputs the current time and date plus selected program

variables, such as the unit number, interrupt indicators, and disk file

status. This routine is executed when a "list" program status command

(control L) has been entered as well as for all other requests, except the

exit program and scan/save counter commands.

50
The exit program command (control E) causes the exit variable to be set.

The computer will terminate execution of the data acquisition program when

the exit status has been detected in the main program module "PUMP."

The new data disk routine is executed (control N) whenever the current data

disk is replaced for a new one. This routine begins by closing the data

file and then requests the user to remove the old data disk and insert the

new one. When the computer receives a prompt from the user indicating that

a new disk has been installed, the routine disables the interrupts and

resets the disk operating system. This disk is checked to make sure it is

a new one by opening the data file and attempting to read the file status

of the first record. An end-of-file status returned from the read operation

will signal to the routine that the disk is indeed a new one and operation

of the program may continue. If the end of file status is not detected

the routine will loop back and again ask the user to change the data disk.

The data dump routines, (control D and control T) simply output to the

console the requested type of data, and then return program control to

the calling program. An example of a printout from the console for the data

dump routine is shown in Appendix B.

The cycle scan/counter routine (control V) is available so the user is able

to alter the scan counter parameter. The computer will output the

current value of the parameter and then request the desired number of

cycles between scan recording. Upon reception of the new value from the

console, the parameter is echoed back to the console to provide the user

with a means of verifying the input. If the input was less than or equal

to zero, the default value of ten is selected.

7.17 SUBROUTINE "CYCLE"

This routine is called to perform the heat pump cycle calculations, such

as system time-on, energy, daily and cycle sum computations, when the

following conditions occur:

a) a change in state of the heat pump defrost mode status (heating season only) , or

b) the heat pump system is energized.

The routine will first check to see if the end-of-cycle is due to a change

in the defrost status. If the defrost mode has ended, then the compressor

time-on computation is modified accordingly. The defrost time-on com- putation is also made at this time. The routine continues by updating the

various time parameters and time of day and date of the new cycle. The

electrical energy consumption is next computed after a call to subroutine

"ENERGY." Next, the daily data sums, sensible and latent heat, system

time-on, electrical energy, and temperature averages, are performed.

The cycle calculations, including the average temperature and cycle performance, are completed last. The data are saved on the disk with a call

to subroutine "SAVE," and the cycle sum variables reset to zero.

51
7.18 SUBROUTINE "SERV"

This assembly language routine is designed to handle the interrupt requests

to the CPU generated by the computer system clock, and to manage the complex

timing of the analgo and digital scans.

The program handles two types of interrupts; those produced in the periodic

mode, and those created when in the analog scan mode. A determination of

the interrupt type is made immediately upon entering the service routine

by inspecting the value of the analog scan counter. Should the value be

equal to thirty-three then the periodic interrupt routine will be executed.

A value of less than thirty-three indicates that analog scanning is in

progress

Heat pump status checks are made to determine the current compressor

and defrost states. Should the compressor turn off between periodic

interrupts (there is a maximum one-second delay before the condition is

detected) , a check will be made to see if the system was also in the defrost

mode. If this is the case (a condition unlikely to occur unless the system

was shut off manually from the thermostat) , the defrost end of cycle

status variable will be set. Otherwise, only the periodic interrupt status

variable will be updated to indicate termination of the interrupts.

A compressor "on" condition will cause the program to jump to the defrost

mode check routine. This routine will compare the previous state of

the defrost mode with the current one. If a change in state has been

detected, the defrost status variable is updated and a check is made to see if the system is currently in the defrost mode. If the system defrost

is in operation, indicating that it had been initiated since the last

periodic interrupt, the current time will be stored in the defrost start

time array. Any change in the defrost state will cause the following

variables to be updated:

a) The end of defrost cycle indicator will be set.

b) The defrost counter will be incremented.

c) The periodic interrupt counter will be reset.

d) The analog scan time zone indicator will be reset.

e) The analog divide-down counter will be set to one.

f) The interrupt divide-down counter will be set to one.

These variables are used to indicate to other programs and routines that

an end-of-cycle has occurred and that the analog scan interval time base

has been reset. If no change is detected in the defrost state, the program

will jump to the periodic interrupt count routine.

52
The time between analog data scans is controlled by the interrupt count

and divide-down routine. The principle interrupt frequency, one per second,

is divided by ten to essentially provide one and ten second count for the

program routines. When a ten second count is detected, the ten second

counter and the analog scan interval tables are utilized to determine

whether or not an analog scan should be made. If a data scan is to be

made, a call to the analog scan set up routine is made. Otherwise, the one second periodic interrupts are continued.

7.19 PROGRAM "REDUCE"

This FORTRAN program is designed to run on a central microcomputer that is

similar to, but remote from, the field units. It takes the data stored on

the disks in the field, groups it into four categories and displays it on

the console of central computer. The four categories are:

a) scan data

b) cycle data

c) daily data

d) 1/2 hour data

The central microcomputer will request from the user information on which

of the four types of data are to be listed on the console. When the proper

response has been received, the disk operating system will be reset. A

header, obtained from the first record of the data file, will be listed on

the console giving the following information:

a) The unit number of the field data acquisition system.

b) The total number of records in the data file.

c) The version number of the data acquisition and calculation program.

d) The number of recorded pieces of data of the type requested.

e) The number of power failures encountered by the computer system

while in the field.

The requested data are then read from the disk and stored in memory. When

the read operation is complete and all the requested data have been found

or the memory buffer is full, a data header is printed on the console

giving the time and date the data were stored on the disk and the mode of

operation of the computer at that time. The data are then printed out in

columns (there is a total of five columns across the page), with each

column corresponding to a record of recorded data. In addition, a column

is furnished to provide the data element number and abbreviated data name. When the listing operation is complete, the data file is closed and the

computer will again request from the user the type of data to be displayed.

Examples of printouts resulting from use of the program "REDUCE" are

found in Appendix A.

53
7.20 SOFTWARE FOR EDITING FIELD DATA, "DCEP"

A review of raw data disks indicated the need for a method of editing the raw cyclic data on the central microcomputer prior to making seasonal

performance calculations. Examples of the types of changes that were

found necessary are listed below:

1) Eliminating those extremely short cycles which were generated by

manipulation of the thermostat, power outages, or by the process

of changing disks. These cycles involved compressor on-times of 5

to 60 seconds. When the disks are changed in the field, the person

making the change is trained to check the functioning of the data

channels by cycling the unit on and off. He does this by either

generating false compressor on-off signals at the signal conditioning

unit and/or occasionally turning the compressor on and off via

the thermostat. Since the extremely short cycles generated by

such actions are not directly related to the seasonal performance

of the unit, it was desirable to remove these data from the

information to be analyzed.

2) On several occasions, the quantity of 4096 would be added by the

subroutine "ENERGY" for some unknown reason. When this happened on

the condensate pump counter, the value of the latent heat output

would be incorrect and result in an erroneous C.O.P. for that cycle.

Likewise, when this action would take place on one of the digital

counters monitoring the watt-hour meters, the C.O.P. for the cycle

would be very low. This problem was primarily observed on field

test unit no. 1. Replacement of the counter circuit cards on this

unit reduced but did not eliminate the problem. The binary counter

integrated circuit chips are extremely sensitive to external noise,

and it was likely that the counters were occasionally dropping one of

the least significant bits and the software was adding 4096 as directed.

Since these errors are readily detected it was desirable to edit

the data and retain the corrected cyclic data for further analysis.

To accomplish these tasks, FORTRAN program "DCEP" was developed to allow the

cyclic data on the raw data disk to be examined and the edited version to

be recorded on a separate disk. The original data disk was left unchanged.

In addition, the daily and cyclic data are corrected, where necessary,

and recorded on separate sections of the new disk. Since only cyclic and

daily records are involved in this process, the edited data from 5 to 10 raw data disks could be stored on one new disk.

One additional step was taken by this program in the updating of the daily

data. As noted in subroutine "INIT," the field units close out the daily

data at midnight. This program corrects this by closing out the daily

data at the end of the last cycle for that day and records the time

corresponding to the end of that cycle as the end of the day. Likewise

the compressor-on time and defrost time correspond to the actual sums of

the cycles that occurred through the last cycle of the day.

54
8. SUMMARY

The objective of this paper was to document the techniques, instrumentation,

data acquisition systems, and data reduction systems used in monitoring the

field performance of three residential heat pumps located in the Washington,

D.C. area. This information was documented because of its application

to future testing projects of this type in both small- and large-scale

laboratory and field studies.

Initial estimates of the quantity of data required to meet the objectives

of this task indicated that the simple recording of raw data would require

data storage systems in the field and a data reduction facility with

capacities far beyond those warranted by a project of this type. To

avoid this problem, a strategy was developed which utilized an on-line

microcomputer at each field unit to gather the data, reduce and analyze

the results, and record the calculated results on a floppy disk. The raw data scans were recorded for every tenth on/off cycle to provide

detailed performance data and allowed the calculated results to be confirmed.

This strategy reduced the storage capacities required and greatly simplified

the task of further reduction of the recorded data by a microcomputer

located at NBS . The use of the on-line microcomputers was found to be

a cost-effective solution compared to other techniques explored during

a search for the most practical means of data accumulation.

The basic design of the instrumentation and data acquisition systems was described first to give the reader a better understanding of the steps

taken in designing the individual components of the systems. The individual

sensors and transducers are identified. Those sensors developed in-house

are also described.

The signal conditioning unit was described in detail. This unit not only

received the signals from the various transducers and amplified, attenuated

and/or offset them to meet the input characteristics of the microcomputer,

but also allowed the microcomputer to process them with maximum accuracy.

The pulse-counting circuits were also described.

The functioning of the components of the microcomputer was described,

together with the overall operation of the unit. A brief description

of the software-using assembly and a higher level language was also given.

The experience gained from this project and documented in this paper

should be helpful in other studies , in both the laboratory and the

field, requiring the collection of large quantities of raw data on the

dynamic and seasonal performance of heating and cooling equipment.

55
References REFERENCES

1. Kelly, G. E. , and Parken, W. H. , "Method of Testing, Rating and Estimating

the Seasonal Performance of Central Air-Conditioners and Heat Pumps

Operating in the Cooling Mode," National Bureau of Standards,

NBSIR 77-1271 (April 1978).

2. Parken, W. H. , Kelly, G. E., and Didion, D. A., "Method of Testing,

Rating and Estimating the Heating Seasonal Performance of Heat Pumps,"

National Bureau of Standards, NBSIR 80-2002 (April 1980).

3. Federal Register, Part III, Department of Energy, Office of Conservation

and Solar Energy, Test Procedures for Central Air Conditioners, Including

Heat Pumps, Thursday, December 27, 1979.

4. Kelly, G. E. , and Bean, J. , "Dynamic Performance of a Residential Air-to-Air

Heat Pump," National Bureau of Standards, NBS Building Science Series 93,

March 1977.

5. ASHRAE (American Society of Heating, Refrigerating and Air-Conditioning

Engineers, Inc.), "Standard Measurements Guide: Section on Temperature

Measurements," ASHRAE Standard 41-66, Part 1, January 27, 1966.

6. "Orientation Instrumentation Amplifiers," pp. 105-112, Analog Devices,

Inc., Data Acquisition Products Catalog, 1978, Route 1, Industrial

Park, P.0. Box 280, Norwood, Massachusetts 02062.

7. Brokaw, R. S., "Calculation of Flue Losses for High-Efficiency Furnaces

and Appliances," ASHRAE (American Society of Heating, Refrigeration

and Air-Conditioning Engineers, Inc.) Journal, January 1979.

8. Ciarcia, S., "Electromagnetic Interference," Byte Publications Inc.,

New York, Vol. 6, No. 1, P 48-68, January 1981.

56
Appendix A

Typical examples of printouts from the raw data disk.

57
12

3

4

5

6

7

S

9

10

11

12

13

1

23

4

5

6

78

9

10

11

12

13

Examples of scan data recorded on raw data disk

in the field and printed by the central processing unit.

MODE - 0 MODE - 0 MODE = 0 MODE = 0 MODE = 0

DRY - 205 DRY - 205 DRY = 205 DRY = 205 DRY = 205

15=00:54 15:01:04 15:01=14 15:01?24 15:01:34

DT 15.24 15.47 15.64 15.73 15.74

FLOW 1258. 1230. 1245. 1283. 1264.

QS 56.04 55.67 56.97 59.04 58.20

TRET 76.41 76.34 76.41 76.47 76.32

TOUT 85.33 65.27 85.60 85.61 85.55

TSUP 60.36 59.81 59.73 59.59 59.42

DP .3508E-01 . 3358E-01 .3437E-01 . 3653E-01 .3543E-01

TDPR 55.81 55.92 56.76 55.86 56.70

TDPO 62.85 62.80 62.71 63. 13 63.20

PRTM 29.52 29.52 29.52 29.52 29.52

TSUP 0 . 000 0.000 0. 000 0 . 000 0. 000

QSUM 495.9 551.6 608.6 667.6 725.8

DIG! 105.0 115.0 125.0 136.0 146.0

Glossary of Terms for Scan Data

-

MODE = 0 - mode of operation (see table 1)

DAY =015 - Julian day of year

09:31:26 - hour, minute ,and second of the scan

DT = differential temperature across the unit (°F)

FLOW = volumetric flow rate in cfm in return duct

QS = sensible heat output of the unit for the current time increment (10 sec.)

TRET = temperature of air in return duct (°F)

TOUT = temperature of outdoor air (°F)

TSUP = temperature of air in supply duct (°F)

DP = differential pressure of the pitot tube (inches of water)

TDPR = dew point of air in the return duct (°F)

TDPO = dew point of outdoor air (°F)

PATM = atmospheric pressure (inches of H ) TSUP = temperature of air in secondary supply duct of unit no. 3 (°F) (if applicable)

QSUM = sensible heat output of the unit since the start of cycle (Btu)

DIG1 = digital count registered on sensor 9 (see table 1)

\

58
12

3

4

5

6

7

8

9

10

11

12

13

1

2

3

4

5

6

78

9 10

11

12

13

Examples of cycle data recorded on the raw data disk

in the field and printed by the central processing unit.

MODE = 0 MODE * 0 MODE = 0 MODE = 0 MODE = 0

DAY = 015 DAY = 015 DAY = 015 DAY = 015 DAY = 015

06: 49: 47 07: 24: 50 08: 02: 25 08: 44: 55 09: 30: 26

QS . 1871E+05 . 1610E+05 . 1804E+05 . 1961E+05 . 1975E+05

QL 0. 000 0. 000 0. 000 0. 000 0. 000

ECMP 1919. 1670. 1800. 2043. 2196.

EFAN 306. 8 268. 7 288. 1 325. 8 349. 0

EHET 1693. 1571. 1832. 1794. 1351.

DIG2 100. 00 92. 00 106. 0 106. 0 85. 00

TRET 67. 44 62. 78 67. 54 68. 20 67. 49

DIG3 0. 000 0. 000 0. 000 0. 000 0. 000

TDPR 26. 69 25. 17 27. 17 27. 52 27. 36

CTIM 2401. 2103. 2255. 2550. 2731.

DTIM 208. 0 213. 0 216. 0 226. 0 234. 0

COP 1. 399 1. 344 1. 348 1. 380 1. 485

TOUT 28. 23 28. 59 28. 76 29. 18 30. 23

Glossary of Terms for Cycle Data (See Section 2. 2)

MODE = 0

- mode of operation (see table 1)

DAY = 015 - Julian day of year

06:49:47 - hour, minute and second at end of cycle

QS = sensible heat output of unit during cycle (Btu)

QL = latent cooling of unit during cycle (Btu)

ECMP = electrical energy consumed by compressor, outdoor fan and heater (watt-hours

EFAN = electrical energy consumed by indoor fan (watt-hours)

EHET = electrical energy consumed by auxiliary heaters (watt-hours)

DIG2 = digital count registered on sensor 10 for cycle (see table 1)

TRET = average temperature of air in return duct during cycle (°F)

DIG3 = digital count registered on sensor 11 for cycle (see table 1)

TDPR = average dew point of air in return duct during cycle (°F)

CTIM = compressor on-time for cycle (seconds)

DTIM = defrost time for cycle (seconds)

COP = coefficient of performance for cycle

TOUT = outdoor temperature at the end of cycle (°F)

V

59
Example of daily data recorded on raw data disk

in the field and printed by the central processing unit.

MODE = 0 MODE = 0

DAY =021 DAY = 022

00: 00: 00 00: 00: 00

1 QS . 2426E+06 . 4038E+06

2 QL 0. 000 0. 000

3 ECMP . 3867E+05 . 5176E+05

4 EFAN 4436. 8130.

5 EHET 89. 18 6998.

6 TOUT 43. 33 33. 11

7 TRET 69. 24 65. 72

8 TDPO 32. 07 30. 68

9 TDPR 32. 95 33. 33

10 CTIM . 3472E+05 . 6363E+05

ii DTIM 0. 000 4586.

12 COP 1. 646 1. 769

13 XCQN . 4018 . 7364

Glossary of Terms for Daily Data (See Section 2.2)

MODE = 0

DAY = 00 : 00:00

- mode of operation at midnight (see table 1) - Julian day of year

- hour, minute and second (midnight, day 014)

1 QS

2 QL

3 ECMP

4 EFAN

5 EHET

6 TOUT

7 TRET

8 TDPO

9 TDPR

10 CTIM

11 DTIM

12 COP

13 %C0N

total sensible heat output of unit for past 24 hours (Btu)

total latent cooling of unit for past 24 hours (Btu)

electrical energy consumed by compressor, outdoor fan and heater (watt-hours)

electrical energy consumed by indoor fan (watt-hours)

electrical energy consumed by auxiliary heaters (watt-hours)

average outdoor temperature computed from 1/2 hr. data (°F)

average temperature in return duct during normal* operation (°F)

average outdoor dew point computed from 1/2 hr. data (°F)

average dew point of air in return duct during normal* operation (°F)

total compressor-on time (seconds)

total defrost time (seconds)

coefficient of performance for the past 24 hours

fraction of compressor-on time for the past 24 hours

* "normal" refers to the total time the compressor was on less the time the

unit was in the defrost.

60
12

3

4

5

6

7

8

9

10

11

12

13

1

23

4

5

6

78

9

10

11

12

13

Examples of one half hour data recorded on the raw data disk

in the field and printed by the central processing unit.

MODE = 0 MODE = 0 MODE = 0 MODE = 0 MODE = 0

DAY = 013 DAY = 013 DAY = 013 DAY = 013 DAY = 013

11: 30: 00 12: 00: 00 12: 30: 00 13: 00: 00 13: 30: 00

TOUT 21. 10 21. 92 22. 87 23. 39 23. 41

TDPO 4. 799 4. 153 6. 895 6. 863 5. 776

PATM 29. 72 29. 70 29. 70 29. 68 29. 66

FLOW 1175. 1202. 1190. 1271. 1166.

DT 58. 37 17. 85 18. 94 58. 83 17. 85

TDPR 23. 63 22. 68 24. 11 24. 20 23. 31

TSUP 114. 9 86. 64 90. 24 116. 2 87. 09

DIG1 668. 0 2035. 3413. 4795. 6189.

DIG2 184. 0 443. 0 622. 0 701. 0 768. 0

DIG3 0. 000 0. 000 0. 000 0. 000 0. 000

DIG4 0. 000 0. 000 0. 000 0. 000 0. 000

TRET 70. 55 69. 92 71. 43 71. 08 69. 95

TSUP 130. 0 85. 97 89. 80 131. 8 87. 49

Glossary of Terms for One Half Hour Data (See Section 2.2)

MODE =0 - mode of operation (see table 1)

DAY = 013 - Julian day of year

11:30:00 - hour, minute, second of data recorded

TOUT = outdoor temperature (°F)

TDPO = dew point of outdoor air (°F)

PATM = barometric pressure (inches of H ) FLOW = volumetric flow rate in return d§ct (CFM)

DT = differential temperature across the unit (°F)

TDPR = dew point of air in return duct (°F)

TSUP = temperature of air in supply duct (°F)

DIG1 = digital count registered on sensor 9 (see table 1)

DIG2 = digital count registered on sensor 10 (see table 1)

DIG3 = digital count registered on sensor 11 (see table 1)

DIG4 = digital count registered on sensor 12 (see table 1)

TRET = temperature of air in return duct (°F)

TSUP = temperature of air in secondary supply duct of unit 3 (°F)

61
Appendix B

Examples of the data available at the units in the field

using a portable terminal. These data allowed any

erroneous results from improper operation of the heat

pump or the data acquisition system to be quickly detected.

62
Appendix B

Example of direct print-out from portable terminal

connected to the field microcomputer. The values listed

are direct read outs from the microcomputer at the time shown.

PRDGRRM STATUS 15: 6:39 EST \s 16/81 Program Versidn 5.3

UNI T= 3 RECDRD= 0 PDWER FftILURES= 0

INTERPT= 2DNE= 1 MDDE= 0

HEATING SEASON

1 -. 0£ 0 £ -£. 14 DP

3 -1.44 TDPR 34

4 .£5 TDPO 31

CT

. 4£ PATM £9

6 - . 08 TRET 71

•7 -. 58 TOUT 38

8 . £0 0 9 - . 0£ 0

1 Ci -1 . 70 DT £1

1

- . 8£ TSUP 93

12 -.86 TSP3 9£

13 -£. 03 0 14 -£. 1£ 0 15 0. 00 0 16 0. 00 o

00 RHD = 14.08

0£ PVS = .£016

83 UIS = . 4£61E-0£

40 FLOW = 1157.

63 CPA = . £4189E+0

80

36

00

QS = . £71 0£E+0

00

53

57 Computed Values

66

00 (See Glossary)

00

f1 f1 IJ l.l 00

\

Engineering Values

(See Glossary)

Voltage (Vm) Output of Signal

Conditioning Circuit

DAS Number (See table 1)

COMP 177 177.0

HEAT 1 £0.00

HEAT 0 0. 000

COND 0 0. 000

T

t t

| Eng. Value

Pulse Counts

Pulse Counting Circuit

(See Glossary)

63
Glossary of Terms Shown on Printout from

Portable Terminal Connected to Field Unit

The engineering values are listed below:

DP = differential pressure of the pitot tube (inches of ^0)

TDPR = dew point of air in the return duct (degrees Fahrenheit)

TDPO = dew point of outdoor air (degrees Fahrenheit)

PATM = atmospheric pressure (inches of H )

§

TRET = temperature of air in the return duct (degrees Fahrenheit)

TOUT = temperature of outdoor air (degrees Fahrenheit)

DT = differential temperature across the unit (degrees Fahrenheit)

TSUP = temperature of air in the supply duct (degrees Fahrenheit)

TSP3 = temperature of air in secondary supply duct of Unit 3 (degrees Fahrenheit).

Note: The values listed apply only to Unit 3 and are not used in the

calculations.

Computed Values:

3

RHO = specific volume of dry air in duct (ft /lb at the temperature in

supply duct and the barometric pressure at the time shown)

PVS = partial pressure of saturated water vapor at TDPR.

WS = humidity ratio at TDPR (lb of water vapor/lb of dry air)

FLOW = volumetric flow rate in cfm in the return duct of the air/water

vapor mixture at the temperature in the return duct.

CPA = specific heat of the air-water mixture, Btu/ (lb . )

• (°F). mixture

QS = sensible heat output of the unit since the start of the cycle

(Btu).

Pulse Counting Circuits:

COMP = electrical energy consumed by the compressor, outdoor fan and sump

heater. The value listed in the first column is the pulse count

for the current cycle. The value in the second column is the

equivalent engineering value in watt-hours.

HEAT^ = electrical energy consumed by the indoor fan and first stage of

the auxiliary heaters. The first column is the pulse count; the

second column is the equivalent engineering value in watt-hours.

HEAT

2 = electrical energy consumed by additional stages of auxiliary heaters.

Note: The indoor fan and all stages of auxiliary heat on unit

no. 3 were registered on HEAT^

COND = condensate metering pump. The pulse count is listed in the first

column and the millileters of condensate displaced is shown in

the second column.

64
Appendix C

A microcomputer printout of all software used in this task.

65
PROGRAM PUMP

HEAT PUMP DATA AQUISITION PROGRAM 3/03/81

c »»» LOGICAL UNIT NUMBER ASSIGNMENTS «««

c AS 5-CONSOLE

c

r AS 9-REDUCED DATA FILE

cr »»» I/O PORT ASSIGNMENTS EDEC INAL. (HEX ) 3 «««

V*c 000 (00) — 015 (OF) 4FDC (CONSOLE DEVICE)

c 016 ( 10) - 031 < IF) SB D+7AIQ (2 CARDS)

c 032 (20) - 047 (2F) = TU-ART PORT A

c 048 (30) - 052 (34) * 4FDC (DISK CONTROLLER)

c 064 (40) - 2B BANK SELECK PORT

C 080 (50) - 095 (5F) SB PR I (PRINTER INTERFACE)

c 128 (80) - 143 ( 8F

)

SB TU-ART PORT B

c 160 (AO) - 167 ( A7

)

3 BP 10 (PARALLEL INTERFACE)

c 192 (CO) - 207 (CF) SB CLOCK

C

€

C

C

c

c

c

c

c

c

cc

cc

c

cc

c

cc

ccc

c

ccc

c

c

c

c

c

c

cc

cc

c

c

»»»

COUNT

STAT

1CNT

NSCAN

DEFRST

NFRST

MODE

PINT

ZONE

DIVIDE

SET

COMP

UNIT

AD

ADATA

PDATA

TDATA

EXIT

TYPE

EOC

TSTART

TEND

TLAST

TDAY

EDAY

LDAY

TIM1

VER

CYDIV

NCYCLE

POWER

VARIABLE DEFINITIONS «««

ANALOG SCAN COUNT (33 is maximum count)

INTERRUPT SCAN STATUS < O-data scanning)

PERIODIC INTERUPT COUNTER

NUMBER OF SCANS/CURRENT CYCLE

DEFROST STATUS <l=defrost on : outside fan off)

NUMBER OF DEFROST CYCLES PER DAY <24 hours)

FAN-DEFROST STATUS BYTE

PERIODIC INTERRUPT STATUS (1 - interrupt active)

TIME ZONE STATUS <0.1. 2. or 3)

TSCAN DIVIDE DOWN COUNTER

INIT INDICATOR (O-all. 1-cycle, 2-daily

)

COMPRESSOR STATUS (1 - off)

FIELD UNIT DESIGNATION <1,2. or 3)

ANALOG PORT AVERAGE VALUE (real number)

ANALOG PORT SCAN VALUES (integer)

PARALLEL PORT DATA (integer)

CLOCK DATA

PROGRAM EXIT STATUS (1 - exit program)

DATA FILE RECORD TYPE

0 - scan ifata

1 - cycle data

2 - daily data

3 - 1/2 hour data

END OF CYCLE INDICATOR <1 - end of def. cycle)

COMPRESSOR START TIME (seconds 0-86400)

COMPRESSOR SHUT OFF TIME (seconds 0-86400)

TIME OF LAST (previous) SCAN

JULIAN DAY CYCLE STARTS (compressor turns on)

JULIAN DAY COMPRESSOR SHUTS OFF

JULIAN DAY OF LAST (previous) SCAN

DEFROST START TIME (time array)

PROGRAM VERSION NUMBER

CYCLE DIVIDE NUMBER (i.e. 10)

NUMBER OF CYCLES

NUMBER OF POWER FAILURES or COMPUTER RESETS

INTEGER*! ADATA. PDATA. COUNT, ICNT. NSCAN, ZONE, PINT

66
to

ft

ft

fto

ft

o

o

o

ft

ft

-ft

ft

ft

ftftftfto

INTE0ER*1 DEFRST, MODE, STAT. TIM1,TDATA, ICON, DIVIDE

INTEGER*1 UNIT. EXIT, COMP, SET, TYPE. EOC, NFRST

INTEGER POWER, DIO. CYDIV, DAY, TDAY. EDAY

C

COMMON /STATUS/STAT, ICNT, NSCAN, DEFRST . COMP. MODE, EOC. NFRST

* .PINT. ZONE. DIVIDE

COMMON /PARELL/PDATA(B). DIG<4)

COMMON /AT0D/ADATAO2S) , ADI < 16) , AD2< 16) . COUNT

COMMON /DATE/TDATA<9)

COMMON /SUM/TSUMC (4 ) , TIMC ( 2) , GSUMC ( 2) , ESUMC ( 3) , LDIG< 4 )

,

* TSUMD ( 4 ) . TIMD ( 2 ) , GSUMD ( 2 ) , ESUMD ( 3 ) . COP ( 2 ) . SET

COMMON /HOUSE/UNIT, AREA(3), FAN<3)

COMMON /TIM/TIM1 (9), TSTART, TEND, TLAST, TDAY. EDAY. LDAY

COMMON /RDATA/RHO, PVS. WS, FLOW, CPA, OS, VER

COMMON /MISC/CYDIV, POWER

C

DATA AREA, FAN/1. 69, 1. 98, 1. 833, 914. 0, 648. 0, 460. 0/

»»» HARDWARE AND SOFTWARE INITIALIZATION ROUTINES «««

CALL SYSTEM

CALL OPEN (9, 'PUMPDATADTA 1)

UN I T— I NP < Z ' A7 ' ) . AND. Z'03'

IF<UNIT. EQ. 0) UNIT-1

READ (9, END-11. REC-1 ) UNIT, NREC. VER, CYDIV, POWER

P OWER—P OWER+

WRITEC9, REC-1 ) UNIT, NREC, VER. CYDIV. POWER

NREC—NREC+1

CALL MOTOR

SET-0

CALL INIT

»»» TIME VARIABLES INTI AL I ZAT I ON «««

CALL CURTIM(T. DAY)

TSTART-T

TEND-T

EDAY-DAY

TDAY—DAY

NCYCLE-0

CYDIV— 10

PINT-0

NFRST—

»»» BEGIN MAIN PROGRAM «««

COUNT-33

ICNT—

NSC AN—

DEFRST—

EOC—

67
niuonn

r>

*

moon

t-onooo

r>

o

soon »»» COMPRESSOR TURN-ON CHECK ROUTINE «««

CALL CHECK (NREC. ZONE. NFRST. EXIT, PINT)

IF (EXIT. EQ 1 > 00 TO 8

C0MF»INP(Z'24' ) AND. Z '01

IF (COMP EQ. I ) ©O TO 7

CALL CYCLE ( NREC, EOC)

NCYCLE-NCYCLE+1

IF(NCYCLE. ©T. CYDIV) NCYCLE=0

»»» NEW CYCLE STARTS «««

Z0NE=0

DIVIDE=1

STAT=*0

»»» SYSTEM STATUS CHECK ROUTINE «««

IF (EOC. NE. 1 ) ©0 TO 13

CALL CYCLE (NREC. EOC)

NCYCLE=NCYCLE+1

IF(NCYCLE. ©T. CYDIV) NCYCLE-0

IF (COMP. EQ. 1 ) ©O TO 2

IF ( STAT. EQ. O) ©0 TO 2

CALL CHECK ( NREC. ZONE, NFRST, EXIT, PINT)

IF ( EXIT. EQ. 1 ) ©0 TO 8

GO TO 5 »»» ANALOG SCAN DATA REDUCTION ROUTINE «««

CALL CALC (ZONE, MODE)

CALL ENERGY

C

QSUMC ( 1 ) =QSUMC ( 1 ) -*-QS C

CALL CURTIMCTT, MDAY)

DT=TT-TLAST+ ( MDAY—LDAY ) *86400.

LDAY=MDAY

TLAST=TT

C

IF(NCYCLE. LT. CYDIV) GO TO IS

C TYPE=0

C

CALL SAVE (TYPE. UNIT, NREC. NFRST)

C

IS IF(DEFRST. EQ. 2) GO TO 23

C

TSUMC ( 2 ) *TSUMC ( 2 ) +AD2 ( 6 ) *DT

TSUMC ( 4 > =TSUMC ( 4 ) +AD2 ( 3 ) *DT

C

23 IF ( NREC. ©E. 440 ) 80 TP S

IF ( COMP. EQ. 1 ) 80 TO 4

63
UUU«

UOUH

UOO

(DO

CO TO 5

»»» COMPRESSOR SHUT-OFF TIME ROUTINE «««

CALL CURTIM(TEND. EDAY)

CO TO 3

»»» NEW DATA DISK RECORD 1 SET-UP «««

1 NREC*2

POWER=0

CO TO 12

»»» PROGRAM EXIT ROUTINE «««

CALL DISABL

TYPE-3

CALL SAVE (TYPE. UNIT, NREC. NFRST)

ENDFILE 9

C

CALL MOTOR

C

PAUSE PI

PAUSE P2

C

END

B.

69
cc

c

c

c

c

c

c

cc

c

cc

c

c

c

c

c

c

cc

cc

c

c

c

c

c

c

»»» HEAT PUMP DATA AOUISITION PROCRAM UTILITY LIBRARY «««

SUBROUTINE CONSOL(UNIT. NREC, ZONE. EXIT, PINT)

CONSOLE PROCESSOR ROUTINE 03/23/81

INPUT CHARACTER DEFINITIONS

CONTROL D ( Z ' 04 ' ) * Data dump (analog & digital)

CONTROL E ( Z '05 ' ) -Exit from program

CONTROL H ( Z' OE ' ) - Nam data disk

CONTROL L (Z'OC') * List program status

CONTROL T ( Z

' 14 ' ) * Cycla 8c Daily data dump

CONTROL V (Z'16') * Cycla scan sava countar sat

INTECER*1 UNIT, EXIT, K, MON, HR, MIN. SEC, ICON, SEASON

INTEGER*1 MODE. SET, ZONE, PINT, COUNT, PDATA. ADATA

INTEGER POWER. CYDIV. YR, DAY, DIG, RECORD

DIMENSION VDIG( 4 ) , TITLE (16),E(4),P(6),R(6), STAGE! 2)

COMMON /ATQD/ADATA(S28), AD1( 16), AD2(16), COUNT

COMMON /PARELL/PDATA(8)» DIGC4)

COMMON /SUM/TSUMC ( 4 ) » TIMC(2). GSUMC ( 2) , ESUMC ( 3 ) , LDIG( 4 )

TSUMD ( 4 ) , T IMD ( 2 ) , GSUMD < 2

)

, ESUMD ( 3 > , COP ( 2 ) . SET

COMMON /RDATA/RHO. PVS, WS, FLOW, CPA, GS. VER

COMMON /MISC/CYDIV. POWER

DATA P/'RHO'. 'PUS'. 'WS', 'FLOW', 'CPA'. 'GS'/

DATA STAGE/ 'HEAT', 'COOL'/

DATA TITLE/' ', 'DP'. 'TDPR ', 'TDPO', 'PATH'. 'TRET', 'TOUT'. 2*' '. 'DT '. 'TSUP '. 'TSP3'. 4*' '/

DATA VDIC/'COMP', 'HEAT'. 'HEAT', 'COND'/

PROGRAM VERSION NUMBER 5. 5

VER*5. 5

EXIT*©

I C QN= I NP < O ) . AND. Z '40' IF ( ICON. EG. 0) RETURN

SEASON* I NP ( Z' A7 ' ) . AND. Z '80'

SEASON=SEASON+

IF < SEASON. OT. 1 OR. SEASON. LE. 0) SEAS0N=2

ICON*INP ( 1 ) . AND Z '7F

IF( ICON. EG Z '04'

GO TO 2

IF< ICON EG. Z '05'

GO TO 1

I F ( ICON EG. Z 'OE ' ) GO TO 2

IF( ICON EG. Z '14'

)

GO TO 2

IF (ICON EG Z'16'

GO TO 8

I F ( ICON NE. Z'OC') RETURN

»»» PROGRAM STATUS LIST ROUTINE «««

70
CALL LINE

C

2

C

C

500

C

c

c

501

C

505

C

506

C

C

C

C

4

C

3

502

C

503

504

C

C

CALL CLOCK ( YR, MON. DAY. HR, MIN. SEC

)

WRITE<5. 500) HR. MIN. SEC, MON, DAY. YR. VER

FORMAT ( 5X, 'PROGRAM STATUS'. 8X, 2 ( 12, '),I2, ' E8T

*. 4X, 2(12, '/'), 12. 5X, 'Progra* Version '. F3. 1

)

CALL LINE

REC0RD=NREC-2

MODE* I NP ( 2

' 24 ' ) . AND. Z'03'

WRITE (5. 501) UNIT, RECORD, POWER

FORMATt IX. //, 15X. ' UNIT*', 13, ' RECORD*'. 13. POWER FAILURES*'. 13)

WRITE (5, 505) PINT. ZONE. MODE

FORMATtlX. //, 24X. 'INTERPT*', 13. ' ZONE-'. 13. ' MODE*'. 13)

WR ITE ( 5. 506 ) STAGE ( SEASON

)

FORMAT ( IX. //, 33X. A4, 'ING SEASON',//)

IF( ICON. EQ. Z '04' > GO TO 5

IF( ICON. EQ. Z '14' ) GO TO 15

IF( ICON EQ. Z 'OC ' ) RETURN

»»» NEW DATA DISK LOO- IN ROUTINE «««

ENDFILE 9

WRITE (5, 502)

FORMATt IX, //. 10X, 'Remove OLD date disk and insert NEW disk'./)

WRITEt 5, 503)

FORMAT ( IX, //, 10X. 'Is NEW data DISK inserted? ')

READ (5. 504) K

FORMAT (A1

)

CALL DISABL

C

CALL RESET

CALL OPEN (9, 'PUMPDATADTA ', 1)

C

READ<9, END*1 1, REC=1 ) UNIT. NREC

C

CO TO 4

C

1 1 NREC=2

POWER*0

CALL SYSTEM

IFtPINT. EQ. 1 ) CALL ENABL

RETURN

C

C »»» REDUCED DATA OUTPUT ROUTINES «««

C

5 CALL CALC (ZONE. MODE)

CALL PSCAN

71
c

R ( 1 >*RHO

R<2)*PVS

R < 3 ) *WS

R<4)=FL0W

R < 3 ) =CPA

R ( 6 ) -as

C

E(1 )*DIO< 1

)

E < 2 ) =20. 0*DIC<2)

E ( 3 ) =20. 0*DI0C3)

E<4)*DIG<4>

C

DO 10 1*1, 16

IF ( I . GT. 4) GO TO 6

WRITE <5. 507) I, ADI ( I ) . TITLE ( I ) , AD2< I ) . P ( I ) , R ( I ) , VDICt I ) , DIG( I

)

E( I

)

507 FORMAT <

' + '» 3X, 12, 2(2X, F6. 2, 2X, A4 ) , ' * ', CIO. 4, 4X. A4, 2X. 14. 2X

-, CIO 4, /)

CO TO 10

C

6 IF « I. GT. 6) GO TO 7

WRITE <5, 500) I, ADKI). TITLE(I), AD2 U ) , P < I ) , R ( I ) 508 FORMAT ( '+', 5X, 12, 2(2X> F6. 2, 2X, A4), ' * '.Ell. 5,/)

CO TO 10

C

7 WRITE (5, 509) I , AD 1 ( I ) . T I TLE < I ) , AD2 ( I

)

509 FORMAT ( 3X. 12. 2X, F6. 2, 2X, A4, 2X. F6. 2, />

10 CONTINUE

RETURN

C

C »»» CYCLE AND DAILY DATA DUMP ROUTINE «««

C

15 WRITE(5, 510)

510 FORMAT ( IX. //, 33X, 'CYCLE BUM DATA'.//)

C

DO 20 1*1,

IF ( I . ©T. 2) ©O TO 9

WRITE <5, 511) TSUMC ( I ) , ESUMC ( I ) . QSUMC ( I ) , T I MC ( I

)

511 FORMAT <

' + '« 3X, 'TSUM = '

, Q10. 3. ' ESUM « CIO. 3. ' OSUM * '. CIO. 3. -' TIMC *'. CIO 3, /)

CO TO 20

C

9 IF ( I . CT. 3) GO TO 12

WRITE(5, 512) TSUMC ( I ) . ESUMC C I

)

512 FORMAT( '+', 3X. 'TSUM *', CIO. 3. ' ESUM * '. CIO. 3. / ) GO TO 20

C

12 WRITE(5. 513) TSUMC ( I

)

313 FORMAT ( 3X, 'TSUM *', G10. 3. /)

20 CONTINUE

C

WRXTEO. 314)

314 FORMAT (IX, //, 33X, 'DAILY SUM DATA'.//)

C

DO 30 1*1.

IF < I . CT. 2) CO TO 13

WR I TE ( 5, 511) TSUMD < I ) , ESUMD ( I ) , QSUMD ( I ) , T I MD ( I

)

CO TO 30

C

72
13 IF ( I. OT. 3) 00 TO 14

WRITER 5. 912) TBUMD < I ) , ESUMD < I

)

00 TO 30

C

14 WRITE( 5. 913) TSUMD(I)

30 CONTINUE

RETURN

C

C »»» CYCLE SCAN DIVIDE NUMBER SET ROUTINE «««

C

8 WRITE <5# 317 ) CYDIV

517 FQRMAT( IX. //» 1QX. 'Current CYCLE divide nunbtr i* - '.13.//)

C

WRITE<5. 516)

516 FORMAT ( 1 IX. 'Enter cycle divide nueber (every nTH) -> ')

19 READ<5. 515. ERR=19) CYDIV

515 FORMAT (13)

C

IF (CYDIV. LE. 0) CYDI V=10

WRITE(5. 517) CYDIV

RETURN

C

1 EXIT»1

RETURN

END

C

C —

c SUBROUTINE CYCLE ( NREC. EOC

)

C ROUTINE PERFORMS WEAT PUMP CYCLE CALCULATIONS

C

INTEGER*1 SET. PDATA. TIM1. MODE. UNIT. EOC. TYPE. TDATA

INTEGER DAY. DDAY, TDAY, EDAY, DIG

C

COMMON /PARELL/PDATA ( 8 ) , DIG(4)

COMMON /DATE/TDATA( 9)

COMMON /SUM/T5UMC (4 ) . TIMC ( 2 ) » QSUMC(2), ESUMC ( 3 ) , LDIG( 4 )

TSUMD ( 4 ) , T I MD ( 2 ) , QSUMD ( 2 ) , ESUMD ( 3 ) , COP ( 2 ) > SET

COMMON /HOUSE/UNIT, AREA ( 3 ) , FAN ( 3)

COMMON /TIM/TIM1 (9). TSTART, TEND. TLAST, TDAY, EDAY, LDAY

C

CALL CURTIM(T, DAY)

C

SEASON* I NP ( Z 'A7 ' ) . AND. Z '80

C

C »»» TEST FOR END OF DEFROST CYCLE (E0C=1) «««

C

I F ( EOC . EQ. 0) GO TO 5

C

C »»» END OF DEFROST CYCLE TIME-ON CALCULATION «««

C

T2-TIM1 ( 1 )+10*TIMl (2)+60*(TIMl (3)+10*TIMl (4)

T2-T2+3600. *(TIM1 (5) + 10*TIMl (6)

)

DDAY*TIM1(7)+10*TIM1(8)+100*TIM1(9)

C

T I MC ( 1 ) *T—TSTART+ ( DAY-TDAY ) *86400.

T I MC ( 2 ) *T I MC ( 2 ) +T+ ( DAY-DDAY ) *86400. -T2

GO TO 6

C

5 TIMC ( 1 ) *TEND—TSTART+ ( EDAY—TDAY ) *86400.

73
o

o

o

oo

o

r>o*o

u

o

o

ooo

o>-*=*

non

o

non

o TSTART=T

TDAY=DAY

TLAST=TSTART

LDAY=DAY

»»» ELECTRIC CONSULT I ON CALCULATION «««

CALL ENERGY

ESUMC <2>=FAN«UNIT)*TIMC( 1 >/3600.

ESUMC ( 3 ) =ESUMC C 3 > -ESUMC ( 2 > IF ( SEASON. NE. 0 .OR. ESUMC (3)

LT. 0. 0) ESUMC(3)»0. O

»»» UPDATE DAILY SUMS «««

DO 10 1 = 1. 3

IF < I. GT. 2) GO TO 1 QSUMD « I

) =QSUMB ( I ) +GSUMC ( I

)

TIMXX I >=TIMD« I )+TIWC < I

)

ESUMD « I ) =ESUMB ( I ) +ESUMC ( I

)

CONTINUE

TSUMD ( 2 ) =TSUMB « 2 > +TSUMC ( 2 > TSUMD ( 4 ) =TSUMB « 4 ) +TSUMC « 4

)

»»» CYCLE CALCULATIONS «««

COP< 1 )=0. o NDUM=©

D£NOM>= < ESUMC < 1 ) +ESUMC ( 2 ) +ESUMC C 3 > > *3. 4 1

IF ( DENOM. EG. 0. OO) 60 TO 3

COP < 1 ) = ( GSUMC C 1 ) +QSUMC C 2 ) ) /DENOM

DENOM=TIMC( 1 >-TIMCC2>

IF (DENOM. EG. O. 0©) GO TO 4

TSUMC ( 2 ) =TSUMC < 2 ) /DENOM

TSUMC ( 4 ) =TSUHC ( 4 ) /DENOM

TYPE=1

CALL SAVE(TYPE. UNIT. NREC, NBUM)

£OC=Q

SET=1

CALL INIT

RETURN

END

SUBROUTINE CHECK (NREC, ZONE, NFRST, EXIT, PINT)

THIS ROUTINES CHECKS FOR 1/2 HR. DAILY. * CONSOLE REQUIREMENTS

INTECER*1 TDATA, UNIT, ZONE, TYPE, MODE, SET. NFRST, EXIT

INTEGERS ADATA. COUNT, PINT, PDATA

INTEGER HR. DAY. DIG

74
mo

o

owooo

OOO

OO

O

-O

O

O

o

ooooooo

c

COMMON /DATE/TDATA(9)

COMMON /PARELL/PDATA(8). DIC(4)

COMMON /ATOD/ADATA< 528) > ADI ( 16) » AD2( 16) > COUNT

COMMON /SUM/TSUMC (4 ) . TIMC ( 2 ) . QSUMC ( 2) . ESUMC ( 3) . LDIQ ( 4 >

TSUMD(4)» TIM0(2)> QSUMD(2)> ESUMDO). COP (2). SET

COMMON /HOUSE/UNIT. AREA(3). FAN(3>

DATA NMIN. NHR. NDAY/3*!/

»»» ENERGY COUNT UPDATE «««

CALL ENERGY

»»» CHECK CURRENT TIME FOR HALF HOUR «««

CALL TIME

M I N=TDATA ( 3 ) +TDATA < 4 ) * 1

HR=TDATA ( 5 ) +TDATA ( 6 ) * 1

DAY=TDATA ( 7 ) +TDATA < 8 ) * 1 0+TDATA ( 9 ) * 1 OO

IF(MIN. EG. O .OR. MIN. EQ. 30 ) 00 TO 1 GO TO 3

»»» HALF HOUR CALCULATIONS «««

IF(MIN. EQ NMIN) GO TO 3

NM I N=M I

NHR=HR

CALL CALC (ZONE. MODE)

TSUMD ( 1 ) —TSUMD ( 1 )+AD2(7)

TSUMD < 3 ) =TSUMD ( 3 ) +AD2 < 4

)

TYPE-3

CALL SAVE (TYPE. UNIT. NREC, NFRST)

IF(MIN. EQ. O AND. HR. EQ. O) GO TO 2

GO TO 3

»»» DAILY CALCULATIONS «««

IF (DAY. EQ. NDAY) GO TO 3

NDAY-DAY

TSUMD ( 1

) =TSUMD ( 1 ) /48. 0

TSUMD ( 3 ) =TSUMD ( 3 ) /48. 0

DEN0M*TIMD(1 )-TIMD(2)

IF(DENOM EQ. O. 00) CO TO 5

TSUMD ( 2 ) “TSUMD ( 2 ) /DENOM

TSUMD ( 4 ) -TSUMD ( 4 ) /DENOM

COP (2)—O. OO

DENOM- ( ESUMD ( 1 ) +ESUMD ( 2 ) -»-ESUMD ( 3 ) ) *3. 413

IF (DENOM EQ. 0. 00) GO TO 4

COP ( 2 ) — ( QSUMD ( 1 ) +QSUMD ( 2 ) ) /DENOM

75
mo

*

r>

o

o

ooooooooo

o

ooooo

ouo

00*0 TYPE-2

CALL SAVE (TYPE, UNIT, f«EC. NFRST)

NFRST—O

SET—

CALL INIT

CALL CONSOL ( UNI T< NREC. ZONE, EXIT, PINT)

RETURN

END

SUBROUTINE CALC ( ZONE. MODE

)

ROUTINE CALCULATES REDUCED DATA

INTECER*1 UNIT. TIM1, ZONE, MODE, ADATA. COUNT, M

INTEGER DAY, TDAY, EDAY

COMMON / ATOD / ADATA < 528 ) , AD 1 < 1 6 ) . AD2 ( 1 6 ) , C OUNT

COMMON /HOUSE/UNIT. AREA(3) , FAN<3)

COMMON /TIM/TIM1 (9). TSTART, TEND, TLAST, TDAY, EDAY, LDAY

COMMON /RDATA/RHO. PVS, WS, FLOW. CPA, QS. VER

CALL ANALOG

»»» TIME SINCE LAST SCAN CALCULATION «««

CALL CURT! M(T. DAY)

DT=T—TLAST+ ( DAY-LDAY ) *86400.

»»» REDUCED DATA COMPUTATIONS «««

MODE* I NP ( Z

' 24 ' ) . AND. Z'03'

ARG=1 5. 4638-7284. 0/ ( AD2(3)+392. 0)

P VS*EXP ( ARC

)

WS=0. 00

DEN0M—AD2 ( 5 ) —PVS

IF(DENOM. Ed. 0. 00) GO TO 1 WS=0. 622*PVS/DENOM

RHO= ( 29. 92/AD2( 5) )*. 02521*(459. 6+AD2<6) )*(1. +1. 6078*WS)

FL0W=0 00

IF(AD2(2) LE. 0. 01 ) GO TO 2

ARC=AD2 ( 2 ) *RHO/ ( 1 . O+WS

)

IF< ARG LE. O. OO) CO TO 2

FLOW* 1096. 0*AREA(UNIT)*SQRT(ARG)

CPA-O. 24+0. 444*WS

M=Z0NE+1

QS=0 OO

DEN0M=60. 0*RH0

76
IF(DENOM. EQ. 0. 00) RETURN

Q6-FL0W*CPA*AD2( 10)«DT/D£NOH

C

RETURN

END

C

C

SUBROUTINE SAVE(TYPE, UNIT. NREC. WRST)

C ROUTINE BUFFERS DATA FOR SUBSEQUENT STORAGE ON DATA DISK

C

I NTEGER *1 TYPE. TDATA. NODE. UNIT. ADATA. COUNT. SET. A(24) < NFRST

INTEGER*1 PDATA

INTEGER DIG. CYDIV. POWER

DIMENSION B (26)

C

COMMON /PARELL/PDATA(B)» DIC<4)

COMMON / ATOD/ADATA ( 52B ) . ADI ( 16 ) . AD2 ( 16) . COUNT

COMMON /DATE/TDATA(9)

COMMON /SUM/TSUMC (4 ) . TIMC ( 2 ) . QSUMC (2) . ESUMC (3) . LDIG ( 4 )

TSUMD(4 ) , TIMD(2 ) . QSUMD<2) . ESUMD<3) » COP (2) . SET

COMMON /RDATA/RHO. PVS. US. FLOW. CPA. QS. VER

COMMON /MISC/CYDIV. POWER

C

DATA N/O/

C

K1«N*12

K2«N*13

C

MODE* I NP ( Z ' 24 ' ) . AND. Z'03'

C

N-N+l

C

A(K1+1)-TYPE

C

DO 10 1-2. 10

L-Kl+I

A(L )—TDATA ( 1-1

)

10 CONTINUE

C

A(K1+11 )=MODE

A(K1+12)—NFRST

C

GO TO (1, 2. 3). TYPE

C

C »»» PERIODIC SCAN DATA ARRAY SET-UP «««

C

B (K2+1 )—AD2( 10)

B ( K2+2 ) —FLOW

B ( K2+3 ) —QS

B ( K2+4 ) —AD2 ( 6 > B < K2+S ) —AD2 ( 7

)

B < K2+6 ) —AD2 (11)

B(K2+7)-AD2(2>

B ( K2+8 ) —AD2 ( 3 > B(K2+9)-AD2(4)

B ( K2+10 )—AD2 O)

B (K2-*-l 1 )—O. O

IF ( UNIT. EQ. 3) B(K2+U)«AD2(12)

B (K2> 12)—QSUMC ( 1

)

77
0*0

UOOO

(UOOO

WOOO

1 < K2+13 ) —DIG ( 1 > GO TO 4

»»» CYCLE DATA ARRAY SET-UP «««

B < K2+ 1

) —QSUMC ( 1

)

B < K2-&-2 > —QSUMC ( 2 ) B<K2+3)-ESUHC< 1

)

1 ( K2+4 ) =ESUIiC ( 2

)

B ( K2+5 ) =ESUMC ( 3

)

B ( K2-*-6 > —DIG ( 2

)

S(K2+7)-TSUMC<2)

B ( K2+S ) =DIO C 3

)

B ( K2+9 ) -TSUMG ( 4

)

B(K2+1Q)=TIMC( 1

B ( K2+ 11) =T I MC ( 2

)

1 ( K2+12 ) —COP < 1

B ( K2+ 1 3 ) —AB2 ( 7

)

GO TO 4

»»» DAILY DATA ARRAY SET-UP «««

BIK2+1 )=QSUMD< 1

B ( K2+2 ) —QSUWD ( 2

)

B<K2+3>=ESUMD( 1

)

1 ( K2+4 ) —ESUMD ( 2

)

B ( K2+5 ) —ESUNB C 3

)

B < K2+6 ) -TSUMD ( 1

)

B ( K2+7 ) —TSUMD C 2

)

B ( K.2+8 ) —TSUMD ( 3

)

B < K2+9 ) —TSUMD ( 4

)

B ( K2+ 10) =T I MD ( 1

)

B < K2+1 1 )=TIMD<2)

B ( K2+ 1 2 ) —COP ( 2

)

1 ( K2+ 1 3 ) —T I MD ( 1 ) / ( 3600 . 0*24. 0)

CO TO 4

»»» ONE-HALF HOUR DATA ARRAY SET-UP «««

B ( K2+ 1 ) —AD2 ( 7

)

B ( K2+2 ) =AD2 ( 4

)

B ( K2+3 ) =AD2 ( 3

)

B ( K2+4 ) —FLOW

B(K2+3)=AD2( 10)

B ( K2+6 ) -AD2 ( 3

)

8 ( K2+7 ) =0. 0

IF ( UNIT. EQ. 3 ) B ( K2+7 ) —AD2 (12)

B(K2+8)=DIC< 1

)

B ( K2+9 ) —D I G < 2

)

B ( K2+ 1 0 ) —D I G ( 3

)

1 < K2+ 11) =0 I G ( 4

)

1 ( K2-*- 12) =AD2 ( 6

)

3 < K2+ 13) —AD2 (11)

IF(N. EQ. 1 ) RETURN

WRITE<9. REC-NREC) < A<

) , I-l, 12), <B<I>, I-l. 13), (A(I), 1-13,24)

< B < I )

1*14, 26)

WRITE (9, REC-1) UNIT, NREC. VER, CYDIV. POWER

78
nno

n

o

o

r>oo

o

r>o

o

o

oo

ooo

o

r>

non

ooooooon

ooo

C

C

NREC-NREC+1

N-0

CALL MOTOR

RETURN

END

SUBROUTINE CURTIMtT, DAY)

THIS ROUTINE COMPUTES THE CURRENT TIME AND CURRENT DAY

»»» VARIABLE DEFINITIONS «««

T CURRENT TIME IN SECONDS

DAY CURRENT JULIAN DAY

TDATA TIME RAW DATA ARRAY

INTEGERS TDATA

INTEGER DAY

COMMON /DATE/TDATAC9)

CALL TIME

T-TDATA ( 1 ) •* 1 0*TDATA ( 2 ) +60* ( TDATA ( 3 ) 1 0*TDATA ( 4 ) > T-T+3600. O* ( TDATA < 5 > + 1 0*TDATA < 6 )

)

DAY-TDATA ( 7 ) +10*TDATA ( 8 ) + 1 00*TDATA < 9

)

RETURN

END

SUBROUTINE ENERGY

ROUTINE COMPUTES THE ELECTRICAL AND LATENT ETCRGY CONSUMED

THIS ROUTINE WILL UPDATE CYCLE ENERGY SUMS (ARRAY ESUMC)

EVERY TIME IT IS CALLED

»»» VARIABLE DEFINITIONS «««

ESUMC ( 1 ) WATT-HRS Compressor enery consumption

ESUMC ( 3 ) WATT-HRS Suppl. heaters energy consumption

GSUMC ( 2 ) WATT-HRS Latent heat

INTECER*1 SET. PDATA

INTEGER DIO

COMMON /PARELL/PDATA<8)> DIG(4)

COMMON /SUM/TSUMC (4 > > TIMC ( 2) . GSUMC (2) . ESUMC (3) . LDIO( 4)

TSUMD<4>. TIMD(2). QSUMD(2). ESUMDO). COP (2). SET

CALL PSCAN

»»» COUNTER OVERRANGE. COMPENSATION. AND UPDATE ROUTINE

DO 10 1-1.4

«««

79
uuu

1 IF(DIC(I). ©E. LDIC(I)) ©O TO 10

DI©( I >=DI©< 1)4-4096

CO TO 1 10 CONTINUE

»»» UPDATE CYCLE ENERGY SUMS «««

ESUMCIl )-ESUMC ( 1 ) + <BIG< 1 )-LDI0(l ) ) GSUMC C 2 ) =QSUMC ( 2 ) +2. 334*(DIC(4)-LDIC<4)

)

ESUMC ( 3 > «ESUMC ( 3 ) -*-20. 0*(DI©<2)+DI©<3)HLDI©<2)-LDI©<3)

)

C

DO 20 1 = 1 j 4

LDIG( I )=DIG( I

)

20 CONTINUE

C

RETURN

END

80
POATA:

Die:

PSCAN:

PIN:

iSTUFF:

PROGRAM PARALLEL 2/6/80

SCAN SUBROUTINE FOR CROMEMCO BPIO

ENTRY PSCAN

COM PARELL

DS e DS

REL

8 { INTEGER ARRAY DI0(4)

PUSH AF

PUSH BC

PUSH HL

LD A. OFFH

OUT 84H. A i UPDATE PARALLEL PORTS. . . 84H-TUART PORT B

XOR A i ZERO ACCUMULATOR

OUT 84H. A .LATCH ALL BPIO PORTS

LD HL. PDATA

LD B. 8

LD C. OAOH ; POINT TO FIRST PARALLEL PORT

INI JR Z. STUFF < EXIT IF DONE (8 DATA POINTS COLLECTED)

INC C i POINT TO NEXT PORT

JR PIN

»»» INTEGER ARRAY DIG<4> SET-UP ROUTINE «««

LD HL. PDATA i POINT TO DATA PORT 0

LD A. (HL)

LD (DIG+2) < A (LOAD LOW BYTE OF DI0(2>

INC HL i POINT TO DATA PORT 1 LD A. (HL)

LD (DIG). A t LOAD LOW BYTE OF DIG(l)

INC HL J POINT TO DATA PORT 2

XOR A i ZERO ACCUMULATOR

RRD i ROTATE LOW NIBBLE OF DATA PORT 2 TO ACC.

LD (DIG+9) . A ; LOAD HIGH BYTE OF DI0(3>

RRD j ROTATE HIGH NIBBLE OF DATA PORT 2 TO ACC

LD (DIO-M ) . A ;LOAD HIGH BYTE OF D10(l)

INC HL i POINT TO DATA PORT 3

RRD {ROTATE LOW NIBBLE OF DATA PORT 3 TO ACC.

LD (DIO+7).

{LOAD HIGH BYTE OF DIG(4)

RRD {ROTATE HIGH NIBBLE OF DATA PORT 3 TO ACC

LD (DIG+3).

{LOAD HIGH BYTE OF DIG(2>

INC HL {POINT TO DATA PORT 4

81
LD A, < HL

)

LD (DIG+6) < A i LOAD LOW BYTE OF DI0(4)

INC HL i POINT TO DATA PORT 9

LD A. (HL)

LD (DIG+4) > A : LOAD LOW BYTE OF DIO( 3)

POP HL

POP BC

POP AF

RET

END

82
ooo

o*-

nnjouo

no

o

o

o

o

o

onoooooooooo

SUBROUTINE ANALOG

DATA AQUISIT10N ROUTINE FOR CROMEMCO A/D CONVERTER CARD 3/27/80

»»» VARIABLE DEFINITIONS «««

COUNT ANALOG SCAN COUNT (33-mi)

ADATA ANALOG PORT RAW DATA

ADI ANALOG RAW DATA (volts)

AD2 ANALOG REDUCED DATA

M SENSOR CALIBRATION SLOPES (Y-MX+B)

B SENSOR CALIBRATION INTERCEPTS

SEASON HEAT I NO-COOLING SEASON INDICATOR (O-hooting)

INTEGER* 1 COUNT. ADATA, SEASON

REAL M( 16)

DIMENSION B ( 16)

COMMON /ATOD/ADATA( 326), ADI (16), AD2( 16), COUNT

DATA M/0. , . 038. 14. . 26. , . 9. 9. , 20. , 0. . 0. . 1. . 2*26. , 4*0. /

DATA B/0. , . 103, S3. . 23. . 29. 23. 72. 3, SO. . 0. . 0. . 0. . 2*113. , 4*0. /

CALL SETUP

SEASON— I NP ( Z

' A7 ' ) . AND. Z'80'

IF ( SEASON. Ed. O) GO TO 1

M( 1 1 ) — 10. O

M< 12) — 10. 0

B ( 1 1 ) —70. 0

B( 12)—70. O

GO TO 3

M( ll>-26. O

M( 12)—26. O

B ( 1 1 ) — 1 15. O

B ( 12)—1 15. 0

N—

IF ( N. GT. COUNT) GO TO 2

DO 10 1-1, 16

J— I*(N— 1 >*16

ADI ( I )—ADI ( I >+ADATA( V)

CONTINUE

N=N*1

IF ( N. LT. 34) GO TO 2

»»» REDUCED DATA CALCULATION ROUTINE «««

DO 20 I-l, 16

ADI ( I )—ADI ( I )*2. 0/(100. 0*(N—1 )

)

AD2( I )—ADI ( I )*M( I )+B( I

)

20 CONTINUE

C

IF ( SEASON. EQ. Z '80') GO TO 4

DV—0. 6 1 34*AD 1 ( 1 0 > + 1 . 3333

83
AD2<10>«44. 4919+DV—0. 98659+DV++2

RETURN

C

4 DV*0. 5605+0. 2242+ADI (10)

AD2(10>-43. 9624+DV+l. 29U+DV++2

C

RETURN

END

84
C »»» PERKIN ELMER CRT UTILITY PROCRAM LIBRAY «««

C

C

C

SUBROUTINE LINE

C ROUTINE PUTS A LINE (DASHES) ON CRT

INTEQERM L(80)

C

DATA L/80*Z'2D'/

C

WRITEO. 500) L

300 FORMAT < IX, BOA1)

C

RETURN

END

C

C

C

SUBROUTINE CLEAR

C

INTEGER*1 L<22)

C

DATA L/22*Z '00 '/

C

L( 1 )=Z ' IB

L(2)»Z '4B

C

WRITEO, 300) L

300 FORMAT < IX, 22A1)

C

RETURN

END

C

cc SUBROUTINE CURSOR(X.Y)

INTEGER*1 X, Y, L<6>, NX, NY

C

NY-Y+31

NX*X+31

C

L< 1 )*Z ' IB

L<2)-Z'58'

L(3)»NY

C

L(4)«*Z ' IB

L ( 3 )»Z ' 39

L(6)-NX

C

WRITEO. 300) L

500 FORMAT ( IX. 6A1

)

C

RETURN

END

3/7/80
o

oo

a

?»o SUBROUT I ps® SKIP!DIR, NSKIP)

ROUTINE MOVES CRT CURSOR UP OR DOWN SCREEN

DIR = 0 MOVE CURSOR UP

DIR » 1 MOVE CURSOR DN

NSKSP » NUMBER OF LINES TO BE SKIPPED

INTEGER*! DIR, NSKIP. L<2)

L( 1 )=Z ' IB

L ( 2 ) =Z '41 '+DIR

DO 10 1*1, NSKIP

WRITE! 5, 500) L

500 FORMAT! 2A1 ) 10 CONTINUE

C

RETURN

END

86
7/ 19/BO

PROGRAM REDUCE

C DATA REDUCTION PROGRAM FOR HEAT PUMP PROJECT

C

C »»» LOGICAL UNIT NUMBER ASSIGNMENTS «««

C

C AS 9 - CONSOLE

C AS 7 - PROGRAM MESSAGE FILE

C AS 8 DATA FILE (PUMPDATA. DTA)

C

INTEGERS TYPE. DTYPE(4. 6). UNIT. NA< 13). NB< 13). NDATA1200. 13)

INTEGER CYDIV. POWER. TOTREC

DIMENSION TITLE( 13. 4). RA< 13), RB( 13). RDATA(200. 13)

C

CALL OPEN <7. ' DATANAMEMSC ' . 0)

C

DO 10 1-1. 13

READ(7, 700. END-6) ( TITLE ( I, J), J— 1, 4)

700 FORMAT (4( IX. A4)

)

10 CONTINUE

C

DO 90 1-1.4

READ(7, 701) <DTYPE<I. J). J-1.6)

701 FORMAT ( 1 X, 6A1

)

90 CONTINUE

C

1 CALL CLEAR

C

CALL LINE

C

WRITE( 9. 909)

909 FORMAT (30X. 'HEAT PUMP FIELD DATA')

C

CALL LINE

C

WRITEd. 900)

900 FORMAT ( IX, ///, 20X, 'DATA TYPE'./. 10X. 'O-SCAN'. /. 10X. '1-CYCLE'.

-/. 10X, '2-DAILY', /. 10X. '3-1/2 HOUR '. //, 9X. 'Entar data type -> ')

READ <5, 501) TYPE

501 FORMAT (II)

C

IF (TYPE. OT. 3) GO TO 1 C

CALL RESET

C

CALL OPEN (8, 'PUMPDATADTA', 1)

C

READ (8. END-6. REC-1 ) UNIT. TOTREC. VER, CYDIV, POWER

C

IFtVER. LT. 0. 00 .OR. VER. OT. 9. 90) VER-O. O

C

NREC-1

2 N—

C

3 NREC-NREC+1

IF (N. GE. 200) GO TO 4

C

READ <8. END-4. REC-NREC ) (NA(I). 1-1. 12). (RA(I), 1-1. 13)

-. (NB(I). 1-1. 12). (RB(I). I-l. 13)

C

87
IF!NA! 1 >. NE TYPE) CO TO 5

C

DO 20 1*1. 13

NDATA !N, I )»NA( I ) RDATA!N, I )=RA! I

)

20 CONTINUE

N*N+1

C

3 IF(NB< 1 ) .ME. TYPE) GO TO 3

C

DO 30 I-l. 13

NDATA! N. I

) =NB Cl)

RDATA ! N. 1 >*RB! I

)

30 CONTINUE

N=N+

GO TO 3

C

4 N=N-1

IF(N. ©T. 200) N=200

C CALL LINE

C WRITE!3, 504) UNIT, NREC. VER

504 FORMAT ( 3X» 'UNIT *'.I2, 3X, 'TOTAL # of records on FILE-'. 14

3«» 'Aquisition program ver. * '. F3. 1)

C

CALL LINE

C

WR I TE < 5. 511 ) TYPE. ! DTYPE ! TYPE+1 , J). J«l, 6), ! DTYPE ! TYPE+1 . J>, -J= 1 . h ) ,

511 FORMAT <3X, 'Data type =', 12. ' < 6A1, ' data)'.3X.

-'Number of '.6A1, ' records on file*'. 14)

C

CALL LINE

C

WR I TE (5. 512) CYBIV. POWER

512 F0RMAT!3X, 'Cycle divide number* '. 13, 3X. 'Number of POWER

-'FAILURES*', 13)

C CALL LINE

C IF < N. EQ. 0) GO TO 7

C

C »»» OUTPUT REDUCED DATA TO CONSOLE «««

C DO 40 11*1. N,

12=11+4

IF ( 12. GT. N) I2=N

WRITE <5. 503)

503 FORMAT ( IX. //. 10X)

C

WRITE (5, 505 ) ( NDATA ( I, 11). 1 = 11, 12)

505 FORMAT ( 12X, 3! IX. 'MODE - '. II, 4X) ) C

WRITE! 5, 506) (NDATA! I. 10). NDATA ! 1 . 9) . NDATA! I, 8). 1*11. 12)

506 FORMAT! 12X. 3! IX. 'DAY - '. 31 1, 3X ) ) C

WRITE! 5, 507) (NDATA! I. 7). NDATA! I. 6). NDATA! I, 3). NDATA( I. 4)

-, NDATA! I, 3), NDATA! I, 2). 1*11. 12)

307 FORMAT! 12X. 3! IX. 211. ',211, '.2I1.4X))

88
O

4

C

WRITE<9. 910)

910 FORMAT ( 10X

)

C

DO 40 J»l. 13

WRITEC9. 902) J. TITLE (J. TYPE+1 ). (RDATA< I. J)» I-Il. 12)

902 FORMAT <2X. 12. 2X. A4. 2X. 9<010. 4. 3X ) ) 40 CONTINUE

C

IF (N. OE. 199) 00 TO 2

7 ENDFILE 8

00 TO 1 CALL CLEAR

WRITE <9. 908)

908 FORMAT( IX. //< 10X. 'ERROR !'»//» 10X. 'Default drivo ut incorroctly OR

- 10X. 'Oat* reduction disk in wrong drivo'.//)

C

END

B.
» PROGRAM SCAN 7/ 19/BO

i HEAT PUMP DATA AQUISITION SCAN ROUTINE

i ENTRY SERV, DISABL. ENABL. TIME. SYSTEM. INIT. SETUP. MOTOR. RESET

COM ATOD

ADATA: DS 528 ANALOG RAW DATA ARRAY

ADI

DS 64 REDUCED DATA ANALOG DATA ARRAY

AD2: DS 64 REDUCED ANALOG DATA ARRAY

COUNT: DS 1 ANALOG SCAN COUNT (33 - max. )

i COM STATUS

STAT: DS 1 SCAN OR NO-SCAN STATUS <l»»canning)

I CNTDS 1 PERIODIC INTERRUPT COUNTER <max count-76)

NSC AN: DS 1 TOTAL SCANS PER CYCLE <255 MAX. ) DEFRST: DS I DEFROST STATUS BYTE; 2=DEFR. ON; fan off

COMP: DS 1 COMPRESSOR STATUS <0 = on)

MODE: DS 1 ; SYSTEM STATUS BIT; FAN AND DEFRST

EOC: DS 1 END OF CYCLE INDICATOR <1 * end of def. cycle)

NFRST

DS 1 NUMBER OF DEFROST CYCLES

PINT: DS 1 PERIODIC INTERRUPT STATUS <1 -interrupt active)

ZONE: DS 1 SCAN TIME ZONE INDICATOR

DIVIDE: DS 1 TSCAN DIVIDE DOWN COUNTER

i COM DATE

TDATA: DS 9 TIME RAW DATA ARRAY

i COM SUM

CYCLE: DS 52 CYCLE SUM DATA ARRAY

DAILY: DS 44 DAILY SUM DATA ARRAY

COP1 : DS 4 CYCLE COP

COPS: DS 4 DAILY COP

SET: DS 1 SUM DATA INITIALIZATION INDICATOR

i COM TIM

TIMl: DS 9 DEFROST START TIME

OTHER

DS 18 OTHER CYCLE TIME INFORMATION

REL

SETPT

DB 14. 38. 74. 74 TIME ZONE SET POINTS

DIVC NT: DB 1 . 3. 8. 30 TSCAN DIVIDE DOWN COUNTER VALUES

iTENCNT

DB 10 -ONE SECOND INTERRUPT DIVIDE DOWN COUNTER

DTAB

DM ADATA ANALOG DATA TABLE ADDRESS POINTER

; *************************************************************

; »»» INTERRUPT SERVICE ROUTINE «««

; *************************************************************

i

>

I

;SERV:

»> PERIODIC OR ANALOG INTERRUPT DETERMINATION ROUTINE «<

DIPUSH AF

90
PUSH BC

PUSH DE

PUSH HL

1 LD A. (COUNT)

CP A. 33 t IS THIS A PERIODIC INTERRUPT?

i JR Z. BEGIN iZ-PERIODIC INTERRUPT

i

1l

tASCAN:

»»» ANALOG DATA INPUT ROUTINE «««

LD HL. (DTAB)

LD B. 16

LD C. 10H

iINPl

INI JR Z. EXITl i EXIT IF ALL 16 PORT DATA COLLECTED

i INC C

JR INPl ! POINT TO NEXT ANALOG PORT

iEXITl: LD A. (COUNT)

INC A

LD (COUNT). A i UPDATE A/D DATA POINTS COUNTER

CP A. 33 ; IS ACCUM. (COUNT) EQUAL TO 33?

JR Z. EXIT2 > ALL DONE IF ZERO (C0UNT«33)

i

iEXIT3:

LD (DTAB). HL i UPDATE DATA POINTER

POP HL

POP DE

POP BC

POP AF

El

i RET

i »»» SCAN COMPLETION EXIT ROUTINE «««

EXIT2: XOR A

OUT OCFH. A j DISABLE CLOCK INTERRUPTS

INC

LD

LD

i LD

INC

t LD

OUT

JR

iEXIT4: POP

POP

POP

POP

RET

A

(PINT). A

(STAT). A

HL, NSCAN

<HL>

A. 14H

OCFH. A

EX1T3

HL

DE

BC

A

• SET A-l

i SET INTERRUPT STATUS (l«interrupt active)

t SET SCAN STATUS ( l**canning completed)

i POINT TO ANALOG SCAN COUNTER

i INCREMENT ANALOG SCAN COUNTER

i SET INTERRUPT TO l»ec

i EXIT AND ENABLE INTERRUPT

91
I

I *****

1

i

I

i

J

iBEGIN:

»»» PERIODIC INTERRUPT SERVICE ROUTINE «««

DEF:

>» COMPRESSOR STATUS ROUTINE «<

IN A, 24H i INPUT COMPRESSOR-OUTDOOR FAN STATUS

AND A. 1 i MASK OFF ALL BUT COMPRESSOR BIT

LD (COMP), A i UPDATE COMPRESSOR STATUS

JR Z. DEF ;

sCOMPRESSOR STILL ON : CONTINUE

>» COMPRESSOR TURN-OFF «<

XOR A

LD (PINT),; RESET INTERRUPT STATUS (O-no interrupts

LD A, (DEFRST)

CP A, 2 ; WAS COMPRESSOR IN DEFRST MODE?

JR NZ, EXIT4 » NZ=DEFROST OFF : THEN STOP EVERYYTH INC

LD A, 1 LD ( EOC ) ,

» SET EOC SINCE DEFROST HAS CONE OFF WITH

LD HL, NFRST ; POINT TO DEFROST COUNTER

INC (HL) ; INCREMENT DEFROST COUNTER

JR EXIT4 ; EVERYTHING OFF SO EXIT (STOP INTERRUPT)

»> DEFROST MODE AND END OF CYCLE STATUS ROUTIhC «<

LD A, (DEFRST)

LD B, A

IN A, 24H i INPUT COMPRESSOR-FAN STATUS

AND A, 02H ; MASK OFF ALL BUT DEFRST

CP A, B , SEE IF CHANCE

JR Z, BEG2 i Z=WO CHANCE

LD (DEFRST), A ; SAVE NEW DEFRST VALUE

OR A

JR Z, CHANG3 i Z=UNIT NOT IN DEFROST MODE (0“fan on)

>» START DEFROST MODE «<

CALL TIME

LD SC, 9

LD HL. TDATA j POINT TO TIME DATA

LD DE. TIM1 ; POINT TO DEFROST START TIME ARRAY

LDIR i SET DEF. START ARRAY TO TIME

JR CHANC2

»> END OF DEFROST CYCLE «<

LD A, OlH

LD (EOC), A » SET EOC (1 ® *nd of defrost cycle)

92
I

lCHANC2:

i

l

t

i

LD

INC

HL. NFRST

<HL>

l POINT TO DEFROST COUNTER

i INCREMENT DEFROST COUNTER

XOR

LD

LD

A

( ICNT) . A

(ZONE). A

: ZERO ACCUMULATOR

i RESET PERIODIC INTERRUPT COUNTER

J RESET TIME ZONE

INC

LD

LD

A

(DIVIDE). A

( TENCNT ) . A

<SET A-l

{SET DIVIDE-1 TO START lOsec PERIODIC

{SET TENCNT TO I NT I ATE SCAN

»»» INTERRUPT DIVIDE DOWN AND CHECK ROUTINE «««

BEC2:

i

{

LD A. (TENCNT)

DEC A {DECREMENT DIVIDE DOWN COUNTER

LD (TENCNT). A {UPDATE DIVIDE DOWN COUNTER

JP NZ. EXITS i NZ-CONTINUE l»ec INTERRUPTS

LD A, 10

LD (TENCNT). A { INITIALIZE TENCNT TO 10 (divide bg ten)

»»» PERIODIC INTERRUPT COUNT AND UPDATE ROUTINE «««

LD HL. SETPT

LD BC, (ZONE)

LD B. 0

ADD HL. BC {POINT TO CURRENT SET POINT

LD A. (ICNT)

CP A. (HL)

JR NZ. BE01 {SET POINT - • OF INTERRUPTS ? : NZ-NO

»> ZONE UPDATE ROUTINE «<

LD A. (ZONE)

CP A. 3 { IS ZONE - 3 ?

JR Z. BE01 { Z-ZONE IS EQUAL TO 3 (then do not increment

INC A

LD (ZONE). A {UPDATE ZONE COUNTER

»> INTERRUPT COUNTER UPDATE ROUTINE <«

BEG1:

BEGS:

LD A. (ICNT)

CP A. 76 { IS ICNT—76?

JR Z.BEG3 i Z-ICNT IS EQUAL TO 76 (then do

INC A

LD (ICNT).

{UPDATE ICNT

»> ANALOG SCAN CHECK ROUTINE «<

LD A. (DIVIDE)

DEC A

JP Z. SETUP

{ Z -ANALOG DATA SCAN REQUIRED

LD (DIVIDE). A {UPDATE DIVIDE COUNT

JP EXIT3 {EXIT AND ENABLE INTERRUPT

93
»»» DATA AQUISITION UTILITY PROGRAMS «««

i

* »> SET INTERRUPT COUNTER ROUTINE <«

SETDIV: LB HL. B I VCNT

LD 1C. (ZONE)

LD §. 0

ADD HL, BC ; POINT TO DIVIDE DOWN NUMBER

LD A. <HL>

LD (DIVIDE).

; UPDATE DIVIDE COUNTER

RET

»> CPU INTERRUPT ENABLE AND DISABLE ROUTINES «<

DISABL: DI

PUSH AF

i XOR A

OUT OCFH. A ; DISABLE CLOCK INTERRUPTS

POP AF

RET

iEMAIL: PUSH AF

LD A. 14H

OUT OCFH.; START CLOCK INTERRUPTS (14H«ls»c int

POP AF

El

RET

»> TIME AND DATE INPUT ROUTINE «<

TIME: PUSH AF

PUSH BC

PUSH HL

IN A, OCOH

AND A. OFH

CP A. 9 i IS CO « 9 ?

JR NZ, CLK5 ; NZ=CO IS NOT EQUAL TO 9. CLK9

LD B. 0 ; SET 3=0 SINCE C0=9

JR CLKl

DCLK3: INC A

LD 1. A

iCLKl

IN A. OCOH

AND A. OFH

CP A. B JR NZ. CLKl ; WAIT FOR lOOuscc CLOCK TRANSITION

94
LD B» 9

LD HL, TDATA i POINT TO DATA AREA

LD C. 0C4H i POINT TO SEC COUNTER

JCLK2: INI

JR Z» CLK3

j INC C ; POINT TO NEXT CLOCK PORT

JR CLK2

j

i » MASK OFF HIGH NIBBLE OF CLOCK DATA «

iCLK3: LD B< 9

LD HL. TDATA

CLK4: LD A. OFH

AND A. (HL)

LD ( HL > .

INC HL ; POINT TO NEXT DATA ELEMENT

DJNZ CLK4 i JUMP IF BOO

i POP HL - POP BC

POP AF

i RET

i

i »> COMPUTER SYSTEM HARDWARE INITIALIZATION ROUTINE «<

)

iSYSTEM: PUSH AF

PUSH HL

LD HL. SERV ; POINT TO INTERRUPTS SERVICE ROUTINE

i LD (00F7H). HL i INIT INTERRUPT VECTOR LOCATION

XOR A i ZERO ACCUMULATOR

LD I. A

I M2 i INT. MODE 2 (VECTOR ADDRESS-OOF7H

)

OUT OCFH. A ; DISABLE ALL CLOCK INTERRUPTS

i OUT 03H. A i MASK CONSOLE PORT INTERRUPTS

OUT 23H. A iMASK TUART PORT A INTERRUPTS

OUT 83H. A {MASK TUART PORT B INTERRUPTS

OUT 02H. A > DISABLE CONSOLE INT. ACK.

OUT 22H. A < DISABLE TUART PORT A INT. ACK.

OUT 82H. A i DISABLE TUART PORT B INT. ACK.

POP HL

POP AF

i RET

i

j »»» ANALOG SCAN SETUP ROUTINE «««

SETUP: D

PUSH AF

PUSH BC

95
PUSH DE

PUSH HL

SETUP 1: LO HL, ADATA

LD < DTAB ) , HL J INITIALIZE DATA TABLE POINTER

LD 1C. 63

LD HL. ADI

LD DE, AD1 + 1 LD

LDIR

(HL). 0

i INIT. ANALOG DATA ARRAY AD TO ZERO

# CALL SETDIV ; INIT DIVIDE DOWN COUNTER

XOR A i ZERO ACCUMULATOR

LD (COUNT), A i INITIALIZE A/D COUNT TO ZERO

i LD (STAT),

; RESET STAT TO INDICATE SCANNING (STAT»0>

i OUT OCFH, A i DISABLE ALL CLOCK INTERRUPTS

LD A, 11H

OUT OCFH, A i ENABLE CLOCK INTERRUPT (11H-1 ms)

JP EXIT3 » EXIT AND ENABLE INTERRUPT

»> CYCLE AND DAILY DATA INITIALIZATION «<

INITPUSH AF

PUSH BC

PUSH DE

PUSH HL

i LD A, (SET)

CP A. 2

JR Z. DI ; Z=INIT DAILY DATA ONLY

i LD HL, CYCLE

LD DE, CYCLE*

LD BC, 51

LD

LDIR

(HL), OOH

i INITIALIZE DAILY DATA

i XOR A

OUT 24H. A ; RESET DIGITAL COUNTERS

LD A, OFFH

OUT 24H, A ; ENABLE DIGITAL COUNTERS

i LD A, (SET)

CP A, 1 JP Z. EXIT4 i Z»INIT CYCLE DATA ONLY (1 - cycls data)

iDl: LD HL, DAILY

LD DE, DAILY+1

LD BC, 43

LD

LDIR

(HL), OOH

i INITIALIZE DAILY DATA TO ZERO

96
MOTOR:

i

i

tRESET:

JP EXIT#

»»» FLOPPY MOTOR SHUT-OFF ROUTINE «««

PUSH BC

LD C. 190

CALL 000SH i CDOS SYSTEM CALL

POP BC

RET

»»» CDOS RESET ROUTINE «««

PUSH BC

LD C. 13

CALL 0009H * CDOS SYSTEM CALL

POP BC

RET

END

97
c PROGRAM DCEP

INTEGER*! NS. NA. NB. TYPE, UNIT, UNIT1

INTEGER POWER, CYDIV, TOTREC

DIMENSION RA< 13), RB ( 13). NA< 13), NB(13)

COMMON /A/ NS<5. 13), RS<5. 13). INUM, NDAYP, ISTART

COMMON /C/ NN, UNIT, VER. CYDIV, NNREC. TYPE, NDISK. POWER

COMMON /D/ NTITLE. III. IDS, SEC1, SECC1

COMMON /E/ ISESON

NREC-0

ND I SK=

WRITE (5, 1

)

1 FORMAT! IX, ///, 2X. 'INPUT DATA TYPE '

, //» 1 5X, '1-CYCLE DATA',/, 13X, & '2-DAILY DATA',/)

READ! 3, 2) TYPE

2 FORMAT < 1 1 1

)

WRITE ( 5. 11)

11 FORMAT!//, 2X, 'INPUT SEASON INFORMATION : ',

Sc /, 13X. '2 = HEATING SEASON'.

Sc /. 13X, '3 = COOLING SEASON'/)

READ (5, 12) ISESON

12 FORMAT (II)

NTITLE=1

IFITYPE. EG. 2) NTITLE-2

CALL OPEN (8. ' PUMPDATADTA ', 1)

CALL OPEN (9, 'PUMPDNEWDTA ' . 2

)

INUM—O

DO 100 1 = 1. 13

DO 100 J=l.

NS ( J. I

) =0

RS< J. I ) =0. 0

100 CONTINUE

110 CONTINUE

SECC 1=-1Q0. 0

READ <8, END=220, REC=1 ) UNIT, TOTREC. VER, CYDIV, POWER

READ ( 9, END-150. REC-1 ) UNIT1. NNREC, VER. CYDIV, POWER. NNN

IF (UNIT. NE. UNIT1 ) WRITE!3. 3)

3 FORMAT!///. 9X. 'WRONG UNIT CHECK DISK'.///)

IFtUNIT. NE. UNIT1) CO TO 240

IF (NNN EG. 0) GOTO 130

READ (9, END-220. REC—NNREC ) (N8(l. I), 1 = 1. 12). (RS(1. I). 1-1. 13)

NNREC—NNREC

INUM—

GO TO 140

130 CONTINUE

READ (9. END—220, REC-NNREC) (NS< 1,1). 1-1, 12), <RS< 1. I ). 1-1. 13)

Sc , (NS (2, I ). 1-1 , 12). <RS(2. I), 1-1. 13)

98
NNREC-NNREC-1

I NUM-2

140 CONTINUE

IF (TYPE. EQ. 1 ) OOTO 160

TN-RSdNUM. 10)-RS(INUM. 11)

RS( INUM. 7)»TN+RS(INUM, 7)

RS( INUM. 9)-TN*RS( INUM. 9)

I START

NDAYP— 1 00*NS < INUM, 10)+10«NS< INUM. 9)+NS< INUM. 8)

SEC 1—3600. •( 10. *NS( INUM. 7)+NS( INUM. 6) )+60. •( 10. *

6 NS ( INUM. 9>+NS( INUM. 4) > + 10. *NS< INUM. 3>+NS( INUM. 2)

IF(RS(INUM. 13). EQ. 0. ) OOTO 160

IF (RS( INUM. 13). LT. 1. ) RS( INUM. 13)-RS(INUH. 10)/RS<INUM. 13)

00 TO 160

190 NNREC-1

I START-0

III-O

160 CONTINUE

NREC-1

170 CONTINUE

NREC—NREC+1

DO 180 1 = 1. 13

NA ( I ) —0

NB ( 1 ) —

RA< I )—O. 0

RB ( I )—0. 0

180 CONTINUE

READ (8. END-230. REC-NREC) <NA(I>. 1-1, 12). <RA(I>. 1-1. 13).

Sc (NB(I). I — 1. 12). (RB(I). I — 1. 13)

IF (TYPE. NE. 1 ) GOTO 1B9

RA( ISESON)—RA( 13)

RB ( ISESON)—RB (13)

189 IF (TYPE. EQ. 1) OOTO 200

IF (NA( 1 ) . NE. 1 ) OOTO 190

NA( 1 )—

CALL DDA(NA. RA. IEXIT)

IFdEXIT. EQ. 1) OOTO 240

190 CONTINUE

1F(NB(1). NE. 1) GOTO 170

NB ( 1 ) —2

CALL DDA(NB. RB. IEXIT)

IFdEXIT. EQ. 1) GOTO 240

OOTO 170

200 CONTINUE

IF(NA(1>. NE. TYPE) 00 TO 210

CALL CTPT(NA. RA)

210 CONTINUE

IF(NB(1>. NE. TYPE) 00 TO 170

CALL CTPT(NB.RB)

00 TO 170

99
220 CONTINUE

WRITE(5. 5)

5 F0RMAT<//, 3QX, 'ERROR !!'.//, 10X.

S. 'FILE 8 CANNOT BE FOUND IN DRIVE A OR IS EMPTY'.//)

00 TO 240

230 CONTINUE

IFdNUM. EQ. 0) ©OTO 235

IF (TYPE EQ. 1 ) GOTO 234

IF(RS( INUM. 13). EQ 0. ) GOTO 233

RS< INUM. 13>*RS(INUM. 10)/RS(INUM. 13)

233 CALL CORECT < INUM. 1

)

234 CALL CHECK

235 ENDFILE 8

CALL RESET

WRITE( 5. 6)

6 FORMAT ( //« 5X» 'INSERT NEW DISK : ', //. 10X, 'INPUT : ' & , ' 1 — NEW DATA DISK INSERTED '. /. 18X. & , ' 0 — END OF DATA INPUT'.//)

READ( 5. 7 ) ND I SK

7 FORMAT (111)

CALL OPEN (8. 'PUMPDATADTA '. 1

)

I F ( NN . NE. 1 > GO TO 237

JJ=10

CALL SAVE ( JJ

)

237 I F ( NDISK. EQ. 1 ) GOTO 110

240 CONTINUE

STOP

END

C SUBROUTINE DDA(NA, RA. IEXIT)

C INTEGER*1 NA. NS, UNIT, TYPE

INTEGER POWER, CYDIV

DIMENSION NA( 13), RA( 13)

COMMON /A/ NS(5, 13), RS(5, 13). INUM, NDAYP, ISTART

COMMON /C/ UNIT, VER, CYDIV, NNREC. TYPE, NDISK, POWER

COMMON /D/ NTITLE, III, IDS, SEC1

IEX IT=0

NDAY=100*NA( 10)-*-10*NA(9)+NA(8)

IF( ISTART EQ. 1) GOTO 100

INUM-1

ISTART*!

NDAYP=NDAY

100 CONTINUE

IF ( NDAY. CT. NDAYP) GOTO 140

IF(NDAY. LT. NDAYP) GOTO 220

110 CONTINUE

DO 120 1*1, 13

100
NSdNUM, I)-NA(I)

120 CONTINUE

DO 130 1*1. 5

RSdNUM, I) -RSdNUM. I)+RA(I)

130 CONTINUE

TN=RA(10)-RA<11)

RSdNUM. 7 ) TMRA ( 7 ) *TN+RS ( INUM. 7)

RSdNUM, 9 ) *RA ( 9 ) *TN+RS < INUM. 9)

RSdNUM, 10)=RS( INUM, 10>+RA<10)

RSdNUM, 1 1 )*RS< INUM, 11>+RA(U)

IF< III. EQ. 0) SEC 1=3600 *(NA<7)*10. «-NA(6) ) +

Sc 60. #<NA< 5) *10. +NA(4) )+NA<3)»10. +NA<2)

IF ( IDS. EQ. 0. AND. SEC1. NE. 0. ) SEC 1 -SEC 1-06400.

SEC2=3600 *( 10. *NA(7)+NA<6) )«-60. *<NA(5>*10.

Sc +NA(4) ) + 10. *NA ( 3 ) +NA ( 2

)

RSdNUM, 13)=RS< INUM, 13 ) +SEC2-SEC

IDS=1

SEC 1=SEC2

1 1

= 1 GOTO 230

140 CONTINUE

IFtRSdNUM. 13). OT. 1. ) RSdNUM, 13)*

Sc RSdNUM, 10) /RSdNUM, 13)

NNDAY=NDAY—

ISO CONTINUE

IFtNDAYP. EQ. NNDAY) GOTO 190

CALL CORECT < INUM. 1

IFdNUM. EQ. 5) CALL CHECK

INUM=INUM+1

160 CONTINUE

I

I =NNDAY-NDAYP

IFdl.LE. 0) GOTO ISO

NDAYP=NDAYP +

DO 170 1 = 1, 13

NS (INUM. I )-0

RS ( INUM, I)=0. 0

170 CONTINUE

NS ( INUM. 1 )=2

NS< INUM, 10) =NDAYP / 1 00

NS< INUM, 9 ) *NDAYP / 1 0— 1 0*NS ( INUM, 10)

NS ( INUM. 8>»NDAYP—10*NS( INUM, 9)-100*NS(INUM. 10)

IF < INUM. EQ. 3) CALL CHECK

I NUM= I NUM+

GOTO 160

180 CONTINUE

NDAYP *NDAYP+

GOTO 200

190 CONTINUE

IDS«0

CALL CORECT (INUM. 1)

IFdNUM. EQ. 3) CALL CHECK

I NUM* I NUM+

NDAYP-NDAYP+1

200 CONTINUE

DO 210 1-1, 13

101
RS<INUM. I>»0.

210 CONTINUE

©OTO 110

220 CONTINUE

IEXIT-1

WRITEO. 1)

1 FORMATt////, 10X, 'THE CYCLE DATA IS NOT IN CORRECT ORDER'.

& ' FOR SUMMATION'. //» 1SX. 'CHECK THE DATA DISKS',///)

230 CONTINUE

RETURN

END

C —

SUBROUTINE CTPT(N, R> C~ —

INTEGER*1 N, NS. TYPE. UNIT

INTEGER POWER, CYDIV

DIMENSION N(13).R(13)

COMMON /A/ NSO, 13). RSO, 13). INUM, NDAYP, ISTART

COMMON /C/ NN. UNIT. VER. CYDIV. NNREC. TYPE, NDISK. POWER

COMMON /D/ NTITLE, III. IDS. SEC1. SECC1

INUM=INUM+1

DO 10 K*l, 13

NS ( INUM, K)=N(K)

RS( INUM, K)»R <K)

10 CONTINUE

AD= 100. *N ( 10 ) +10. *N ( 9 ) +N ( 8

)

SECC2-3600. *<10. *N<7)+N<6> >+60. *< 10. *NO)+N<4) > + 10. *N(3)+N<2>

IF (SECC1 LT. 0. ) GOTO 20

SECC=SECC2-SECC 1+86400. *(AD-ADP>

RS < INUM, 13) =“RS ( INUM, 105/SECC

20 CONTINUE

ADP=AD

SECC 1=SECC2

I F ( INUM. EQ 3) CALL CHECK

RETURN

END

C

C

SUBROUTINE CHECK

INTEGER*1 N, TYPE. UNIT

INTEGER CYDIV, POWER

COMMON /A/ NO. 13). R<S. 13), INUM, NDAYP, ISTART

COMMON /C/ NN, UNIT, VER, CYDIV. NNREC. TYPE, NDISK. POWER

COMMON /D/ NTITLE. III. IDS. SEC1

102
CALL PRINT

100 WRITE (5, 1

)

1 FORMAT (5X. 'WHICH DATA SET NEED CORRECTION?

Ic 'INPUT I SET — 13 ««'./. 3X, 'NO. OF CORRECTIONS'

It .

' INPUT ICOR — 13 (INPUT 0 FOR NO CORRECTION)'

It > /» 3X. 'FOR ERASING ALL DATA — ICOR-lOO '/)

READ ( 5. 2) I SET. I COR

2 FORMAT (213)

IF(ISET. EQ. 0. OR. ICOR. EQ. 0) GO TO 140

IF( ICOR. NE. 100) GOTO 120

DO 110 1=1. 13

R < I SET. I )=0. O

110 CONTINUE

CALL PRINT

GOTO 100

120 CONTINUE

DO 130 1=1. ICOR

WRITEC5. 3)

3 FORMAT ( //, 5X, 'INPUT COLUMN NO. — 13'./.

& 5X, ' St NEW VALUE — F12. 3 './)

READ (5.4) IC.AA

4 FORMAT ( 13. FI 2. 3)

R ( I SET. IC)=AA

130 CONTINUE

CALL CORECT < ISET)

CALL PRINT

GO TO 100

140 CONTINUE

DO 130 11=1, INUM

CALL SAVE (II)

150 CONTINUE

INUM=0

RETURN

END

C

SUBROUTINE SAVE(II)

C

INTECER*1 N, NA, UNIT, TYPE

INTEGER CYDIV, POWER

DIMENSION N(26) , R (26)

COMMON /A/ NA(5, 13), RA(5. 13). INUM, NDAYP, ISTART

COMMON /C/ NN, UNIT, VER. CYDIV. NNREC, TYPE. ND I SK. POWER

COMMON /D/ NTITLE

DATA NN/O/

IF< II. EQ. 10) GO TO 20

NN=NN+1

K=13*(NN— 1)

DO 10 I-l. 13

J=I*K

103
N< J)«NA< II. I

>

R( J)=RA( Hi I)

10 CONTINUE

IF (NN. EQ. 1 ) RETURN

20 CONTINUE

NNREC-NNREC+1

IF (NN. EQ. 2) 00 TO 30

WRITE (9. REC-NNREC) (N( I ) . I = l» 12) < <R(I), 1 = 1. 13)

00 TO 40

30 CONTINUE

WRITE (9, REC=NNREC> <N< I ) . 1 = 1 , 12) , <R < I ) , 1 = 1. 13)

.

& (N<I). 1 = 14.29). (R(I). 1 = 14.26)

NN=0

40 CONTINUE

WRITE (9, REC=1 ) UNIT, NNREC, VER, CYDIV. POWER, NN

NN=0

RETURN

END

C SUBROUTINE CORECT ( ISET, ID)

C —

INTEGER*1 N

COMMON /A/NO, 13), RO. 13), INUM. NDAYP, ISTART

COMMON /D/ NTITLE

IF(NTITLE. NE. 2. OR. ID. NE. 1 ) GOTO 5

T=R ( ISET , 10) —R < I SET, 11)

IF < T. LE. 0. 0) GOTO 9

R < ISET. 7)=R< ISET, 7>/T

R( ISET, 9)=R( ISET, 9>/T

9 CONTINUE

E=<R< ISET, 3 ) +R < I SET , 4>«-R< ISET, 9) )*3. 413

Q=R < ISET . 1 ) +R ( I SET, 2

)

IF ( E NE. 0. 0) GOTO 10

R( ISET, 12)=0.

O

GOTO 20

10 CONTINUE

R ( ISET. 12)=Q/E

20 CONTINUE

RETURN

END

C SUBROUTINE PRINT

INTEGER*1 N. UNIT. TYPE

INTEGER POWER, CYDIV

DIMENSION TITLE! 13, 2)

COMMON /A/ NO. 13),R(5< 13), If'flJM, NDAYP, ISTART

104
COMMON /C/ UNIT. VER, CYDIV. NNREC. TYPE. NDISK, POWER

COMMON /D/ NTITLE

COMMON /E/ ISESON

DATA TITLE/ 'OS'. '<SL'. 'ECMP'. 'EFAN '» 'EHET '» 'DIC2 'TRET'

b 'DI03'. 'TDPR '. 'CTIM '» 'DTIM'. 'COP'. 'XCON', 'OS'. 'QL'.

b 'ECMP', 'EFAN'. 'EHET'. 'TOUT', 'TRET'. 'TDPO'. 'TDPR'. 'CTIM

b . 'DTIM'. 'COP'. 'XCON'/

DATA START/O.O/

IF(NTITLE. EQ. 2. OR. START. NE. 0. 0) GOTO 100

TITLE( ISESON. 1)«TITLE<6. 2)

START* 1. 0

100 WRITEO. 1 ) (N(I. 10).N(I.9),N(I,8). 1*1. INUM)

1 FORMAT ( 12X, 5< IX. 'DAY * '.3I1.3X))

WRITE (5. 2) (N(I.7),N(I.6),N<I,5>»N(I.4),N(I,3),

b N( I, 2), 1*1, INUM)

2 FORMAT ( 12X, 3( IX, 211, ': ',211. ': '.2I1.4X))

WRITEO, 3)

3 FORMAT ( /

)

DO 10 J=l. 13

WRITEO, 4) J, TITLE< J, NTITLE). (R<I, J). 1*1. INUM)

4 FORMAT <2X, 12, 2X, A4, 2X, 5(010. 4, 3X )

)

10 CONTINUE

RETURN

END

B.

105
c —

c -»

1

2

100

200

300

400

500

600

PROGRAM DDC

INTEGER*1 UNIT. UNIT1, N, NN

DIMENSION N< 12). NN(2, 12). RR(2, 13)

COMMON /A/ IBDAY. NDAY, INUM. I END

WRITE ( 5, 1)

FORMAT ( / . 3X. 'CHECK THE DISKS IN SLOTS'. /, SX. & 'INPUT 0 TO CONTINUE THE PROGRAM'.//)

READ (5. 2) IBEC

FORMAT (II)

CALL OPEN (9, 'PUMPDNEWDTA'. 2)

READ (9. END-850. REC-2) (Nil), I-l. 12)

IBDAY-100*N( 1Q)+10*N(9)+N(B)

I START*©

NDC-0

NREC*1

INUM-0

TOUT—Q.

TDPO-G. O

I END-0

CALL OPEN (8, 'PUMPDATADTA ' . 1)

READ (8, END—700. REC-1 ) UNIT

READ ( 9. END—700, REC— 1 ) UNIT!

IF (UNIT. NE. UNIT1 ) GOTO 800

CONTINUE

NREC-NREC+1

READ (8. END-600. REC-NREC ) <NN(1, I), I-i, 12), (RR( 1, 2). I-l, 13)

& , ( NN ( 2, I), I-l. 12), (RR(2, I), I-l. 13)

DO 500 1-1.2

IFiNNil. 1). NE. 3) GOTO 500

NDC-100*NN( I, 10>+10*NN(I, 9>«-NN( I, 8)

IF< I START. EO. O) NDAY-NDC

MN-NDC-NDAY

IF(MN) 900.400.30©

CALL CHECK < TOUT, TDPO)

TOUT—O. 0

TDPO—O. 0

INUM—

NDAY-NDC

TOUT—RR ( 1 , 1 ) +TOUT

TDPO—RR < I, 2)+TDP0

INUM-INUM+1

I START

CONTI NIC

GOTO 200

CONTINUE

IEND-1

CALL CHECK (TOUT, TDPO)

106
ENDFILE 8

CALL RESET

WRITE (3. 4)

4 FORMAT<//, 3X. 'INSERT NEW BISK : ', //, 10X. 'INPUT :

It ,

' 1 — NEW DATA DISK INSERTED /. 18X.

«, ' 0 — END OF DATA INPUT'.//)

READ (3. 5) NDISK

3 FORMAT < 1 1

)

IFINDISK. EQ. 1 ) GOTO 100

GOTO 900

700 CONTINUE

WRITEO. 6)

6 FORMAT ( //. 30X. 'ERROR !!'./, 10X. 'FILE 8 OR FILE 9 '. /. & 5X> 'CANNOT BE FOUND OR FILE IS EMPTY',//)

GOTO 900

800 CONTINUE

WRITE <5. 7)

7 FORMAT (//, 30X. 'ERROR !!'.//. 10X. 'THE UNITS IN DRIVE'.

* ' A AND DRIVE B '. /, 15X, 'IS NOT CONSISTENT'//)

GOTO 900

830 WR I TE (5.8)

8 FORMAT < / /, 30X, 'ERROR ! ! ', //, 10X. 'PUMPDNEW. DTA CANNOT BE'. * ' FOUND IN DRIVE B OR IS EMPTY',//)

900 STOP

END

C

SUBROUT I NE CHECK ( TOUT. TDPO

)

C

INTEGERM N

DIMENSION N ( 2, 12),R(2, 13)

COMMON /A/ IBDAY, NDAY. INUM, I END

I I=NDAY-IBDAY+2

J-l+II/2

K=II-2*J+3

READ <9. END-200. REC-J) <N<1. I). 1 = 1, 12). (R(l, I). 1-1. 13).

& (N<2» I). 1 = 1, 12), <R<2, I), 1 = 1. 13)

NO—N(K» 12)*10+N(K» 11)

FNO—FLOAT < NO

)

R (K, 6)=FN0*R <K, 6>+T0UT

R(K. 8 ) =FNO*R < K, 8 ) +TDPO

INUM— INUM+NO

FNUM-FLOAT < I NUH

)

R (K. 6)-R(K, 6)/FNUM

R(K, 8)—R (K» 8 ) /FNUM

IFdEND. NE. 1 ) GOTO 100

N(K, 12 ) —INUM/ 10

N(K. 11 )»INUM-10*N(K. 12)

107
e®

*8

100 CONTINUE

WRITE <9, REC-J) (N< 1. I ) . I»l, 12) , (R< 1. I ) , I»l» 13),

«< <N<2. I). 1-1. 12), ( R <2. I), I»l» 13)

WRITE<5. 1) NDAY. R(K. 6). RCK. 8 > * FNUH

1 FORMAT(/, 5X. 'DAY* '. 13. 10X. 'TOUT* ' , F5. 1 , 8X, 'TDPO- '

, F5. 1./.5X, 'NO. OF RECORDS (1/2 HR DATA) IN THIS'.

, ' DAY - F5. 0. //)

©OTO 300

200 WRITEO. 2) J. ft 2 FORMAT < /. 3X» 'CANNOT FIND THE FOLLOWING RECORD: '. /. & 10X. 'NREC- ', 14. 5X, 'SET- '.12.//)

300 CONTINUE

RETURN

END

B.

108
Appendix D

SI Conversion

109
In view of the presently accepted practice of the building industry in the

United States and the structure of the computer software used in this

project, common U.S. units of measurement have been used throughout this

report. In recognition of the United States as a signatory to the General

Conference of Weights and Measures, which gave official status to the

metric SI system of units in 1960, appropriate conversion factors have

been provided in the table below. The reader interested in making further

use of the coherent system of SI units is referred to: NBS SP330, 1972

Edition, "The International System of Units," or E380-72, ASTM Metric Practice

Guide (American National Standard 2210.1).

Metric Conversion Factors

Length 1

1

inch (in) = 25.4 millimeters (mm)

foot (ft) = 0.3048 meter (m)

Area 1 ft

2 = 0.092903 m

2

Volume 1 ft

3 = 0.028317 m3

Temperature F = 9/5 C + 32

Temperature

Interval 1 F = 5/9 C or K

Mass 1 pound (lb) = 0.453592 kilogram (kg)

Mass Per Unit

Volume 1 lb/ft 3 = 16.0185 kg/m3

Energy 1 Btu = 1.05506 kilojoules (kJ)

Specific Heat 1 Btu/ [ (lb) (°F) ] = 4.1868 kJ/[(kg) (K)

110
U.S. DEPT. OF COMM.

BIBLIOGRAPHIC DATA

1. PUBLICATION OR

REPORT NO.

2. Performing Organ. Report No. 3. Publication Date

SHEET (See instructions) NBSIR 81-2285 June 1981

4. TITLE AND SUBTITLE

Using Microcomputers to Monitor the Field Performance of Residential Heat Pumps

5. AUTHOR(S)

C. W. Hurley, P. A. Kopetka, G. E. Kelly

6. PERFORMING ORGANIZATION (If joint or other than N BS. see instructions) 7. Contract/Grant No.

national bureau of standards

DEPARTMENT OF COMMERCE 8. Type of Report & Period Covered

WASHINGTON, D.C. 20234

9. SPONSORING ORGANIZATION NAME AND COMPLETE ADDRESS (Street. City. State. ZIP)

U.S. Department of Energy

1000 Independence Avenue, S.W.

Washington, D.C. 20585

10. SUPPLEMENTARY NOTES

Q2] Document describes a computer program; SF-185, FIPS Software Summary, is attached.

11. ABSTRACT (A 200-word or less factual summary of most significant information. If document includes a si gn i fi cant

bi bliography or literature survey, mention it here)

Field data on the heating and cooling performance of residential heat pumps were

gathered for the purpose of verifying and refining laboratory testing procedures.

This report describes the procedures, instrumentation, and microprocessor-based data

acquisition system (DAS) used for evaluating the field performance of three residential

heat pumps located in the Washington, D.C. area. The instrumentation, signal conditioning unit and DAS are described in detail since the designs employed are applicable to

future testing projects of this type in both small and large scale field studies.

To avoid the large capacities of the DAS and data reduction facility required

for on-line monitoring, a strategy was developed which used the on-line microcomputer

in the field to reduce and analyze the raw data and record the calculated results.

This reduced the amount of recorded data to an acceptable level and thereby extended

the time period between data collection.

This report discusses the selection of the heat pumps utilized in this field study

and the design and selection of the instrumentation and DAS. The requirements for

scanning data and recording the results are also discussed.

The basic equations and the software for processing the data at the field units

and for reducing and editing the raw data disks at a central microcomputer are described. Examples of printouts taken directly at the field units and from the data

disks are shown.

12. KEY WORDS (Six to twelve entries; alphabetical order; capitalize only proper names; and separate key words by semicolons)

Analog signal conditioning; data acquisition system; field data acquisition; field

instrumentation; field performance of heat pumps; heat pumps; heat pump test methods;

microcomputer

13. AVAILABILITY

|^| Unlimited

| | For Official Distribution. Do Not Release to NTIS

H Order From Superintendent of Documents, U.S. Government Printing Office, Washington, D.C.

20402.

Q7) Otder From National Technical Information Service (NTIS), Springfield, VA. 22161

14. NO. OF

PRINTED PAGES

115

15. Price

$11 .00

USCOMM-DC 6043-P80
-

1