Skip to main content

Full text of "ERIC ED216877: Minicomputers In The Teaching Laboratory An Example From Physics"

See other formats


ED 216 877 

SE 037 701 




Farr, John E.; van den Berg, Willem H. 

Minicomputers in the Teaching Laboratory - An Example 
from Physics. 


7p • 



MF01/PC01 Plus Postage. 

•College Science; ‘Computer Oriented Programs; 
Engineering Education; Higher Education; 
•Instrumentation; ‘Microcomputers; ‘Physics; Science 
Activities; Science Education; ‘Science Experiments; 
‘Science Instruction 


Microcomputers are commonly interfaced to external 
devices in scientific, industrial, and consumer settings for data 
acquisition and for control. The general problem under consideration 
is the task of taking measurements of some continuous phenomenon, 
transforming them into digital form, and storing the data in the 
microcomputer for later use. First, the physical variable to be 
measured must be changed to a voltage (or resistance) by means of 
some transducing device; for example, light intensity can be 
transduced to a voltage using a photocell. Then, too-large or 
too-small voltages need to be amplified. Next, the continuous voltage 
is converted to a digital representation in eight bits. Finally, the 
analog-digital converter is connected to the data address, and 
control buses of the microcomputer. Microcomputers such as Apple, 
TRS-80, Atari, Compucolor, and others, have a "game paddle" which is 
used to accomplish all of these steps while another method involves 
using a thermocouple. Once the system is ready, such experiments as 
those involving pendulums can be easily accomplished, a typical 
program recording the position of a swinging pendulum, displayed the 
motion on the monitor, and displaying graphs of variables examined 
during the experiment. Most students prefer using the computer as it 
swiftly and accurately performs the experiment’s busywork. 



* Reproductions supplied by EDRS are the best that can be made * 

* from the original document. * 



EDUCATIONAL resources information 

W document has been reproduced as 
received from the person or organization 
originating it 

Minor changes have been made to improve 
reproduction quality 

• Points of view or opinions stated in this docu 
ment do not necessarily represent official NlE 
position or policy 

John E. Farr and Willem H. van den Berg 
DuBois Campus, The Pennsylvania State University 










Introduetio n 

Minicomputers or microprocessors are commonly interfaced to external 
devices in scientific, industrial, and consumer settings. They are used 
for data acquisition and for control. We think it is important for not 
only our science and engineering students but for everyone in our physics 
courses to begin to understand how computer interfacing can be used. 

Using a minicomputer as a data acquisition device can remove the 
tedium of acquisition and analysis. The process is so much speeded up 
that the student-experimenter can devote more time and energy to the 
phenomenon itself. The TV monitor is a friendly environment which most 
students relate to easily. They are moire likely to be comfortable and 
interested, especially if the computer program incorporates graphics. 

The cost of an experiment can be minimal (excluding the purchase of 
the minicomputer). In fact, it may be cost effective in setting up new 
laboratories to use minicomputers and substantially fewer meters, oscillo¬ 
scopes, timers, etc. 


The general problem under consideration is the task of taking mea¬ 
surements of some continuous phenomenon, transforming them into digital 
form, and storing the data in the minicomputer. Later the stored data can 
be manipulated. This process can be easy, as will be shown, so the novice 
should not be deterred by the potential difficulties. Some measurements 
can be done with minimal electronics and many more difficult situations 
can be handled with commercially available components at reasonable cost. 


First, the physical variable to be measured must be changed to a 
voltage (or resistance) by means of some "transducing" device. For in¬ 
stance, angular position can be transduced to a resistance using a poten¬ 
tiometer (pot.), or a temperature can be changed to a voltage using a 
thermocouple. Light intensity can be transduced to a voltage using a 

Second, in the electronic "signal conditioning" phase, Loo-large or 
voltages may need to be amplified. Additionally there may be 
a need to isolate the transducer or match inipedences. The goal is to 
make the voltage variations compatable with the input requirements of 
the next stage. 

The third step converts the continuous voltage (frequently 0 —> 5v 
or -5->5v) to a digital representation in eight bits. (An analog-to- 
digital (A/D) converter could create more or fewer bits, but many micro¬ 
computers have an eight bit data bus so having more bits creates program¬ 
ming complexities while having fewer bits reduces precision.) Eight bits 
resolves a voltage swing of 0 5v into 256 steps of .0195v or 0.4% incre¬ 
ments. This gives adequate precision for most applications. 

Finally, the A/D converter is connected to the data bus, address 
bus, and control bus of the minicomputer. This step requires a lot of 
knowledge about the signal timing and organization of the minicomputer 
and A/D converter. Many users both new and experienced will wish to buy 
a commercial unit to short cut the complications. 

Once the connections are made properly, the A/D converter can be 
viewed as several memory locations with specific addresses. Therefore 
the commands normally used in Basic to read from and write to memory 


