Electronics for scientists: A computer intensive approach - American

Eastern Michigan University. Ypslianti. MI 48197. A Computer-Intensive Approach. Alexander ... Electronics for Scientists has been taught in the Schoo...
0 downloads 0 Views 3MB Size
cornouter miw. 98

edited by JOHN W.

MOORE

Eastern Michigan University. Ypslianti. MI 48197

A Computer-Intensive Approach Alexander Scheeline and Brian J. Mork University of Illinois. Urbana, IL 61601 Electronics for Scientists has been taught in the School of Chemical Sciences a t the University of Illinois since 1957. The pervasiveness of electronics in modern instrumentation made knowledge of electronics important to chemists who were designing novel equipment, debugging existing equipment, or trying to interpret performanrt: uf instrumentatiun nushed t o i t s limits. Freauentlv. new measurement avbroaches for characterizingchemical systems have been desiened not bv electrical engineers (who mav not be familiar wrth chemic& problems), b i t by chemists ~"fficientlyversed in electronics to assemble innovative hardware. Engineers can later add whatever nuances the chemist may have missed, but the ability of a chemist with even moderate training to assemhle a new piece of electronic equipment and use it in awaythat results in accurate measurements radically accelerates research. Furthermore, most problems with equipment can be easily diagnosed by a knowledgeable user. This can either save time by allowing the user to repair equipment directly or can accelerate the diagnostic work of technical personnel by allowing user and technician to communicate efficiently about the problem. The typical instrumental analysis class covers so much material on how specific instruments work that there is inadequate time to deal with the electronic components of instruments in general. Electronics for Scientists covers only the processing of sensed information; transducers are the only chemistry-specific components discussed. Here, as in most other programs, the course was taught for most of its histom in the followine order: vassive components, analog electronics, digital electronics, cotnpurers, and o~timization/comnutation algorithms. Until the mid-19X'c, computers were ~ u f f i c i e n t ~ ~ k x ~ e nthat s i v ethis approach was an economic necessity and also accurately reflected the frequency with which the various subsystems were encountered in real instruments. T o alter the order required too many skills of heginning students. With the capabilities of modern computers to simulate circuit performance, and with computers so common in modern instrumentation, a fresh look a t course content and method of presentation seemed appropriate. This was accelerated by the granting to the University of Illinois of several million dollars worth of microcomputers. We here report our design for a top-down, i.e., principles before details, presentation of electronics. The course requires one semester, with two 2.5-hour laboratory periods and two lectures per week. We evaluate the effectiveness of this approach, having used i t for two semesters. Syllabus Explanation The paradigm for presentation order is as follows: data processing algorithms, computers, digital electronics, analog electronics, and interfacing. Passive components are intro-

duced as needed, with Ohm's law reviewed in the first lab and lecture, but with discussion of other components deferred until the middle of the course. The concepts of the Fourier transform are presented early and are used repeatedly throughout the semester. Thus, synthetic filtering is introduced several months before analog filters are described. Consequently analog filters are viewed as compact, simnle wavs to imnlement filterine without reauirine a computer, rather than as inordinately complex modules of poorlv understood utilitv. Comnuters are introduced durine the second week of the Eourse, bowing their use for data acquisition and simulation throughout the semester. Digital circuits have traditionally heen less intimidating to students than analog circuits, and so are presented earlier to defer the more difficult material relating to analog modules until late in the course. Typically, a student will feel a t the end of each unit that the concepts are clear, hut that the "whys" need to he expanded upon by explaining the "hows". These are supplied in the subsequent unit. For example, students know that registers exist in a computer before they learn that flipfloos are a means to i m ~ l e m e nsuch t registers. In stark contrait to "bottom-up"aiproaches, the rzevence of any detail to the "bie oicture" need never be in doubt. The syiabus for the lectures is given in Table 1and that for the laboratory in Table 2. Students are expected toread a chapter on transducers on their own. A handout details the

-

Table 1. Lecture To~ics 1. 2. 3. 4. 5. 6. 7.

