Skip to main content

Full text of "A minicomputer-controlled data acquisition system"

See other formats


Historic,  archived  document 

Do  not  assume  content  reflects  current 
scientific  knowledge,  policies,  or  practices. 


A S^) 
f\7UU(j(^ 

A Minicomputer-controlled 
Data  Acquisition  System 


U.S.  Department  of  Agriculture 

Science  and  Education  Administration 

Advances  in  Agricultural  Technology  • AAT-W-1/August  1978 


with  this  issue,  the  Western  Region  of  the  Science  and  Education  Adminis- 
tration (SEA) , U.S.  Department  of  Agriculture , begins  publication  of  a new 
series  of  reports.  Advances  in  Agricultural  Technology.  This  series  will  con- 
tain reports  of  technology  that  has  been  tested  and  is  ready  for  application . 
Examples  are  plans  and  specifications  for  a piece  of  equipment,  new  or  improved 
laboratory  techniques,  mathematical  models,  and  studies  resulting  in  practical 
suggestions  for  improved  operations. 

Four  U.S.  Department  of  Agriculture  agencies — Agricultural  Research  Service 
(ARS) , Cooperative  State  Research  Service  (CSRS) , Extension  Service  (ES) , and 
the  National  Agricultural  Library  (NAL) — have  been  merged  to  form  a new  orga- 
nization, the  Science  and  Education  Administration  (SEA) , U.S.  Department  of 
Agriculture . The  five  regional  series  of  ARS,  the  CSRS  series,  the  ES  Circular , 
and  the  NAL  Library  List  have  been  discontinued . If  you  subscribed  to  any  of 
these  discontinued  series,  you  will  continue  to  receive  similar  material  from 
SEA  as  new  series  are  established . Subscribers  wishing  to  modify  or  stop  mail- 
ings coming  to  them  should  write  the  office  whose  address  appears  below.  Please 
include  the  mailing  label  from  this  publication  with  your  request. 


Science  and  Education  Administration,  Advances  in  Agricultural  Technology, 
Western  Series,  No.  1,  August  1978 


Published  by  the  Office  of  the  Regional  Administrator  for  Federal  Research 
(Western  Region),  Science  and  Education  Administration,  U.S.  Department  of 
Agriculture,  Berkeley,  Calif.  94705. 


ABSTRACT 


A minicomputer-controlled  data  system  was  developed  for  measuring  a wide 
variety  of  plant  and  weather  variables  in  the  field.  One  to  26  sensors  were 
scanned  at  each  of  one  to  eight  portable  sensor  stands  placed  in  field  plots. 
Analog  signals  from  thermocouples,  a dewpoint  meter,  radiation  sensing  devices, 
and  a hot-wire  anemometer  were  measured  with  a digital  voltmeter.  Digital  data 
were  accumulated  from  a cup  anemometer,  an  automatic  evaporation  pan,  and  a 
beta-ray  scaler.  Data  were  processed  by  the  computer,  and  the  dimensioned  val- 
ues were  recorded  on  punched  paper  tape  and  in  a printed  form.  The  software 
was  written  in  absolute  assembler  language.  The  program  included  routines  that 
would  set  the  initial  conditions  and  control  the  read,  convert,  and  write  oper- 
ations; drive  the  peripheral  equipment;  provide  mathematical  functions;  and 
handle  interrupt  signals.  A multipoint  recorder  furnished  graphic  data  from 
selected  sensors. 

KEYWORDS:  Leaf  thermometer,  sensor  stand,  automatic  evaporation  pan, 
stepping  switch  driver. 


ACKNOWLEDGMENTS 


The  author  received  valuable  assistance  in  setting  up  and  calibrating  the 
beta  absorption  equipment  from  W.  R.  Ehrler,  plant  physiologist. 


Trade  names  and  the  names  of  commercial  companies  are  used 
in  this  publication  solely  to  provide  specific  information. 
Mention  of  a trade  name  or  manufacturer  does  not  constitute 
a guarantee  or  warranty  of  the  product  by  the  U.S.  Depart- 
ment of  Agriculture  nor  an  endorsement  by  the  Department 
over  other  products  not  mentioned. 


CONTENTS 


Page 

System  requirements 1 

Computer  control  of  operation.., 1 

Sensor  selection 2 

Data  processing 2 

Data  logging 2 

System  hardware 2 

Computer  and  peripheral  equipment 2 

Multipoint  recorder 4 

Auxiliary  power 4 

Data  reduction 4 

Analog  parameter  measurements 5 

Temperature  measurements 5 

Radiation  measurements 7 

Hot-wire  anemometers 7 

Digital  parameter  measurements 7 

Cup  anemometer 8 

Automatic  evaporation  pan 8 

Beta  absorption 8 

System  operation 8 

Discussion 9 

Appendix  A 9 

Software  program  for  data  acquisition  system 9 

Key  to  subroutine  labels  in  figure  4 10 

Appendix  B — single-step  driver  for  stepping  switch. . . 12 

Appendix  C 13 

Crossbar  switch 13 

Interfacing  peripheral  equipment 13 


A copy  of  this  publication  is  available  from  the  Western  Cotton 
Research  Laboratory,  4135  East  Broadway  Road,  Phoenix,  Ariz.  85040. 


A MINICOMPUTER-CONTROLLED  DATA  ACQUISITION  SYSTEM 


By  K.  E.  Fry^ 

SYSTEM  REQUIREMENTS 


Methods  of  monitoring  plant  and  microclimate  variables  in  field  crops  are 
continuously  needed.^  ^ Present  solid-state  systems  offer  reasonable  flexibil- 
ity for  interfacing  with  a wide  variety  of  electrical  sensors;  however,  as  the 
demand  for  flexibility  increases,  so  does  the  cost  of  the  equipment.  As  a re- 
sult of  the  recent  advancements  in  microprocessor  integrated  circuits  and  rea- 
sonably simple  combinations  with  peripheral  input-output  devices,  experimenters 
can  assemble  highly  flexible  systems  inexpensively. 

Although  the  data  acquisition  system  described  here  was  designed  around  a 
minicomputer  (Hewlett-Packard  Co.,  Model  2114A,  8K  x 16  bit  memory  locations), 
the  principal  organization  of  the  hardware  and  software  (computer  programs)  is 
applicable  to  available  microprocessors  in  combination  with  adequate  random- 
access-memories  (RAM)  and  input-output  peripheral  equipment. 

The  follov7ing  requirements  were  incorporated  into  the  total  system  to  col- 
lect plant,  microclimate,  and  weather  data: 

Computer  Control  of  Operation 


Operate  the  system  with  computer  program  (see  Appendix  A) , which  is  composed 
of  a control  loop  that  selects  program  subroutines  to  scan  sensors,  convert 
data,  and  record  final  data  for  further  analysis. 

Sound  a buzzer  to  warn  field  help  before  scans  are  started. 

Operate  multiplexing  and  measuring  devices  under  program  control  in  the 
field  plots. 

Place  the  system  in  a wait  mode  during  periods  of  power  failure. 


^Plant  physiologist.  Western  Cotton  Research  Laboratory,  Science  and  Educa- 
tion Administration,  Phoenix,  Ariz. 

^Boving,  P.  A.,  and  Winterfeld,  R.  G.  A mobile  recording  and  monitoring 
weather  tower.  U.S.  Dept.  Agr.,  Agr.  Res.  Serv.  ARS  W-41,  13  pp.  1976. 

^Smith,  J.  W. , Stadelbacher , E.  A.,  and  Gantt,  C.  W.  A mobile  unit  for 
automatic  collection  of  computer-compatible  macroclimatic  and  microclimatic  field 
data.  U.S.  Dept.  Agr.,  Agr.  Res.  Serv.  ARS  S-136,  6 pp.  1976. 


1 


Sensor  Selection 


. Scan  1 to  26  analog  sensors  at  each  of  one  to  eight  portable  sensor  stands 
placed  in  field  plots. 

. Record  rapidly  changing  plant  and  weather  parameters  at  predetermined  in- 
tervals (1  to  30  min) . 

. Record  slowly  changing  parameters  (for  example,  soil  temperatures)  at 
hourly  intervals. 

. Accumulate  and  record  pulse  counts  for  preset  time  periods. 

. Be  able  to  change  the  pattern  of  scan  under  program  control  or  manually 
without  halting  operations. 


Data  Processing 

Convert  the  sensor  voltage  readings  or  pulse  counts  into  the  desired  dimen- 
sion by  using  linear,  polynomial,  or  exponential  regression  equations. 

Utilize  multiple  sensors  and  multiple  regression  equations  to  calculate  the 
final  dimension,  when  it  is  influenced  by  more  than  one  weather  or  plant 
variable. 


Data  Logging 


. Print  Julian  day,  hour,  and  minute. 

. Print  channel  code  number  and  corresponding  data  in  block  format  for  immed- 
iate observation. 

. Record  the  above  information  of  punched  paper  tape  in  an  appropriate  format 
for  further  processing. 

. Print  statements  indicating  the  channel  and  stand  number  when  a malfunction 
of  equipment  occurred. 

. Print  the  time  when  line  power  was  lost  and  when  it  returned. 


SYSTEM  HARDWARE 

Computer  and  Peripheral  Equipment 


The  components  of  the  data  acquisition  system  are  shown  in  figure  1.  Only 
signal  lines  are  shown  connecting  the  components.  The  plant  and  microclimate 
sensors  were  mounted  on  field  sensor  stands  (fig.  2),  which  were  usually  located 
near  the  center  of  the  experimental  plots.  A 26-position  stepping  switch  at 
each  stand  performed  the  necessary  multiplexing  of  the  sensor  signals  to  a com- 
mon signal  line.  Appendix  B describes  a single-step  driver,  which  was  used  to 
operate  a stepping  switch  under  computer  control.  Signal,  control,  and  direct 
current  power  lines  connect  the  stands  to  the  signal  processing  equipment,  which 
was  located  in  an  air-conditioned  trailer. 


2 


TC's 


ANALOG  SENSORS 


AIR  Solar 

TEMPERATURE  SOIL  RADIATION  NET 

LEAVES  P.A.R. 


HUMIDITY 
DEW  POINT 


HOT-WIRE 

ANEMOMETER 


Figure  1. — Relation  of  system  hardware  components  to  minicomputer. 


Figure  2. — Sensor  stand  support  for  air-temperature  manifold  and 
sensor  tubes,  stepping  switch,  and  terminal  board. 


3 


In  the  trailer,  a crossbar  switch  (see  Crossbar  Switch,  Appendix  C)  multi- 
plexed the  signals  from  the  different  stepping  switches  at  the  sensor  stands 
and  also  signals  from  individual  sensors  located  elsewhere.  The  signals  were 
measured  by  a digital  voltmeter  (DVM,  Hewlett-Packard  Co.,  Model  2401C) , were 
converted  to  the  desired  dimensions  in  the  computer,  and,  by  means  of  a tele- 
typewriter (Teletype  Corp.,  Model  ASR-35) , were  logged  on  punched  paper  tape 
and  as  printed  data.  Each  system  component  was  operated  by  the  computer  under 
program  control  (see  Interfacing  Peripheral  Equipment,  Appendix  C) . A software 
clock  determined  the  preselected  time  to  sound  the  warning  buzzer  and  start  a 
scan  of  the  sensors  on  line.  The  code  numbers  of  the  channels  to  be  scanned 
were  read  from  paper  tape  by  the  photo  tape-reader  (Hewlett-Packard  Co.,  Model 
2753)  and  were  stored  in  computer  memory.  Digital  counters  (four-decade)  accum- 
ulated the  numbers  of  electrical  pulses  received  from  digital-output  sensors 
over  preselected  time  periods.  The  counts  were  read  and  logged  by  the  computer. 


Multipoint  Recorder 

Graphic  recordings  of  selected  weather  and  plant  parameters  were  obtained 
with  a multipoint  recorder  (Leeds  and  Northrup,  Model  H,  1 to  12  channels). 
Under  computer  control,  a 12-pole  relay  rerouted  the  signals  from  the  selected 
sensors  between  the  scans. 


Auxiliary  Power 


Regulated  and  uninterruptible  alternating  current  power  was  supplied  to 
the  computer  and  digital  voltmeter  through  a charger-inverter  system  connected 
to  seven  12-volt  automobile  batteries  (Elgar  Corp.,  Model  UPSlOOl) . In  the  event 
of  line  power  failure,  the  data  acquisition  system  was  held  in  a wait  mode;  the 
software  clock  continued  to  run.  Normal  operations  were  resumed  if  the  line 
power  returned  within  45  min;  if  not,  the  total  system  was  shut  down  orderly. 


Data  Reduction 

The  field  data  were  printed  on  folded  teletypewriter  paper  (8.5  by  11 
inches) , which  was  conveniently  bound  in  pressboard  binders  for  a quick  refer- 
ence; however,  studies  of  the  weather  and  plant  variables,  including  hourly 
averages  of  air  and  leaf  temperature,  required  further  data  reduction. 

During  1976,  a small  office  computer  (Wang  Laboratories,  Inc.,  Model  2200S, 
32K  X 8-bit  registers)  became  available.  Computer  programs  in  BASIC  were  written 
to  read  the  paper  tapes  (Photo  tape-reader,  Wang  Model  2203),  select  specific 
data,  perform  statistical  treatments,  and  list  and  graph  the  reduced  field  pa- 
rameters (Plotter,  Wang  Model  2212). 


4 


ANALOG  PARAMETER  MEASUREMENTS 


Temperature  Measurements 

The  choice  of  sensors  for  the  air,  soil,  and  leaf  temperatures  was  copper- 
constantan  thermocouples  for  the  following  reasons:  (1)  Thermocouples  were  in- 
expensive and  easily  constructed,  (2)  sensors  for  a wide  number  of  uses  could 
be  fabricated  from  commercially  available  wire  with  diameters  from  1.4  to  0.012 
mm  (Omega  Engineering  Inc.),  (3)  only  a single  calibration  was  needed  regardless 
of  sensor  size  for  all  thermocouples  made  from  the  same  materials,  and  (4)  inex- 
pensive hand-held  meters  were  available  for  use  with  thermocouples. 

Air  Temperature 

At  each  sensor  stand  (fig.  2),  air  temperature  was  measured  at  the  soil 
surface,  at  the  height  in  the  densest  canopy,  and  about  1 m higher.  Sensors 
were  mounted  inside  a horizontal  polyvinyl  tube  (1/2-inch  diameter,  30  cm  long) . 
An  outer  tube  (1-inch  diameter)  surrounded  the  sensor  tube,  and  both  were  wrapped 
with  reflective  aluminized  polyester  tape  (Scotch  No.  850).  Holes  were  drilled 
near  the  base  of  the  inner  tube  to  allow  airflow  between  the  tubes.  All  joints 
were  lubricated  with  silicone  grease  to  prevent  sticking  during  adjustments  and 
disassembly.  The  meter-long  manifold  (l^^-inch  diameter)  supported  two  sensor 
tubes  and  a connection  to  the  third  sensor  tube  through  a flexible  hair -dryer 
hose.  Aspiration  velocities  were  508,  330,  and  152  cm  sec“^  for  the  upper,  cen- 
ter, and  lower  sensor  tubes,  respectively,  when  obtained  with  a small  blower 
(Dayton,  No.  40012)  attached  to  the  manifold  with  its  exhaust  point  upward. 


Soil  Temperature 

Copper -constantan  thermocouples  were  inserted  to  depths  of  1,  5,  10,  20,  40, 
and  100  cm  below  the  soil  surface  of  the  cotton  rows.  The  junctions  were  insu- 
lated with  several  coats  of  vinyl  glue. 


Leaf  Temperature 


A clip-on  type  of  leaf  thermometer  was  developed  to  obtain  maximum  conven- 
ience in  attaching  the  thermometer  to  the  leaf,  minimum  influence  on  the  leaf’s 
temperature  and  movement,  and  adequate  reliability  in  monitoring  leaf  surface 
temperature  over  extended  periods.  Figure  3 shows  a thermometer  clamped  to  a 
cotton  leaf.  A copper-constantan  junction  bead  (about  0.1  mm  in  diameter,  welded 
from  25  y wire)  was  epoxy-glued  to  the  tip  of  a toothbrush  bristle  (0.38  mm  in 
diameter)  and  was  held  against  the  leaf  surface  with  a force  of  about  1 g.  The 
coiled  spring  and  wire  arm  that  holds  the  bristle  was  formed  from  0. 5-mm-diameter 
phosphorbronze  wire.  Heavier  spring  wire  (0.8  mm  in  diameter)  was  used  for  the 
holding  loops  and  arms  that  were  soldered  to  the  jaws  of  a miniature  alligator 
clip  (Mueller,  No.  30C) . The  clamping  force  of  the  spring-loaded  clip  was  suf- 
ficient to  hold  the  thermometer  in  place  in  winds  of  670  cm  sec”^  (15  miles  per 


5 


Figure  3. — Thermocouple  leaf  thermometer  on  cotton  leaf  (underside). 


hour).  For  use  on  cotton  leaves,  holding-loops  were  2.7  cm  in  diameter  and  the 
arms  were  3 cm  long.  Flexible  thermocouple  lead  wires  (127  y in  diameter,  40  cm 
long.  Teflon  insulation.  Omega  Engineering  Inc.)  were  threaded  through  polyvinyl 
tubing  (1.3  mm  outside  diameter)  and  connected  to  heavier  lead  wires  (0.5  mm  in 
diameter)  . 

The  leaf  thermometers  were  tested  for  accuracy  in  measuring  surface  temper- 
atures by  clamping  them  to  wet  blotter  paper.  Their  temperature  readings  were 
compared  with  those  from  fine-wire  thermocouples  embedded  in  the  blotter.  The 
leaf  thermometers  were  in  error  about  0.16°  Celsius  above  the  blotter  temperature 
for  every  degree  Celsius  the  ambient  air  temperature  was  higher  than  the  blotter 
temperature. 

Possible  leaf  damage  and  its  influence  on  the  leaf  temperature  at  the  point 
of  measurement  were  tested  in  the  following  manner.  Thermometers  were  allowed 
to  remain  on  field  cotton  leaves  for  5 days.  Then,  during  a period  of  relatively 
stable  leaf  temperature  and  rapid  transpiration,  the  leaf  temperatures  were  re- 
corded before  and  after  moving  the  thermometer  bead  about  5 mm.  Usually,  no 
significant  mean  difference  in  temperatures  was  observed.  Indicating  that  the 
1-g  force  of  the  bead  against  the  leaf  tissue  did  not  greatly  influence  the 
transpiration  rate  and  the  resulting  leaf  temperature. 


6 


Dewpoint  Temperature 


Air  was  sampled  at  the  temperature  sensor  tubes  and  pumped  at  the  sensor 
stands  (not  shown  in  fig.  2)  to  a solenoid  gas  multiplexer  (three  channels)  in 
the  trailer.  Dewpoint  temperatures  were  measured  in  a thermoelectric  dewpoint 
hygrometer  (Cambridge  Systems,  Model  880) . During  stormy  weather,  condensation 
in  the  gas  lines  invalidated  the  readings. 


Radiation  Measurements 


Solar  Radiation 

At  an  instrument  shelter,  the  solar  radiation  was  monitored  with  a Kipp  and 
Zonen  solar imeter.  Because  the  solar imeter  was  used  at  high  field  temperatures, 
it  was  calibrated  against  a temperature-compensated  Epply  Black  and  White  pyra- 
nometer.  Recorded  body  temperatures,  measured  on  the  north  side  of  the  Kipp  and 
Zonen  solarimeter,  were  included  in  the  multiple  regression  analysis  along  with 
the  radiation  measurements.  The  resulting  multiple  linear  equation  was  used  for 
the  calibration. 


Net  Radiation 


At  each  sensor  stand,  net  radiation  was  measured  1 m above  the  crop  and  1 m 
south  of  the  stand  with  Fr itschen-type  net  radiometers.  Calibrations  from  the 
manufacturer  were  used. 


Photosynthetic  Active  Radiation  (PAR) 


At  the  instrument  shelter,  PAR  was  measured  with  a quantum  sensor  (Lambda 
Instruments  Co.,  Inc.,  Model  LI-190S) . The  manufacturer's  calibration  was  used. 

Hot-Wire  Anemometers 

Mu It iple-j unction,  hot-wire  anemometers  (Hastings-Radist  Inc.,  Probe  Type 
N-7B)  were  used  to  measure  the  horizontal  air  movement  in  the  canopy.  Unfortu- 
nately, the  alternating  current  in  the  lead  wires  often  induced  in  the  main  sig- 
nal wires  a noise  component.  The  level  of  this  noise  was  reduced  by  cabling  the 
anemometer  lead  wires  separately. 


DIGITAL  PARAMETER  MEASUREMENTS 


For  each  15-min  interval,  the  electrical  pulses  from  sensors  were  counted 
by  means  of  solid-state,  four-decade  counters.  At  scan  time,  the  count  of  each 
unit  was  sampled  in  sequence  and  was  logged  by  the  computer.  Then  the  count  reg- 
isters were  set  to  zero  and  the  counters  were  started  again.  Three  devices  were 
operating  currently. 


7 


Cup  Anemometer 


A three-cup  anemometer^  was  used  to  integrate  windspeed  over  15-min  inter- 
vals and  at  1 m above  the  crop.  For  every  revolution  of  the  cups,  a pulse  was 
generated  and  counted.  The  calibration  of  the  anemometer  was  based  on  the  data 
of  Fritschen.^ 


Automatic  Evaporation  Pan 


A standard  (type  A)  evaporation  pan  was  placed  near  the  center  of  the  field. 
The  water  level  was  regulated  at  17.8  cm  by  automatically  adding  water  at  15-min 
intervals.  Chlorinated  water  was  supplied  from  an  elevated  fiberglass  tank  (ca- 
pacity 946  liters)  at  the  edge  of  the  field.  The  pan  water  level  was  controlled 
at  a small  shelter  2 m east  of  the  pan.  A reservoir  in  the  shelter  was  connected 
to  the  pan  with  a garden  hose  so  that  pan  water  level  could  be  sensed  in  the 
shelter  with  a Styrofoam  float.  Attached  to  the  float  was  permanent  magnet, 
which  controlled  a 6-v  solenoid  valve  in  the  waterline  by  means  of  a reed  switch. 
A tipping -bucket  mechanism,  taken  from  a rain  gage,  triggered  an  electric  pulse 
to  the  four-decade  counter  for  every  8 ml  of  water  added  to  the  pan.  At  15-min 
intervals,  the  count  was  logged  and  the  counter  was  reset. 


Beta  Absorption 


Relative  leaf  water  content  (RLWC)  was  estimated  from  beta  absorption.^ 
Counts  from  a Geiger  Muller  detector  were  scaled  for  10  min  (Hamner  Electronics, 
Inc.,  Scaler  Model  NS-11) . The  count  was  recorded  by  the  computer,  and  the 
scaler  was  reset  at  15-min  intervals.  The  high  voltage  to,  and  the  signal  from, 
each  detector  were  switched  consecutively  among  four  detectors  by  means  of  high- 
voltage  reed  switches  at  the  field  plot.  In  this  manner,  the  thickness  of  each 
of  four  leaves  was  measured  once  every  hour.  The  relation  of  RLWC  to  leaf 
thickness  was  determined  in  experimental  leaves  at  the  end  of  a run. 


SYSTEM  OPERATION 


The  data  acquisition  system  has  been  in  operation  since  the  summer  of  1975, 
primarily  for  field  measurements.  Modifications  to  the  hardware  and  software 
were  made  as  needed  to  accomodate  different  kinds  of  sensors.  The  maximum  number 
of  channels  on  line  at  one  time  was  125,  which  were  distributed  among  six  step- 
ping switches. 


^Fritschen,  L.  J.  A sensitive  cup-type  anemometer.  J.  Appl.  Meteorol. 

6:  695-698.  1976. 

^See  footnote  4. 

^Nakayama,  F.  S.,  and  Ehrler,  W.  L.  Beta-ray  technique  for  measuring  leaf 
water  content  changes  and  moisture  status  of  plants.  Plant  Physiol.  39:  95-98. 

1964. 


8 


The  system  was  used  during  winter  months  in  the  laboratory  for  logging  leaf 
weight  losses.  Ten  balances  were  constructed  in  the  laboratory,  using  miniature 
strain  gages. ^ For  each  of  10  detached  leaves,  10  measurements  were  taken  every 
4 minutes  for  the  first  hour  and  every  10  minutes  for  the  next  2 hours.  In  this 
operation,  a modified  computer  program  was  assembled  from  selected  subroutines 
(Appendix  A).  The  subroutines,  labeled  LOOP,  TBG,  and  PRINT,  were  modified  to 
suit  the  specific  task. 


DISCUSSION 

Analog  stripchart  recorders  log  data  that  are  immediately  observable,  yet 
the  number  of  channels  is  severely  limited.  Digital  recording  systems  will  han- 
dle large  numbers  of  data  channels,  but  small  changes  in  any  parameter  are  diffi- 
cult to  observe  unless  the  digitized  data  are  graphed.  Our  data  collection  sys- 
tem includes  some  of  each  advantage. 

The  greatest  advantage  of  the  system  is  its  flexibility  and  ability  to  col- 
lect data  from  a wide  variety  of  sensors,  to  scan  different  sensors  at  different 
intervals,  to  utilize  multiple  sensors  and  mathematical  equations  to  obtain  the 
final  dimensions,  and  to  control  both  the  field  multiplexers  and  the  sensing  de- 
vices during  a measurement. 

The  main  disadvantages  of  the  system  result  from  operation  of  the  sophisti- 
cated equipment,  which  is  necessary  for  operation.  The  builder-operator  must 
have  knowledge  of  digital  electronics,  assembler  language  programming,  and  sen- 
sor characteristics.  Changes  made  in  the  method  of  operation  generally  require 
additional  digital  circuitry  and  computer  program  modifications;  however,  higher 
levels  of  sophistication  can  be  obtained  when  innovations  of  circuitry  and  pro- 
gramming become  available. 


APPENDIX  A 

Software  Program  for  Data  Acquisition  System 


The  computer  program  is  written  in  assembler  language  for  the  Hewlett-Packard 
2100  series  minicomputers.®  To  reduce  memory  requirements  for  the  total  opera- 
tional program,  absolute  (nonrelocatable)  expressions  were  used.  The  program 
occupied  about  2,000  memory  locations  (16  bit).  For  the  storage  of  data  from 
200  sensors,  about  1,500  additional  locations  were  needed.  The  subroutine  sym- 
bols and  their  linkage  in  the  program  are  shown  in  figure  4,  which  is  followed 
by  a key  to  the  mission  of  each  subroutine.  Four  more  conversions  subroutines 
may  be  added  without  changing  the  format  of  the  channel  codes.  In  the  program 
listing  (not  shown) , the  steps  are  well  documented  and  are  assembled  in  octal- 
based  integers.  A current  program  listing  is  available  from  the  author. 


^Idle,  D.  B.  An  electrical  weight  transducer  designed  for  the  measurement 
of  changes  of  weight  of  detached  leaves.  Ann.  Bot.  40:  473-477.  1976. 

^Anonymous.  A Pocket  Guide  to  Hewlett-Packard  Computers.  Hewlett-Packard 
Co.,  Cupertino,  Calif.,  626  pp.,  illus.  1972. 


9 


TIMIN 


LEADR 


TMOUT 


BADSS 


4 — » DVM.C 


TBG 


> INITIALIZE 


START 


READ 


I 


ssw 


CODIN 


CONTROL 

LOOP 


I 


PROUT 

WAIT 

PR. ON 

START 

PRINT 


^ 

1 

f 

BCD.V 

MODE 

j (LIBRARY) 

4 

VLT. 


V.DEG 


RADS 


T.DIF 


! i I. 


1.7  L. 


JUMP  SUBROUTINE 
UNCONDITIONAL  JUMP 


PTIME 


PCODE 


FPOUT 

—f 


INTGR 


Figure  4. — Subroutines  for  computer  program  and  their  linkage. 


Key  to  Subroutine  Labels  in  Figure  4 


INITIALIZE  sets  the  initial  conditions  for  the  peripheral  equipment. 

START  clears  the  storage  arrays  and  resets  the  pointers. 

TIMIN  inputs  the  Julian  day,  hour,  and  minute  from  the  keyboard. 

CODIN  inputs  from  paper  tape  the  specific  channels  to  be  read,  the  correspond- 
ing conversion  subroutine  code,  and  the  DVM  integration  time  (0.1  or  1.0 
sec).  The  information  is  stored  in  array  CODE. 

LOOP  tests  for  different  operational  commands  that  are  manually  or  program  con- 
trolled. When  present,  they  cause  a jump  to  the  corresponding  subroutines. 

LEADR  punches  127  nulls  to  obtain  leader  and  trailers  on  data  tapes. 

TMOUT  is  called  manually  to  print  the  current  Julian  day  and  time. 

READ  inputs  the  channel  code,  sets  the  crossbar  switch  to  the  requested  stepping 
switch  line,  calls  the  stepping  switch  subroutine  (SSW),  and  initiates  the 
DVM  to  start  a reading. 

SSW  operates  the  requested  stepping  switch  to  find  the  requested  switch  level 
(see  Appendix  B) . 


10 


BADSS  prints  the  channel  number  at  which  a malfunction  of  the  stepping  switch 
occurred . 

BCD.V  converts  voltage  data  from  array  BCD  (see  DVM.C  below)  to  a floating- 
point binary  (packed),  checks  for  a DVM  overload,  and  stores  the  data  in 
array  VOLT. 

MODE  selects  a conversion  subroutine  according  to  the  channel  code,  gets  the 
data  from  array  VOLT,  and  stores  the  converted  data  in  array  DATA. 

VLT.  transfers  voltage  data  without  conversion. 

V.DEG  converts  voltage  data  to  degrees  Celsius  using  a quadratic  regression 
equation  for  copper-constantan  thermocouples. 

RADS  converts  voltage  to  langleys  per  minute.  The  temperature  of  the  solari- 

meter  is  recalled  from  the  previous  reading  and  is  used  in  a multiple  linear 
regression  equation.  Coefficients  for  the  equation  were  determined  experi- 
mentally. 

T.DIF  converts  voltage  data  to  degrees  Celsius  using  a quadratic  regression 

equation  for  chromel-constantan-copper  thermocouples,  which  were  wired  for 
differential  temperature  measurements. 

PRINT  controls  the  output  of  day,  time,  code,  and  data.  After  an  end  statement 
is  printed,  the  program  control  is  transferred  to  START. 

PTIME  outputs  the  Julian  day,  hour,  and  minute  at  which  the  scanning  started. 

PCODE  outputs  the  channel  code  in  decimal  integers. 

FPOUT  outputs  a floating-point  number.  When  the  number  of  integers  exceeds  6, 

$$  is  printed. 

INTGR  outputs  an  integer  (decimal)  that  was  stored  as  an  unpacked  binary  number 
(manufacturer’s  software). 

LIBRARY  includes  selected  mathematical  subroutines  (furnished  by  the  manufac- 
turer) that  will:  (1)  convert  a binary  number  of  16  bits  to  a packed 
floating-point  number  of  32  bits;  (2)  double-store  or  double-load  floating- 
point numbers;  and  (3)  add,  subtract,  multiply,  and  divide  integers  and 
floating-point  numbers. 

BITIN  (not  shown  in  fig.  4)  is  called  by  READ.  It  inputs  data  from  the  counters 
and  scaler,  and  stores  them  in  array  BIT. 

BTOUT  (not  shown  in  fig.  4)  is  called  by  PRINT.  It  outputs  data  from  array  BIT. 

INTERRUPT  SUBROUTINES  An  interrupt  is  a signal  to  the  computer  from  an  external 
source,  which  immediately  forces  the  control  of  the  program  to  a specific 
subroutine.  At  the  end  of  the  subroutine,  the  control  is  transferred  back 
to  the  next  step  in  the  program  at  which  it  was  interrupted.  The  subroutines 
are  listed  with  decreasing  priorities. 


11 


TBG  A signal  from  the  time-base-generator  (every  10  sec)  causes  a jump  to  sub- 
routine TBG,  in  which  the  software  clock  is  updated.  At  preselected  times, 
signals  are  set  to  sound  the  warning  buzzer,  start  a scan,  scan  the  hourly 
readings,  punch  a leader -trailer , and  start  a new  page  on  the  printer. 

DVM.C  When  the  DVM  has  finished  a reading,  it  causes  a jump  to  subroutine  DVM.C, 
in  which  the  binary  coded  data  (4-2 '-2-1)  is  input  from  the  DVM  and  is 
stored  in  array  BCD. 

PROUT  When  the  auxiliary  power  source  has  signaled  that  the  line  power  is  off, 
the  control  jumps  to  PROUT.  The  time  of  day  is  saved,  and  the  control  is 
locked  in  a wait  loop.  Peripheral  equipment  is  turned  off,  but  the  soft- 
ware clock  continues  to  operate. 

PR. ON  A return  of  line  power  causes  a jump  to  PR. ON.  Peripheral  equipment  is 
turned  on,  the  times  of  day  that  the  power  went  off  and  came  back  on  are 
printed,  a leader  and  new  page  are  obtained,  and  the  program  control  is 
transferred  to  START. 


GRND.  TRUE 
STEPPING 

PULSE  24  VDC 


Figure  5. — Schematic  diagram  of  stepping-switch  (Type  45),  single-step  driver. 


APPENDIX  B 

Single-Step  Driver  for  Stepping  Switch 

The  circuit  shown  in  figure  5 causes  the  stepping  switch  (GTE  Automatic 
Electric  Co.,  Type  45,  26  switch  positions,  6 to  12  banks)  to  advance  one  step 


12 


for  every  voltage  drop  at  the  pulse  input  terminal.  The  quad  two-input  nand 
gate  (SN7400  or  MC846)  generates  a positive  pulse  that  triggers  the  silicon 
controlled  rectifier  (SCR)  to  energize  the  magnet  motor.  Commutation  of  the 
SCR  is  obtained  at  the  interrupter  switch  on  the  stepper.  The  pulse  timing  is 
controlled  at  the  computer,  which  was  programmed  to  send  out  8 pulses  per  second. 

The  26  positions  of  the  stepping  switch  are  wired  (five  banks)  to  send  to 
the  computer  the  binary  equivalent  for  each  position.  In  operation,  the  computer 
tests  the  binary  signal  for  a requested  position.  Stepping  is  commanded  until 
the  requested  position  is  reached.  When  more  than  76  stepping  commands  (three 
rotations  of  the  wiper  assembly)  are  sent  and  the  requested  position  is  not 
reached,  a malfunction  statement  is  printed. 

For  three  summers,  these  drivers  have  operated  satisfactorily  without  atten- 
tion except  for  an  annual  cleaning  of  the  interrupter  contacts  on  the  stepping 
switch.  A single  powerline  carrying  24  volts  of  direct  current  (vd-c)  was  sup- 
plied to  the  drivers.  The  5 vd-c  power  required  by  the  nand  gate  was  furnished 
through  a 7805  voltage  regulator,  which  was  mounted  on  a small  heat  sink  (not 
shown  in  fig.  5).  An  Insulated  metal  dust  cover  was  placed  over  the  switch  (not 
shown  in  fig.  2). 


APPENDIX  C 
Crossbar  Switch 


The  crossbar  switch  was  a relay  switching  matrix  containing  20  gold-plated 
switches,  each  having  six  levels.  It  was  an  experimental  model  (Cunningham 
Corp.)  acquired  from  government  surplus.  The  relay  driving  circuits  were  de- 
signed and  wired  by  us  so  that  the  switches  would  operate  under  computer  control 
through  an  interface  card. 


Interfacing  Peripheral  Equipment 

The  peripheral  equipment  was  connected  to  the  computer  through  interface 
circuit  cards,  which  were  supplied  by  the  manufacturer.  These  cards  permitted 
the  exchange  of  commands  and  data  signals.  Fifty  channels  were  made  available 
for  control  of  the  crossbar  and  stepping  switches  and  to  read  digital  data  from 
the  digital  counters.  One  card  (not  an  interface  card)  furnished  crystal-con- 
trolled time  pulses  that  were  counted  in  the  software  clock.  We  wrote  the  soft- 
ware to  drive  all  the  peripheral  equipment. 


13 


GPO  795-867/396 


g^l;' 


PHn>.:»  i'JWt'Ui*'  If.  "vW't  aig|.&.t%:|^' 'li- } . ' 

'■v..*a*|i;;,  ’ '.tf^^'  " •rtHf-'  f,  • ;■  V ' .ft  .••  ''•*»'  •'.  » 


'A 

J/iC- 


.M'  ^ 


'■  ; :r, '.'  '"'JJ 'jy's 

;--4t  '».v  . ■*■  j\  ,f'i)^«-»} 

f i{'\  - ^ ;,  .i.**l  ■ V?:*) 


’.  -I  * ' v" 


> \ ■'  2 .. 


••-■'  , ^ ■ , 1'^  ^ . ■'■ 

c 3»0h-  ^wifeWM  ■ : > ' * * 

i>'"'  ■ . ' “'L'^)^'^- ■■  '^''  '' a ti  if 

"i/  s ■ '■*  •S‘2^:i  'isi',.  Ii4'.  M fe'!''’’-  «^^."  U'tn  '*•■-  ^ Ujiii(|l¥».>  ''7 


i'ti'  ^j\'Wi''-'-  «^^."  u'l'n  ^ 

fi»:t^'^ii},i  <•»,,, f Ka  • 'HWiS^iBl 


I 


U.  S.  DEPARTMENT  OF  AGRICULTURE 
SCIENCE  and  EDUCATION  ADMINISTRATION 
WESTERN  REGION 
2850  TELEGRAPH  AVENUE 
BERKELEY,  CALIFORNIA  94705 


OFFICIAL  BUSINESS 

PENALTY  FOR  PRIVATE  USE,  $300 


POSTAGE  AND  FEES  PAID 
U.  S.  DEPARTMENT  OF 
AGRICULTURE 

AGR  101