data acquisition for sensor systems

9
Data Acquisition for Sensor Systems H. ROSEMARY TAYLOR formerly Lecturer in Electrical Engineering and Electronics at UMIST The University of Manchester Institute of Science and Technology CHAPMAN & HALL London Weinheim New York Tokyo Melbourne Madras

Upload: others

Post on 20-Feb-2022

10 views

Category:

Documents


1 download

TRANSCRIPT

Data Acquisition for Sensor Systems

H. ROSEMARY TAYLOR

formerly Lecturer in Electrical Engineering and Electronics

at UMIST

The University of Manchester Institute of Science and Technology

CHAPMAN & HALL London • Weinheim • New York • Tokyo • Melbourne • Madras

Contents

Preface xiii

Acknowledgements xv

1 Introduction 1 1.1 What is data acquisition? 1 1.2 Elements of a data acquisition system 3 1.3 Complete data acquisition systems 4

1.3.1 Integrated circuits 4 1.3.2 Data acquisition boards 5 1.3.3 Software for data acquisition 5 1.3.4 Data loggers for process control 6 1.3.5 Digital voltmeters and multimeters 6 1.3.6 Choosing a system 6

2 Principles of measurement 9 2.1 Reasons for measuring 9 2.2 What is measurement? 9

2.2.1 Definitions and terminology 9 2.2.2 Errors and the quality of a measurement 10

2.3 Units and standards 12 2.4 Systeme Internationale d'Unites 13 2.5 Standards 13 2.6 Unit and standard of mass 15 2.7 Unit and standard of time 15 2.8 Unit and standard of length 15 2.9 Electrical units and standards 16

2.9.1 60 and fi0 16 2.9.2 Unit of electric current 16 2.9.3 Units of potential and impedance 17

2.10 Units and standards of temperature 17 2.11 Traceability and calibration 18

CONTENTS

Sensors 21 3.1 Introduction 21 3.2 Active and passive sensors 21 3.3 Effort and flow variables 22 3.4 Static performance of sensors 23

3.4.1 Accuracy 23 3.4.2 Offset 23 3.4.3 Linearity 24

3.5 Dynamic performance of sensors 25 3.5.1 First- and second-order sensors 25 3.5.2 Example of a first-order system:

a thermometer 25 3.5.3 Example of a second-order system:

a thermometer in a sheath 26 3.5.4 Example of second-order sensors:

spring-mass systems 28 3.6 Strain gauges 32

3.6.1 Description and applications 32 3.6.2 Strain 33 3.6.3 Gauge factor 35 3.6.4 Circuit layout and temperature

compensation 36 3.6.5 Signal conditioning 37

3.7 Linear variable differential transformer 37 3.8 Piezoelectric sensors 39

3.8.1 Piezoelectricity 39 3.8.2 Practical piezoelectric sensors 44 3.8.3 Ultrasonics 44 3.8.4 Frequency control 45

3.9 Temperature sensors 45 3.9.1 Platinum resistance thermometers 45 3.9.2 Signal conditioning for platinum

resistance thermometers 46 3.9.3 Thermistors 48 3.9.4 Thermocouples 49 3.9.5 Signal conditioning for thermocouples 50 3.9.6 Integrated circuit temperature sensors 51 3.9.7 Radiation sensors 51

3.10 Future developments 53 3.10.1 Microsensors 53 3.10.2 Smart sensors 54

3.11 Examples 54

CONTENTS vii

4 Signal conditioning 61 4.1 General 61

4.1.1 Earthing or grounding 61 4.1.2 Series and common mode noise 62 4.1.3 Errors due to common mode interference 62 4.1.4 Specification of common mode rejection

ratio 65 4.1.5 The use of a guard terminal 66

4.2 Instrumentation amplifiers 66 4.2.1 Differential gain 67 4.2.2 Common mode gain 69

4.3 Isolation amplifiers 69 4.4 Charge amplifiers 70

4.4.1 Requirements 70 4.4.2 Circuit 71 4.4.3 Frequency response 72

