Practical Interfacing in the Laboratory: Using a PC
for instrumentation, data analysis, and control
Cambridge University Press
This URL is http://www.eecs.berkeley.edu/~derenzo/INTERFACING.html
(Last update 2003.08.25)
Here's a book that shows through practical explanations and 27 hands-on
laboratory exercises, how to use microcomputers to
- sense quantities such as temperature, force, sound, and light
- rapidly analyze the results (e.g. least squares fitting)
- display the results
- control a quantity being sensed
5 chapters
27 laboratory exercises
9 appendices
352 illustrations
610 pages
extensive glossary (35 pp)
index (12 pp)
Also available from: www.Amazon.com
Emphasizing concepts most useful for design and implementation functions,
INTERFACING takes advantage of low-cost microcomputers, high-speed input/output
ports, and high-level languages. It demonstrates in a down-to-earth style
the range of problems in data acquisition, analysis, display, and control
that can be solved cost-effectively without delving into the specific bus
protocol or native language of any individual microprocessor. A full range
of topics is covered in depth, including
- sensors and actuators for temperature, force, position, and light
- signal amplification and analog processing
- digital building blocks
- biomedical signals and processing
- analog/digital conversion circuits
- data acquisition, analysis, and control using the C programming language
- Fourier analysis and sampling system design
- Monte Carlo simulation of experiments
- easy-to-use formulas for statistical analysis and least-squares fitting
- computer algorithms for the fast Fourier transform, numerical integration,
and nonlinear fitting
- common problems such as noise, interference, inadequate sampling rates,
and time truncation
Return to top of INTERFACING home page
Table of Contents:
1 DIGITAL TOOLS 1
1.1 Introduction 1
1.2 The Microcomputer 2
1.3 Number Systems 5
1.4 Digital Building Blocks 9
1.5 Digital Counter/Timers 13
1.6 Parallel and Serial Input/Output Ports 18
1.7 Digital Data-Acquisition Procedures 29
1.8 Switch Debouncing 33
1.9 Digital Interfacing Standards 35
1.10 Problems 44
1.11 Additional Reading 51
Laboratory Exercise 1 Introduction to C Programming 53
Laboratory Exercise 2 Measuring Event Times 58
Laboratory Exercise 3 Digital Interfacing: Switches and Lights 66
2 ANALOG TOOLS 75
2.1 Introduction 75
2.2 Operational-Amplifier Circuits 76
2.3 Op-Amp Characteristics 85
2.4 Instrumentation and Isolation Amplifiers 89
2.5 Noise Sources 94
2.6 Analog Filtering 98
2.7 The Power Amplifier 117
2.8 Problems 118
2.9 Additional Reading 127
Laboratory Exercise 4 Operational-Amplifier Circuits 128
Laboratory Exercise 5 Instrumentation Amplifiers 136
Laboratory Exercise 6 Analog Filtering 145
3 ANALOG <--> DIGITAL CONVERSION AND SAMPLING 153
3.1 Introduction 153
3.2 Digital-to-Analog Converter Circuits 153
3.3 Analog-to-Digital Converter Circuits 161
3.4 The Sample-and-Hold Amplifier 173
3.5 Sampling Analog Waveforms 180
3.6 Frequency Aliasing 183
3.7 Available Data-Acquisition Systems 186
3.9 Problems 187
3.10 Additional Reading 200
Laboratory Exercise 7 Introduction to A/D and D/A Conversion 201
Laboratory Exercise 8 D/A Conversion and Waveform Generation 206
Laboratory Exercise 9 A/D Conversion and Periodic Sampling 213
Laboratory Exercise 10 Frequency Aliasing 221
4 SENSORS AND ACTUATORS 226
4.1 Introduction 226
4.2 Position and Angle Sensors 228
4.3 Temperature Transducers 234
4.4 Strain-Sensing Elements 253
4.5 Force and Pressure Transducers 255
4.6 Measuring Light 261
4.7 Producing Visible Light 268
4.8 Ionic Potentials 271
4.9 The Detection and Measurement of Ionizing Radiation 274
4.10 Measuring Time 277
4.11 Problems 278
4.12 Additional Reading 298
Laboratory Exercise 11 Measuring Angular Position 300
Laboratory Exercise 12 Measuring Temperature 305
Laboratory Exercise 13 Measuring Strain and Force 311
Laboratory Exercise 14 Measuring Light with a Photodiode 316
Laboratory Exercise 15 The Thermoelectric Heat Pump 322
Laboratory Exercise 16 Electrodes and Ionic Media 329
Laboratory Exercise 17 The Human Heart 334
Laboratory Exercise 18 The Electromyogram (EMG) 343
Laboratory Exercise 19 The Electrooculogram (EOG) 352
5 DATA ANALYSIS AND CONTROL 360
5.1 Introduction 360
5.2 The Gaussian-Error Distribution 360
5.3 Student's t Test 366
5.4 Least-Squares Fitting 372
5.5 The Chi-Squared Statistic 375
5.6 Solving Nonlinear Equations 379
5.7 Monte Carlo Simulation 383
5.8 Fourier Transforms 385
5.9 Digital Filters 415
5.10 Control Techniques 419
5.11 Problems 427
5.12 Additional Reading 448
Laboratory Exercise 20 Analog <--> Digital Conversion and Least-Squares
Fitting 449
Laboratory Exercise 21 Fast Fourier Transforms of Sampled Data 454
Laboratory Exercise 22 Fast Fourier Transforms of the Human Voice 461
Laboratory Exercise 23 Digital Filtering 471
Laboratory Exercise 24 Process Compensation Using Fourier Deconvolution
and digital filtering 477
Laboratory Exercise 25 Analog Temperature Control Using a Resistive Heater
485
Laboratory Exercise 26 Temperature Control using the Computer and a Resistive
Heater 490
Laboratory Exercise 27 Temperature Control using the Computer and a Thermoelectric
Heat Pump 497
APPENDIX A: GROUNDING AND SHIELDING 504
APPENDIX B: EXPERIMENTAL UNCERTAINTIES 508
APPENDIX C: C PROGRAMMING TIPS 510
APPENDIX D: NUMERICAL METHODS AND C FUNCTIONS 517
1 Introduction 517
2 Fast Fourier Transform 517
3 Minimization Function PARFIT 520
4 Uncertainty Estimation Function VARFIT 529
5 Numerical Evaluation of Functions Defined by Integrals 542
6 Function Inversion using Newton's Method 549
7 Function Inversion using Quadratic Approximation 549
8 Random Number Generator 550
APPENDIX E: SUMMARY OF DATA TRANSLATION PT3010 PCI PLUG-IN CARD 553
1 Introduction 553
2 Parallel Output 553
3 Parallel Input 556
4 Analog Output 556
5 Analog Input 557
6 Using the DT3010 Bard with the Microsoft Visual C++ Compiler 557
APPENDIX F: USING THE DIGITAL OSCILLOSCOPE TO RECORD WAVEFORMS 558
1 Introduction 558
2 Capturing the Waveform 558
3 Printing the Waveform558
APPENDIX G: ELECTRICAL HAZARDS AND SAFETY 560
APPENDIX H: STANDARD RESISTOR AND CAPACITOR VALUES 566
APPENDIX I: ASCII Character Codes 569
GLOSSARY 572
INDEX 602
Return to top of PRACTICAL INTERFACING web page