The Art of Electronics [3 ed.]
 0521809266, 9780521809269

  • Commentary
  • Took original with MD5 b56092538d41992fe164749ff7a29a04, applied OCR, did some small cleaning, uploade back [Codeman].

Table of contents :
Preface to the First Edition
Preface to the Second Edition
Preface to the Third Edition
ONE: Foundations
TWO: Bipolar Transistors
THREE: Field-Effect Transistors
FOUR: Operational Amplifiers
FIVE: Precision Circuits
SIX: Filters
SEVEN: Oscillators and Timers
EIGHT: Low-Noise Techniques
NINE: Voltage Regulation and Power Conversion
TEN: Digital Logic
ELEVEN: Programmable Logic Devices
TWELVE: Logic Interfacing
THIRTEEN: Digital meets Analog
FOURTEEN: Computers, Controllers, and Data Links
FIFTEEN: Microcontrollers
APPENDIX A: Math Review
APPENDIX B: How to Draw Schematic Diagrams
APPENDIX C: Resistor Types
APPENDIX D: Thevenin’s Theorem
APPENDIX E: LC Butterworth Filters
APPENDIX F: Load Lines
APPENDIX G: The Curve Tracer
APPENDIX H: Transmission Lines and Impedance Matching
APPENDIX I: Television: A Compact Tutorial
APPENDIX J: SPICE Primer
APPENDIX K: "Where Do I Go to Buy Electronic Goodies?"
APPENDIX L: Workbench Instruments and Tools
APPENDIX M: books
APPENDIX N: Further Reading and References
APPENDIX O: The Oscilloscope
APPENDIX P: Acronyms and Abbreviations
Index

Citation preview

n u t w f . ^ »p iij i » w n B » l ^ w B,* t 4 M iw Pi>to,k

wwmrv*..,

THE ART OF ELECTRONICS Third Edition

Paul Horowitz Winfield Hill

H I Cam

HARVARD U N IVE R SITY

ROWLAND INSTITU TE AT HARVARD

b r id g e

'S |x P UNIVERSITY PRESS

C a m b r id g e U N IV E R S IT Y PRESS

32 Avenue of the Americas, New York, NY 10013-2473, USA Cambridge University Press is part of the University of Cambridge. It furthers the University’s mission by disseminating knowledge in the pursuit of education, learning, and research at the highest international levels of excellence. www.cambridge.org Information on this title: www.cambridge.org/9780521809269 © Cam bridge University Press, 1980, 1989, 2015 This publication is in copyright. Subject to statutory exception and to the provisions of relevant collective licensing agreements, no reproduction of any part may take place without the written permission of Cambridge University Press. First published 1980 Second edition 1989 Third edition 2015 Printed in the United States of America A catalog record fo r this publication is available from the British Library. ISBN 978-0-521-80926-9 Hardback Cambridge University Press has no responsibility for the persistence or accuracy of URLs for external or third-party Internet websites referred to in this publication and does not guarantee that any content on such websites is, or will remain, accurate or appropriate.

To Vida and Ava

In Memoriam: Jim Williams, 1948-2011

List o f Tables

xxii

Preface to the F irst Edition

XX V

Preface to the Second Edition Preface to the Third Edition O N E : Foundations 1.1 Introduction 1.2 V oltage, current, and resistance 1.2.1 Voltage and current R elationship betw een voltage 1.2.2 and current: resistors Voltage dividers 1.2.3 1.2.4 Voltage sources and current sources 1.2.5 Thevenin equivalent circuit Sm all-signal resistance 1.2.6 1.2.7 An example: “It’s too hot!” 1.3 Signals 1.3.1 Sinusoidal signals 1.3.2 Signal am plitudes and decibels 1.3.3 O ther signals 1.3.4 Logic levels 1.3.5 Signal sources 1.4 C apacitors and ac circuits 1.4.1 Capacitors R C circuits: V and / versus tim e 1.4.2 D ifferentiators 1.4.3 1.4.4 Integrators 1.4.5 Not quite p e rfec t... 1.5 Inductors and transform ers 1.5.1 Inductors 1.5.2 T ransform ers 1.6 D iodes and diode circuits 1.6.1 D iodes Rectification 1.6.2 1.6.3 Pow er-supply filtering R ectifier configurations for 1.6.4 pow er supplies

R egulators C ircuit applications o f diodes Inductive loads and diode protection Interlude: inductors as friends 1.6.8 Im pedance and reactance 1.7 Frequency analysis o f reactive 1.7.1 circuits R eactance o f inductors 1.7.2 Voltages and currents as 1.7.3 com plex num bers R eactance o f capacitors and 1.7.4 inductors O h m ’s law generalized 1.7.5 Pow er in reactive circuits 1.7.6 Voltage dividers generalized 1.7.7 R C highpass filters 1.7.8 R C low pass filters 1.7.9 1.7.10 R C differentiators and integrators in the frequency dom ain 1.7.11 Inductors versus capacitors 1.7.12 P hasor diagram s 1.7.13 “ Poles” and decibels per octave 1.7.14 R esonant circuits 1.7.15 L C filters 1.7.16 O ther capacitor applications 1.7.17 T hevenin’s theorem generalized P utting it all together - an A M radio 1.8 1.9 O ther passive com ponents E lectrom echanical devices: 1.9.1 sw itches E lectrom echanical devices: 1.9.2 relays C onnectors 1.9.3 Indicators 1.9.4 V ariable com ponents 1.9.5 1.10 A parting shot: confusing m arkings and itty-bitty com ponents 1.10.1 S urface-m ount technology: the jo y and the pain 1.6.5 1.6.6 1.6.7

xxvii xxix 1

1 1 1 3 7 8 9 12 13 13 14 14 15 17 17 18 18 21 25 26 28 28 28 30 31 31 31 32 33 ix

34 35 38 39 40 41 44 44 45 46 47 48 48 50

51 51 51 52 52 54 54 55 55 56 56 59 59 61 63 64 65

x

A rt o f E lectronics Third E dition

Contents A dditional E xercises for C hapter 1 R eview o f C hapter 1

T W O : B ip o la r T ra n s is to rs Introduction 2.1 First transistor model: current 2.1.1 am plifier Som e basic transistor circuits 2.2 T ransistor sw itch 2.2.1 Sw itching circuit exam ples 2.2.2 E m itter follow er 2.2.3 E m itter follow ers as voltage 2.2.4 regulators E m itter follow er biasing 2.2.5 C urrent source 2.2.6 C om m on-em itter am plifier 2.2.7 U nity-gain phase splitter 2.2.8 T ransconductance 2.2.9 E b ers-M o ll m odel applied to basic tran ­ 2.3 sistor circuits Im proved transistor model: 2.3.1 transconductance am plifier 2.3.2 C onsequences o f the E b ers-M o ll m odel: rules o f thum b fo r transistor design T he em itter follow er revisited 2.3.3 T he co m m on-em itter am plifier 2.3.4 revisited B iasing the com m on-em itter 2.3.5 am plifier A n aside: the perfect transistor 2.3.6 2.3.7 C urrent m irrors 2.3.8 D ifferential am plifiers 2.4 Som e am plifier building blocks 2.4.1 P u sh -p u ll o utput stages 2.4.2 D arlington connection B ootstrapping 2.4.3 2.4.4 C urren t sharing in paralleled B JTs C apacitance and M iller effect 2.4.5 2.4.6 Field-effect transistors N egative feedback 2.5 Introduction to feedback 2.5.1 2.5.2 G ain equation E ffects o f feedback o n am plifier 2.5.3 circuits Tw o im portant details 2.5.4 Two exam ples o f transistor 2.5.5 am plifiers w ith feedback Som e typical tran sisto r circuits 2.6

66 68 71 71 72 73 73 75 79 82 83 85 87 88 89 90 90

91 93 93 96 99 101 102 105 106 109 111 112 113 115 115 116 116 117 120 121 123

R egulated pow er supply T em perature con tro ller Sim ple logic w ith transistors and diodes A dditional E xercises fo r C hapter 2 Review o f C h ap ter 2 2.6.1 2.6.2 2.6.3

T H R E E :: F ie ld -E ffe ct T ra n s is to rs 3.1 Introduction FE T characteristics 3.1.1 3.1.2 FE T types U niversal FE T characteristics 3.1.3 3.1.4 FE T drain characteristics M anufacturing spread o f FET 3.1.5 characteristics 3.1.6 B asic F E T circuits 3.2 FE T lin ear circuits 3.2.1 Som e representative JFE T s: a b rie f to u r 3.2.2 JF E T current sources 3.2.3 FE T am plifiers D ifferential am plifiers 3.2.4 O scillators 3.2.5 S ource follow ers 3.2.6 FE T s as variable resistors 3.2.7 F E T gate current 3.2.8 3.3 A closer look at JFE T s D rain current versus gate 3.3.1 voltage D rain current versus 3.3.2 d rain-source voltage: output conductance T ransconductance versus drair 3.3.3 current T ransconductance versus drair 3.3.4 voltage JF E T capacitance 3.3.5 W hy JF E T (versus M O SFE T ) 3.3.6 am plifiers? 3.4 FE T sw itches 3.4.1 FE T analog sw itches 3.4.2 L im itations o f FE T sw itches 3.4.3 S om e FE T analog sw itch exam ples 3.4.4 M O S F E T logic sw itches Pow er M O SFE T s 3.5 H igh im pedance, therm al 3.5.1 stability P ow er M O S F E T sw itching 3.5.2 param eters

123 123 123 124 126 131 131

131 134 136 137 138 140 141 141 142 146 152 155 156 161 163 165 165

166 168 170 170 170 171 171 174 182 184 187 187 192

A rt o f E lectronics Third Edition Pow er sw itching from logic levels 3.5.4 Pow er sw itching cautions 3.5.5 M O SFETs versus BJTs as high-current switches 3.5.6 Som e pow er M O SFET circuit exam ples 3.5.7 IGBTs and other power sem iconductors 3.6 M O SFETs in linear applications 3.6.1 H igh-voltage piezo amplifier 3.6.2 Som e depletion-m ode circuits 3.6.3 Paralleling M OSFETs 3.6.4 Therm al runaway Review o f C hapter 3

Contents

3.5.3

F O U R : O p e ra tio n a l A m plifiers 4.1 Introduction to op-am ps - the “perfect com ponent” 4.1.1 Feedback and op-am ps 4.1.2 O perational amplifiers 4.1.3 The golden rules 4.2 Basic op-am p circuits 4.2.1 Inverting am plifier 4.2.2 N oninverting am plifier 4.2.3 Follower D ifference amplifier 4.2.4 4.2.5 C urrent sources 4.2.6 Integrators 4.2.7 Basic cautions for op-am p circuits An op-am p sm orgasbord 4.3 Linear circuits 4.3.1 N onlinear circuits 4.3.2 O p-am p application: 4.3.3 triangle-w ave oscillator 4.3.4 O p-am p application: pinch-off voltage tester Program m able pulse-w idth 4.3.5 generator 4.3.6 Active lowpass filter A detailed look at op-am p behavior 4 .4 4.4.1 D eparture from ideal op-am p perform ance Effects o f op-am p lim itations on 4.4.2 circuit behavior 4.4.3 Exam ple: sensitive m illivoltm eter B andw idth and the op-am p 4.4.4 current source

4.5 192 196 201 202 207 208 208 209 212 214 219

223 223 223 224 225 225 225 226 227 227 228 230 231 232 232 236 239 240 241 241 242 243 249 253 254