8. 9. 10. 11. 12. 13. 14. 15. 18. 17. 18. 19. 20. 21. 22. 23. 24. 25.

Information The Electrnmagnetic Spectrum. Signals, and Noise Conjugate Informatlon/Fourier Transform Correlation. Convolution. Filtering Basic Electrical Quantities Computer Functional Blocks Addressing, Handshaking, Assembly Language CWlCeptS Digital Logic Gates Flip-flops and Counters Random Logic Systems State-Sequential Systems IC Computer-compatible CounterlTimer RC Circuits, Time Domain RC Circuits. Frequency Domain Diodes Bipolar Transistors and FEls Math with Operational Amplifiers Nonlinear Op. Amp. Circuits Op-amp Nonideaiities Linear Systems Analysis Analog Filters Boxcar Integrators Lock-in Amplifiers How TO Read a Circuit Dlagrsm Analog and Digital Domain Conversion

Volume 65 Number 12 December 1988

1079

plotting routine, one may select any of the three time-domain or three frequency-domain data arrays for plotting (here frequency array 1 is selected). A graphics screen a t upper right displays the magnitude spectrum of a square wave. That is, a square wave with four cycles across the display window was Fourier-transformed, and the resulting spectrum is plotted. DC (zero frequency) is a t the center of the screen, and the expected l/f amplitude falloff with only odd harmonics contributine simificant power can be seen. The equal (or "white") con&ih;tion at e;en harmonics is an artifact of usine a finite number of data points. A cursor has been called up,and is positioned a t the Ofrequency position. The DC contribution is shown in the text window a t the hottom ofthescreen to have an amplitudeof0.5078, whereas the expected value for a unity amplitude square wave is 0.5. The lunrtion kev labeled "H.I.P.M." can select amone: Heal, ---. Imaginary, phase, and Magnitude display of the spectral data. Usine aonro~riate simulated and measured wave.. . firms, addTtiona1 concepts which can be taught include aliasing (the Nyquist sampling theorem), spectral hehavior as a function of phase, and signal-to-noise ratio as a function of signal averaeing, - -. filterine, and spectral bandwidth. SPEKLis set up so that there are default values for all oarameters. Thus. astudent will eet somethiur! on the screen iegardless of hisker understanzing of the sihjert matter. Herause of the order of presentation, this is not a handirap. When first exposed to the program, the student is told precisely what numbers toenter,and what isstudied is the form of thk displayed waveform. Later, the meaning of the various inputs is studied in detail by varying the parameter values to illustrate their effect. Students are encouraged to try wide ranges of parameters, since i t is probably more important to understand what ranee of effects a oarticular control can inciw than to be able'io derive the r&onse quantitatively. Whileauantitative work isdone. the emohasis is on huildingintuition concerning waveforms and their distortions. MlcroCap Descrlptlon Two nerenuial problems have heretofore limited the student's ability to gain a rommand of analog elertronirs concepts: (1) Constructinn and measurement, which should he two different activities, were strongly interwoven. A single misplaced wire can stop progress for a considerable period of time. (2) With inexpensive equipment, generation of certain types of data can require large amounts of time. +o'r exam&ole.. ronstrurtion of a Bode olot of a bandpass filter mav require 1 hour when using only a function generator and oscilloscope to make the measurements. Thus, the range of parameters that can he investigated is extremely limited. Some "hands-on" wiring is necessary to show what care is needed to get real circuiis to work. balance is thus needed between construction, measurement, and circuit simulation, so that an appropriate range of material may be covered, students can compare the operation of their circuits to the functionalitv exoected of that circuit. and construction is to some degreedeioupled from understanding of circuit function. Numerous circuit simulation packages are availahle for microcomouters.'MicroCao was chosen prior to the puhlication of thdcited article. I t was chosen without a comprehensive list of microcomputer circuit simulation packages; however, it turned out to be an outstanding pr6gramr1t has a nearly intuitive interface, so that students can learn the mechanics of drawing and analyzing circuits in 15 minutes. When the author received the program from the vendor, i t took less than 2 hours from the time the wrapper was removed until useful circuit designs were being completed!