4.5 Filters 72 4.5.1 Classification of filters 72 4.5.2 Types of filter response 74 4.5.3 Filter circuits 78

4.6 Integrators and differentiators 81 4.7 Phase-sensitive detectors 82

4.7.1 Applications 82 4.7.2 Linear, switching PSD 83 4.7.3 Multiplying PSD 86 4.7.4 Digital PSD 87 4.7.5 Edge-triggered PSD 87 4.7.6 Phase-locked loop 87

4.8 Examples 89

5 Sample and hold circuits 95 5.1 Introduction 95 5.2 Applications 95 5.3 Slew rate and aperture error 95 5.4 Basic design 98 5.5 Operation 98 5.6 Definitions 99 5.7 Practical circuits 100 5.8 Errors 101 5.9 Choice of hold capacitor 102 5.10 Sampling converters 103 5.11 Examples 103

VIII CONTENTS

6 Multiplexers 111 6.1 Introduction 111 6.2 Number of switches required 112 6.3 Reed relays 112

6.3.1 Advantages of reed relays 113 6.3.2 Disadvantages of reed relays 113

6.4 FET switches 115 6.4.1 Junction FETs (JFETs) 115 6.4.2 MOSFETs 116 6.4.3 CMOSFETs 116 6.4.4 Equivalent circuit of a JFET 116

6.5 Errors in multiplexers 118 6.6 Examples 120

7 Elements of analogue to digital and digital to analogue converters 127 7.1 Introduction 127 7.2 Voltage references 127

7.2.1 Zener diodes 127 7.2.2 Three-terminal Zener reference devices 129 7.2.3 Bandgap references 129 7.2.4 Ratiometric measurements 132

7.3 Bipolar binary codes 132 7.3.1 Offset binary 132 7.3.2 Two's complement 132 7.3.3 Sign magnitude 133 7.3.4 Gray code 133 7.3.5 Binary coded decimal 135 7.3.6 American Standard Code for Information

Interchange 135 7.4 Examples 136

8 Digital to analogue converters 141 8.1 Design of digital to analogue converters 141

8.1.1 Weighted resistor circuit 141 8.1.2 Ladder networks 142 8.1.3 Quads 144 8.1.4 Timesharing D/As 144 8.1.5 D/A converters for digital audio 146

8.2 Bipolar D/As 147 8.3 Multiplying D/As 147 8.4 Accuracy of D/A converters 147

CONTENTS ix

8.5 Sources of error 151 8.6 Testing D/A converters 152

8.6.1 Input codes 152 8.6.2 Step error 152 8.6.3 Dynamic testing of D/A converters 152

8.7 Examples 154

9 Analogue to digital converters 163 9.1 Early designs 163 9.2 Integrating and nonintegrating converters 165 9.3 Integrating converters 165

9.3.1 Series mode rejection ratio 167 9.3.2 Improvement of series mode rejection

ratio at mains frequency 168 9.3.3 Oversampling 168 9.3.4 Systems voltmeters 168

9.4 Dual ramp A/D converter 169 9.4.1 Principle 169 9.4.2 Auto polarity using a flying capacitor 171 9.4.3 Auto-zero compensation using a flying

capacitor 171 9.4.4 Effect of delays in the switching and in the

comparator 173 9.4.5 Dielectric absorption 175

9.5 Triple ramp and multislope A/D converters 177 9.6 Voltage to frequency and charge balance A/D

converters 179 9.6.1 Bipolar charge balance converters 179 9.6.2 Voltage to frequency methods 179 9.6.3 Simple voltage to frequency converter 180 9.6.4 Charge balance voltage to frequency

converter 180 9.6.5 Synchronous charge balance voltage to

frequency converter 181 9.6.6 Audio sigma-delta A/D converters 183

9.7 Pulse-width A/D converters 185 9.8 Pulse-width, pulse-height wattmeter 186 9.9 Successive approximation A/D converters 186

9.9.1 Principle 186 9.9.2 Resistive ladder converters 187 9.9.3 Sampling successive approximation