A detailed look at selected op-am p cir­ cuits Active peak detector 4.5.1 Sam ple-and-hold 4.5.2 4.5.3 A ctive clam p A bsolute-value circuit 4.5.4 A closer look at the integrator 4.5.5 A circuit cure for FET leakage 4.5.6 D ifferentiators 4.5.7 O p-am p operation with a single pow er 4.6 supply B iasing single-supply ac 4.6.1 amplifiers 4.6.2 Capacitive loads “ S ingle-supply” op-am ps 4.6.3 4.6.4 Exam ple: voltage-controlled oscillator V CO im plem entation: 4.6.5 through-hole versus surface-m ount Z ero-crossing detector 4.6.6 An op-am p table 4.6.7 4.7 O th er am plifiers and op-am p types 4.8 Som e typical op-am p circuits G eneral-purpose lab am plifier 4.8.1 S tuck-node tracer 4.8.2 L oad-current-sensing circuit 4.8.3 Integrating suntan m onitor 4.8.4 Feedback am plifier frequency com pensa­ 4.9 tion G ain and phase shift versus 4.9.1 frequency A m plifier com pensation 4.9.2 m ethods Frequency response o f the 4.9.3 feedback netw ork A dditional E xercises for C hapter 4 R eview o f C hapter 4

xi

F IV E : P rec isio n C irc u its P recision op-am p design techniques 5.1 Precision versus dynam ic range 5.1.1 E rro r budget 5.1.2 An exam ple: the m illivoltm eter, revisited 5.2 The challenge: lOmV, 1%, 5.2.1 1 0 M Q , 1.8 V single supply T he solution: precision RRIO 5.2.2 current source T he lessons: erro r budget, unspecified pa­ 5.3 ram eters

254 254 256 257 257 257 259 260 261 261 264 265 267

268 269 270 270 274 274 276 277 278 280 281 282 284 287 288

292 292 292 293 293 293 294 295

xii

A rt o f Electronics Third Edition

Contents A nother example: precision amplifier with null offset 5.4.1 Circuit description A precision-design error budget 5.5 5.5.1 Error budget 5.6 Component errors 5.6.1 Gain-setting resistors 5.6.2 The holding capacitor 5.6.3 Nulling switch Amplifier input errors 5.7 5.7.1 Input impedance 5.7.2 Input bias current 5.7.3 Voltage offset 5.7.4 Common-mode rejection 5.7.5 Power-supply rejection 5.7.6 Nulling amplifier: input errors Amplifier output errors 5.8 5.8.1 Slew rate: general considerations 5.8.2 Bandwidth and settling time 5.8.3 Crossover distortion and output impedance 5.8.4 Unity-gain power buffers 5.8.5 Gain error 5.8.6 Gain nonlinearity 5.8.7 Phase error and “active compensation” 5.9 RRIO op-amps: the good, the bad, and the ugly 5.9.1 Input issues 5.9.2 Output issues 5.10 Choosing a precision op-amp 5.10.1 “Seven precision op-amps” 5.10.2 N um ber per package 5.10.3 Supply voltage, signal range 5.10.4 Single-supply operation 5.10.5 Offset voltage 5.10.6 Voltage noise 5.10.7 Bias current 5.10.8 C urrent noise 5.10.9 CM RR and PSRR 5.10.10 G B W , / t , slew rate and “m,” and settling time 5.10.11 Distortion 5.10.12 “Two out o f three isn’t bad” : creating a perfect op-amp 5.11 Auto-zeroing (chopper-stabilized) am pli­ fiers 5.11.1 Auto-zero op-am p properties 5.11.2 W hen to use auto-zero op-amps

5.11.3 5.11.4

5.4

297 297 298 299 299 300 300 300 301 302 302 304 305 306 306 307 307 308 309 311 312 312 314 315 316 316 319 319 322 322 322 323 323 325 326 328 328 329 332 333 334 338

5.12 Designs DMMs 5.12.1 5.12.2 5.12.3 5.12.4 5.12.5 5.13

Selecting an auto-zero op-amp Auto-zero miscellany

338 340

by the masters: A gilent’s accurate It’s impossible! W rong - it is possible! Block diagram: a simple plan The 34401A 6.5-digit front end The 34420A 7.5-digit frontend

Difference, differential, and instrum enta­ tion amplifiers', introduction

5.14 Difference amplifier 5.14.1 Basic circuit operation 5.14.2 Some applications 5.14.3 Performance parameters 5.14.4 Circuit variations

342 342 342 343 343 344 347 348 348 349 352 355

Instrumentation amplifier 5.15.1 A first (but naive) guess 5.15.2 Classic three-op-amp instrumentation amplifier 5.15.3 Input-stage considerations 5.15.4 A “roll-your-own” instrumentation amplifier 5.15.5 A riff on robust input protection

356 357

5.16 Instrumentation amplifier miscellany 5.16.1 Input current and noise 5.16.2 Common-mode rejection 5.16.3 Source impedance and CMRR 5.16.4 EM I and input protection 5.16.5 Offset and CM RR trimming 5.16.6 Sensing at the load 5.16.7 Input bias path 5.16.8 Output voltage range 5.16.9 Application example: current source 5.16.10 Other configurations 5.16.11 Chopper and auto-zero instrumentation amplifiers 5.16.12 Programmable gain instrumentation amplifiers 5.16.13 Generating a differential output

362 362 364 365 365 366 366 366 366

5.17 Fully differential amplifiers 5.17.1 Differential amplifiers: basic concepts 5.17.2 Differential amplifier application example: wideband analog link 5.17.3 Differential-input ADCs 5.17.4 Impedance matching

373

5.15

357 358 359 362

367 368 370 370 372

374

380 380 382

Contents

Art o f Electronics Third Edition 5.17.5

Differential amplifier selection criteria Review of Chapter 5 SIX : Filters 6.1 Introduction 6.2 Passive filters 6.2.1 Frequency response with RC filters 6.2.2 Ideal performance with LC filters 6.2.3 Several simple examples 6.2.4 Enter active filters: an overview 6.2.5 Key filter performance criteria 6.2.6 Filter types 6.2.7 Filter implementation 6.3 Active-filter circuits 6.3.1 VCVS circuits 6.3.2 VCVS filter design using our simplified table 6.3.3 State-variable filters 6.3.4 Twin-T notch filters 6.3.5 Allpass filters 6.3.6 Switched-capacitor filters 6.3.7 Digital signal processing Filter miscellany 6.3.8 Additional Exercises for Chapter 6 Review of Chapter 6 SEVEN:: O scillators and Tim ers 7.1 Oscillators 7.1.1 Introduction to oscillators 7.1.2 Relaxation oscillators The classic oscillator-timer 7.1.3 chip: the 555 Other relaxation-oscillator ICs 7.1.4 7.1.5 Sinewave oscillators Quartz-crystal oscillators 7.1.6 7.1.7 Higher stability: TCXO, OCXO, and beyond 7.1.8 Frequency synthesis: DDS and PLL Quadrature oscillators 7.1.9 7.1.10 Oscillator “jitter” 7.2 Timers Step-triggered pulses 7.2.1 7.2.2 Monostable multivibrators A monostable application: 7.2.3 limiting pulse width and duty cycle

383 388

Timing with digital counters 7.2.4 Review o f Chapter 7

EIG H T: Low-Noise Techniques 8.1 “ Noise” Johnson (Nyquist) noise 8.1.1 Shot noise 8.1.2 1// noise (flicker noise) 8.1.3 Burst noise 8.1.4 391 Band-limited noise 8.1.5 Interference 8.1.6 393 Signal-to-noise ratio and noise figure 8.2 393 Noise power density and 8.2.1 396 bandwidth 399 Signal-to-noise ratio 8.2.2 400 8.2.3 Noise figure 405 Noise temperature 8.2.4 406 Bipolar transistor amplifier noise 8.3 407 Voltage noise, e„ 8.3.1 Current noise in 8.3.2 407 BJT voltage noise, revisited 8.3.3 410 A simple design example: 8.3.4 414 loudspeaker as microphone 415 Shot noise in current sources 8.3.5 415 and em itter followers 418 8.4 Finding; en from noise-figure specifica422 tions 422 8.4.1 Step 1: NF versus / c 423 Step 2: NF versus /?s 8.4.2 Step 3: getting to en 425 8.4.3 Step 4: the spectrum of en 8.4.4 425 The spectrum o f /„ 8.4.5 425 When operating current is not 8.4.6 425 your choice Low-noise design with bipolar transistors 428 8.5 432 Noise-figure example 8.5.1 Charting amplifier noise with e„ 8.5.2 435 and /„ 443 Noise resistance 8.5.3 Charting comparative noise 450 8.5.4 Low-noise design with BJTs: 8.5.5 two examples 451 Minimizing noise: BJTs, FETs, 453 8.5.6 and transformers 457 A design example: 40? 8.5.7 457 “lightning detector” preamp 458 Selecting a low-noise bipolar 8.5.8 461 transistor An extreme low-noise design 8.5.9 challenge 465

391 391 391

xiii 465 470 473 473 474 475 476 477 477 478 478 479 479 479 480 481 481 483 484 486 487 489 489 489 490 491 491 491 492 492 493 494 495 495 496 497 500 505

xiv

A rt o f Electronics Third Edition

Contents Low-noise design with JFETS Voltage noise of JFETs 8.6.1 Current noise o f JFETs 8.6.2 Design example: low-noise 8.6.3 wideband JFET “hybrid” amplifiers Designs by the masters: SR560 8.6.4 low-noise preamplifier Selecting low-noise JFETS 8.6.5 Charting the bipolar-FET shootout W hat about MOSFETs? 8.7.1 Noise in differential and feedback ampli­ fiers Noise in operational amplifier circuits Guide to Table 8.3: choosing 8.9.1 low-noise op-amps Power-supply rejection ratio 8.9.2 Wrapup: choosing a low-noise 8.9.3 op-amp Low-noise instrumentation 8.9.4 amplifiers and video amplifiers Low-noise hybrid op-amps 8.9.5 Signal transformers 8.10.1 A low-noise wideband amplifier with transformer feedback Noise in transimpedance amplifiers 8.11.1 Summary o f the stability problem 8.11.2 Amplifier input noise 8.11.3 The enC noise problem 8.11.4 Noise in the transresistance amplifier 8.11.5 An example: wideband JFET photodiode amplifier 8.11.6 Noise versus gain in the transim pedance amplifier 8.11.7 Output bandwidth limiting in the transim pedance amplifier 8.11.8 Composite transim pedance amplifiers 8.11.9 Reducing input capacitance: bootstrapping the transim pedance amplifier 8.11.10 Isolating input capacitance: cascoding the transimpedance amplifier 8.11.11 Transimpedance amplifiers with capacitive feedback 8.11.12 Scanning tunneling microscope preamplifier

509 509 511

512 512 515 517 519 520 521 525 533 533 533 534 535 536 537 537 538 538 539 540

8.11.13 Test fixture for compensation and calibration 8.11.14 A final remark 8.12 Noise measurements and noise sources 8.12.1 Measurement without a noise source 8.12.2 An example: transistor-noise test circuit 8.12.3 M easurement with a noise source 8.12.4 Noise and signal sources 8.13 Bandwidth limiting and rms voltage mea­ surement 8.13.1 Limiting the bandwidth 8.13.2 Calculating the integrated noise 8.13.3 Op-amp “low-frequency noise” with asym metric filter 8.13.4 Finding the II f corner frequency 8.13.5 Measuring the noise voltage 8.13.6 Measuring the noise current 8.13.7 Another way: roll-your-own fAA/Hz instrument 8.13.8 Noise potpourri 8.14 Signal-to-noise improvement by band­ width narrowing 8.14.1 Lock-in detection 8.15 Power-supply noise 8.15.1 Capacitance multiplier 8.16 Interference, shielding, and grounding 8.16.1 Interfering signals 8.16.2 Signal grounds 8.16.3 Grounding between instruments Additional Exercises for Chapter 8 Review of Chapter 8

554 555 555 555 556 556 558 561 561 563 564 566 567 569 571 574 574 575 578 578 579 579 582 583 588 590

