An undergraduate program on computer interfacing - American

In the computer program thederivative is approximated by. dF. F(Ca) - ... very small concentrations, initial conditions veryclose to ... vary the part...
0 downloads 0 Views 9MB Size
al courses on computer interfacing for chemists have been described in THIS JOURNALin the past three years ( 2 4 ) . These have been full-term three- or four-credit courses designed primarily for graduate students. The "Bughooks" of Rony and Larsen contain an extensive series of experiments that can be used t o teach digital electronics and microcomputer fundamentals (5) and a number of individual computer interfacing experiments have been described 16-18), No detailed descriptions of programs specifically designed to teach lahoratorv uses of comouters to undereraduates have appeared in THIS JOURNALsince the pioneering work of Perone in the earlv seventies (19-21). Since we were unable to find desc;iptions in the literature of course materials that met our needs, we proceeded in the summer of 1983 to develop a unified set of liboratory experiments suitable for teaching the principles of digital electronics and computer interfacing to undergraduate chemistry students. This paper describes those experiments and our program for teaching laboratory uses of computers. Copies of the experiments are available from the author. Acheck for 54 to cover expenses (made out to Robert J. Anderson) should be enclosed with any requests for copies.

-

Course Outllne Our goal in developing our program was to teach the principles of computer interfacing while displacing as little chemistry as possible from the curriculum and without introducing a new course. We chose to insert the new material into a iuuior-vear ohvsical . . " chemistw laboratorv course. Experimental Chemistry V, replacing a segment on basic analog electronics. The material could also he integrated into an instrumental analysis course. Experimental Chemistry V is a project-oriented laboratory with 14 50-min lectures and 28 4-h laboratory periods per semester. In addition to the computer experiments described below, each student does two short and two long physical chemistry experiments. Of the 14 lecture periods available, one is used for a course introduction, four to discuss error analysis, and one for a quiz. This leaves eight periods for the computer-interfacing material. The topics of those eight lectures are described below. Lectures are presented twice a week for the first half of the semester with no lectures heing given during the second half. In this way, students can begin doing the computer interfacing experiments hy the fifth week of the course. Students come to this course with little background in electronics, typically only what they obtain from their introductory physics course. Lecture 1covers the basic concepts of a computerized measurement system: transducers, analog and digital signal domains, frequency components of signals, noise, and analog signal processing. With regard to the latter, examples of amplification, filtering, and level shifting are presented. and the students are told that this is usuallv don; with operational amplifiers. (Thus a topic to which we previouslv devoted eight hours of lecture is now covered in one. We have decide2 that an introduction to computer interfacing is more important today than an introduction to analog ele&onics, and, unfortuna&ly, we do not have time to give both. Dessy's comments on this subject are recommended reading (22).) Lectures 2 through 4 present the basic digital devices (gates and flip-flops) and give some simple examples of how they are used. Lecture 5 discusses computer input/output including synchronization with externai devices: The basic point emphasized is that computers interact with the rest of the world by inputting a hyte br outputting a hyte. (We have 8-hit computers.) The only form of synchronization that is discussed is polling, i.e., interrupts and Direct Memory Access are not mentioned. Lecture 6 covers programming of iuput/output operations and analog-to-digital converters. The students have already had an introduction to micro-

ClrcuHs Studled In Experiment 1 1)

2) 3) 4) 5) 6)

7) 8) 9)

10) 11) 12)

2-input NAND gate Gated clock Inverted input NAND gate = OR gate Multiplexer Dgmultiplexer R-Sflip-flop Clock gated via a flop-flop Clocked R-S flip-flap J-K flip-flop 4-bit binary counter 4 b i l binary down counter 4-bit shift register

computers and the Basic language in their physical chemistry course, and the only new programming techniques that must be taught are the use of the IN function, the OUT command, and the logical AND operator. In lectures 7 and 8 the interfacing of a gas chromatograph is discussed in some detail. This serves to tie the various concepts together and introduces some examples of realtime data manipulations, e.g., moving-window averaging and peak integration. It also provides the background for a physical chemistry experiment that some of the students will be doing later in the semester. Dlgital ElectronlcslComputer Interiaclng Experiments The heart of the program is a sequence of three laboratory experiments in which students begin by studying the most basic digital circuits and end by putting a stopwatch, which they have constructed, under computer control. Students work in pairs on these experiments just as they do on the physical chemistry experiments of the course. Each of the experiments can be done comfortably in one 4-h laboratory period. The first experiment introduces two basic digital devices, the 2-input NAND gate and the J-K flip-flop, and some useful circuits that can he built from them. The students set UD the circuits on a commercial breadhoardine svstem. investigate their behavior, and answer a short question about each one. The circuits studied in the ex~erimentare listed in the'l'ablr. 'l'hey ran all he huilt using &I" three integrated circuiti, one 7100 a u a d r u ~ l e2-input N A N D plate and two 74107 dual J-K flip:flops. -

-

Figure 1. Stopwatch constructed on a Digi-Designer.

Volume 62

Number 9

September 1985

793

The breadboarding system we use is a Model DD-1 DigiDesigner sold by E and L Instruments, Inc (5).This unit has a breadboarding socket into which up to eight integrated circuits can be inserted and then wired together without soldering. I t contains a 5-V logic supply, a clock with a switch-selectable output of 1, 10. 100, 1000. 10,000, or IOU,000 Hz, four lampmonitors, four logicswitches, and two debounced pulsers. We bolt two Kand LSK-20 breadboarding sockets t o the Digi-Designer to accept a data cahle from the computer for the third experiment of the sequence. A picture i f a ~ i ~ i - D e s i g nwith; er stopwatch constr&ted on i t is shown in Figure 1.The computer cahle can he seen extending from the top. Less than one breadboarding system per pair of students is required because not all students do the same experiment a t the same time. The second experiment demonstrates how the basic devices are assembled into more sophisticated circuits and introduces Medium Scale Integration devices in the form of the 7490 decade counter and the 7447 BCD to seven-segment decoder. The main portion of the experiment involves the construction of a digital stopwatch, a diagram of which is given in Figure 2. The seven-segment displays are MAN-72 types. The resistors are all 470 ohm. The signals labeled StartIStou and Reset come from the two debounced nulsers. pushing the StartIStop button generates pulses &at start and ston the watch: the Reset button resets the watch to 0 and stops it if it was' running. With just two decades and a 1Hz clock. the watch onlv times t o the nearest second. I t automat