This practical text describes how to use a desk-top computer to monitor and control laboratory experiments. Stephen Derenzo clearly explains how to design electronic circuits and write computer programs to sense, analyze and display real-world quantities, including displacement, temperature, force, sound, light, and biomedical potentials. He includes numerous laboratory exercises and appendices that provide practical information on microcomputer architecture and interfacing, including complete circuit diagrams and component lists. A very basic knowledge of electronics is assumed, making the book ideal for college-level laboratory courses and for practicing engineers and scientists.
Author(s): Stephen E. Derenzo
Publisher: Cambridge University Press
Year: 2003
Language: English
Pages: 628
Cover......Page 1
Half-title......Page 3
Title......Page 5
Copyright......Page 6
Dedication......Page 7
Contents......Page 9
Preface......Page 15
Guide for the instructor......Page 18
Acknowledgments......Page 19
1.1 Introduction......Page 21
1.2 The microcomputer......Page 22
1.3.1 Binary number representations......Page 25
Warning: sign extension......Page 26
1.3.2 Gray code......Page 27
1.4 Digital building blocks......Page 28
1.4.1 Tri-state buffer......Page 29
1.4.3 Transparent latch......Page 31
1.4.5 AND, OR, exclusive-OR gates......Page 32
1.5 Digital counters/timers......Page 33
Measuring an average pulse frequency......Page 34
1.5.2 The 8253 programmable interval timer......Page 35
Warning: cascading counter/timer chips......Page 36
1.6 Parallel and serial input/output ports......Page 38
1.6.1 Handshaking considerations......Page 39
1.6.2 The parallel output port......Page 40
1.6.3 The parallel input port......Page 44
1.7.1 Software-trigger status-poll method......Page 49
1.7.2 Hardware-trigger status-poll method......Page 50
1.7.3 Hardware-trigger hardware-interrupt method......Page 51
1.7.4 Hardware-trigger direct-memory-access (DMA) method......Page 52
1.8 Switch debouncing......Page 53
1.8.2 One-shots......Page 54
1.9.1 RS-232C......Page 55
1.9.2 RS-422 and RS-423......Page 59
1.9.4 IEEE-488......Page 60
1.9.5 VME-BUS......Page 62
1.9.7 Universal serial bus (USB)......Page 63
1.10 Problems......Page 64
1.11 Additional reading......Page 71
1. Microsoft Visual C++ programming environment......Page 73
2. Program......Page 75
1. Setup......Page 76
5. Laboratory data sheets......Page 77
1. Timer function......Page 78
3. Student’s t......Page 79
1. Program......Page 80
5. Response to a visible prompt with a random delay......Page 82
3. Analysis......Page 83
5. Questions......Page 84
6. Program and laboratory data sheets......Page 85
Equipment......Page 86
3. Reading from the DT3010 parallel input port......Page 87
1. Circuit......Page 88
2. Program......Page 90
4. Testing the functions of ‘‘Strobe” and ‘‘Input Data Available”......Page 91
6. Seven-segment decoder driver......Page 92
4. Questions......Page 93
5. Program and laboratory data sheets......Page 94
2.1 Introduction......Page 95
2.2.1 Inverting amplifier......Page 96
The virtual short rule......Page 97
2.2.2 Noninverting amplifier......Page 98
2.2.3 Differential amplifier......Page 99
2.2.4 Voltage follower......Page 100
2.2.6 Summing amplifier......Page 101
2.2.7 Full-wave rectifier......Page 102
2.2.9 Curve shaper amplifiers......Page 104
Unequal resistance paths......Page 105
2.3.2 Op-amp dynamic response......Page 106
2.3.4 Relationship between RC time constant, risetime, and bandwidth......Page 108
2.4.1 Instrumentation amplifiers......Page 109
2.4.2 Isolation amplifier......Page 113
2.5 Noise sources......Page 114
2.5.2 Shot noise......Page 115
2.5.3 Amplifier noise......Page 116
2.5.5 Inadequate grounds......Page 117
2.6 Analog filtering......Page 118
Step function response of a passive low filter......Page 120
Frequency response of a passive low-pass filter......Page 121
Impulse response of a passive high-pass filter......Page 122
Square-wave response of passive high-pass and low-pass filters......Page 123
2.6.2 Computing the Bode plot of op-amp filters......Page 124
2.6.3 Low-pass one-pole filter......Page 125
2.6.4 High-pass one-pole filter......Page 126
2.6.5 Notch filter......Page 127
2.6.6 High-order low-pass filters......Page 130
2.6.7 High-order high-pass filters......Page 136
2.7 The power amplifier......Page 137
2.8 Problems......Page 138
2.9 Additional reading......Page 147
Equipment......Page 148
Background......Page 149
2. Inverting amplifier with gains = –100 and –1......Page 150
3. Noninverting amplifier with gains = 101 and 1......Page 152
3. Analysis......Page 153
5. Questions......Page 154
6. Laboratory data sheets......Page 155
Equipment......Page 156
1. Circuit construction......Page 157
2. Offset voltage......Page 158
4. Common-mode gain......Page 159
6. Electromagnetic pickup......Page 160
3. Analysis......Page 161
5. Questions......Page 163
6. Laboratory data sheets......Page 164
Equipment......Page 165
1. Low-pass one-pole filter......Page 166
Additional reading......Page 167
1. Low-pass one-pole filter......Page 168
2. Butterworth low-pass two-pole filter......Page 169
4. Low-Q notch filter......Page 170
3. Analysis......Page 171
6. Laboratory data sheets......Page 172
3.2.1 D/A converter characteristics......Page 173
3.2.2 Weighted-adder D/A converter......Page 177
3.2.3 R-2R resistive-ladder D/A converter......Page 178
3.2.4 Subranging D/A converter......Page 180
3.3 Analog-to-digital converter circuits......Page 181
3.3.1 A/D converter characteristics......Page 182
3.3.3 The comparator......Page 184
3.3.4 Tracking A/D converter......Page 185
3.3.5 Integrating A/D converter......Page 187
3.3.6 Successive-approximation A/D converter......Page 188
3.3.7 Flash A/D converter......Page 190
3.3.8 Subranging flash A/D converter......Page 191
3.3.9 1-bit oversampling sigma–delta A/D converter......Page 192
3.4 The sample-and-hold amplifier......Page 193
3.4.1 Sample mode......Page 194
3.4.2 Hold mode......Page 195
3.4.3 Sample-to-hold transition......Page 196
3.4.4 Hold-to-sample transition......Page 197
3.4.5 The role of the sample-and-hold amplifier......Page 198
3.5.1 Software-controlled sampling......Page 200
3.5.4 Pulse height analysis......Page 201
3.6 Frequency aliasing......Page 203
3.7.2 Special-purpose external data-acquisition systems......Page 206
3.8 Problems......Page 207
3.9 Additional reading......Page 220
Additional reading......Page 221
2. Circuit construction......Page 222
4. D/A conversion......Page 223
2. Data summary......Page 224
6. Laboratory data sheets......Page 225
Equipment......Page 226
1. Circuit construction......Page 227
5. Static response......Page 229
2. Data summary and analysis......Page 230
4. Questions......Page 231
5. Program and laboratory data sheets......Page 232
Equipment......Page 233
1. Circuit connections......Page 234
3. Measurement of A/D characteristics......Page 236
2. Data summary and analysis......Page 238
4. Questions......Page 239
5. Program and laboratory data sheets......Page 240
1. Circuit......Page 241
2. Programs......Page 242
4. Frequency aliasing......Page 243
3. Discussion and conclusions......Page 244
5. Program and laboratory data sheets......Page 245
4.1 Introduction......Page 246
4.2.1 The potentiometer......Page 248
4.2.2 The digital encoder......Page 250
Digital linear encoder......Page 251
Digital rotary encoders......Page 252
4.2.3 The stepper motor......Page 253
4.3 Temperature transducers......Page 254
4.3.1 Temperature standards......Page 255
4.3.2 Platinum resistance thermometer......Page 256
4.3.3 The bimetallic switch and the dial thermometer......Page 257
Thompson emf......Page 258
Peltier emf......Page 259
The thermocouple as a temperature sensor......Page 260
Peltier thermoelectric device......Page 264
4.3.5 The thermistor......Page 266
4.3.6 The solid-state temperature sensor......Page 269
4.3.7 Automatic thermocouple reference junction compensation (electronic ‘‘ice point’’)......Page 271
4.3.9 Summary of temperature sensors......Page 272
4.4.1 The bonded resistance strain gauge......Page 273
4.5.1 Force transducers......Page 275
4.5.3 Piezoelectric transducers......Page 277
Capacitance......Page 279
Turbomolecular pump......Page 280
4.6.1 The silicon photodiode......Page 281
Photovoltaic mode......Page 282
Photoconductive mode......Page 283
4.6.2 Lambert–Beer law......Page 285
4.6.3 Summary of solid-state photodetectors......Page 286
4.6.4 The vacuum photomultiplier tube......Page 287
4.7.1 Incandescence......Page 288
4.7.2 Luminescence......Page 289
4.7.3 Luminous efficiency......Page 290
4.8.1 Origin of the ionic potential......Page 291
4.8.3 Ag(AgCl) electrodes......Page 292
4.9.2 Applications of radiation......Page 294
4.9.5 Neutrons......Page 295
4.9.9 Radiation detectors......Page 296
4.10.1 Traditional time measurement......Page 297
4.11 Problems......Page 298
4.12 Additional reading......Page 318
1. Damped-harmonic oscillator......Page 320
1. Setup......Page 322
2. Data summary and analysis......Page 323
5. Laboratory data sheets......Page 324
Equipment......Page 325
1. Setup......Page 326
3. Thermistor......Page 327
5. Reproducibility......Page 328
2. Data summary and analysis......Page 329
5. Laboratory data sheets......Page 330
Equipment......Page 331
2. Four-strain-element force transducer......Page 332
1. Single-strain-element force transducer......Page 333
2. Data summary and analysis......Page 334
Laboratory data sheets......Page 335
Equipment......Page 336
1. Setup......Page 337
2. Photodiode I–V characteristics and noise with dark conditions......Page 338
5. Measuring the concentration of a solution......Page 339
3. Discussion and conclusions......Page 340
5. Laboratory data sheets......Page 341
1. Peltier and Seebeck effects......Page 342
2. Thermoelectric efficiency......Page 343
4. Estimation of T from T versus time measurements......Page 344
1. Setup......Page 345
1. Setup......Page 346
4. Questions......Page 347
5. Laboratory data sheets......Page 348
1. Electrodes used as sensors and actuators......Page 349
2. Complex impedance analysis......Page 350
1. Electrode offset potential, stability, and microphonics......Page 351
1. Setup......Page 352
5. Laboratory data sheets......Page 353
1. Ag(AgCl) electrodes......Page 354
4. Sequence of cardiac depolarization......Page 355
5. Glossary......Page 356
1. Electrocardiogram (ECG) (demonstrated by a physician)......Page 358
3. Blood pressure......Page 359
Potential sources of error......Page 360
2. Data summary and analysis......Page 361
5. Laboratory data sheets......Page 362
Equipment......Page 363
1. The motor unit and its action potential signal......Page 364
2. Summary of steps in skeletal muscle contraction and recovery......Page 365
Additional reading......Page 366
1. EMG signal-processing circuit – construction......Page 367
2. EMG signal-processing circuit – testing......Page 368
5. The unprocessed EMG......Page 369
3. Discussion and conclusions......Page 370
5. Laboratory data sheets......Page 371
1. Origin of the EOG......Page 372
Additional reading......Page 373
2. Response time......Page 374
3. Smooth pursuit and saccadic motion......Page 375
4. Questions......Page 378
5. Laboratory data sheets......Page 379
5.2.1 Repeated measurements of the same quantity......Page 380
5.2.2 Estimating the sample mean and standard deviation......Page 384
5.2.3 Estimating the standard error of the mean......Page 385
5.3.1 Unpaired data......Page 386
5.3.3 Using Student’s t test......Page 388
5.3.4 Computing the probability of exceeding |t|......Page 390
5.4.1 Fitting a straight line to measured data......Page 392
5.4.2 Fitting a curve to measured data......Page 394
5.5.1 Use of chi-squared in fitting a model to data......Page 395
5.6.1 Newton’s method for solving f(x) =0......Page 399
5.6.2 Solving f(x) = 0 by quadratic iteration......Page 400
5.6.3 Numerical minimization......Page 401
5.7 Monte Carlo simulation......Page 403
5.8 Fourier transforms......Page 405
5.8.1 The integral Fourier transform with examples......Page 406
5.8.2 The Fourier transform of periodic waveforms......Page 411
5.8.3 The Fourier transform of a periodically sampled time function......Page 414
5.8.4 Using aliasing to advantage – the sampling oscilloscope......Page 416
5.8.5 The fourier transform of a truncated time function......Page 418
5.8.6 The Fourier transform of a periodic function periodically sampled – the discrete Fourier transform......Page 420
5.8.7 The fast Fourier transform......Page 425
5.8.8 Use of the fast Fourier transform function and windowing......Page 428
Discrete Fourier transform......Page 434
5.9 Digital filters......Page 435
5.9.1 The finite impulse response (FIR) filter......Page 436
Low-pass single-pole digital filter......Page 437
5.9.3 Use of FIR and IIR filters to perform the DFT......Page 438
5.10.1 Fourier control......Page 439
5.10.3 Computer-based digital control......Page 440
5.10.5 Performance criteria for control algorithms......Page 442
5.10.6 Temperature control......Page 443
5.10.7 ON–OFF control......Page 444
5.10.9 PID (proportional–integral–differential) control......Page 446
5.11 Problems......Page 447
5.12 Additional reading......Page 468
1. Analog-to-digital (A/D) converter characteristics......Page 469
4. Two-parameter least-squares fit......Page 470
2. Program......Page 471
3. Discussion and conclusions......Page 472
5. Program and laboratory data sheets......Page 473
Equipment......Page 474
Additional reading......Page 475
2. Computer sampling using the analog input port......Page 476
4. FFT of periodic waveforms......Page 477
2. Data summary and analysis......Page 478
4. Questions......Page 479
5. Program and laboratory data sheets......Page 480
Equipment......Page 481
Background......Page 482
1. Microphone pre-amplifier......Page 485
2. Anti-aliasing filter......Page 486
4. Program......Page 487
7. Sampling and playback of human speech......Page 488
2. Data summary and analysis......Page 489
5. Program and laboratory data sheets......Page 490
1. Analog low-pass single-pole filter......Page 491
2. Digital low-pass single-pole filter......Page 492
2. Digital filtering......Page 493
4. Questions......Page 495
5. Program and laboratory data sheets......Page 496
Equipment......Page 497
2. The Fourier convolution theorem applied to digital control......Page 498
2. Measurement of the impulse response of the low-pass filter......Page 500
4. Response of combined digital deconvolution filter and low-pass analog filter to square-wave input......Page 502
4. Questions......Page 503
5. Program and laboratory data sheets......Page 504
Equipment......Page 505
Mode 2 (proportional)......Page 506
1. Circuit......Page 507
4. Proportional closed-loop step response......Page 508
5. Laboratory data sheets......Page 509
Equipment......Page 510
Mode 0 (manual)......Page 511
Additional reading......Page 512
1. Circuit......Page 513
5. ON–OFF closed-loop response......Page 514
3. Discussion and conclusions......Page 515
5. Program and laboratory data sheets......Page 516
Equipment......Page 517
1. Control modes......Page 518
Additional reading......Page 519
1. Circuit......Page 520
5. ON–OFF closed-loop response......Page 521
3. Discussion and conclusions......Page 522
5. Program and laboratory data sheets......Page 523
A.2 Interference noise due to common impedance......Page 524
A.3 Interference noise due to capacitive coupling......Page 525
A.4 General rules to follow......Page 526
B.2 Propagation of random error......Page 528
C.2 Arithmetic statements......Page 530
C.5 Indexed looping......Page 531
C.7 Increment and decrement operators......Page 532
C.9 Defining your own functions......Page 533
C.10 ‘‘Including’’ your own functions......Page 534
C.12 Using library functions......Page 535
C.14 General format rules for C programs......Page 536
D.2 Fast Fourier transform......Page 537
D.2.1 C program code......Page 538
D.3 Minimization function PARFIT......Page 540
D.3.2 C program code......Page 541
D.4 The uncertainty estimation function VARFIT......Page 549
D.4.2 C program code......Page 550
D.5 Numerical evaluation of functions defined by integrals......Page 562
D.5.2 C program code......Page 563
D.5.3 Example of a program to compute the probability of exceeding a particular value of Student’s t (of either sign)......Page 566
D.5.4 Function to compute the gamma function of integral or half-integral arguments......Page 568
D.7 Function inversion using quadratic approximation......Page 569
D.8.1 Previous methods......Page 570
D.8.3 C program use......Page 571
D.8.4 C program code......Page 572
E.2 Parallel output......Page 573
E.4 Analog output......Page 576
E.6 Using the DT3010 board with the Microsoft visual C++ compiler......Page 577
F.3 Printing the waveform......Page 578
G.1 Introduction......Page 580
G.2 Electrical power......Page 581
G.3 The ground fault interrupter circuit......Page 583
G.6 Methods of accident prevention......Page 584
H.2 Standard capacitor values and codes......Page 586
I.1 ASCII character set codes......Page 589
Glossary......Page 592
Index......Page 622