converters 188

X CONTENTS

9.10 9.11

9.12

9.13

9.14

Recirculating remainder A/D converters High-speed A/D converters

9.11.1 Flash converters 9.11.2 Two-stage flash A/D converters

Interfacing a converter to a microprocessor 9.12.1 Data transfer methods 9.12.2 Microprocessor-compatible converters

Testing A/D converters 9.13.1 Static tests 9.13.2 Offset error 9.13.3 Gain error 9.13.4 Integral nonlinearity 9.13.5 Differential nonlinearity 9.13.6 Dynamic tests 9.13.7 Back-to-back test 9.13.8 Fast Fourier transform test 9.13.9 Beat frequency test for fast converters 9.13.10 Histogram test for fast converters 9.13.11 Other tests

Examples

10 Sampled data systems 10.1 10.2

Introduction Sampling

10.3 Quantization

10.4 10.5

10.6 10.7

10.3.1 RMS quantization error 10.3.2 Signal to quantization noise ratio

Tracking errors Aliasing errors

10.5.1 Theory 10.5.2 Aliasing errors in practice 10.5.3 Choice of sampling frequency 10.5.4 Anti-aliasing filters

System specification Example of system design

10.7.1 Sensors 10.7.2 Signal conditioning 10.7.3 Linearity 10.7.4 Order of taking samples 10.7.5 Sampling rate 10.7.6 Timing 10.7.7 Transferring data to the computer

189 189 189 192 193 193 194 196 196 196 196 196 197 197 197 197 198 198 198 199

213 213 213 213 214 215 215 215 215 219 220 221 222 222 222 223 223 223 224 226 226

CONTENTS xi

10.8 Control and data signals 229 10.9 Error analysis 230 10.10 Earthing 231 10.11 Examples 231

11 Bus systems 249 11.1 Introduction 249

11.1.1 Three-state logic and open collectors 249 11.2 Microprocessor busses 250

11.2.1 Interface adapters 250 11.2.2 PC-XT bus 251 11.2.3 PC-AT bus 251 11.2.4 VESA and EISA local busses 253 11.2.5 PCI bus 253 11.2.6 PCMCIA bus for laptop computers 253

11.3 Busses to link boards 254 11.3.1 STD and STE 254 11.3.2 VME 254 11.3.3 Futurebus 254

11.4 Asynchronous serial data transmission 255 11.4.1 Standards 256 11.4.2 Asynchronous interface transceivers 257

11.5 General purpose interface bus 257 11.5.1 Origins 257 11.5.2 Device classification 258 11.5.3 Bus lines 260 11.5.4 Data lines 260 11.5.5 Bus management lines 262 11.5.6 Device addressing 263 11.5.7 Interrupts 264 11.5.8 Handshake 264 11.5.9 Interface boards and chips 265 11.5.10 Standard commands for programmable

instrumentation 267 11.6 VXI bus 268 11.7 Examples 268

12 Software for data acquisition 273 12.1 Introduction 273 12.2 Software choices 274

12.2.1 Criteria for choosing software 274

\ii CONTENTS

12.3 Driver programs 276 12.3.1 Drivers for commercial data acquisition

boards 276 12.3.2 Drivers for GPIB interface boards 276 12.3.3 Writing drivers 277

12.4 Data presentation 277 12.4.1 Spreadsheets 277 12.4.2 Graphics packages 279

12.5 Data analysis 279 12.5.1 Introduction 279 12.5.2 Curve fitting 280 12.5.3 Correlation 280 12.5.4 Fourier transforms 282 12.5.5 Spectral density functions 286 12.5.6 Frequency response of a system 286 12.5.7 Statistics 287

12.6 Complete data acquisition packages 287 12.6.1 Introduction 287 12.6.2 Virtual instruments 287

Appendix A: Table of ratios and equivalent word lengths 289 Appendix B: Linear regression or finding the best straight

line 291 Appendix C: Dielectric comparison chart 293

Glossary 297

References 311

Index 319