University of
California, Berkeley
College of
Engineering
Electrical
Engineering and Computer Sciences Department
Spring 2008

2. Course Prerequisites, Goals, and Topics
3. Summary of Laboratory Exercises
7. Lab Report Format and Style
9. EECS 145M Course Responsibilities
10. Laboratory Equipment and Parts
12. Exams and Solutions: 1990- 2006
EECS 145L (closely related course)
The URL for this EECS145M web page is
http://www.EECS.berkeley.edu/~derenzo/145M.html
(last update 2008.01.14)
Link to Peter LauÕs TA website
Instructors: Stephen E. Derenzo Derenzo@EECS 486-4097
Qiyu
Peng, qiyupeng@berkeley.edu
Lecture: Mon, Wed 2-3, 247 Cory Hall
Office hours: Mon 1:10-2:00, Wed 3:10-4:00 463 Cory
Teaching Laboratory (140 Cory Hall):
Tue
12:30 - 3:30 PM
Teaching Associate: TBA
Three hours laboratory, two hours lecture per week. 3
units
Final Exam Saturday, May 13, 5-8 pm (group 6)
First lecture Wed, Jan 18; first lab Tue, Jan 23
In the past few years, enormous advances have been made in the cost, power, and ease of use of microcomputers. Approximately $1500 can buy a system with dual > 2GHz microprocessors, 2 GByte of memory, parallel and analog I/O ports, and 500 GByte of magnetic disk storage.
This course is intended for students who want to be able to use modern microcomputers for data acquisition, analysis, display, and control without delving into the details of a particular microprocessor, its bus protocol, or its native code. The laboratory exercises use the C programming language and cover instrumentation principles and techniques that are applicable to nearly all microcomputer systems. The microcomputer with a prototyping circuit board is also an excellent software/hardware development system for single board microprocessor projects.
Specifically, EE145M provides laboratory experience in interfacing microcomputers to external devices such as digital timers; analog to digital and digital to analog converters; temperature, force, and motion sensors, and display terminals. Many of the data analysis techniques covered in EECS 145B "Computer Applications in Biology and Medicine" are implemented in the C language on the microcomputer. Laboratory exercises include event timing, digital interfacing and handshaking, digital to analog and analog to digital conversion, sampling and digitization of waveforms, frequency aliasing and anti-aliasing filters, spectral leakage and waveform windowing, temperature sensing and control, fast Fourier transforms and frequency filtering, and the use of Fourier deconvolution to control a time-invariant linear system. Applications include laboratory instrumentation, data acquisition, process control, and biomedical electronics.
Each lab station has a PC microcomputer running the Windows XP operating system and timing, data acquisition and control circuits for sampling, storage, display, and control. In addition, a digital oscilloscope is used for rapid viewing of waveforms.
In performing the laboratory exercises, students will work in groups of 2. Please stay with the same lab partner throughout the semester. Two weeks after the scheduled date of the laboratory exercise, one lab partner will turn in to the TA a full lab report and the other lab partner will turn in to the TA only the answers to the question section. This will alternate so that by the end of the semester each lab partner will have written complete reports for five laboratory exercises and the answers to the question sections for the other five lab reports. (The lowest full lab report grade and the lowest question section grade will be dropped.) The full lab reports are expected to be complete technical reports understandable to an EECS upper division student who has not taken the course.
The two midterm exams and the final exam will not only cover the principles and techniques covered in the laboratory exercises and the class lectures, but will also pose problems that require new designs involving those principles and techniques.
¤ EECS40
¤ EECS20N
¤ Experience in building simple circuits
¤ Familiarity with TTL signals and logic circuits
¤ Integral and differential calculus
¤ Fourier series expansions of periodic functions
¤ Convolution of two functions
¤ Inner products of functions and orthogonal functions
¤ Use of printf, scanf
¤ Opening files of arbitrary name, use of fprintf, fscanf
¤ Loops and conditional tests
¤ Use of calloc for allocating large storage arrays
¤ Operators for shifting and masking bits
¤ Prototyping and defining functions
¤ To use the ANSI C programming language, and digital and analog interfacing in an interactive, microcomputer environment
¤ To learn to use digital timers, digital interfacing, and simple handshaking with expansion cards and external devices
¤ To learn the principles of operation and use of D/A and A/D converters and build a data acquisition circuit
¤ To learn to sample digital data, use anti-aliasing filters and windows, and perform the FFT
¤ To learn to use digital filters, and digital control strategies for both linear and non-linear systems
¤ To make programs and analog circuits work together (design and debugging)
¤ To write clear, concise, informative laboratory reports
¤ Representation of numbers in binary and 2's complement
¤ Digital timers for measuring a time interval or for producing periodic pulses
¤ Computing the sample mean, standard deviation, standard error of the mean
¤ Using Student's t test to determine the statistical significance of the difference between two means
¤ Use of the Edge-triggered D-type flip flop and tri-state buffer for binary I/O - circuit design & timing diagram
¤ Design of buses (using registers and tri-state drivers) for connecting many binary sources to a single input port or for connecting many output ports to a single circuit- circuit design, handshaking, and timing diagram
¤ Generalized handshaking protocol for binary input and output
¤ D/A characteristics: transfer function, resolution, absolute error, linearity error, differential linearity error, power supply sensitivity, glitch area, settling time, slewing rate
¤ D/A designs: Resistive ladder and R-2R
¤ Sample and hold (S/H) amplifier circuit and characteristics
¤ A/D characteristics: transfer function, resolution, absolute error, linearity error, differential linearity error, power supply sensitivity
¤ Comparator w hysteresis, output vs. input
¤ A/D designs and comparison of properties: tracking, dual slope, successive approximation, flash, half-flash, sigma-delta
¤ Analog data acquisition circuit -S/H, A/D, input port, handshaking, timing diagram
¤ S/H aperture and A/D conversion time limitations on fmax
¤ Nyquist sampling rate and practical anti-aliasing filter limitations on fmax
¤ Analog data acquisition control- software vs. hardware trigger; status poll vs. interrupts vs. dedicated memory
¤ Aliasing in the time domain- apparent frequency vs. true frequency for a particular sampling rate
¤ Integral Fourier transforms of the delta function, sine, cosine, rectangle pulse, triangle pulse, periodic delta functions
¤ Fourier Convolution Theorem
¤ Fourier transforms of periodic waveforms: rectangle and triangle
¤ Relationship between periodic in time and discrete in frequency
¤ The Fourier series expansion of a periodic waveform- the relationship between harmonic number, period, and frequency
¤ The Fourier Frequency Convolution Theorem
¤ Periodic sampling, aliasing in the frequency domain, the need to limit bandwidth of waveform before sampling
¤ The discrete time Fourier transform
¤ Sampling a bandlimited, periodic signal near its fundamental frequency to increase the effective sampling frequency (using aliasing to advantage)
¤ If a waveform is periodic in time and sampled periodic in time, then integral Fourier Transform becomes the Discrete Fourier Transform (DFT)
¤ DFT of periodic waveforms, significance of indices, magnitude, and phase
¤ Spectral leakage and the use of the Hanning window
¤ Why the Hanning window has more desirable spectral leakage than the rectangular window
¤ FFT of the vowel sounds- a periodic impulse generator in a resonant cavity
¤ Digital filters- IIR and FIR
¤ Relationship between single stage, low pass digital and analog filters
¤ Use of Fourier convolution theorem for real-time control of a linear, time-invariant system whose impulse response can be measured
¤ General computer-based control system- design involving sensor, computer, actuator; output control behavior; on-off, proportional, and PID control strategies
¤ RS-232, RS-422, IEEE-488, VME interfacing protocol and general characteristics
¤ Data acquisition design relationships between maximum frequency, sampling rate, anti-aliasing filter, frequency resolution, number of samples needed, effect of spectral leakage and the Hanning window.
¤ Measuring time variant Fourier amplitudes. The DFT as FIR and IIR digital filters.
Lab 3: Elementary interfacing of switches and lights to a parallel interface circuit. Use of the digital oscilloscope. Latching data onto D-type Flip-Flops. Use of STROBE PULSE and STATUS BIT protocol.
Lab 2: Initializing and reading digital timers, timing events, measuring human reaction times, computation of Student's t, determination of statistical difference between means.
Lab 2a: Optional variation of Lab 2 measuring ultrasonic pulse echo times instead of human reaction times
Lab 8: Use of a parallel output port and a digital to analog converter to generate static voltage levels under program control, measurement of the transfer characteristic, and least squares comparison with the ideal D/A characteristics. Generation of time-varying waveforms.
Lab 9: Construction of a data acquisition circuit, using a parallel input port, an analog to digital converter, and several logic chips. Sampling of static voltages, measurement of the transfer characteristics, and least squares comparison with the ideal A/D characteristics. Sampling of slow sine waves.
Lab 10: Use of an analog I/O plug-in board to sample sine, triangle, and square waves of various frequencies, to store the digital representation, and to recover the analog waveforms. Demonstration of aliasing and the conditions under which it occurs.
Lab 21: Use of an analog I/O plug-in board to sample sine, triangle, and square waves of various frequencies. Use of the anti-aliasing filter, windowing, computation of the Fast Fourier Transform, and display of the frequency amplitudes.
Lab 22: Sampling and Fast Fourier Transform of the human voice. Use of an instrumentation amplifier, anti-aliasing filter, and windowing. Storage and playback of the digital representation. Identification of the pattern of Fourier frequency amplitudes that permit identification of the vowel sounds, independent of speaker.
Lab 23: Real-time digital filters and their relationship to analog filters.
Lab 24a: Measuring the impulse response of a single-stage low pass filter and use of the Fourier deconvolution theorem to derive the digital compensation filter
Lab 24b Demonstration that if a waveform is first preprocessed by the digital filter derived in Lab 24a and then sent through a single-stage low pass filter, the result is similar to the original waveform
Lab 26: Use of a thermistor bridge, instrumentation amplifier, analog input and output ports, a power amplifier, and a resistor to control the temperature inside a small oven. Exploration and comparison of several control algorithms. (2 weeks optional in place of 24a and 24b).
Lectures: 247 Cory Hall
Mon and Wed 2-3 pm
Laboratory sessions: 140 Cory Hall
Tue 12:30 pm Ð 3:30 pm
Wed 10:00 am - 1:00 pm
Jan 23 Wed
¤ Course
Organization
¤ None
¤ This handout, especially sections 4-9
¤ Microcomputers, Chapter 1.1 and 1.2
¤ Number systems, Chapter 1.3
¤ Appendix C, C Programming Tips
¤ Lab Exercise 3, Digital Interfacing: Switches and lights
¤ Appendix I- ASCII Character Codes (for your information only)
¤ Appendix J- Glossary (check the meaning of unfamiliar technical terms)
Jan 28 Mon
¤ Computers, bits and numbers
¤ Counters and timers
¤ Lab 2- Event timing
¤ The Gaussian distribution
¤ Introductory statistics
Jan 30 Wed
¤ Student's t
¤ Lab 3 (Digital I/O, switches and lights) Jan 29, 30
¤ Digital Building Blocks, Chapter 1.4
¤ Digital Counter/Timers, Chapter 1.5
¤ Lab Exercise 2 or 2a, Measuring Event Times
¤ Gaussian Distributions, Chapter 5.1 and 5.2
¤ Student's t Test, Chapter 5.3 (except 5.3.4)
Feb 4 Mon
¤ Digital building blocks
¤ Digital output and handshaking
Feb 6 Wed
¤ Digital input and handshaking
¤ Lab 3- Switches and lights
¤ Lab 2 (Event timing) Feb 5, 6
¤ Parallel and Serial Input/Output Ports, Chapter 1.6
¤ Switch Debouncing, Chapter 1.8
¤ Appendix E.1-E.3, E.6: Data Translation DT3010 data acquisition board- digital interface
¤ Appendix A- grounding and shielding
¤ 74LS244 Octal Buffer/Line Driver (Data sheets from www.fairchild.com)
¤ BCD to 7-segment Decoder/Driver (Data sheets from www.fairchild.com)
¤ 7-segment LED display (Data Sheets from Hewlett Packard)
¤ 74LS373 Octal Latch and 74LS374 Octal D-type Flip-flop (Data Sheets from www.fairchild.com)
¤ Appendix H- Standard Resistor and Capacitor Values (for your information only)
Feb 11 Mon
¤ Digital I/O & Handshaking
Feb 13 Wed
¤ D/A converters
¤ Lab 8 (D/A conversion) Feb 12, 13 [Lab 1 due]
¤ Summing Amplifier (Chapter 2.2.6)
¤ Introduction (Chapter 3.1)
¤ D/A Converter Circuits (Chapter 3.2)
¤ Lab Exercise 8 , D/A Conversion and Waveform Generation
¤ DAC0802 8-bit D/A Converter (Data Sheets from www.national.com)
Feb 18 Mon
¤ PRESIDENTS' DAY HOLIDAY
Feb 20 Wed
¤ A/D converters
¤ Lab 9 (A/D conversion) Feb 19, 20
¤ A/D Converter Circuits (Chapter 3.3)
¤ The Sample-and-Hold Amplifier (Chapter 3.4)
¤ ADC0820B 8-bit A/D Converter (Data Sheets from www.national.com)
¤ Digital Data-Acquisition Procedures (Chapter 1.7)
¤ Sampling Analog Waveforms (Chapter 3.5)
Feb 25 Mon
¤ Review for MIDTERM #1
Feb 27 Wed
¤ MIDTERM #1
¤ Makeup labs Feb 26, 27 [no labs due- study for midterm]
¤ Frequency Aliasing (Chapter 3.6)
¤ Appendix E.4-E.5, Data Translation DT3010 data acquisition board- analog interface
¤ Lab Exercise 9, A/D Conversion and Periodic Sampling
¤ Previous Midterm #1 exams and solutions (see links in section 12 below)
Mar 3 Mon
¤ Sample-and-hold
Mar 5 Wed
¤ Periodic sampling
¤ Pulse height spectroscopy
¤ Aliasing
¤ Lab 10 (Aliasing) Mar 4, 5 [Lab 8 due]
¤ Lab Exercise 10, Frequency Aliasing
¤ The Integral Fourier Transform (Chapter 5.8.1)
¤ Fourier Transform of Periodic Waveforms (Chapter 5.8.2)
¤ Fourier Transform of a Periodically Sampled Time Function (Chapter 5.8.3)
¤ Using Aliasing to Advantage- the Sampling Oscilloscope (Chapter 5.8.4)
¤ The Fast Fourier Transform (Chapter 5.8.7)
¤ Use of the Fast Fourier Transform and Windowing (Chapter 5.8.8)
Mar 10 Mon
¤ Introduction to Fourier transforms
Mar 12 Wed
¤ The Integral Fourier transform
¤ Lab 21 (FFT of periodic data) Mar 11, 12 [Lab 9 due]
¤ Summary of Sampling System Design Factors (Chapter 5.8.9)
¤ Lab Exercise 21, Fast Fourier Transforms of Sampled Data
¤ Using Aliasing to Advantage- the Sampling Oscilloscope (Chapter 5.8.4)
¤ Fourier Transform of a Truncated Time Function (Chapter 5.8.5)
¤ Appendix D.2, Fast Fourier Transform C Program Code (for your information only)
Mar 17 Mon
¤ Transforms of periodic waveforms
¤ Sampling and aliasing
Mar 19 Wed
¤ Windowing and spectral leakage
¤ Lab 22 (FFT of the voice) Mar 18,19 [Lab 10 due]
¤ Fourier Transform of a Periodic Time Function periodically Sampled- The Discrete Fourier Transform (Chapter 5.8.6)
¤ Digital Filters (Chapter 5.9)
¤ High-Order Low-Pass Filters (Chapter 2.6.6, especially the Butterworth Filter and the EXAMPLE at the end of the section)
¤ Lab Exercise 22, Fast Fourier Transforms of the Human Voice
Mar 31 Mon
¤ DFT and FFT
Apr 2 Wed
¤ Digital filters
¤ Lab 23 (Digital filters) Apr 1, 2 [Lab 21 due]
¤ Lab Exercise 23, Digital Filtering
¤ Fourier Control (Chapter 5.10.1)
¤ Control Techniques (Chapter 5.10.2 to 5.10.9)
¤ Temperature Control Using the Computer and a Resistive Heater (Lab Exercise 26)
¤ Temperature Transducers (Chapter 4.3- for those doing Lab Exercise 26)
¤ The Power Amplifier (Chapter 2.7- for those doing Lab Exercise 26)
¤ LM12 Power Op-Amp (Data sheets from www.nnational.com)
Apr 7 Mon
¤ Control
Apr 9 Wed
¤ Sigma-delta A/D and D/A converters
¤ Lab 24a (FFT control) Apr 8, 9 [Lab 22 due]
¤ Least squares fitting (Chapter 5.4)
¤ Solving f(x) = 0 (Chapter 5.6.1 and 5.6.2)
¤ Monte Carlo Simulation (Chapter 5.7)
Apr 14 Mon
¤ Review for Midterm
Apr 16 Wed
¤ MIDTERM #2
¤ Makeup lab Apr 15, 16 [no labs due- study for midterm]
¤ Lab Exercise 24, Process compensation using Fourier deconvolution and digital filtering
¤ Previous Midterm #2 exams and solutions
Apr 21 Mon
¤ Control of non-linear systems
Apr 23 Wed
¤ Data analysis
¤ Lab 24b (FFT control) April 22, 23 [Lab 23 due]
¤ or Lab 26 (Temperature control continued- 2 week lab)
¤ Digital Interfacing Standards (Chapter 1.9)
Apr 28 Mon Interfacing techniques
Apr 30 Wed Interfacing standards
¤ Makeup lab Apr 29, 30 [Lab 24a due]
¤ Review of topics covered, this syllabus, section 2
¤ Previous Final Exams and solutions (see links in section 12 below)
May 5 Mon
¤ Design Tips
May 7 Wed
¤ Design problem examples
¤ Makeup lab (if needed) May 6, 7 [Lab 24b or Lab 26 due]
May 12 Mon
¤ Review for Final Exam
Stephen E. Derenzo, Practical Interfacing for the Laboratory, Cambridge University Press edition, 2003. Purchase from ASUC bookstore or Amazon.com
¤ 74LS373/74LS374 Octal latch and D-type flip-flop
¤ 74LS244 Octal buffer/line driver
¤ 74LS47 BCD to 7-segment decoder/driver
¤ ADC0820 8-bit A/D converter
¤ DAC0802 8-bit D/A converter
¤ LF356 monolithic JFET operational amplifier
¤ LM12 80-W op amp
¤ ADC622 instrumentation amplifier
E. Orhan Brigham, The Fast Fourier Transform and its Applications, Prentice Hall, Englewood Cliffs, NJ, 1988
40% - Four full written lab reports (including question, raw data, and code sections) from each student, due according to the course schedule on the last page (five are assigned- lowest grade dropped). Lab partners will write full reports for alternate laboratory exercises.
10% - Four short written lab reports (only question, raw data, and code sections) from each student, due according to the course schedule on the last page (five are assigned- lowest grade dropped). Lab partners will write short reports for alternate laboratory exercises.
10% - Laboratory attendance and participation (as observed by TA)
20% - Two midterm written examinations (closed book, in class)
20% - Final written examination (closed book, exam group 20)
100 for excellent effort beyond the call of duty
90 for putting in the required time and affort
80 for attending but doing less than a fair share of the lab work
<80 as fits the situation
For both full and short reports, three points will be deducted for each school day late (no deductions for weekends or holidays). No credit for lab reports turned after the graded reports have been handed back to the students (usually 1-2 weeks after they are due).
The two midterm exams and the final exam include design problems that require the student to apply the principles learned in the laboratory exercises and lectures to new design situations.
Final letter grades are determined from the total course scores of the undergraduate students only. Then the graduate student letter grades are determined using the same standard. Otherwise, the graduate students taking the course (who generally have better numerical scores) would cause all students to get lower letter grades.
Both full and short lab reports are to be prepared on 8.5 x 11 inch paper stapled together, including the raw data (or a copy). It is not necessary to use a bound notebook to record your lab data or write your lab report. For each laboratory exercise, one lab partner will prepare a full written lab report (including the question section) and the other lab partner will prepare a short written lab report (question section only). This pattern will alternate for each laboratory exercise so that each student will prepare five full written lab reports their lab partner will prepare five different full lab reports.
Throughout your professional career you will be required to write internal reports, papers for research journals, proposals, grant applications, etc. To prepare you for these tasks, one of the purposes of this course to improve your skills in the area of written technical communication.
On the first page of your report, write (1) your name (identified as the author), (2) lab section day and time, (3) lab station number, and (4) the name of your lab partner. Three points will be deducted if this information is not present. To make your report easier to grade, number all parts tro correspond to the numbering scheme in the text.
Each full laboratory report will be graded on the basis of 100 points and each short laboratory report will be graded on the basis of 25 points. If you want to know how many points were deducted from each section, also include a table with entries for set-up, data and program, analysis, discussion, questions, clarity, and total grade. At the end of the semester, the lowest full lab report and short lab report grades will be dropped.
Lateness: Three points deducted for each school day late. Saturdays, Sundays, the Spring break, and holidays do not count.
Set-up: A simple block diagram of the experimental setup you used with all essential equipment labeled. (For example, if the keyboard was used, include it in the diagram.) A photocopy of the appropriate diagrams from the course book could be included, with any modifications that you made to do the lab exercise.
Procedure and Data Summary: A clear presentation of your data and how you took it for each procedure section, with uncertainties, as you would find in a published technical journal article. (The "Raw Data" section below would be complete, but need not be as clear or as organized.) Any special or unusual experimental circumstances should be mentioned. This section should contain all the information specified in the Practical Interfacing textbook and required for the Analysis section without requiring reference to the "Raw Data" section.
Analysis: A clear description of how you analyzed the data and the results of your analysis. Include typical error propagation from raw measurements to analyzed quantities. In almost all cases the description will refer to tables and graphs. Remember to label the axes of all graphs with numbers and units, and provide a short title for each graph. Whenever possible, compare the analyzed results with numerical expectations. Reference background material, (e.g. equations from the textbook or numbers from manufacturers data sheets) as appropriate.
Discussion and Conclusions: Draw conclusions from your observations, data, and analysis. This section should total at least 500 words (1 page single space typed, 2 pages handwritten) and address the following points:
1) The principles demonstrated in each procedure section. Often this only requires stating what is obvious to you, but not necessarily obvious to a colleague reading your report who has not done the laboratory exercise.
2) Compare the results of different procedure sections (whenever appropriate)
3) Compare your observations to what you would expect. (Why did you observe what you did?) If a mathematical model is used to describe the behavior of the system, describe how well it agreed with your measurements and give possible reasons for any disagreement.
4) Discuss general situations where the principles and techniques demonstrated in the laboratory exercise could be used.
5) Discuss the major components used in the laboratory exercise and the role each played.
6) Discuss limitations of the laboratory exercise and how they can be reduced by changing the method or the equipment.
Questions: (25 points) Answer all questions posed in the Practical Interfacing textbook. Any questions answered in the body of the report can be referred to by section number.
Raw Data and Program Listings: Notes and data taken in ink during the laboratory exercise and the source of the manually taken data for the "Data Summary" section (equivalent to a laboratory "log book"). If you make an error, draw a single line through it. Processed data presented as raw data is a misrepresentation. Special experimental circumstances should be noted on these sheets during the lab period. Include computer printout of raw data and program listings. Include estimates of experimental uncertainties in your raw measurements. If your program performs data analysis, print the results in a separate section of the output that can be pasted into the analysis section of your report.
Clarity of organization; neatness: Your finished report should be clear and understandable to your professional colleagues (in your case the average upper division EE student who has not taken 145M). Use numbered section and sub-section headings (as suggested in the Practical Interfacing textbook) so that your grader can keep track of the organization. Provide a short title for each figure so the reader knows what is being presented without having to read the entire report. Although many students prepare their reports on word processors and laser printers, the same material written by hand will get the same grade, provided that it can easily be read. (If your handwriting is difficult to read, learn to print!) All computer printout should be cut to 8.5 x 11 inches and attached so that it can be read as easily as any other page.
If you want to know how many points were deducted from each section, also include a table with entries for lateness, set-up, analysis, discussion, questions, clarity, and total grade.
IMPORTANT NOTES:
Photocopy your lab report before you turn it in. The typical lab report is 15 pages and the copy centers around campus charge about $0.05 per page - $0.75 is good insurance against a lost lab report. We will not excuse a lost lab report.
To turn in late lab reports, ask the instructor or the staff in 231 Cory to d