(PEEK and POKE) can be used to read and control the A/D converter. For 
some purposes programming in machine language is desirable and LDA and 
STA commands would be used. 


11 the proceeding explanation looks tedious and/or hopeless, take 
heart; there is a wonderful short cut. Many minicomputers (Apple, TRS-80, 
Atari, Compucolor, and others) have a "game paddle" which is used to ac¬ 
complish all these steps. The Apple uses a 150 kilohm pot. in its game 
paddle. So any physical phenomenon that could be transduced into a 0 —$ 
150 kilohm resistance change could be read using the Basic command 
PDL (0). For instance, a 150 kilohm thermistor could be used to measure 

In our teaching laboratory we used the shaft of a 1 megohm pot. as 
the pivot of a pendulum. The 1 megohm pot. is wired to pin 1 and pin 6 
of a 14 pin block. The game paddle block is removed and this block put 
in its place. The pendulum is now connected to paddle port zero and 
everything but very large swings will produce a 0-^150 kilohm change in 
resistance. The angular position of the pendulum can be read and dis¬ 
played using: PRINT PDL (0). 

Our program measures time by using a BASIC loop. This method is 
the least accurate, but suitable for this case. For faster timing the 
accuracy of a machine language routine is desirable. For some applica¬ 
tions an external clock that interrupts the computer would be needed. 


This example is presented to show how the interfacing problem is 
more generally solved. 


The transducer is a ccpper-constantan thermocouple with output of 
approximately 0.2mV/°F. Over a temperature range of 32° to 102° F the 
voltage change is about 1.5 mV. 

The signal conditioner used is a scientific amplifier (Analog Devices 

AD521). It is powered witli a 9 V battery and the gain resistors are 


adjusted (gain = 2x10 ) so that the voltage output varies from 1 to 5V 
for temperature variation from 0° to 125° F. A voltage offset is re¬ 
quired to do this. The scientific amplifier is connected to the thermo¬ 
couple with the shortest possible leads to reduce pickup. The amplified 
signal can be carried on fairly long wires to the A/D converter. 

The A/D converter used is an Interactive Structures Inc. AI02 which 
allows for sixteen 0—>5V inputs. 

The total cost of the above system is less than $150.00. Each addi¬ 
tional thermocouple up to sixteen total costs less than $25.00. Even 
though this is more expensive than necessary, the hookups and programming 
considerations are minimal. Those that want to learn more and spend less 
can purchase a cheaper scientific amplifier and build their own A/D con¬ 
verter for approximately $30.00. (See Hands On! , Winter 81-82, p. 14, 
TERC, 8 Eliot Street, Cambridge, MA 02138.) 


For the motion of a pendulum, four quantities are easy to measure 
and correlate: mass (M) of the bob, length (L), amplitude (A), and peri¬ 
od (T). For an ideal simple pendulum, 

T = 2tt V L/g~, (1) 

(where g = acceleration due to gravity). T is independent of M and A, 
as long as A is not large. 


Our program records the position of the swinging pendulum and dis¬ 
plays the motion on the monitor. It then displays T and asks the stu¬ 
dent for the values of M and L. After several such runs the computer 
can display graphs of T vs. M, T vs. A, and T vs. L. These graphs clear¬ 
ly indicate the period's independence of mass or amplitude, but show a 
nonlinear dependence on length. 

The computer can then plot InT vs^. Ini,, and the result is a straight 
line. Although the scales on this graph are arbitrary and unlabelled, 
the program can calculate and display the slope, which is close to 0.5. 
Thus it is shown that 

InT = UlnL + constant, (2) 

in agreement with the result obtained by taking the natural logarithm 
of eq. (1) : 

InT - hlnL + ln(2ir//g). (3) 

Of the 54 students doing the lab, 49 said that they would prefer 
using the computer this way over the traditional method, using a stop¬ 
watch and a mass on the end of a string. When asked how well they en¬ 
joyed the experiment as compared to other physics experiments without a 
computer, 18 said "much more", 25 "somewhat more", 7 "no more", and 3 
"somewhat less". Regarding their subjective impression of how much 
they learned, the response was not as favorable, although generally 
good: 6 "much more", 12 "somewhat more", 24 "the same", 8 "somewhat 
less", and 4 "much less". 

The most frequently cited reasons for preferring the computer 
approach were: gaining firsthand experience with a microcomputer; and 
letting the computer swiftly and accurately perform the busywork of the 


experiment. The most frequent complaints were: overcrowding (average 
of 4.5 students/machine at a time); and inadequate background informa¬ 
tion provided by the instructor. A small minority of students complained 
of a lack of sense of participation. 

The students provided sensible suggestions for improving the lab; 
providing more background information ahead of time; reducing crowding; 
and making the program more foolproof and sophisticated, perhaps allow¬ 
ing greater student interaction with the machine ( e.g. , having the stu¬ 
dent measure the period, with the machine checking the result). 

For those interested, our software is available on an unprotected 
DOS 3.3 disk for $10.00.