Figure 2. Generationofa Bode plot for a state-variable filter using Micrffiap 11. 1A) . .Terndate . loaded bv student to begin exercise. IB) Full circuit allsr addition of four rerortarsanda sine wave source. (C, Simu.al on of o m p ~as t node 5, me OmapaSS 0JfPut. NOdots: gain (-20.6 db a1 4958 rlz) Open dots: phase of onpul(-90' 81 10 rlz) SOlio doll. g r o ~ pdelay (range from 500 ns lo 500 #*I.

This ease of use not only encourages students to simulate circuits that are assiened: it also encourages them to modify the circuits to see wiiat the parametric dependences of performance are. The strongest sentiment about the top-down revision of the course among both students and teaching assistants was that simulation sped up and clarified understanding of analog circuits. This may, however, be more of a commentary on the utility of simulation in instruction than on the too-down oreanization of the course. An example of the use of MicroCap I1 is shown in Figure 2. A state-variable filter is simulated. This filter is contained on a single chip (National Semirondurtor AF-100);while rhe ooerational amplifiers are not LNI741A's, they do have similar gain, input, and frequency response properties. Students enter the same external components that are used on the actual IC. Bode plots are then generated for all three passhand types (output 5 is a bandpass output, whose performance is shown in Figure 2; output 3 is highpass, output 7 is lowpass). Having simulated the behavior of all outputs, the students then build the circuit and measure actual gain and phase hehavior fur one output only, using measurement frequencies as suggested by the simulation. Any radical differ~~~

5

Schreier, P. G. Personal Engineering and instrumentation News

1987, *I), 35-43.

~

~

Volume 65 Number 12 December 1988

1081

ences in behavior can he ascribed in wiring errors. Small differences renresent the difference between modeling and actual circuit performance. Simulation thus guidrs the student tu beine able to e\,aluilte whether "the circuit is wurking", and also allows for illustration of all three outputs' performance. As part of the lab preparation, students derive exact formulas for the expected behavior of the filter, assuming the operational amplifiers are ideal. Notice the phase behavior above 100 KHz; the shift to -450' at 1MHz is not predicted by the student's rigorous hut ideal circuit analysis. This illustrates how the limited bandwidth of the operational amplifiers complicates performance evaluation at high frequencies. Seeing divergence between expectation and actuality impresses students more thoroughly about the restrictions of real amplifiers than abstract discussion possibly could.

dents than they did previously. This is due in part to delaying the wiring of analog circuits until the students have sufficient experience (from their work with digital circuits) that the frequency of wiring errors is reduced. Thus, the waveforms observed can be believed. Apparently, there is no loss in understanding of digital circuits, since wiring errors for such circuits are somewhat easier to detect. Furthermore, one can use digital components .iinecessary when dpiigning analor circuits without having to auoloaize that "we'll get tu thesebarb of the system later". digitil circuits can be nnderstood and used without reference to most analog circuit concepts, and so are readily taught at the start of the course. By structuring the course to deal with generalities before details, the students are continually motivated to delve into the specifics of electronics, rather than being overwhelmed by them.

Evaluation and Conclusion We have attempted to evaluate, both objectively and suhjectively, the improvement in learning resulting from our change to a computer-intensive top-down course structure. Our objective measurements (comparative nonstandardized examination scores) thus far do not indicate a statistically significant change. Subjectively, there is the general impression that analog circuits make much more sense to the stu-

Acknowledgment Computers used in this course were donated to the University of Illinois, Project EXCEL, by IBM Corp. Additional support from the University and the School of Chemical Sciences is appreciated. Some of the code for the SPEKL program was written by Deborah Zurawski and Edward Flint. This work was presented a t the 193rd American Chemical Society National Meeting, Denver, CO, April 1987.

1082

Journal of Chemical Education