540 542 543

547

548 552 553

NINE: Voltage Regulation and Power Conver­ sion 9.1 Tutorial: from zener to series-pass linear regulator 9.1.1 Adding feedback 9.2 Basic linear regulator circuits with the classic 723 9.2.1 The 723 regulator 9.2.2 In defense of the beleaguered 723 9.3 Fully integrated linear regulators 9.3.1 Taxonomy o f linear regulator ICs 9.3.2 Three-term inal fixed regulators

594 595 596 598 598 600 600 601 601

Contents

Art o f Electronics Third Edition 9.3.3

9.4

9.5

9.6

9.7

Three-terminal adjustable regulators 9.3.4 317-style regulator: application hints 9.3.5 317-style regulator: circuit examples 9.3.6 Lower-dropout regulators 9.3.7 True low-dropout regulators 9.3.8 Current-reference 3-terminal regulator 9.3.9 Dropout voltages compared 9.3.10 Dual-voltage regulator circuit example 9.3.11 Linear regulator choices 9.3.12 Linear regulator idiosyncrasies 9.3.13 Noise and ripple filtering 9.3.14 Current sources Heat and power design 9.4.1 Power transistors and heatsinking 9.4.2 Safe operating area From ac line to unregulated supply ac-line components 9.5.1 9.5.2 Transformer dc components 9.5.3 9.5.4 Unregulated split supply - on the bench! Linear versus switcher: ripple 9.5.5 and noise Switching regulators and dc-dc convert­ ers Linear versus switching 9.6.1 9.6.2 Switching converter topologies 9.6.3 Inductorless switching converters 9.6.4 Converters with inductors: the basic non-isolated topologies Step-down (buck) converter 9.6.5 Step-up (boost) converter 9.6.6 Inverting converter 9.6.7 Comments on the non-isolated 9.6.8 converters Voltage mode and current mode 9.6.9 9.6.10 Converters with transformers: the basic designs 9.6.11 The flyback converter 9.6.12 Forward converters 9.6.13 Bridge converters Ac-line-powered (“offline”) switching converters

602 604 608 610 611 611 612 613 613 613 619 620 623 624 627 628 629 632 633 634 635 636 636 638

9.7.1 The ac-to-dc input stage 9.7.2 The dc-to-dc converter 9.8 A real-world switcher example 9.8.1 Switchers: top-level view 9.8.2 Switchers: basic operation 9.8.3 Switchers: looking more closely 9.8.4 The “reference design” 9.8.5 Wrapup: general comments on line-powered switching power supplies 9.8.6 When to use switchers 9.9 Inverters and switching amplifiers 9.10 Voltage references 9.10.1 Zener diode 9.10.2 Bandgap (V be) reference 9.10.3 JFET pinch-off (VP) reference 9.10.4 Floating-gate reference 9.10.5 Three-terminal precision references 9.10.6 Voltage reference noise 9.10.7 Voltage references: additional Comments 9.11 Commercial power-supply modules 9.12 Energy storage: batteries and capacitors 9.12.1 Battery characteristics 9.12.2 Choosing a battery 9.12.3 Energy storage in capacitors 9.13 Additional topics in power regulation 9.13.1 Overvoltage crowbars 9.13.2 Extending input-voltage range 9.13.3 Foldback current limiting 9.13.4 Outboard pass transistor 9.13.5 High-voltage regulators Review of Chapter 9

xv 660 662 665 665 665 668 671

672 672 673 674 674 679 680 681 681 682 683 684 686 687 688 688 690 690 693 693 695 695 699

638 641 642 647 648 649 651 653 655 656 659 660

T EN : D igital Logic 10.1 Basic logic concepts 10.1.1 Digital versus analog 10.1.2 Logic states 10.1.3 N um bercodes 10.1.4 Gates and truth tables 10.1.5 Discrete circuits for gates 10.1.6 Gate-logic example 10.1.7 Assertion-level logic notation 10.2 Digital integrated circuits: CMOS and Bipolar (TTL) 10.2.1 Catalog o f common gates 10.2.2 IC gate circuits 10.2.3 CMOS and bipolar (“TTL”) characteristics

703 703 703 704 705 708 711 712 713 714 715 717 718

xvi

Contents Three-state and open-collector devices 10.3 Combinational logic 10.3.1 Logic identities 10.3.2 Minimization and Karnaugh maps 10.3.3 Combinational functions available as ICs 10.4 Sequential logic 10.4.1 Devices with memory: flip-flops 10.4.2 Clocked flip-flops 10.4.3 Combining memory and gates: sequential logic 10.4.4 Synchronizer 10.4.5 Monostable multivibrator 10.4.6 Single-pulse generation with flip-flops and counters 10.5 Sequential functions available as inte­ grated circuits 10.5.1 Latches and registers 10.5.2 Counters 10.5.3 Shift registers 10.5.4 Programmable logic devices 10.5.5 M iscellaneous sequential functions 10.6 Some typical digital circuits 10.6.1 Modulo-n counter: a timing example 10.6.2 Multiplexed LED digital display 10.6.3 An n-pulse generator 10.7 M icropower digital design 10.7.1 Keeping CMOS low power 10.8 Logic pathology 10.8.1 dc problems 10.8.2 Switching problems 10.8.3 Congenital weaknesses o f TTL and CMOS Additional Exercises for Chapter 10 Review o f Chapter 10

Art o f Electronics Third Edition

10.2.4

E L E V E N : P ro g ram m ab le Logic Devices 11.1 A brief history 11.2 The hardware 11.2.1 The basic PAL 11.2.2 T heP L A 11.2.3 The FPGA 11.2.4 The configuration memory 11.2.5 Other programmable logic devices 11.2.6 The software

720 722 722 723 724 728 728 730 734 737 739

11.3 An example: pseudorandom byte generator 11.3.1 How to make pseudorandom bytes 11.3.2 Im plementation in standard logic 11.3.3 Implementation with programmable logic 11.3.4 Programmable logic - HDL entry 11.3.5 Implementation with a microcontroller 11.4 Advice 11.4.1 By Technologies 11.4.2 By User Communities Review o f Chapter 11

770 771 772 772 775 111

782 782 785 787

739 740 740 741 744 745 746 748 748 751 752 753 754 755 755 756 758 760 762 764 764 765 765 768 768 769 769 769

T W E L V E : Logic In terfacin g 12.1 CM OS and TTL logic interfacing 12.1.1 Logic family chronology - a brief history 12.1.2 Input and output characteristics 12.1.3 Interfacing between logic families 12.1.4 Driving digital logic inputs 12.1.5 Input protection 12.1.6 Some comments about logic inputs 12.1.7 Driving digital logic from comparators or op-amps 12.2 An aside: probing digital signals 12.3 Comparators 12.3.1 Outputs 12.3.2 Inputs 12.3.3 O ther parameters 12.3.4 O ther cautions 12.4 Driving; external digital loads from logic levels 12.4.1 Positive loads: direct drive 12.4.2 Positive loads: transistor assisted 12.4.3 Negative or ac loads 12.4.4 Protecting power switches 12.4.5 nMOS LSI interfacing 12.5 Optoelectronics: emitters 12.5.1 Indicators and LEDs 12.5.2 Laser diodes 12.5.3 Displays 12.6 Optoelectronics: detectors

790 790 790 794 798 802 804 805 806 808 809 810 812 815 816 817 817 820 821 823 826 829 829 834 836 840

Contents

Art o f Electronics Third Edition Photodiodes and phototransistors 12.6.2 Photomultipliers 12.7 Optocouplers and relays 12.7.1 1: Phototransistor output optocouplers 12.7.2 II: Logic-output optocouplers 12.7.3 III: Gate driver optocouplers 12.7.4 IV: Analog-oriented optocouplers 12.7.5 V: Solid-state relays (transistor output) 12.7.6 VI: Solid-state relays (triac/SCR output) 12.7.7 VII: ac-input optocouplers 12.7.8 Interrupters 12.8 Optoelectronics: fiber-optic digital links 12.8.1 TOSLINK 12.8.2 Versatile Link 12.8.3 ST/SC glass-fiber modules 12.8.4 Fully integrated high-speed fiber-transceiver modules 12.9 Digital signals and long wires 12.9.1 On-board interconnections 12.9.2 Intercard connections 12.1U Driving Cables 12.10.1 Coaxial cable 12.10.2 The right w a y - I : Far-end termination 12.10.3 Differential-pair cable 12.10.4 RS-232 12.10.5 Wrapup Review o f Chapter 12

13.2.8

12.6.1

T H IR T E E N : Digital meets Analog 13.1 Some preliminaries 13.1.1 The basic performance parameters 13.1.2 Codes 13.1.3 Converter errors 13.1.4 Stand-alone versus integrated 13.2 Digital-to-analog converters 13.2.1 Resistor-string DACs 13.2.2 R -2R ladder DACs 13.2.3 Current-steering DACs 13.2.4 Multiplying DACs 13.2.5 Generating a voltage output 13.2.6 Six DACs 13.2.7 Delta-sigm a DACs

PWM as digital-to-analog converter 13.2.9 Frequency-to-voltage converters 13.2.10 Rate multiplier 13.2.11 Choosing a DAC Some DAC application examples 13.3.1 General-purpose laboratory source 13.3.2 Eight-channel source 13.3.3 Nanoamp wide-compliance bipolarity current source 13.3.4 Precision coil driver Converter linearity - a closer look Analog-to-digital converters 13.5.1 Digitizing: aliasing, sampling rate, and sampling depth 13.5.2 ADC Technologies ADCs 1[: Parallel (“flash”) encoder 13.6.1 Modified flash encoders 13.6.2 Driving flash, folding, and RF ADCs 13.6.3 Undersampling flash-converter example ADCs II: Successive approximation 13.7.1 A simple SAR example 13.7.2 Variations on successive approximation 13.7.3 An A/D conversion example ADCs Iff: integrating 13.8.1 Voltage-to-frequency conversion 13.8.2 Single-slope integration 13.8.3 Integrating converters 13.8.4 Dual-slope integration 13.8.5 Analog switches in conversion applications (a detour) 13.8.6 Designs by the masters: Agilent’s world-class “multislope” converters ADCs IV: delta-sigm a 13.9.1 A simple delta-sigm a for our suntan monitor 13.9.2 Demystifying the delta-sigm a converter 13.9.3 AX ADC and DAC 13.9.4 The AS process 13.9.5 An aside: “noise shaping” 13.9.6 The bottom line 13.9.7 A simulation 13.9.8 W hat about DACs?

xvii

841 842 843 844 844 846

13.3

847 848 849 851 851 852 852 854 855 855 856 856 858 858 858 860 864 871 874 875

13.4 13.5

13.6

13.7

13.8

879 879 879 880 880 880 881 881 882 883 884 885 886 888

13.9

888 890 890 891 891 891 893 894 897 899 900 900 902 903 903 904 907 908 909 909 910 912 912 914 914 914 916

918 922 922 923 923 924 927 928 928 930

xviii

Contents

Pros and Cons o f AL oversampling converters 13.9.10 Idle tones 13.9.11 Some delta-sigm a application examples 13.10 ADCs: choices and tradeoffs 13.10.1 Delta-sigm a and the competition 13.10.2 Sampling versus averaging ADCs: noise 13.10.3 Micropower A/D converters 13.11 Some unusual A/D and D/A converters 13.11.1 ADE7753 multifunction ac power metering IC 13.11.2 AD7873 touchscreen digitizer 13.11.3 AD7927 ADC with sequencer 13.11.4 AD7730 precision bridge-measurement subsystem 13.12 Some A/D conversion system examples 13.12.1 Multiplexed 16-channel data-acquisition system 13.12.2 Parallel multichannel successive-approximation data-acquisition system 13.12.3 Parallel multichannel delta-sigm a data-acquisition system 13.13 Phase-locked loops 13.13.1 Introduction to phase-locked loops 13.13.2 PLL components 13.13.3 PLL design 13.13.4 Design example: frequency multiplier 13.13.5 PLL capture and lock 13.13.6 Some PLL applications 13.13.7 Wrapup: noise and jitter rejection in PLLs 13.14 Pseudorandom bit sequences and noise generation 13.14.1 Digital-noise generation 13.14.2 Feedback shift register sequences 13.14.3 Analog noise generation from maximal-length sequences 13.14.4 Power spectrum o f shift-register sequences 13.14.5 Low-pass filtering 13.14.6 W rapup 13.14.7 “True” random noise generators

Art o f Electronics Third Edition

13.9.9

931 932 932 938 938 940 941 942 943 944 945 945 946 946

950

952 955 955 957 960 961 964 966 974 974 974 975 977 977 979 981 982

13.14.8 A “hybrid digital filter” Additional Exercises for Chapter 13 Review of Chapter 13 F O U R T EE N : C o m p u ters, C o ntro llers, and D ata L inks 14.1 Computer architecture: CPU and data bus 14.1.1 CPU 14.1.2 Memory 14.1.3 Mass memory 14.1.4 Graphics, network, parallel, and serial ports 14.1.5 Real-time I/O 14.1.6 Data bus 14.2 A com puter instruction set 14.2.1 Assembly language and machine language 14.2.2 Simplified “x86” instruction set 14.2.3 A programming example 14.3 Bus signals and interfacing 14.3.1 Fundamental bus signals: data, address, strobe 14.3.2 Programmed I/O: data out 14.3.3 Programming the X Y vector display 14.3.4 Programmed I/O: data in 14.3.5 Programmed I/O: status registers 14.3.6 Programmed I/O: command registers 14.3.7 Interrupts 14.3.8 Interrupt handling 14.3.9 Interrupts in general 14.3.10 Direct memory access 14.3.11 Summary of PC 104/IS A 8-bit bus signals 14.3.12 The PC104 as an embedded single-board computer 14.4 Memory types 14.4.1 Volatile and non-volatile memory 14.4.2 Static versus dynamic RAM 14.4.3 Static RAM 14.4.4 Dynamic RAM 14.4.5 Nonvolatile memory 14.4.6 M emory wrapup 14.5 Other buses and data links: overview 14.6 Parallel buses and data links 14.6.1 Parallel chip “bus” interface an example

983 984 985

989 990 990 991 991 992 992 992 993 993 993 996 997 997 998 1000 1001 1002 1004 1005 1006 1008 1010 1012 1013 1014 1014 1015 1016 1018 1021 1026 1027 1028 1028

Art o f Electronics Third Edition Parallel chip data links - two high-speed examples 14.6.3 Other parallel computer buses 14.6.4 Parallel peripheral buses and data links 14.7 Serial buses and data links 14.7.1 SPI 14.7.2 I2C 2-wire interface (“TWI”) 14.7.3 Dallas-Maxim “ 1-wire” serial interface 14.7.4 JTAG 14.7.5 Clock-be-gone: clock recovery 14.7.6 SATA, eSATA, and SAS 14.7.7 PCI Express 14.7.8 Asynchronous serial (RS-232, RS-485) 14.7.9 Manchester coding 14.7.10 Biphase coding 14.7.11 RLL binary: bit stuffing 14.7.12 RLL coding: 8b/10b and others 14.7.13 USB 14.7.14 FireWire 14.7.15 Controller Area Network (CAN) 14.7.16 Ethernet 14.8 Number formats 14.8.1 Integers 14.8.2 Floating-point numbers Review of Chapter 14

Contents

14.6.2

FIFTEEN: Microcontrollers 15.1 Introduction 15.2 Design example 1: suntan monitor (V) 15.2.1 Implementation with a microcontroller 15.2.2 Microcontroller code (“firmware”) 15.3 Overview of popular microcontroller fam­ ilies 15.3.1 On-chip peripherals 15.4 Design example 2: ac power control 15.4.1 Microcontroller implementation 15.4.2 Microcontroller code 15.5 Design example 3: frequency synthesizer 15.5.1 Microcontroller code 15.6 Design example 4: thermal controller 15.6.1 The hardware 15.6.2 The control loop 15.6.3 Microcontroller code

1030 1030 1031 1032 1032 1034 1035 1036 1037 1037 1037 1038 1039 1041 1041 1041 1042 1042 1043 1045 1046 1046 1047 1049 1053 1053 1054 1054 1056 1059 1061 1062 1062 1064 1065 1067 1069 1070 1074 1075

15.7 Design example 5: stabilized mechanical platform 15.8 Peripheral ICs for microcontrollers 15.8.1 Peripherals with direct connection 15.8.2 Peripherals with SPI connection 15.8.3 Peripherals with I2C connection 15.8.4 Some important hardware constraints 15.9 Development environment 15.9.1 Software 15.9.2 Real-time programming constraints 15.9.3 Hardware 15.9.4 The Arduino Project 15.10 Wrapup 15.10.1 How expensive are the tools? 15.10.2 When to use microcontrollers 15.10.3 How to select a microcontroller 15.10.4 A parting shot Review o f Chapter 15 APPENDIX A: Math Review A. 1 Trigonometry, exponentials, and loga­ rithms A.2 Complex numbers A.3 Differentiation (Calculus) A .3.1 Derivatives o f some common functions A.3.2 Some rules for combining derivatives A.3.3 Some examples of differentiation

xix

1077 1078 1079 1082 1084 1086 1086 1086 1088 1089 1092 1092 1092 1093 1094 1094 1095 1097 1097 1097 1099 1099 1100 1100

APPENDIX B: How to Draw Schematic Dia­ grams B.l General principles B.2 Rules B.3 Hints B.4 A humble example

1101 1101 1101 1103 1103

APPENDIX C: Resistor Types C.l Some history C.2 Available resistance values C.3 Resistance marking C.4 Resistor types C.5 Confusion derby

1104 1104 1104 1105 1105 1105

APPENDIX D: Thevenin’s Theorem D.l The proof

1107 1107

xx

Art o f Electronics Third Edition

Contents

D.2 D.3 D.4

Two examples - voltage dividers Norton’s theorem Another example M illman’s theorem

1.3

D. 1.1

A PPEN D IX E: LC B utterw o rth F ilters E. 1 Lowpass filter E.2 Highpass filter E.3 Filter examples A PPEN D IX F: L oad Lines F. 1 An example F.2 Three-terminal devices F.3 Nonlinear devices A PPEN D IX G : T he C urv e T ra c e r A PPEN D IX H : T ransm ission L ines and Im pedance M atching H. 1 Some properties of transmission lines H. 1.1 Characteristic impedance H.1.2 Termination: pulses H.1.3 Termination: sinusoidal signals H. 1.4 Loss in transmission lines H.2 Impedance matching H .2.1 Resistive (lossy) broadband matching network H.2.2 Resistive attenuator H.2.3 Transformer (lossless) broadband matching network H.2.4 Reactive (lossless) narrowband matching networks H.3 Lumped-element delay lines and pulseforming networks H.4 Epilogue: ladder derivation of characteris­ tic impedance H .4.1 First method: terminated line H.4.2 Second method: semi-infinite line H.4.3 Postscript: lum ped-element delay lines A PPEN D IX I: Television: A C o m p act T utorial I.1 Television: video plus audio I.1.1 The audio 1.1.2 The video 1.2 Combining and sending the audio + video: modulation

1107 1108 1108 1108 1 1 Q9

j [Q9 j [Q9 [jo g n11

1115

1116 1116 1116 1117 1120 1121 1122 1123 1123

Recording analog-format broadcast or ca1135 ble television 1136 1.4 Digital television: what is it? 1-5 Digital television: broadcast and cable de1138 livery 1.6 Direct satellite television 1139 1.7 Digital video streaming over internet 1140 1.8 Digital cable: premium services and con1141 ditional access 1141 1.8.1 Digital cable: video-on-demand 1.8.2 Digital cable: switched 1142 broadcast 1142 1.9 Recording digital television 1142 1.10 Display technology 1143 1.11 Video connections: analog and digital A PPEN D IX J : S P IC E P rim e r Setting up ICAP SPICE J.l Entering a Diagram J.2 Running a simulation J.3 J.3 .1 Schematic entry J.3.2 Simulation: frequency sweep J.3.3 Simulation: input and output waveforms J.4 Some final points A detailed example: exploring amplifier J.5 distortion Expanding the parts database J.6

1146 1146 1146 1146 1146 1147 1147 1148 1148 1149

A PPEN D IX K: “W h ere Do I Go to Buy Elec­ tro n ic G oodies?”

1150

A PPEN D IX L : W orkbench In stru m e n ts an d Tools

1152

1126

A PPEN D IX books

1153

1127 1127

A PPEN D IX N: F u rth e r R eading a n d R efer­ ences

1154

1127

A PPEN D IX O : T he O scilloscope O.l The analog oscilloscope O .l.l Vertical 0 . 1.2 Horizontal 0 .1 .3 Triggering 0 . 1.4 Hints for beginners 0 . 1.5 Probes 0 . 1.6 Grounds 0 . 1.7 Other analog scope features 0 .2 The digital oscilloscope

1158 1158 1158 1158 1159 1160 1160 1161 1161 1162

1124 1125

1128 1131 1131 1131 1132 1133

M : C atalogs, M agazines, D ata-

Art o f Electronics Third Edition 0.2.1 0.2 .2

W hat’s different? Some cautions

1162 1164

Contents

xxi

A PPEN D IX P: A cronym s an d A bbreviations

1166

Index

1171

LIST OF TABLES

1.1. Representative Diodes. 2.1. Representative Bipolar Transistors. 2.2. Bipolar Power Transistors. 3.1. JFET Mini-table. 3.2. Selected Fast JFET-input Op-amps. 3.3. Analog Switches. 3.4a. MOSFETs - Small n-channel (to 250 V), and p-channel (to 100 V). 3.4b. «-channel Power MOSFETs, 55 V to 4500 V. 3.5. M OSFET Switch Candidates. 3.6. Depletion-mode n-channel MOSFETs. 3.7. Junction Field-Effect Transistors (JFETs). 3.8. Low-side M OSFET Gate Drivers. 4.1. Op-amp Parameters. 4.2a. Representative Operational Amplifiers. 4.2b. Monolithic Power and High-voltage Op-amps. 5.1. Millivoltmeter Candidate Op-amps. 5.2. Representative Precision Op-amps. 5.3. Eight Low-input-current Op-amps. 5.4. Representative High-speed Op-amps. 5.5. “Seven” Precision Op-amps: High Voltage. 5.6. Chopper and Auto-zero Op-amps. 5.7. Selected Difference Amplifiers. 5.8. Selected Instrumentation Amplifiers 5.9. Selected Programmable-gain Instrumentation Amplifiers. 5.10. Selected Differential Amplifiers. 6.1. Time-domain Performance Comparison for Lowpass Filters. 6.2. VCVS Lowpass Filters. 7.1. 555-type Oscillators. 7.2. Oscillator Types. 7.3. Monostable Multivibrators. 7.4. “Type 123” Monostable Timing. 8.1a. Low-noise Bipolar Transistors (BJTs). 8.1b. Dual Low-noise BJTs. 8.2. Low-noise Junction FETs (JFETs). 8.3a. Low-noise BJT-input Op-amps. 8.3b. Low-noise FET-input Op-amps. 8.3c. High-speed Low-noise Op-amps.

Noise Integrals. Auto-zero Noise M easurements. 7800-style Fixed Regulators. Three-terminal Adjustable Voltage Regulators (LM317-style). 9.3. Low-dropout Linear Voltage Regulators. 9.4. Selected Charge-pump Converters. 188 9.5a. Voltage-mode Integrated Switching Regulators. 189 206 9.5b. Selected Current-mode Integrated Switching Regulators. 210 217 9.6. External-switch Controllers. 218 9.7. Shunt (2-terminal) Voltage References. 245 9.8. Series (3-terminal) Voltage References. 9.9. Battery Choices. 271 9.10. Energy Storage: Capacitor Versus Battery. 10.1. Selected Logic Families. 272 10.2. 4-bit Signed Integers in Three Systems o f 296 Representation. 302 10.3. Standard Logic Gates. 303 10.4. Logic Identities. 310 10.5. Selected Counter ICs. 320 10.6. Selected Reset/Supervisors. 335 12.1. Representative Comparators. 353 12.2. Comparators. 363 12.3. Power Logic Registers. 12.4. A Few Protected MOSFETs. 370 12.5. Selected High-side Switches. 375 12.6. Selected Panel-mount LEDs. 13.1. Six Digital-to-analog Converters. 406 13.2. Selected Digital-to-analog Converters. 408 13.3. Multiplying DACs. 430 13.4. Selected Fast ADCs. 452 13.5. Successive-approximation ADCs. 462 13.6. Selected M icropower ADCs. 463 13.7. 4053-style SPDT Switches. 501 13.8. Agilent’s M ultislope III ADCs. 502 13.9. Selected D elta-sigm a ADCs. 516 13.10. Audio D elta-sigm a ADCs. 522 13.11. Audio ADCs. 523 524 13.12. Speciality ADCs. 32 74 106 141 155 176

8.4. 8.5. 9.1. 9.2.

xxii

564 569 602 605 614 640 653 654 658 677 678 689 690 706 707 716 722 742 756 812 813 819 825 826 832 889 893 894 905 910 916 917 921 935 937 939 942

Art o f Electronics Third Edition 13.13. Phase-locked Loop ICs. 13.14. Single-tap LFSRs. 13.15. LFSRs with Length a Multiple of 8. 14.1. Simplified x86 Instruction Set. 14.2. PC 104/ISA Bus Signals.

List of Tables 972 976 976 994 1013

14.3. Common Buses and Data Links. 14.4. RS-232 Signals. 14.5. ASCII Codes. C. 1. Selected Resistor Types. E. 1. Butterworth Lowpass Filters. H. 1. Pi and T Attenuators.

xxiii 1029 1039 1040 1106 1110 1124

PREFACE TO THE FIRST EDITION =il

This volume is intended as an electronic circuit design text­ book and reference book; it begins at a level suitable for those with no previous exposure to electronics and carries the reader through to a reasonable degree of proficiency in electronic circuit design. We have used a straightforward approach to the essential ideas of circuit design, coupled with an in-depth selection of topics. We have attempted to combine the pragmatic approach of the practicing physicist with the quantitative approach of the engineer, who wants a thoroughly evaluated circuit design. This book evolved from a set of notes written to ac­ company a one-semester course in laboratory electronics at Harvard. That course has a varied enrollment - under­ graduates picking up skills for their eventual work in sci­ ence or industry, graduate students with a field of research clearly in mind, and advanced graduate students and post­ doctoral researchers who suddenly find themselves ham­ pered by their inability to “do electronics.” It soon becam e clear that existing textbooks were inade­ quate for such a course. Although there are excellent treat­ ments o f each electronics specialty, written for the planned sequence o f a four-year engineering curriculum or for the practicing engineer, those books that attempt to address the whole field o f electronics seem to suffer from excessive detail (the handbook syndrome), from oversimplification (the cookbook syndrome), or from poor balance of mate­ rial. Much o f the favorite pedagogy of beginning textbooks is quite unnecessary and, in fact, is not used by practicing engineers, while useful circuitry and methods of analysis in daily use by circuit designers lie hidden in application notes, engineering journals, and hard-to-get data books. In other words, there is a tendency among textbook writers to represent the theory, rather than the art, of electronics. We collaborated in writing this book with the specific intention of combining the discipline of a circuit design engineer with the perspective of a practicing experimen­ tal physicist and teacher of electronics. Thus, the treat­ ment in this book reflects our philosophy that electronics, as currently practiced, is basically a simple art, a combi­ nation o f som e basic laws, rules of thumb, and a large bag of tricks. For these reasons we have omitted entirely the

usual discussions o f solid-state physics, the /i-parameter model o f transistors, and complicated network theory, and reduced to a bare minimum the mention o f load lines and the i-plane. The treatment is largely nonmathematical, with strong encouragement of circuit brainstorming and men­ tal (or, at most, back-of-the-envelope) calculation o f circuit values and performance. In addition to the subjects usually treated in electronics books, we have included the following:

• an easy-to-use transistor model; • extensive discussion o f useful subcircuits, such as current sources and current mirrors; • single-supply op-amp design; • easy-to-understand discussions o f topics on which prac­ tical design information is often difficult to find: opamp frequency compensation, low-noise circuits, phaselocked loops, and precision linear design; • simplified design of active filters, with tables and graphs; • a section on noise, shielding, and grounding; • a unique graphical method for streamlined low-noise am­ plifier analysis; • a chapter on voltage references and regulators, including constant current supplies; • a discussion o f monostable multivibrators and their id­ iosyncrasies; • a collection o f digital logic pathology, and what to do about it; • an extensive discussion o f interfacing to logic, with em ­ phasis on the new NMOS and PMOS LSI; • a detailed discussion of A/D and D/A conversion tech­ niques; • a section on digital noise generation; • a discussion of minicomputers and interfacing to data buses, with an introduction to assembly language; • a chapter on microprocessors, with actual design exam­ ples and discussion - how to design them into instru­ ments, and how to make them do what you want; • a chapter on construction techniques: prototyping, printed circuit boards, instrument design;

xxvi

Preface to the First Edition

• a sim plified w ay to evaluate high-speed sw itching cir­ cuits; • a chapter on scientific m easurem ent and data processing: w hat you can m easure and how accurately, and w hat to do with the data; • bandw idth narrow ing m ethods m ade clear: signal averag­ ing, m ultichannel scaling, lock-in am plifiers, and pulseheight analysis; • am using collections o f “bad circuits,” and collections o f “circuit ideas” ; • useful appendixes on how to draw schem atic diagram s, IC generic types, LC filter design, resistor values, oscil­ loscopes, m athem atics review, and others; • tables of diodes, transistors, FETs, op-am ps, com para­ tors, regulators, voltage references, m icroprocessors, and other devices, generally listing the characteristics o f both the m ost popular and the best types. T hroughout w e have adopted a philosophy o f nam ing nam es, often com paring the characteristics o f com peting devices for use in any circuit, and the advantages o f alterna­ tive circuit configurations. E xam ple circuits are draw n w ith real device types, not black boxes. T he overall intent is to bring the reader to the point o f understanding clearly the choices one m akes in designing a circuit - how to choose circuit configurations, device types, and parts values. The use o f largely nonm athem atical circuit design techniques does not result in circuits that cut co m ers or com prom ise perform ance or reliability. O n the contrary, such techniques enhance o ne’s understanding o f the real choices and co m ­ prom ises faced in engineering a circuit and represent the best approach to good circuit design.

A rt o f E lectronics T hird E dition This book can be used for a full-year electronic circuit design course at the college level, w ith only a m inim um m athem atical prerequisite; nam ely, som e acquaintance w ith trigonom etric and exponential functions, and prefer­ ably a bit o f differential calculus. (A short review o f co m ­ plex num bers and derivatives is included as an appendix.) If the less essential sections are om itted, it can serve as the text for a o n e-sem ester course (as it does at H arvard). A separately available laboratory m anual, L aboratory M anual fo r the A rt o f E lectronics (H orow itz and R obinson, 1981), contains tw enty-three lab exercises, together w ith reading and problem assignm ents keyed to the text. To assist the reader in navigation, we have designated w ith open boxes in the m argin those sections w ithin each chapter that we feel can be safely passed over in an abbre­ viated reading. For a o ne-sem ester course it w ould proba­ bly be w ise to om it, in addition, the m aterials o f C hapter 5 (first half), 7, 12, 13, 14, and possibly 15, as explained in the introductory paragraphs o f those chapters. We w ould like to thank o u r colleagues fo r th eir th o u g h t­ ful com m ents and assistance in the preparation o f the m anuscript, p articularly M ike A ronson, H ow ard Berg, D ennis C rouse, C arol D avis, D avid G riesinger, John H a­ gen, Tom H ayes, P eter H orow itz, B ob K line, C ostas Papaliolios, Jay Sage, and Bill V etterling. We are indebted to Eric H ieber and Jim M obley, and to R hona Johnson and Ken W erner o f C am bridge U niversity Press, for th eir im ag ­ inative and highly professional w ork. Paul H orow itz W infield H ill A p ril 1980

PREFACE TO THE SECOND EDITION

E lectronics, perhaps more than any other field o f technol­ ogy, has enjoyed an explosive developm ent in the last four decades. Thus it w as with som e trepidation that we at­ tem pted, in 1980, to bring out a definitive volum e teach­ ing the art of the subject. By “art” we m eant the kind o f m astery that com es from an intim ate fam iliarity with real circuits, actual devices, and the like, rather than the m ore abstract approach often favored in textbooks on electro n ­ ics. O f course, in a rapidly evolving field, such a nuts-andbolts approach has its hazards - most notably a frighten­ ingly quick obsolescence. The pace o f electronics technology did not disappoint us! H ardly was the ink dry on the first edition before we felt foolish reading our words about “the classic [2Kbyte] 2716 E P R O M ...w ith a price tag o f about $25.” T h ey ’re so classic you can ’t even get them anym ore, having been replaced by EPRO M s 64 tim es as large, and costing less than h a lf the price! Thus a m ajor elem ent o f this revision responds to im proved devices and methods - com pletely rew ritten chapters on m icrocom puters and m icroprocessors (using the IBM PC and the 68008) and substantially re­ vised chapters on digital electronics (including PLD s, and the new H C and AC logic fam ilies), on op-am ps and pre­ cision design (reflecting the availability o f excellent FETinput op-am ps), and on construction techniques (including C A D /C A M ). Every table has been revised, som e substan­ tially; for exam ple, in Table 4.1 (operational am plifiers) only 65% o f the original 120 entries survived, w ith 135 new op-am ps added. We have used this opportunity to respond to read ers’ suggestions and to our own experiences using and teach­ ing from the first edition. T hus we have rew ritten the chap­ ter on FE Ts (it was too com plicated) and repositioned it before the chapter on op-am ps (which are increasingly o f FE T construction). We have added a new chapter on lowpow er and m icropow er design (both analog and digital), a field both im portant and neglected. M ost o f the rem ain­ ing chapters have been extensively revised. We have added many new tables, including A/D and D/A converters, d ig i­ tal logic com ponents, and low-power devices, and through­ out the book we have expanded the num ber o f figures. The

book now contains 78 tables (available separately as The H orow itz a n d H ill C om ponent Selection Tables) and over 1000 figures. T hroughout the revision we have strived to retain the feeling o f inform ality and easy access that m ade the first edition so successful and popular, both as reference and text. We are aw are o f the difficulty students often experi­ ence w hen approaching electronics for the first tim e; the field is densely interw oven, and there is no path o f learning that takes you, by logical steps, from neophyte to broadly com petent designer. Thus we have added extensive crossreferencing throughout the text; in addition, we have ex­ panded the separate L aboratory M anual into a Student M anual (S tudent M anual fo r The A rt o f E lectronics, by T hom as C. H ayes and Paul H orow itz), com plete w ith addi­ tional w orked exam ples o f circuit designs, explanatory m a­ terial, reading assignm ents, laboratory exercises, and solu­ tions to selected problem s. By offering a student supple­ m ent, we have been able to keep this volum e concise and rich w ith detail, as requested by o u r m any readers w ho use the volum e prim arily as a reference work. We hope this new edition responds to all our read ers’ needs - both students and practicing engineers. W e w el­ com e suggestions and corrections, w hich should be ad­ dressed directly to Paul H orow itz, Physics D epartm ent, H arvard University, C am bridge, M A 02138. In preparing this new edition, we are appreciative o f the help we received from M ike A ronson and Brian M atthew s (AOX, Inc.), John G reene (U niversity o f Cape Town), Jerem y Avigad and Tom H ayes (H arvard U niversity), P e­ ter H orow itz (EVI, Inc.), Don Stem , and O w en Walker. We thank Jim M obley for his excellent copyediting, Sophia Prybylski and David Tranah o f C am bridge U niversity Press for their encouragem ent and professional dedication, and the never-sleeping typesetters at R osenlaui P ublishing Ser­ vices, Inc. for their m asterful com position in Ig X . Finally, in the spirit o f m odern jurisprudence, w e rem ind you to read the legal notice here appended.

xxvii

Paul H orow itz W infield H ill M arch 1989

xxviii

Preface to the Second Edition

Legal notice In this book we have attempted to teach the techniques o f electronic design, using circuit exam ples and data that w e believe to be accurate. However, the exam ­ ples, data, and other information are intended solely as teaching aids and should not be used in any particu­ lar application without independent testing and verifi­ cation by the person making the application. Indepen­ dent testing and verification are especially im portant in any application in which incorrect functioning could re­ sult in personal injury or damage to property. For these reasons, we make no warranties, express or implied, that the examples, data, or other infor­

A rt o f Electronics Third Edition mation in this volume are free o f error, that they are consistent with industry standards, or that they will meet the requirements for any particular application. THE AUTHORS AND PUBLISHER EXPRESSLY DISCLAIM THE IM PLIED WARRANTIES OF M ER­ CHANTABILITY AND OF FITNESS FOR ANY PAR­ TICULAR PURPOSE, even if the authors have been advised of a particular purpose, and even if a particu­ lar purpose is indicated in the book. The authors and publisher also disclaim all liability for direct, indirect, incidental, or consequential damages that result from any use o f the examples, data, or other information in this book.

PREFACE TO THE THIRD EDITION

M oore’s Law continues to assert itself, unabated, since the publication of the second edition a quarter century ago. In this new third (and final!) edition we have responded to this upheaval with major enhancements: • an emphasis on devices and circuits for AID and D/A conversion (Chapter 13), because embedded microcon­ trollers are everywhere • illustration of specialized peripheral ICs for use with mi­ crocontrollers (Chapter 15) • detailed discussions o f logic family choices, and of in­ terfacing logic signals to the real world (Chapters 10 and 12)

• greatly expanded treatment of important topics in the es­ sential analog portion of instrument design: - precision circuit design (Chapter 5) - low-noise design (Chapter 8) - power switching (Chapters 3, 9, and 12) - power conversion (Chapter 9) And we have added many entirely new topics, including: • • • • • • • • • • • • • • • • •

digital audio and video (including cable and satellite TV) transmission lines circuit simulation with SPICE transimpedance amplifiers dcpletion-mode MOSFETs protected MOSFETs high-side drivers quartz crystal properties and oscillators a full exploration of JFETs high-voltage regulators optoelectronics power logic registers delta-sigm a converters precision multislope conversion memory technologies serial buses illustrative “Designs by the Masters”

In this new edition we have responded, also, to the re­ ality that previous editions have been enthusiastically em ­ braced by the community o f practicing circuit designers, even though The Art o f Electronics (now 35 years in print) originated as a course textbook. So we’ve continued the “how we do it” approach to circuit design; and w e’ve ex­ panded the depth o f treatment, while (we hope) retaining

the easy access and explanation o f basics. At the same time we have split off some of the specifically course-related teaching and lab material into a separate Learning the Art o f Electronics volume, a substantial expansion of the pre­ vious edition’s companion Student Manual fo r The Art o f Electronics.' Digital oscilloscopes have made it easy to capture, an­ notate, and combine measured waveforms, a capability we have exploited by including some 90 ’scope screenshots illustrating the behavior of working circuits. Along with those doses o f reality, we have included (in tables and graphs) substantial quantities o f highly useful measured data - such as transistor noise and gain characteristics (e„, rbbTgX source files w ith corrections from m ultiple personalities, then entering a few thousand index entries, and m aking it all w ork w ith its 1,500+ linked figures and tables. A nd then putting up w ith a cou p le o f fussy authors. We are totally indebted to D avid. We ow e him a pint o f ale. We are grateful to Jim M acarthur, circu it desig n er extraordinaire, for his careful reading o f chapter drafts, and invariably helpful suggestions fo r im provem ent; we adopted every one. O ur colleague P eter Lu taught us the delights o f A dobe Illustrator, and appeared at a m o m en t’s notice when we w ent off the rails; the b o o k ’s figures are testam ent to the quality o f his tutoring. A nd our alw aysentertaining colleague Jason G allicchio generously con­ tributed his m aster M athem atica talents to reveal g raphi­ cally the properties o f d e lta -sig m a conversion, nonlinear control, filter functions; he left his m ark, also, in the m i­ crocontroller chapter, contributing both w isdom and code. For their m any helpful contributions w e thank Bob A dam s, M ike B urns, Steve C erw in, Jesse C olm an, M ichael C ovington, D oug D oskocil, Jon H agen, Tom H ayes, Phil H obbs, P eter H orow itz, G eorge K ontopidis, M ag­ gie M cFee, Ali M ehm ed, A ngel Peterchev, Jim Phillips, M arco S artore, A ndrew Speck, Jim T hom pson, Jim van Zee, G uY eon W ei, John W illison, Jonathan W olff, John W oodgate, and W oody Yang. We thank also o thers w hom (w e’re sure) w e’ve here overlooked, w ith apologies for the om ission. A dditional contributors to the b o o k ’s content (circuits, inspired w eb-based tools, unusual m easurem ents, etc., from the likes o f U w e Beis, Tom B ruhns, and John L arkin) are referenced th roughout the book in the relevant text.

Sim on C apelin has kept us out o f the d o ldrum s with his unflagging encouragem ent and his apparent inability to scold us for m issed deadlines (our contract called for d e ­ livery o f the finished m anuscript in D e cem b er... o f 1994! W e’re only 20 years late). In the production chain w e are indebted to o u r project m anager Peggy Rote, o ur copy ed ­ itor Vicki Danahy, and a cast o f unnam ed graphic artists w ho converted our pencil circuit sketches into beautiful vector graphics. We rem em ber fondly o u r late colleague and friend Jim W illiam s fo r w onderful insider stories o f circuit failures and circuit conquests, and for his take-no-prisoners ap ­ proach to precision circuit design. H is no-bullshit attitude is a m odel fo r us all. A nd finally, we are forever indebted to o ur loving, sup­ portive, and ever-tolerant spouses Vida and Ava, w ho suf­ fered through decades o f abandonm ent as w e obsessed over every detail o f o u r second encore.

A note on the tools. Tables w ere assem bled in M i­ crosoft E xcel, and graphical data w as plotted w ith Igor Pro; both w ere then beautified w ith A dobe Illustrator, w ith text and annotations in the san s-serif H elvetica N eue LT typeface. O scilloscope screenshots are from o u r trusty Tek­ tronix T D S 3044 and 3054 “ lunchboxes,” taken to finish­ ing school in Illustrator, by w ay o f P hotoshop. T he p h o ­ tographs in the book w ere taken prim arily w ith tw o cam ­ eras: a C alum et H orsem an 6 x 9 cm view cam era w ith a 105 m m S chneider S ym m ar / / 5 . 6 lens and K odak PlusX 120 roll film (developed in M icrodol-X 1:3 at 75°F and digitized w ith a M am iya m ultiform at scanner), and a C anon 5D with a Scheim pflug3-enabling 90 m m tilt-shift lens. The authors com posed the m anuscript in I4Tj;X, us­ ing the P C T g X softw are from Personal TeX, Incorporated. The text is set in the T im es N ew R om an and H elvetica typefaces, the form er dating from 1 9 3 1,4 the latter de­ signed in 1957 by M ax M iedinger. Paul H orow itz W infield H ill January 2015 C am bridge, M assachusetts *

*

*

*

*

3 W hat’s that? G oogle it! 4 D eveloped in response to a criticism o f the antiquated typeface in The Times (London).

A rt o f E lectronics Third Edition

Legal Notice Addendum In addition to the Legal Notice appended to the Pref­ ace to the Second Edition, we also make no represen­ tation regarding w hether use o f the exam ples, data, or other inform ation in this volum e m ight infringe oth ers’ intellectual property rights, including US and foreign patents. It is the reader’s sole responsibility to ensure that he or she is not infringing any intellectual property rights, even for use which is considered to be ex p eri­

Preface to the Third Edition

xxxi

m ental in nature. By using any o f the exam ples, data, or other inform ation in this volum e, the reader has agreed to assum e all liability for any dam ages arising from or relating to such use, regardless o f w hether such liab il­ ity is based on intellectual property or any other cause o f action, and regardless o f w hether the dam ages are direct, indirect, incidental, consequential, or any other type o f dam age. T he authors and publisher disclaim any such liability.

FOUNDATIONS CHAPTER

1

1.1 Introduction electronic circuits. B ecause you c a n ’t touch, see, sm ell, or hear electricity, there will be a certain am ount o f abstrac­ tion (particularly in the first chapter), as well as some d e­ pendence on such visualizing instrum ents as oscilloscopes and voltm eters. In many w ays the first chapter is also the m ost m athem atical, in spite o f our efforts to keep m ath­ em atics to a m inim um in order to foster a good intuitive understanding o f circuit design and behavior. In this new edition w e’ve included som e intuition-aiding approxim ations that our students have found helpful. And, by introducing one or tw o “active” com ponents ahead of their tim e, w e’re able to jum p directly into som e applica­ tions that are usually im possible in a traditional textbook “passive electronics” chapter; this will keep things inter­ esting, and even exciting. O nce w e have considered the foundations o f electron­ ics, w e w ill quickly get into the active circuits (am plifiers, oscillators, logic circuits, etc.) that m ake electronics the ex­ citing field it is. The reader w ith som e background in elec­ tronics may w ish to skip over this chapter, since it assum es no prior know ledge o f electronics. Further generalizations at this tim e w ould be pointless, so le t’s ju s t dive right in.

The field of electronics is one o f the great success stories o f the 20th century. From the crude spark-gap transm itters and “c a t’s-w hisker” detectors at its beginning, the first halfcentury brought an era o f vacuum -tube electronics that d e­ veloped considerable sophistication and found ready ap ­ plication in areas such as com m unications, navigation, in ­ strum entation, control, and com putation. The latter halfcentury brought “solid-state” electronics - first as discrete transistors, then as magnificent arrays o f them w ithin “in ­ tegrated circuits” (ICs) - in a flood o f stunning advances that show s no sign of abating. Com pact and inexpensive consum er products now routinely contain many m illions o f transistors in V LSI (very large-scale integration) chips, com bined with elegant optoelectronics (displays, lasers, and so on); they can process sounds, im ages, and data, and (for exam ple) perm it w ireless networking and shirt-pocket access to the pooled capabilities of the Internet. Perhaps as notew orthy is the pleasant trend tow ard increased perfor­ m ance per dollar.' The cost o f an electronic m icrocircuit routinely decreases to a fraction of its initial cost as the m anufacturing process is perfected (see Figure 10.87 for an exam ple). In fact, it is often the case that the panel co n ­ trols and cabinet hardw are o f an instrum ent cost m ore than the electronics inside. On reading of these exciting new developm ents in elec­ tronics, you may get the im pression that you should be able to construct pow erful, elegant, yet inexpensive, little g ad ­ gets to do alm ost any conceivable task - all you need to know is how all these miracle devices w ork. If y o u ’ve had that feeling, this book is for you. In it we have attem pted to convey the excitem ent and know-how o f the subject o f electronics. In this chapter we begin the study o f the laws, rules o f thum b, and tricks that constitute the art o f electronics as we see it. It is necessary to begin at the beginning - with talk o f voltage, current, power, and the com ponents that make up

1.2 Voltage, current, and resistance 1.2.1 Voltage and current T here are tw o quantities that we like to keep track o f in electronic circuits; voltage and current. These are usually changing w ith tim e; otherw ise nothing interesting is hap­ pening. Voltage (sym bol V or som etim es E ). Officially, the volt­ age betw een tw o points is the cost in energy (w ork done) required to move a unit o f positive charge from the m ore negative point (low er potential) to the m ore positive point (higher potential). Equivalently, it is the energy released w hen a unit charge m oves “dow nhill” from the higher potential to the lower.2 Voltage is also called

1 A m id-century com puter (the IBM 650) cost $300,000, weighed 2.7

2 These are the definitions, but hardly the way circuit designers think of

tons, and contained 126 lamps on its control panel; in an amusing re­

voltage. W ith time, you'll develop a good intuitive sense o f w hat volt­

versal, a contem porary energy-efficient lamp contains a com puter of

age really is, in an electronic circuit. R oughly (very roughly) speaking,

greater capability w ithin its base, and costs about $10.

voltages are w hat you apply to cause currents to flow.

I

2

1.2. Voltage, current, and resistance

A rt o f E lectronics T hird Edition

po ten tia l difference o r electrom otive fo r c e (E M F). The unit o f m easure is the volt, w ith voltages usually ex ­ pressed in volts (V), kilovolts (1 k V = 103 V ), m illivolts ( l m V = 1 0 _ 3 V), or m icrovolts ( l p V = 1 0 - 6 V ) (see the box on prefixes). A jo u le (J) o f w ork is d one in m ov­ ing a coulom b (C ) o f charge through a potential differ­ ence o f I V. (T he coulom b is the unit o f electric charge, and it equals the charge o f approxim ately 6 x 1018 e le c ­ trons.) For reasons that w ill becom e clear later, the o p ­ portunities to talk about nanovolts (1 n V = 10-9 V) and m egavolts (1 M V = I06 V ) are rare. C u r r e n t (sym bol /). C urrent is the rate o f flow o f elec­ tric charge past a point. T he unit o f m easure is the am pere, o r am p, w ith currents usually expressed in am peres (A), m illiam peres (1 m A = 10-3 A ), m icro am ­ peres (1 ju A = 10- 6 A), nanoam peres ( l n A = 1 0 _ 9 A), or occasionally picoam peres (1 p A = 10-12 A). A cur­ rent o f 1 am p equals a flow o f 1 coulom b o f charge per second. By convention, current in a circu it is considered to flow from a m ore positive point to a m ore negative point, even though the actual electro n flow is in the o p ­ posite direction.

In real circuits we connect things to g eth er w ith w ires (m etallic conductors), each o f w hich has the sam e voltage on it everyw here (w ith respect to ground, say).4 W e m en­ tion this now so that you w ill realize that an actual circuit do esn ’t have to look like its schem atic diagram , because w ires can be rearranged. H ere are som e sim ple rules about voltage and current:

Im portant: from these definitions you can see that cur­ rents flow through things, and voltages are applied (o r ap­ pear) across things. So y o u ’ve got to say it right: alw ays re­ fer to the voltage betw een tw o points or across tw o points in a circuit. A lw ays refer to current through a device or connection in a circuit. To say som ething like “the voltage through a resistor . . . ” is nonsense. However, we do frequently speak o f the voltage at a p o in t in a circuit. T his is alw ays understood to m ean the voltage betw een that point and “ground,” a co m ­ mon point in the circuit that everyone seem s to know about. Soon you w ill, too. We generate voltages by doing w ork on charges in devices such as batteries (conversion o f electrochem ical energy), generators (conversion o f m echanical energy by m agnetic forces), solar cells (photovoltaic conversion o f the energy o f photons), etc. W e get currents by placing volt­ ages across things. A t this point you m ay well w onder how to “see” volt­ ages and currents. The single m ost useful electronic in stru­ m ent is the oscilloscope, w hich allow s you to look at volt­ ages (or occasionally currents) in a circuit as a function o f tim e 3 We w ill deal w ith oscilloscopes, and also volt­ m eters, w hen we discuss signals shortly; for a preview see A ppendix O , and the m ultim eter box later in this chapter.

2. T hings hooked in parallel (Figure l . I ) have the sam e voltage across them . R estated, the sum o f the “voltage drops” from A to B via one path through a circuit equals the sum by any o ther route, and is sim ply the voltage betw een A and B. A nother w ay to say it is th at the sum o f the voltage d rops around any clo sed circuit is zero. T his is K irch h o ff’s voltage law (K V L). 3. T he pow er (energy p er unit tim e) consum ed by a circuit device is

3 It has been said that engineers in other disciplines are envious o f e lec­ trical engineers, because w e have such a splendid visualization tool.

I. T he sum o f the currents into a point in a circuit equals the sum o f the currents out (conservation o f charge). T his is som etim es called K irch h o ff’s current law (K C L). E ngineers like to refer to such a point as a node. It fo l­ lows that, for a series circuit (a bunch o f tw o-term inal things all connected end-to-end), the current is the sam e everyw here.

Figure 1.1. Parallel connection.

P = V1

(I.I)

T his is sim ply (energy/charge) x (charge/tim e). F or V in volts and I in am ps, P com es out in w atts. A w att is a jo u le p er second ( IW = I J/s). So, for exam ple, the cu r­ rent flowing through a 60W lightbulb running on 120 V is 0.5 A. Pow er goes into heat (usually), o r som etim es m echan­ ical w ork (m otors), radiated energy (lam ps, transm itters), o r stored energy (batteries, capacitors, inductors). M anag­ ing the heat load in a com plicated system (e.g., a large com puter, in w hich m any kilow atts o f electrical energy are converted to heat, w ith the energetically insignificant b y ­ product o f a few pages o f com putational results) can be a crucial part o f the system design. 4 In the dom ain o f high frequencies or low im pedances, that isn’t strictly true, and w e w ill have m ore to say about this later, and in C hapter F or now, it’s a good approxim ation.

lx.

A rt o f E lectronics Third Edition

1.2.2. Relationship between voltage and current: resistors

3

Figure 1.2. A selection of common resistor types. Top row, left to right (wirewound ceramic power resistors): 20W vitreous enamel with leads, 20W with mounting studs, 30W vitreous enamel, 5W and 20W with mounting studs. Middle row (wirewound power resistors): 1W, 3W, and 5W axial ceramic; 5W, 10W, 25W, and 50W conduction-cooled (“Dale-type”). Bottom row: 2W, 1W, ±W, |W , and j w carbon composition; surlace-mount thick-film (2010, 1206, 0805, 0603, and 0402 sizes); surface-mount resistor array; 6-, 8-, and 10-pin single in-line package arrays; dual in-line package array. The resistor at bottom is the ubiquitous RN55D |W , 1% metal-film type; and the pair of resistors above are Victoreen high-resistance types (glass, 2GQ; ceramic, 5GQ).

Soon, when w e deal with periodically varying voltages and currents, we will have to generalize the sim ple equa­ tion P = V I to deal with average power, but it’s correct as a statem ent o f instantaneous power ju st as it stands. Incidentally, d o n ’t call current “am perage” ; th at’s strictly bush league.5 The same caution will apply to the term “ohm age”6 when we get to resistance in the next section.

1.2.2 Relationship between voltage and current: resistors This is a long and interesting story. It is the heart o f elec­ tronics. C rudely speaking, the name of the gam e is to make and use gadgets that have interesting and useful /-versusV characteristics. Resistors (/ simply proportional to V ), 5 U nless yo u 're a pow er engineer working with giant 13 kV transform ers and the like - those guys are allowed to say amperage. 6 . .. also, D ude, “ohm age" is not the preferred nomenclature: resistance, please.

capacitors ( / proportional to rate o f change o f V ), diodes (/ flows in only one direction), therm istors (tem peraturedependent resistor), photoresistors (light-dependent resis­ tor), strain gauges (strain-dependent resistor), etc., are ex­ am ples. P erhaps m ore interesting still are three-term inal devices, such as transistors, in w hich the current that can flow betw een a p air o f term inals is controlled by the volt­ age applied to a third term inal. We will gradually get into som e o f these exotic devices; for now, we will start with the m ost m undane (and most w idely used) circuit elem ent, the resistor (Figure 1.3).

Figure 1.3. Resistor.

A. Resistance and resistors It is an interesting fact that the current through a m etal­ lic conductor (or other partially conducting m aterial) is proportional to the voltage across it. (In the case o f w ire

A rt o f E lectronics Third E dition

1.2. Voltage, current, and resistance

4

PR E FIX ES M ultiple 1024 1021 1018 1015 1012 109 106 103 io -3 10~6 \0 9 10-12 10~15 10-18 1 0 -21 1 0 -24

Prefix yotta zetta exa peta tera g 'g a mega kilo milli m icro nano pico fem to atto zepto yocto

Sym bol Y Z E P T G M k m n P f a z y

D erivation end-1 o f Latin alphabet, hint o f G reek iota end o f Latin alphabet, hint o f G reek zeta G reek hexa (six: pow er o f 1000) G reek p en ta (five: pow er o f 1000) G reek teras (m onster) G reek g ig a s (giant) G reek m egas (great) G reek khilioi (thousand) Latin m illi (thousand) G reek m ikros (sm all) G reek nanos (dw arf) from Italian/Spanish picco lo /pico (sm all) D anish/N orw egian fe m te n (fifteen) D anish/N orw egian atten (eighteen) end o f Latin alphabet, m irrors zetta e n d -1 o f Latin alphabet, m irrors yotta

These prefixes are universally used to scale units in science and engineering. T heir etym ological derivations are a m atter o f som e controversy and should not be con­ sidered historically reliable. W hen abbreviating a unit with a prefix, the sym bol for the unit follow s the prefix w ithout space. Be careful about uppercase and low ercase letters (especially m and M ) in both prefix and unit: 1 m W

conductors used in circuits, w e usually choose a thickenough gauge o f wire so that these “voltage d ro p s” will be negligible.) T his is by no m eans a universal law for all objects.For instance, the current through a neon bulb is a highly nonlinear function o f the applied voltage (it is zero up to a critical voltage, at w hich point it rises dram atically). The same goes for a variety o f interesting special devices - diodes, transistors, lightbulbs, etc. (If you are interested in understanding w hy m etallic conductors behave this way, read §§4.4—4 .5 in Purcell and M o rin ’s splendid text E lec­ tricity and M agnetism ). A resistor is made out o f som e conducting stuff (carbon, o r a thin m etal or carbon film, o r w ire o f poor conductivity), with a wire or contacts at each end. It is characterized by its resistance:

is a m illiw att, or one-thousandth o f a w att; 1 M H z is a m egahertz o r 1 m illion hertz. In general, units are spelled with low ercase letters, even w hen they are derived from proper nam es. T he unit nam e is not capitalized w hen it is spelled o u t and used with a prefix, only w hen abbre­ viated. Thus: h ertz and kilohertz, but H z and kH z; w att, m illiw att, and m egaw att, but W, mW , and MW.

values from 1 ohm (1 £2) to about 10 m egohm s (1 0 M Q ). R esistors are also ch aracterized by how m uch pow er they can safely dissipate (the m ost com m only used ones are rated at 1/4 o r 1/8 W ), th eir physical size,7 and by other param eters such as tolerance (accuracy), tem perature co ­ efficient, noise, voltage coefficient (the extent to w hich R depends on applied V), stability with tim e, inductance, etc. See the box on resistors, C h ap ter Jx, and A ppendix C for further details. Figure 1.2 show s a collection o f resistors, w ith m ost o f the available m orphologies represented. R oughly speaking, resistors are used to convert a

7 The sizes o f chip resistors and other com ponents intended for surface m ounting are specified by a four-digit size code, in which each pair of digits specifies a dim ension in units of 0.010" (0.25 mm). For exam ­

R = V/I\

(1.2)

ple, an 0805 size resistor is 2 m m x 1.25 mm, or 80 m ils x 50 m ils ( I mil

R is in ohm s for V in volts and / in amps. This is known as O h m ’s law. Typical resistors o f the m ost frequently used type (m etal-oxide film, metal film, or carbon film) com e in

to this sim ple schem e, the four-digit size code may instead be m etric

is O.OOl^); the height m ust be separately specified. To add confusion (som etim es w ithout saying so!), in units o f 0,1 mm: thus an “0805’’ (English) is also a “2012” (metric).

A rt o f E lectronics Third Edition

1.2.2. Relationship between voltage and current: resistors

RESISTORS R esistors are truly ubiquitous. There are alm ost as many types as there are applications. Resistors are used in am ­ plifiers as loads for active devices, in bias netw orks, and as feedback elem ents. In com bination with capacitors they establish tim e constants and act as filters. They are used to set operating currents and signal levels. R esistors are used in pow er circuits to reduce voltages by dissi­ pating pow er, to measure currents, and to discharge ca­ pacitors after pow er is removed. They are used in p re­ cision circuits to establish currents, to provide accurate voltage ratios, and to set precise gain values. In logic cir­ cuits they act as bus and line term inators and as “pullup” and “pull-dow n” resistors. In high-voltage circuits they are used to m easure voltages and to equalize leakage cur­ rents am ong diodes or capacitors connected in series. In radiofrequency (RF) circuits they set the bandw idth o f resonant circuits, and they are even used as coil form s for inductors. R esistors are available with resistances from 0.0002 Q through 10I2Q , standard pow er ratings from 1/8 w att through 250 watts, and accuracies from 0.005% through 20% . R esistors can be made from metal films, m etaloxide films, or carbon films; from carbon-com position or

ceram ic-com position m oldings; from metal foil or metal wire w ound on a form ; or from sem iconductor elem ents sim ilar to field-effect transistors (FE T s). The m ost co m ­ m only used resistor type is form ed from a carbon, metal, o r oxide film, and com es in tw o w idely used “packages” : the cylindrical axial-lead type (typified by the generic R N 55D 1% 1/4W m etal-film resistor),8 and the much sm aller sw fa ce-m o u n t “chip resistor.” T hese com m on types com e in 5% , 2% , and 1% tolerances, in a standard set o f values ranging from I Q to 10 M Q . The 1% types have 96 values per decade, w hereas the 2% and 5% types have 24 values per decade (see A ppendix C). Figure 1.2 illustrates m ost o f the com m on resistor packages. Resistors are so easy to use and well behaved that they’re often taken for granted. T h ey ’re not perfect, though, and you should be aw are o f som e o f their lim ita­ tions so that you w on’t be surprised som eday. T he princi­ pal defects are variations in resistance with tem perature, voltage, tim e, and humidity. O ther defects relate to in­ ductance (w hich may be serious at high frequencies), the developm ent o f therm al hot spots in pow er applications, or electrical noise generation in low -noise am plifiers. We treat these in the advanced C hapter Ix.

voltage to a current, and vice versa. This may sound aw ­ fully trite, but you will soon see what we mean. Figure 1.4. Resistors in series.

B. Resistors in series and parallel From the definition o f R , some simple results follow: 1. The resistance o f tw o resistors in series (Figure 1.4) is R = R\ +/?2'

(1-3)

By putting resistors in series, you alw ays get a larger re­ sistor. 2. T he resistance o f tw o resistors in parallel (Figure 1.5) is «1«2 Ri+ « 2

or

„ /? =

I

(1.4)

R~\+ R 2~ By putting resistors in parallel, you alw ays get a sm aller resistor. R esistance is measured in ohms (Q ), but in prac­ tice w e frequently om it the £2 symbol when referring to resistors that are more than 1000Q (1 kO ). Thus, a 4.7 kQ resistor is often referred to as a 4.7k resistor, and a 1 M O __________________________________________________________________ 8 Conservatively rated at 1/8 watt in its RN55 military grade (“MILspec"), but rated at 1/4 watt in its CMF-55 industrial grade.

R, -A/W-

fl2 -w v Figure 1.5. Resistors in parallel.

resistor as a lM resistor (or 1 m eg).9 If these prelim inaries bore you, please have patience - w e’ll soon get to num er­ ous am using applications. Exercise 1.1. You have a 5k resistor and a 10k resistor. What is their combined resistance (a) in series and (b) in parallel? Exercise 1.2. If you place a 1 ohm resistor across a 12 volt car battery, how much power will it dissipate?

9 A popular "international" alternative notation replaces the decimal point with the unit multiplier, thus 4k7 or 1M0. A 2 .2 Cl resistor becom es 2R2. There is an analogous schem e for capacitors and inductors.

6

A n o f E lectronics Third Edition

1.2. Voltage, current, and resistance

Exercise 1.3. Prove the formulas for series and parallel resistors. Exercise 1.4. Show that several resistors in parallel have resis­ tance

R t + R2 + R3 + " Beginners tend to get carried aw ay w ith com plicated al­ gebra in designing or trying to understand electronics. Now is the tim e to begin learning intuition and shortcuts. H ere are a couple o f good tricks: S h o rtc u t #1 A large resistor in series (parallel) w ith a sm all resistor has the resistance o f the larger (sm aller) one, roughly. So you can "trim ” the value o f a resistor up or down by connecting a second resistor in series or parallel: to trim up, choose an available resistor value below the target value, then add a (m uch sm aller) series resistor to make up the difference; to trim d o w n , choose an available resistor value above the target value, then connect a (m uch larger) resistor in parallel. For the lat­ ter you can approxim ate w ith proportions - to low er the value o f a resistor by 1%, say, put a resistor 100 tim es as large in p arallel.10 S h o rtc u t #2 Suppose you w ant the resistance o f 5k in par­ allel with 10k. If you think o f the 5k as two lOk’s in parallel, then the w hole circuit is like three lOk’s in par­ allel. B ecause the resistance o f n equal resistors in p ar­ allel is 1/«th the resistance o f the individual resistors, the answ er in this case is 10k/3, or 3.33k. This trick is handy because it allows you to analyze circuits quickly in your head, w ithout distractions. We w ant to encour­ age mental designing, or at least “back-of-the-envelope” designing, for idea brainstorm ing. Som e more hom e-grow n philosophy: there is a ten­ dency am ong beginners to w ant to com pute resistor val­ ues and other circuit com ponent values to many signif­ icant places, particularly with calculators and com puters that readily oblige. T here are tw o reasons you should try to avoid falling into this habit: (a) the com ponents them selves are o f finite precision (resistors typically have tolerances o f ± 5 % or ± 1 % ; for capacitors it’s typically ± 1 0 % or ± 5 % ; and the param eters that characterize transistors, say, fre­ quently are know n only to a factor o f 2); (b) one m ark o f a good circuit design is insensitivity o f the finished circuit to precise values o f the com ponents (there are exceptions, o f course). You’ll also learn circuit intuition m ore quickly if you get into the habit o f doing approxim ate calculations in your head, rather than w atching m eaningless num bers pop up on a calculator display. We believe strongly that reliance

on form ulas and equations early in your electronic circuit education is a fine way to prevent you from understanding w hat’s really going on. In trying to develop intuition about resistance, som e people find it helpful to think about conductance, G = I /R . The current through a device o f conductance G bridging a voltage V is then given by / = G V (O h m ’s law). A sm all resistance is a large conductance, with corresp o n d ­ ingly large current under the influence o f an applied volt­ age. View ed in this light, the fo rm u la for parallel resistors is obvious: w hen several resistors o r co nducting paths are connected across the sam e voltage, the total current is the sum o f the individual currents. T herefore the net c o n d u c­ tance is sim ply the sum o f the individual conductances, G — G i + G j + G i -----, w hich is the sam e as the form ula for parallel resistors derived earlier. Engineers are fond o f defining reciprocal units, and they have designated as the unit o f conductance the siem ens (S = 1 /Q ), also know n as the m ho (th at’s ohm spelled backw ard, given the sym bol 15). A lthough the co n cep t o f conductance is helpful in developing intuition, it is not used w id ely ;11 m ost people p refer to talk about resistance instead.

C. Power in resistors T he pow er dissipated by a resistor (or any o th er device) is P — I V . U sing O h m ’s law, you can get the equivalent form s P = I 2R and P = V 2/R . Exercise 1.5. Show that it is not possible to exceed the power rating of a 1/4 watt resistor of resistance greater than Ik, no matter how you connect it, in a circuit operating from a 15 volt battery. Exercise 1.6. Optional exercise: New York City requires about 1010 watts of electrical power, at 115 volts (this is plausible: 10 million people averaging 1 kilowatt each). A heavy power ca­ ble might be an inch in diameter. Let’s calculate what will happen if we try to supply the power through a cable 1 foot in diameter made of pure copper. Its resistance is 0.05 (5x 10-8 ohms) per foot. Calculate (a) the power lost per foot from “I2R losses,” (b) the length of cable over which you will lose all 1010 watts, and (c) how hot the cable will get, if you know the physics involved (a = 6 x IO~,2W/K4 cm2). If you have done your computations correctly, the result should seem preposterous. What is the solu­ tion to this puzzle?

11 A lthough the elegant M illm an's theorem has its adm irers: it says that the output voltage from a set o f resistors (call them R,) that are driven from a set o f corresponding input voltages (V,) and connected together a t the output is V'oul=(XV ',G , ) /X G ,, w here the G, are the conductances

10 With an error, in this case, o f ju st 0 .0 1%.

Ft

Figure 1.31. The simplest RC circuit.

Exercise 1.15. Derive the formula for the capacitance of two ca­ pacitors in series. Him: because there is no external connection to the point where the two capacitors are connected together, they must have equal stored charges.

The current that flows in a capacitor during charging (/ = C d V / d t ) has some unusual features. U nlike resistive current, it’s not proportional to voltage, but rather to the rate of change (the “time derivative” ) o f voltage. Further­ more, unlike the situation in a resistor, the pow er (V x / ) as­ sociated with capacitive current is not turned into heat, but is stored as energy in the capacitor’s internal electric field. You get all that energy back when you discharge the capac­ itor. W e’ll see another way to look at these curious proper­ ties when we talk about reactance, beginning in §1.7.

1.4.2 RC circuits: V and I versus time W hen dealing with ac circuits (or, in general, any circuits that have changing voltages and currents), there are two possible approaches. You can talk about V and / versus tim e, or you can talk about am plitude versus signal fre­ quency. Both approaches have their m erits, and you find y o u rself sw itching back and forth according to w hich d e­ scription is most convenient in each situation. We begin our

B.

time (seconds)

Figure 1.32. RC discharge waveform, plotted with (A) linear and (B) logarithmic voltage axes.

22

A rt o f E lectronics Third E dition

1.4. Capacitors and ac circuits

A. Time constant The product RC is called the time constant o f the circuit. For R in ohm s and C in farads, the product RC is in seconds. A m icrofarad across 1.Ok has a tim e constant o f 1 ms; if the capacitor is initially charged to 1.0 V, the initial current is 1.0 mA.

iE I -±-

battery, voltage =

. -i-

Vi

'/out 0

r-O

Figure 1.33. RC charging circuit.

<