Principal Practical Electronics for Inventors, 4th Edition
Due to the technical work on the site downloading books (as well as file conversion and sending books to email/kindle) may be unstable from May, 27 to May, 28 Also, for users who have an active donation now, we will extend the donation period.
You may be interested in Powered by Rec2Me
Most frequently terms
shown in fig226
cans someone reupload this, please?
03 April 2017 (08:11)
very nice thx dude.......
17 July 2017 (17:14)
thank you for your work
23 October 2019 (00:29)
thank you Iam verry happy read the ebooks
29 March 2020 (19:13)
Practical Electronics for Inventors ABOUT THE AUTHORS Paul Scherz is a Systems Operation Manager who received his B.S. in physics from the University of Wisconsin. He is an inventor/ hobbyist in electronics, an area he grew to appreciate through his experience at the University’s Department of Nuclear Engineering and Engineering Physics and Department of Plasma Physics. Dr. Simon Monk has a bachelor’s degree in cybernetics and computer science and a Ph.D. in software engineering. He spent several years as an academic before he returned to industry, co-founding the mobile software company Momote Ltd. He has been an active electronics hobbyist since his early teens and is a full-time writer on hobby electronics and open-source hardware. Dr. Monk is author of numerous electronics books, including Programming Arduino, Hacking Electronics, and Programming the Raspberry Pi. ABOUT THE TECHNICAL EDITORS Michael Margolis has more than 40 years of experience developing and delivering hardware and software solutions. He has worked at senior levels with Sony, Lucent/Bell Labs, and a number of start-up companies. Michael is the author of two books, Arduino Cookbook and Make an Arduino-Controlled Robot: Autonomous and Remote-Controlled Bots on Wheels. Chris Fitzer is a solutions architect and technical manager who received his Ph.D. in electrical and electronic engineering from the University of Manchester Institute of Science and Technology (UMIST) in 2003 and a first-class honors degree (B.Sc.) in 1999. He currently leads a global team developing and deploying Smart Grid technologies around the world. Previous positions have seen Chris drive the European interests of the ZigBee Smart Energy (ZSE) profile and lead the development of the world’s first certified Smart Energy In Premise Display (IPD) and prototype smart meter. He has also authored or co-authored numerous technical journal papers within the field of Smarter Grids. Practical Electronics for Inventors Fourth Edition Paul Scherz Simon Monk New Yor; k Chicago San Francisco Athens London Madrid Mexico City Milan New Delhi Singapore Sydney Toronto Library of Congress Control Number: 2016932853 McGraw-Hill Education books are available at special quantity discounts to use as premiums and sales promotions or for use in corporate training programs. To contact a representative, please visit the Contact Us page at www.mhprofessional.com. Practical Electronics for Inventors, Fourth Edition Copyright © 2016, 2013, 2007, 2000 by McGraw-Hill Education. All rights reserved. Printed in the United States of America. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher, with the exception that the program listings may be entered, stored, and executed in a computer system, but they may not be reproduced for publication. McGraw-Hill Education, the McGraw-Hill Education logo, TAB, and related trade dress are trademarks or registered trademarks of McGraw-Hill Education and/or its affiliates in the United States and other countries and may not be used without written permission. All other trademarks are the property of their respective owners. McGraw-Hill Education is not associated with any product or vendor mentioned in this book. 1 2 3 4 5 6 7 8 9 0 ROV ROV 1 2 1 0 9 8 7 6 ISBN 978-1-25-958754-2 MHID 1-25-958754-1 This book is printed on acid-free paper. Sponsoring Editor Michael McCabe Editorial Supervisor Stephen M. Smith Production Supervisor Pamela A. Pelton Acquisitions Coordinator Lauren Rogers Technical Editors Michael Margolis and Chris Fitzer Project Manager Apoorva Goel, Cenveo® Publisher Services Copy Editor Raghu Narayan Das, Cenveo Publisher Services Indexer Cenveo Publisher Services Art Director, Cover Jeff Weeks Composition Cenveo Publisher Services Illustration Cenveo Publisher Services Proofreader Cenveo Publisher Services Information has been obtained by McGraw-Hill Education from sources believed to be reliable. However, because of the possibility of human or mechanical error by our sources, McGraw-Hill Education, or others, McGraw-Hill Education does not guarantee the accuracy, adequacy, or completeness of any information and is not responsible for any errors or omissions or the results obtained from the use of such information. CONTENTS Preface Acknowledgments xxiii xxv CHAPTER 1 Introduction to Electronics 1 CHAPTER 2 Theory 5 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10 Theory of Electronics Electric Current 2.2.1 Currents in Perspective Voltage 2.3.1 The Mechanisms of Voltage 2.3.2 Definition of Volt and Generalized Power Law 2.3.3 Combining Batteries 2.3.4 Other Voltage Sources 2.3.5 Water Analogies A Microscopic View of Conduction (for Those Who Are Interested) 2.4.1 Applying a Voltage Resistance, Resistivity, Conductivity 2.5.1 How the Shape of a Conductor Affects Resistance 2.5.2 Resistivity and Conductivity Insulators, Conductors, and Semiconductors Heat and Power Thermal Heat Conduction and Thermal Resistance 2.8.1 Importance of Heat Production Wire Gauges Grounds 2.10.1 Earth Ground 2.10.2 Different Types of Ground Symbols 2.10.3 Loose Ends on Grounding 5 6 9 9 11 14 15 16 17 18 21 23 24 25 28 31 34 37 39 40 42 45 47 ix x Contents 2.11 2.12 2.13 2.14 2.15 2.16 2.17 2.18 2.19 2.20 2.21 2.22 2.23 2.24 Electric Circuits Ohm’s Law and Resistors 2.12.1 Resistor Power Ratings 2.12.2 Resistors in Parallel 2.12.3 Resistors in Series 2.12.4 Reducing a Complex Resistor Network 2.12.5 Multiple Voltage Dividers Voltage and Current Sources Measuring Voltage, Current, and Resistance Combining Batteries Open and Short Circuits Kirchhoff’s Laws Superposition Theorem Thevenin’s and Norton’s Theorems 2.19.1 Thevenin’s Theorem 2.19.2 Norton’s Theorem AC Circuits 2.20.1 Generating AC 2.20.2 Water Analogy of AC 2.20.3 Pulsating DC 2.20.4 Combining Sinusoidal Sources 2.20.5 AC Waveforms 2.20.6 Describing an AC Waveform 2.20.7 Frequency and Period 2.20.8 Phase AC and Resistors, RMS Voltage, and Current Mains Power Capacitors 2.23.1 Determining Capacitance 2.23.2 Commercial Capacitors 2.23.3 Voltage Rating and Dielectric Breakdown 2.23.4 Maxwell’s Displacement Current 2.23.5 Charge-Based Model of Current Through a Capacitor 2.23.6 Capacitor Water Analogy 2.23.7 Energy in a Capacitor 2.23.8 RC Time Constant 2.23.9 Stray Capacitance 2.23.10 Capacitors in Parallel 2.23.11 Capacitors in Series 2.23.12 Alternating Current in a Capacitor 2.23.13 Capacitive Reactance 2.23.14 Capacitive Divider 2.23.15 Quality Factor Inductors 2.24.1 Electromagnetism 2.24.2 Magnetic Fields and Their Influence 49 50 51 52 55 58 61 62 65 67 68 69 74 76 76 77 80 81 82 82 83 84 84 85 86 87 92 94 97 99 99 100 102 104 105 105 108 108 109 110 111 113 113 113 114 117 Contents 2.24.3 2.24.4 2.24.5 2.24.6 2.24.7 2.24.8 2.24.9 2.24.10 2.24.11 2.24.12 2.24.13 2.24.14 2.24.15 2.25 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.33 Self-Inductance Inductors Inductor Water Analogy Inductor Equations Energy Within an Inductor Inductor Cores Understanding the Inductor Equations Energizing RL Circuit Deenergizing RL Circuit Voltage Spikes Due to Switching Straight-Wire Inductance Mutual Inductance and Magnetic Coupling Unwanted Coupling: Spikes, Lightning, and Other Pulses 2.24.16 Inductors in Series and Parallel 2.24.17 Alternating Current and Inductors 2.24.18 Inductive Reactance 2.24.19 Nonideal Inductor Model 2.24.20 Quality Factor 2.24.21 Inductor Applications Modeling Complex Circuits Complex Numbers Circuit with Sinusoidal Sources 2.27.1 Analyzing Sinusoidal Circuits with Complex Impedances 2.27.2 Sinusoidal Voltage Source in Complex Notation 2.27.3 Odd Phenomena in Reactive Circuits Power in AC Circuits (Apparent Power, Real Power, Reactive Power) 2.28.1 Power Factor Thevenin’s Theorem in AC Form Resonant Circuits 2.30.1 Resonance in RLC Circuits 2.30.2 Q (Quality Factor) and Bandwidth 2.30.3 Bandwidth 2.30.4 Voltage Drop Across Components in RLC Resonant Circuit 2.30.5 Capacitor Losses 2.30.6 Parallel-Resonant Circuits 2.30.7 The Q of Loaded Circuits Lecture on Decibels 2.31.1 Alternative Decibel Representations Input and Output Impedance 2.32.1 Input Impedance 2.32.2 Output Impedance Two-Port Networks and Filters 2.33.1 Filters 2.33.2 Attenuators xi 120 121 127 128 133 133 138 142 144 147 147 148 149 149 150 151 153 154 155 155 159 164 165 167 175 176 178 186 188 191 193 194 195 195 196 202 204 207 207 207 208 210 210 221 xii Contents 2.34 2.35 2.36 2.37 CHAPTER 3 3.1 3.2 3.3 3.4 3.5 3.6 Transient Circuits 2.34.1 Series RLC Circuit Circuits with Periodic Nonsinusoidal Sources 2.35.1 Fourier Series Nonperiodic Sources SPICE 2.37.1 How SPICE Works 2.37.2 Limitations of SPICE and Other Simulators 2.37.3 A Simple Simulation Example 223 231 235 236 243 245 246 249 249 Basic Electronic Circuit Components 253 Wires, Cables, and Connectors 3.1.1 Wires 3.1.2 Cables 3.1.3 Connectors 3.1.4 Wiring and Connector Symbols 3.1.5 High-Frequency Effects Within Wires and Cables Batteries 3.2.1 How a Cell Works 3.2.2 Primary Batteries 3.2.3 Comparing Primary Batteries 3.2.4 Secondary Batteries 3.2.5 Battery Capacity 3.2.6 Note on Internal Voltage Drop of a Battery Switches 3.3.1 How a Switch Works 3.3.2 Describing a Switch 3.3.3 Kinds of Switches 3.3.4 Simple Switch Applications Relays 3.4.1 Specific Kinds of Relays 3.4.2 A Few Notes about Relays 3.4.3 Some Simple Relay Circuits Resistors 3.5.1 Resistance and Ohm’s Law 3.5.2 Resistors in Series and Parallel 3.5.3 Reading Resistor Labels 3.5.4 Real Resistor Characteristics 3.5.5 Types of Resistors 3.5.6 Variable Resistors (Rheostats, Potentiometers, Trimmers) 3.5.7 Potentiometer Characteristics Capacitors 3.6.1 Capacitance 3.6.2 Capacitors in Parallel 3.6.3 Capacitors in Series 253 253 256 256 261 262 271 272 274 275 279 287 289 290 291 291 292 294 295 297 298 299 299 301 302 304 306 314 320 322 324 326 326 327 Contents 3.7 3.8 3.9 CHAPTER 4 4.1 4.2 xiii 3.6.4 RC Time Constant 3.6.5 Capacitive Reactance 3.6.6 Real Capacitors 3.6.7 Capacitor Specifications 3.6.8 Types of Capacitors 3.6.9 Capacitor Applications 3.6.10 Timing and Sample and Hold 3.6.11 RC Ripple Filter 3.6.12 Arc Suppression 3.6.13 Supercapacitor Applications 3.6.14 Problems Inductors 3.7.1 Inductance 3.7.2 Constructing Inductors 3.7.3 Inductors in Series and Parallel 3.7.4 RL Time Constant 3.7.5 Inductive Reactance 3.7.6 Real Inductors 3.7.7 Inductor Specifications 3.7.8 Types of Inductors 3.7.9 Reading Inductor Labels 3.7.10 Inductor Applications 3.7.11 EMI/EMC Design Tips Transformers 3.8.1 Basic Operations 3.8.2 Transformer Construction 3.8.3 Autotransformers and Variable Transformers 3.8.4 Circuit Isolation and the Isolation Transformer 3.8.5 Various Standard and Specialized Transformers 3.8.6 Transformer Applications Fuses and Circuit Breakers 3.9.1 Types of Fuses and Circuit Breakers 327 328 329 329 333 341 347 348 350 352 352 355 357 357 357 359 360 361 361 363 367 369 373 374 374 385 387 389 390 392 397 398 Semiconductors 401 Semiconductor Technology 4.1.1 What Is a Semiconductor? 4.1.2 Applications of Silicon Diodes 4.2.1 How p-n Junction Diodes Work 4.2.2 Diode Water Analogy 4.2.3 Kinds of Rectifiers/Diodes 4.2.4 Practical Considerations 4.2.5 Diode/Rectifier Applications 4.2.6 Zener Diodes 4.2.7 Zener Diode Applications 4.2.8 Varactor Diodes (Variable Capacitance Diodes) 401 401 406 407 407 409 409 411 412 420 423 424 xiv Contents 4.3 4.4 4.5 4.6 CHAPTER 5 5.1 5.2 5.3 5.4 5.5 5.6 5.7 4.2.9 PIN Diodes 4.2.10 Microwave Diodes (IMPATT, Gunn, Tunnel, etc.) 4.2.11 Problems Transistors 4.3.1 Introduction to Transistors 4.3.2 Bipolar Transistors 4.3.3 Junction Field-Effect Transistors 4.3.4 Metal Oxide Semiconductor Field-Effect Transistors 4.3.5 Insulated Gate Bipolar Transistors (IGBTs) 4.3.6 Unijunction Transistors Thyristors 4.4.1 Introduction 4.4.2 Silicon-Controlled Rectifiers 4.4.3 Silicon-Controlled Switches 4.4.4 Triacs 4.4.5 Four-Layer Diodes and Diacs Transient Voltage Suppressors 4.5.1 Lecture on Transients 4.5.2 Devices Used to Suppress Transients Integrated Circuits 4.6.1 IC Packages 426 426 427 429 429 430 449 459 468 468 472 472 473 476 477 480 481 482 483 491 492 Optoelectronics 495 A Little Lecture on Photons Lamps Light-Emitting Diodes 5.3.1 How an LED Works 5.3.2 Kinds of LEDs 5.3.3 More on LEDs 5.3.4 LED Applications 5.3.5 Laser Diodes Photoresistors 5.4.1 How a Photoresistor Works 5.4.2 Technical Stuff 5.4.3 Applications Photodiodes 5.5.1 How a Photodiode Works 5.5.2 Basic Operations 5.5.3 Kinds of Photodiodes Solar Cells 5.6.1 Basic Operations Phototransistors 5.7.1 How a Phototransistor Works 5.7.2 Basic Configurations 5.7.3 Kinds of Phototransistors 5.7.4 Technical Stuff 5.7.5 Applications 495 497 499 500 501 502 505 506 512 512 513 513 514 514 515 515 516 517 517 518 518 519 519 520 Contents 5.8 5.9 5.10 CHAPTER 6 6.1 6.2 6.3 6.4 6.5 6.6 6.7 xv Photothyristors 5.8.1 How LASCRs Work 5.8.2 Basic Operation Optoisolators 5.9.1 Integrated Optoisolators 5.9.2 Applications Optical Fiber 521 521 521 522 522 523 524 Sensors 525 General Principals 6.1.1 Precision, Accuracy, and Resolution 6.1.2 The Observer Effect 6.1.3 Calibration Temperature 6.2.1 Thermistors 6.2.2 Thermocouples 6.2.3 Resistive Temperature Detectors 6.2.4 Analog Output Thermometer ICs 6.2.5 Digital Thermometer ICs 6.2.6 Infrared Thermometers/Pyrometers 6.2.7 Summary Proximity and Touch 6.3.1 Touch Screens 6.3.2 Ultrasonic Distance 6.3.3 Optical Distance 6.3.4 Capacitive Sensors 6.3.5 Summary Movement, Force, and Pressure 6.4.1 Passive Infrared 6.4.2 Acceleration 6.4.3 Rotation 6.4.4 Flow 6.4.5 Force 6.4.6 Tilt 6.4.7 Vibration and Mechanical Shock 6.4.8 Pressure Chemical 6.5.1 Smoke 6.5.2 Gas 6.5.3 Humidity Light, Radiation, Magnetism, and Sound 6.6.1 Light 6.6.2 Ionizing Radiation 6.6.3 Magnetic Fields 6.6.4 Sound GPS 525 525 526 526 528 529 531 532 532 533 534 534 535 535 536 537 539 539 540 540 541 542 543 544 545 545 545 546 546 546 547 547 547 547 548 549 549 xvi Contents CHAPTER 7 7.1 7.2 7.3 7.4 7.5 Hands-on Electronics 551 Safety 7.1.1 7.1.2 551 551 Lecture on Safety Damaging Components with Electrostatic Discharge 7.1.3 Component Handling Precautions Constructing Circuits 7.2.1 Drawing a Circuit Schematic 7.2.2 A Note on Circuit Simulator Programs 7.2.3 Making a Prototype of Your Circuit 7.2.4 The Final Circuit 7.2.5 Making a PCB 7.2.6 Special Pieces of Hardware Used in Circuit Construction 7.2.7 Soldering 7.2.8 Desoldering 7.2.9 Enclosing the Circuit 7.2.10 Useful Items to Keep Handy 7.2.11 Troubleshooting the Circuits You Build Multimeters 7.3.1 Basic Operation 7.3.2 How Analog VOMs Work 7.3.3 How Digital Multimeters Work 7.3.4 A Note on Measurement Errors Oscilloscopes 7.4.1 How Scopes Work 7.4.2 Interior Circuitry of a Scope 7.4.3 Aiming the Beam 7.4.4 Scope Usage 7.4.5 What All the Little Knobs and Switches Do 7.4.6 Measuring Things with Scopes 7.4.7 Scope Applications 7.4.8 Measuring Impedances The Electronics Laboratory 7.5.1 Work Area 7.5.2 Test Equipment 7.5.3 Multimeters 7.5.4 DC Power Supplies 7.5.5 Oscilloscope 7.5.6 Oscilloscope Probes 7.5.7 General-Purpose Function Generator 7.5.8 Frequency Counter 7.5.9 Computer 7.5.10 Miscellaneous Test Equipment 7.5.11 Multifunction PC Instruments 7.5.12 Isolation Transformers 7.5.13 Variable Transformers, or Variacs 555 555 556 556 558 558 559 562 567 568 569 569 570 570 571 572 573 574 574 575 576 578 579 580 581 586 590 592 594 594 595 596 597 598 600 607 608 608 609 610 611 613 Contents 7.5.14 Substitution Boxes 7.5.15 Test Cables, Connectors, and Adapters 7.5.16 Soldering Equipment 7.5.17 Prototyping Boards 7.5.18 Hand Tools 7.5.19 Wires, Cables, Hardware, and Chemicals 7.5.20 Electronics Catalogs 7.5.21 Recommended Electronics Parts 7.5.22 Electronic CAD Programs 7.5.23 Building Your Own Workbench CHAPTER 8 8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 8.10 8.11 8.12 8.13 8.14 8.15 8.16 8.17 8.18 CHAPTER 9 9.1 9.2 9.3 9.4 9.5 9.6 9.7 9.8 9.9 xvii 614 616 618 621 622 624 626 627 630 631 Operational Amplifiers 635 Operational Amplifier Water Analogy How Op Amps Work (The “Cop-Out” Explanation) Theory Negative Feedback Positive Feedback Real Kinds of Op Amps Op Amp Specifications Powering Op Amps Some Practical Notes Voltage and Current Offset Compensation Frequency Compensation Comparators Comparators with Hysteresis 8.13.1 Inverting Comparator with Hysteresis 8.13.2 Noninverting Comparator with Hysteresis Using Single-Supply Comparators Window Comparator Voltage-Level Indicator Instrumentation Amplifiers Applications 636 637 638 639 644 645 647 649 650 651 652 652 654 654 655 656 656 657 657 658 Filters 663 Things to Know Before You Start Designing Filters Basic Filters Passive Low-Pass Filter Design A Note on Filter Types Passive High-Pass Filter Design Passive Bandpass Filter Design Passive Notch Filter Design Active Filter Design 9.8.1 Active Low-Pass Filter Example 9.8.2 Active High-Pass Filter Example 9.8.3 Active Bandpass Filters 9.8.4 Active Notch Filters Integrated Filter Circuits 664 665 666 670 670 672 674 675 676 677 678 680 681 xviii Contents CHAPTER 10 Oscillators and Timers 683 RC Relaxation Oscillators The 555 Timer IC 10.2.1 How a 555 Works (Astable Operation) 10.2.2 Basic Astable Operation 10.2.3 How a 555 Works (Monostable Operation) 10.2.4 Basic Monostable Operation 10.2.5 Some Important Notes about 555 Timers 10.2.6 Simple 555 Applications Voltage-Controlled Oscillators Wien-Bridge and Twin-T Oscillators LC Oscillators (Sinusoidal Oscillators) Crystal Oscillators Microcontroller Oscillators 684 686 687 688 689 690 690 691 692 693 693 696 698 CHAPTER 11 Voltage Regulators and Power Supplies 699 11.1 Voltage-Regulator ICs 11.1.1 Fixed-Regulator ICs 11.1.2 Adjustable-Regulator ICs 11.1.3 Regulator Specifications A Quick Look at a Few Regulator Applications The Transformer Rectifier Packages A Few Simple Power Supplies Technical Points about Ripple Reduction Loose Ends Switching Regulator Supplies (Switchers) Switch-Mode Power Supplies (SMPS) Kinds of Commercial Power Supply Packages Power Supply Construction 701 701 702 702 702 703 703 704 707 709 710 713 714 716 Digital Electronics 717 The Basics of Digital Electronics 12.1.1 Digital Logic States 12.1.2 Number Codes Used in Digital Electronics 12.1.3 Clock Timing and Parallel versus Serial Transmission Logic Gates 12.2.1 Multiple-Input Logic Gates 12.2.2 Digital Logic Gate ICs 12.2.3 Applications for a Single Logic Gate 12.2.4 Combinational Logic 12.2.5 Keeping Circuits Simple (Karnaugh Maps) Combinational Devices 12.3.1 Multiplexers (Data Selectors) and Bilateral Switches 717 717 718 10.1 10.2 10.3 10.4 10.5 10.6 10.7 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.10 11.11 CHAPTER 12 12.1 12.2 12.3 725 726 727 727 728 730 738 740 741 12.4 12.5 12.6 12.7 12.8 12.9 Contents xix 12.3.2 Demultiplexers (Data Distributors) and Decoders 12.3.3 Encoders and Code Converters 12.3.4 Binary Adders 12.3.5 Binary Adder/Subtractor 12.3.6 Comparators and Magnitude Comparator ICs 12.3.7 A Note on Obsolescence and the Trend Toward Microcontroller Control Logic Families 12.4.1 CMOS Family of ICs 12.4.2 I/O Voltages and Noise Margins 12.4.3 Current Ratings, Fanout, and Propagation Delays Powering and Testing Logic ICs 12.5.1 Power Supply Decoupling 12.5.2 Unused Inputs 12.5.3 Logic Probes and Logic Pulsers Sequential Logic 12.6.1 SR Flip-Flops 12.6.2 SR Flip-Flop ICs 12.6.3 D-Type Flip-Flops 12.6.4 Quad and Octal D Flip-Flops 12.6.5 JK Flip-Flops 12.6.6 Practical Timing Considerations with Flip-Flops 12.6.7 Digital Clock Generators and Single-Pulse Generators 12.6.8 Automatic Power-Up Clear (Reset) Circuits 12.6.9 Pullup and Pulldown Resistors Counter ICs 12.7.1 Asynchronous Counter (Ripple Counter) ICs 12.7.2 Synchronous Counter ICs 12.7.3 A Note on Counters with Displays Shift Registers 12.8.1 Serial-In/Serial-Out Shift Registers 12.8.2 Serial-In/Parallel-Out Shift Registers 12.8.3 Parallel-In/Serial-Out Shift Registers 12.8.4 Ring Counter (Shift Register Sequencer) 12.8.5 Johnson Shift Counter 12.8.6 Shift Register ICs 12.8.7 Simple Shift Register Applications Analog/Digital Interfacing 12.9.1 Triggering Simple Logic Responses from Analog Signals 12.9.2 Using Logic to Drive External Loads 12.9.3 Analog Switches 12.9.4 Analog Multiplexer/Demultiplexer 12.9.5 Analog-to-Digital and Digital-to-Analog Conversion 12.9.6 Analog-to-Digital Converters 743 746 749 751 751 752 753 754 755 756 756 756 757 757 758 759 763 764 768 769 773 774 777 779 780 780 782 787 789 789 790 790 791 791 792 796 799 799 800 802 802 803 811 xx Contents 12.10 12.11 CHAPTER 13 13.1 13.2 13.3 13.4 13.5 CHAPTER 14 14.1 14.2 14.3 14.4 14.5 14.6 Displays 12.10.1 LED Displays 12.10.2 Liquid-Crystal Displays Memory Devices 12.11.1 Read-Only Memory 12.11.2 Simple ROM Made Using Diodes 12.11.3 Memory Size and Organization 12.11.4 Simple Programmable ROM 12.11.5 ROM Devices 12.11.6 RAM 813 813 815 828 829 830 830 831 832 836 Microcontrollers 843 Basic Structure of a Microcontroller Example Microcontrollers 13.2.1 The ATtiny85 Microcontroller 13.2.2 The PIC16Cx Microcontrollers 13.2.3 32-Bit Microcontrollers 13.2.4 Digital Signal Processing Evaluation/Development Boards Arduino 13.4.1 A Tour of Arduino 13.4.2 The Arduino IDE 13.4.3 Arduino Board Models 13.4.4 Shields 13.4.5 The Arduino C Library 13.4.6 Arduino Example Project 13.4.7 Taking the Arduino Offboard Interfacing with Microcontrollers 13.5.1 Switches 13.5.2 Analog Inputs 13.5.3 High-Power Digital Outputs 13.5.4 Sound Interfaces 13.5.5 Serial Interfaces 13.5.6 Level Conversion 13.5.7 LED Display Interfaces 844 844 845 849 862 862 863 864 864 865 865 866 868 870 872 874 874 878 879 883 884 892 892 Programmable Logic 897 Programmable Logic FPGAs ISE and the Elbert V2 14.3.1 Installing ISE The Elbert 2 Board 14.4.1 Installing the Elbert Software Downloads Drawing Your FPGA Logic Design 14.6.1 Example 1: A Data Selector 14.6.2 Example 2: A 4-bit Ripple Counter 898 899 900 901 901 902 903 903 903 912 Contents 14.7 14.8 14.9 14.10 14.11 CHAPTER 15 15.1 15.2 15.3 15.4 15.5 15.6 15.7 15.8 15.9 CHAPTER 16 16.1 16.2 16.3 16.4 16.5 16.6 16.7 16.8 16.9 16.10 16.11 16.12 CHAPTER 17 17.1 17.2 xxi Verilog 14.7.1 Modules 14.7.2 Wires, Registers, and Busses 14.7.3 Parallel Execution 14.7.4 Number Format Describing Your FPGA Design in Verilog 14.8.1 A Data Selector in Verilog 14.8.2 A Ripple Counter in Verilog Modular Design 14.9.1 Counter/Decoder Example 14.9.2 Multiplexed 7-Segment Counter Example 14.9.3 Parameterized Modules Simulation VHDL 914 915 915 915 915 916 916 919 920 921 924 928 928 931 Motors 933 DC Continuous Motors Speed Control of DC Motors Directional Control of DC Motors RC Servos Stepper Motors Kinds of Stepper Motors Driving Stepper Motors Controlling the Driver with a Translator A Final Word on Identifying Stepper Motors 933 934 935 936 938 939 941 943 945 Audio Electronics 947 A Little Lecture on Sound Microphones Microphone Specifications Audio Amplifiers 16.4.1 Inverting Amplifier 16.4.2 Noninverting Amplifier 16.4.3 Digital Amplifiers 16.4.4 Reducing Hum in Audio Amplifiers Preamplifiers Mixer Circuits A Note on Impedance Matching Speakers Crossover Networks Simple ICs Used to Drive Speakers Audible-Signal Devices Miscellaneous Audio Circuits 947 949 950 951 951 952 952 954 954 955 955 956 957 959 960 960 Modular Electronics 963 There’s an IC for It Breakout Boards and Modules 963 963 xxii Contents 17.3 17.4 APPENDIX A A.1 A.2 A.3 A.4 APPENDIX B B.1 B.2 APPENDIX C C.1 C.2 C.3 C.4 C.5 C.6 C.7 C.8 C.9 17.2.1 Radio Frequency Modules 17.2.2 Audio Modules Plug-and-Play Prototyping Open Source Hardware 964 967 968 970 Power Distribution and Home Wiring 973 Power Distribution A Closer Look at Three-Phase Electricity Home Wiring Electricity in Other Countries 973 974 976 977 Error Analysis 979 Absolute Error, Relative Error, and Percent Error Uncertainty Estimates 979 980 Useful Facts and Formulas 983 Greek Alphabet Powers of 10 Unit Prefixes Linear Functions (y = mx + b) Quadratic Equation (y = ax 2 + bx + c) Exponents and Logarithms Trigonometry Complex Numbers Differential Calculus Integral Calculus 983 983 983 984 984 984 985 985 987 Index 989 PREFACE Inventors in the field of electronics are individuals who possess the knowledge, intuition, creativity, and technical know-how to turn their ideas into real-life electrical gadgets. We hope that this book will provide you with an intuitive understanding of the theoretical and practical aspects of electronics in a way that fuels your creativity. This book is designed to help beginning inventors invent. It assumes little to no prior knowledge of electronics. Therefore, educators, students, and aspiring hobbyists will find this book a good initial text. At the same time, technicians and more advanced hobbyists may find this book a useful resource. Notes about the Fourth Edition The main addition to the fourth edition is a new chapter on programmable logic. This chapter focuses on the use of FPGAs (field-programmable gate arrays) and shows you how to program an FPGA evaluation board using both a schematic editor and the Verilog hardware definition language. The book has also undergone numerous minor updates and fixes to errors discovered in the third edition. In addition, there has been some pruning of outdated material that is no longer relevant to modern electronics. xxiii ACKNOWLEDGMENTS We would like to thank the many people who have helped in the production of this book. Special thanks are due to the technical reviewers Michael Margolis, Chris Fitzer, and David Buckley. We have been able to greatly improve the accuracy of the book thanks to the very detailed and helpful errata for the second edition that were collated by Martin Ligare at Bucknell University. Contributors to these errata were Steve Baker (Naval Postgraduate School), George Caplan (Wellesley College), Robert Drehmel, Earl Morris, Robert Strzelczyk (Motorola), Lloyd Lowe (Boise State University), John Kelty (University of Nebraska), Perry Spring (Cascadia Community College), Michael B. Allen, Jeffrey Audia, Ken Ballinger (EIT), Clement Jacob, Jamie Masters, and Marco Ariano. Thank you all for taking the time to make this a better book. Many thanks to Michael McCabe, the ever-patient Apoorva Goel, and everyone from McGraw-Hill Education, for their support and skill in converting this manuscript into a great book. —Paul Scherz and Simon Monk xxv Practical Electronics for Inventors C H A PT ER 1 Introduction to Electronics Perhaps the most common predicament newcomers face when learning electronics is figuring out exactly what it is they must learn. What topics are worth covering, and in which general order should they be covered? A good starting point for answering these questions is the flowchart presented in Fig. 1.1. This chart provides an overview of the basic elements that go into designing practical electrical gadgets and represents the information you will find in this book. This chapter introduces these basic elements. At the top of the chart comes the theory. This involves learning about voltage, current, resistance, capacitance, inductance, and various laws and theorems that help predict the size and direction of voltages and currents within circuits. As you learn the basic theory, you will be introduced to basic passive components such as resistors, capacitors, inductors, and transformers. Next down the line are discrete passive circuits. Discrete passive circuits include current-limiting networks, voltage dividers, filter circuits, attenuators, and so on. These simple circuits, by themselves, are not very interesting, but they are vital ingredients in more complex circuits. After you have learned about passive components and circuits, you move on to discrete active devices, which are built from semiconductor materials. These devices consist mainly of diodes (one-way current-flow gates) and transistors (electrically controlled switches/amplifiers). Once you have covered the discrete active devices, you get to discrete active/ passive circuits. Some of these circuits include rectifiers (ac-to-dc converters), amplifiers, oscillators, modulators, mixers, and voltage regulators. This is where things start getting interesting. Throughout your study of electronics, you will learn about various input/output (I/O) devices (transducers). Input devices (sensors) convert physical signals, such as sound, light, and pressure, into electrical signals that circuits can use. These devices include microphones, phototransistors, switches, keyboards, thermistors, strain gauges, generators, and antennas. Output devices convert electrical signals into physical signals. Output devices include lamps, LED and LCD displays, speakers, buzzers, motors (dc, servo, and stepper), solenoids, and antennas. These I/O devices allow humans and circuits to communicate with one another. 1 2 PRACTICAL ELECTRONICS FOR INVENTORS OF EL BAS EL EM IC EC EN TR TS ON IC S Power Sources DC V Test Equipment t + – Battery + – AC V DC power supply AC outlet t Oscilloscope Multimeters Logic probes … Solar cell … etc. Discrete Passive Components Basic Passive Circuits Vin R1 Resistors Vout Transformers Solder 8.0000 MHz Electronics Inductors Prototype Crystals Iron Current & Voltage dividers, alternators RC delay circuits, ﬁlters, etc. Thyristors Transistors PC board nductor technology Semico Laws, rules, etc. Discrete Active Components Enclosure Discrete Circuits Output Devices Input Devices Half-wave rectifiers Diodes Switch Mic Frequency counter Circuit Construction R2 Capacitors ry Theo Function generator Transistors Thyristors Phototransistor Full-wave rectifiers +V +V Keyboard Speaker Buzzer Solenoid DC motor Stopper RC servo Integrated Circuits Thermistor ed ON LED display … mixers, modulators, voltage multipliers, regulators, etc. d min iatur iz Generator Receiving antenna Strain gauge 7:30 Oscillators Ampliﬁers ICs Analog e riz miniatu in LCD Lamp Transmitting antenna g mi ital I Cs nia tur ize d Phototube Drivers Di Analog Digital Digital Circuits Input/output devices Logic gates , AND Analog circuits 98.6 XOR Analog signal JS KR Q Q Flip-flops A. 0 Din .. A6 Dout RAS CAS DRAM Computers Robots Digital signal Logic circuits Sensors etc. ? “In-the-ear” thermometer ? ? … counters, timers, processors, shift registers, etc. Analog/digital conversion ? its” “Smart circu ,etc. , NOT L AL … GO TO IN Data loggers Mystery gadgets FIGURE 1.1 Chapter 1: Introduction to Electronics 3 To make things easier on the circuit designer, manufacturers have created integrated circuits (ICs), which contain discrete circuits (like the ones mentioned in the previous paragraph) that are crammed onto a tiny chip of silicon. The chip is usually housed within a plastic package, where little internal wires link the chip to external metal terminals. ICs such as amplifiers and voltage regulators are referred to as analog devices, which means that they respond to and produce signals of varying degrees of voltage. (This is unlike digital ICs, which work with only two voltage levels.) Becoming familiar with ICs is a necessity for any practical circuit designer. Digital electronics comes next. Digital circuits work with only two voltage states: high (such as 5 V) or low (such as 0 V). The reason for having only two voltage states has to do with the ease of processing data (numbers, symbols, and control information) and storage. The process of encoding information into signals that digital circuits can use involves combining bits (1s and 0s, equivalent to high and low voltages) into discrete-meaning “words.” The designer dictates what these words will mean to a specific circuit. Unlike analog electronics, digital electronics uses a whole new set of components, which at the heart are all integrated in form. A huge number of specialized ICs are used in digital electronics. Some of these ICs are designed to perform logical operations on input information; others are designed to count; while still others are designed to store information that can be retrieved later on. Digital ICs include logic gates, flip-flops, shift registers, counters, memories, processors, and so on. Digital circuits are what give electrical gadgets “brains.” In order for digital circuits to interact with analog circuits, special analog-to-digital (A/D) conversion circuits are needed to convert analog signals into strings of 1s and 0s. Likewise, digital-to-analog conversion circuits are used to convert strings of 1s and 0s into analog signals. With an understanding of the principals behind digital electronics, we are free to explore the world of microcontrollers. These are programmable digital electronics that can read values from sensors and control output devices using the I/O pins, all on a single IC controlled by a little program. And mixed in among all this is the practical side of electronics. This involves learning to read schematic diagrams, constructing circuit prototypes using breadboards, testing prototypes (using multimeters, oscilloscopes, and logic probes), revising prototypes (if needed), and constructing final circuits using various tools and special circuit boards. In the next chapter, we will start at the beginning by looking at the theory of electronics. C H A PT ER 2 Theory 2.1 Theory of Electronics This chapter covers the basic concepts of electronics, such as current, voltage, resistance, electrical power, capacitance, and inductance. After going through these concepts, this chapter illustrates how to mathematically model currents and voltage through and across basic electrical elements such as resistors, capacitors, and inductors. By using some fundamental laws and theorems, such as Ohm’s law, Kirchhoff’s laws, and Thevenin’s theorem, the chapter presents methods for analyzing complex networks containing resistors, capacitors, and inductors that are driven by a power source. The kinds of power sources used to drive these networks, as we will see, include direct current (dc) sources, alternating current (ac) sources (including sinusoidal and nonsinusoidal periodic sources), and nonsinusoidal nonperiodic sources. We will also discuss transient circuits, where sudden changes in state (such as flipping a switch within a circuit) are encountered. At the end of the chapter, the approach needed to analyze circuits that contain nonlinear elements (diodes, transistors, integrated circuits, etc.) is discussed. We recommend using a circuit simulator program if you’re just starting out in electronics. The web-based simulator CircuitLab (www.circuitlab.com) is extremely easy to use and has a nice graphical interface. There are also online calculators that can help you with many of the calculations in this chapter. Using a simulator program as you go through this chapter will help crystallize your knowledge, while providing an intuitive understanding of circuit behavior. Be careful—simulators can lie, or at least they can appear to lie when you don’t understand all the necessary parameters the simulator needs to make a realistic simulation. It is always important to get your hands dirty—get out the breadboards, wires, resistors, power supplies, and so on, and construct. It is during this stage that you gain the greatest practical knowledge that is necessary for an inventor. It is important to realize that components mentioned in this chapter are only “theoretically” explained. For example, in regard to capacitors, you’ll learn how a capacitor works, what characteristic equations are used to describe a capacitor under certain conditions, and various other basic tricks related to predicting basic behavior. To get important practical insight into capacitors, however, such as real-life capacitor 5 6 PRACTICAL ELECTRONICS FOR INVENTORS applications (filtering, snubbing, oscillator design, etc.), what type of real capacitors exist, how these real capacitors differ in terms of nonideal characteristics, which capacitors work best for a particular application, and, more important, how to read a capacitor label, requires that you jump to Chap. 3, Sec. 3.6, which is dedicated to these issues. This applies to other components mentioned in this theory portion of the book. The theoretical and practical information regarding transformers and nonlinear devices, such as diodes, transistors, and analog and digital integrated circuits (ICs), is not treated within this chapter. Transformers are discussed in full in Chap. 3, Sec. 3.8, while the various nonlinear devices are treated separately in the remaining chapters of this book. A word of advice: if the math in a particular section of this chapter starts looking scary, don’t worry. As it turns out, most of the nasty math in this chapter is used to prove, say, a theorem or law or to give you an idea of how hard things can get if you do not use some mathematical tricks. The actual amount of math you will need to know to design most circuits is surprisingly small; in fact, basic algebra may be all you need to know. Therefore, when the math in a particular section in this chapter starts looking ugly, skim through the section until you locate the useful, nonugly formulas, rules, and so on, that do not have weird mathematical expressions in them. You don’t have to be a mathematical whiz to be able to design decent circuits. 2.2 Electric Current Electric current is the total charge that passes through some cross-sectional area A per unit time. This cross-sectional area could represent a disk placed in a gas, plasma, or liquid, but in electronics, this cross-sectional area is most frequently a slice through a solid material, such as a conductor. If ∆Q is the amount of charge passing through an area in a time interval ∆t, then the average current Iave is defined as: Iave = ∆Q ∆t FIGURE 2.1 If the current changes with time, we define the instantaneous current I by taking the limit as ∆t → 0, so that the current is the instantaneous rate at which charge passes through an area: I = lim Λt → 0 ∆Q dQ = ∆t dt (2.1) The unit of current is coulombs per second, but this unit is also called the ampere (A), named after Andre-Marie Ampere: 1 A = 1 C/s Chapter 2: Theory 7 To sound less nerdy, the term amp can be used in place of ampere. Because the ampere is a rather large unit, current is also expressed in milliamps (1 mA = 1 × 10−3 A), microamps (1 µA = 1 × 10−6 A), and nanoamps (1 nA = 1 × 10−9 A). Within conductors such as copper, electrical current is made up of free electrons moving through a lattice of copper ions. Copper has one free electron per copper atom. The charge on a single electron is given by: Qelectron = (− e) = −1.602 × 10−19 C (2.2.a) This is equal to, but opposite in sign of, the charge of a single copper ion. (The positive charge is a result of the atom donating one electron to the “sea” of free electrons randomly moving about the lattice. The loss of the electron means there is one more proton per atom than electrons.) The charge of a proton is: Qproton = (+ e) = +1.602 × 10−19 C (2.2.b) The conductor, as a whole, is neutral, since there are equal numbers of electrons and protons. Using Eq. 2.2, we see that if a current of 1 A flows through a copper wire, the number of electrons flowing by a cross section of the wire in 1 s is equal to: 1 C electron 1A= = − 6.24 × 1018 electrons/s −19 1 s −1.602 × 10 C Now, there is a problem! How do we get a negative number of electrons flowing per second, as our result indicates? The only two possibilities for this would be to say that either electrons must be flowing in the opposite direction as the defined current, or positive charges must be moving in our wire instead of electrons to account for the sign. The last choice is an incorrect one, since experimental evidence exists to prove electrons are free to move, not positive charges, which are fixed in the lattice network of the conductor. (Note, however, there are media in which positive charge flow is possible, such as positive ion flow in liquids, gases, and plasmas.) It turns out that the first choice—namely, electrons flowing in the opposite direction as the defined current flow—is the correct answer. Long ago, when Benjamin Franklin (often considered the father of electronics) was doing his pioneering work in early electronics, he had a convention of assigning positive charge signs to the mysterious (at that time) things that were moving and doing work. Sometime later, a physicist by the name of Joseph Thomson performed an experiment that isolated the mysterious moving charges. However, to measure and record his experiments, as well as to do his calculations, Thomson had to stick with using the only laws available to him—those formulated using Franklin’s positive currents. But these moving charges that Thomson found (which he called electrons) were moving in the opposite direction of the conventional current I used in the equations, or moving against convention. See Fig. 2.2. What does this mean to us, to those of us not so interested in the detailed physics and such? Well, not too much. We could pretend that there were positive charges moving in the wires and various electrical devices, and everything would work out fine: negative electrons going one way are equivalent to positive charges going in 8 PRACTICAL ELECTRONICS FOR INVENTORS FIGURE 2.2 Thomson changed the notion that positive charges were what were moving in conductors, contrary to Franklin’s notion. However, negative electrons going one way is equivalent to positive charges going the opposite direction, so the old formulas still work. Since you deal with the old formulas, it’s practical to adopt Franklin’s conventional current—though realize that what’s actually moving in conductors is electrons. the opposite direction. In fact, all the formulas used in electronics, such as Ohm’s law (V = IR), “pretend” that the current I is made up of positive charge carriers. We will always be stuck with this convention. In a nutshell, it’s convenient to pretend that positive charges are moving. So when you see the term electron flow, make sure you realize that the conventional current flow I is moving in the opposite direction. In a minute, we’ll discuss the microscopic goings-on within a conductor that will clarify things a bit better. Example 1: How many electrons pass a given point in 3 s if a conductor is carrying a 2-A current? FIGURE 2.3 Answer: The charge that passes a given point in 3 s is: ∆Q = I × ∆t = (2 A)(3 s) = 6 C One electron has a charge of 1.6 × 10−19 C, so 6 C worth of electrons is: # Electrons = 6 C/1.602 × 10−19 C = 3.74 × 1019 Chapter 2: Theory 9 Example 2: Charge is changing in a circuit with time according to Q(t) = (0.001 C) sin [(1000/s) t]. Calculate the instantaneous current flow. I= dQ d = [(0.001C)sin (1000/s ⋅ t)] = (0.001C)(1000/s)cos(1000/s ⋅ t) dt dt = (1A)cos(1000/s ⋅ t) Answer: If we plug in a specific time within this equation, we get an instantaneous current for that time. For example, if t = 1, the current would be 0.174 A. At t = 3 s, the current would be − 0.5 A, the negative sign indicating that the current is in the opposite direction—a result of the sinusoidal nature. Note: The last example involved using calculus—you can read about the basics of calculus in App. C if you’re unfamiliar with it. Fortunately, as we’ll see, rarely do you actually need to work in units of charge when doing electronics. Usually you worry only about current, which can be directly measured using an ammeter, or calculated by applying formulas that usually require no calculus whatsoever. 2.2.1 Currents in Perspective What’s considered a lot or a little amount of current? It’s a good idea to have a gauge of comparison when you start tinkering with electronic devices. Here are some examples: a 100-W lightbulb draws about 1 A; a microwave draws 8 to 13 A; a laptop computer, 2 to 3 A; an electric fan, 1 A; a television, 1 to 3 A; a toaster, 7 to 10 A; a fluorescent light, 1 to 2 A; a radio/stereo, 1 to 4 A; a typical LED, 20 mA; a mobile (smart) phone accessing the web uses around 200 mA; an advanced low-power microchip (individual), a few µA to perhaps even several pA; an automobile starter, around 200 A; a lightning strike, around 1000 A; a sufficient amount of current to induce cardiac/ respiratory arrest, around 100 mA to 1 A. 2.3 Voltage To get electrical current to flow from one point to another, a voltage must exist between the two points. A voltage placed across a conductor gives rise to an electromotive force (EMF) that is responsible for giving all free electrons within the conductor a push. As a technical note, before we begin, voltage is also referred to as a potential difference or just potential—they all mean the same thing. We’ll avoid using these terms, however, because it is easy to confuse them with the term potential energy, which is not the same thing. A simple flashlight circuit, consisting of a battery connected to a lamp, through two conductors and a switch, is shown in Fig. 2.4. When the switch is open (“off”), no current will flow. The moment the switch is closed, however, the resistance of the switch falls to almost zero, and current will flow. This voltage then drives all free electrons, everywhere within the circuit, in a direction that points from negative to positive; conventional current flow, of course, points in the opposite direction (see Benjamin Franklin). 10 PRACTICAL ELECTRONICS FOR INVENTORS FIGURE 2.4 It is important to note that the battery needs the rest of the circuit, just as the rest of the circuit needs the battery. Without the linkage between its terminals, the chemical reactions within the battery cannot be carried out. These chemical reactions involve the transfer of electrons, which by intended design can only occur through a link between the battery’s terminals (e.g., where the circuit goes). Figure 2.5 shows this process using an alkaline dry cell battery. Notice that the flow of current is conserved through the circuit, even though the nature of the current throughout the circuit varies—ionic current within sections of the battery, electron current elsewhere. FIGURE 2.5 As free electrons within the lamp filament experience an EMF due to the applied voltage, the extra energy they gain is transferred to the filament lattice atoms, which result in heat (filament atomic vibrations) and emitted light (when a valence electron of a lattice atom is excited by a free electron and the bound electron returns to a lower energy configuration, thus releasing a photon). A device that maintains a constant voltage across it terminals is called a direct current voltage source (or dc voltage source). A battery is an example of a dc voltage source. The schematic symbol for a battery is . Chapter 2: Theory 11 2.3.1 The Mechanisms of Voltage To get a mental image of how a battery generates an EMF through a circuit, we envision that chemical reactions inside yield free electrons that quickly build in number within the negative terminal region (anode material), causing an electron concentration. This concentration is full of repulsive force (electrons repel) that can be viewed as a kind of “electrical pressure.” With a load (e.g., our flashlight lamp, conductors, switch) placed between the battery’s terminals, electrons from the battery’s negative terminal attempt to alleviate this pressure by dispersing into the circuit. These electrons increase the concentration of free electrons within the end of the conductor attached to the negative terminal. Even a small percentage difference in free electron concentration in one region gives rise to great repulsive forces between free electrons. The repulsive force is expressed as a seemingly instantaneous (close to the speed of light) pulse that travels throughout the circuit. Those free electrons nearest to the pumped-in electrons are quickly repulsed in the opposite direction; the next neighboring electrons get shoved, and so on down the line, causing a chain reaction, or pulse. This pulse travels down the conductor near the speed of light. See Fig. 2.6. FIGURE 2.6 The actual physical movement of electrons is, on average, much slower. In fact, the drift velocity (average net velocity of electrons toward the positive terminal) is usually fractions of a millimeter per second—say, 0.002 mm/s for a 0.1-A current through a 12-gauge wire. We associate this drift movement of free electrons with current flow or, more precisely, conventional current flow I moving in the opposite direction. (As it turns out, the actual motion of electrons is quite complex, involving thermal effects, too—we’ll go over this in the next section.) It is likely that those electrons farther “down in” the circuit will not feel the same level of repulsive force, since there may be quite a bit of material in the way which absorbs some of the repulsive energy flow emanating from the negative terminal (absorbing via electron-electron collisions, free electron–bond electron interactions, etc.). And, as you probably know, circuits can contain large numbers of components, some of which are buried deep within a complex network of pathways. It is possible to imagine that through some of these pathways the repulsive effects are reduced to a weak nudge. We associate these regions of “weak nudge” with regions of low 12 PRACTICAL ELECTRONICS FOR INVENTORS “electrical pressure,” or voltage. Electrons in these regions have little potential to do work—they have low potential energy relative to those closer to the source of pumped-in electrons. Voltage represents the difference in potential energy. A unit charge has been at one location relative to another within a region of “electrical pressure”—the pressure attributed to new free electrons being pumped into the system. The relationship between the voltage and the difference in potential energy is expressed as: VAB = U AB U − UA ∆U or VB − VA = B or ∆V = q q q FIGURE 2.7 Implicit in the definition of voltage is the notion that voltage is always a measurement between two points, say point A and point B. That is the reason for the subscript “AB” in VAB. The symbol ∆V means the same. Both infer that there is an absolute scale on which to measure and give individual points a specific voltage value. In electronics, we can create such a scale by picking a point, often the point where there is the lowest electrical pressure, and defining this point as the zero point, or 0-V reference. In many dc circuits, people choose the negative terminal of the battery as the 0-V reference, and let every(more on this later). In practice, one know by inserting a ground symbol you rarely see voltages expressed using subscripts (VAB) or deltas (∆V), but instead you simply see the symbol V, or you may see a symbol like VR. The “blank symbol” V, however, is always modified with a phrase stating the two points across which the voltage is present. In the second case, VR, the subscript means that the voltage is measured across the component R—in this case, a resistor. In light of this, we can write a cleaner expression for the voltage/ potential energy expression: V= U q Just make sure you remember that the voltage and potential energy variables represent the difference in relation to two points. As we’ll discover, all the big electronics laws usually assume that variables of voltage or energy are of this “clean form.” In our flashlight example, we can calculate the difference in potential energy between an electron emanating from the negative terminal of the 1.5-V battery and one entering the positive terminal. ∆U = ∆Vq = (1.5 V)(1.602 × 10−19 C) = 2.4 × 10−19 J Notice that this result gives us the potential energy difference between the two electrons, not the actual potential energy of either the electron emanating from the Chapter 2: Theory 13 negative terminal (U1) or the electron entering the positive terminal (U0). However, if we make the assumption that the electron entering the positive terminal is at zero potential energy, we can figure that the electron emanating from the negative terminal has a relative potential energy of: U1 = ∆U + U0 = ∆U + 0 = 2.4 × 10−19 J Note: Increasing positive potential energy can be associated with similar charges getting closer together. Decreasing energy can be associated with similar charges getting farther apart. We avoided the use of a negative sign in front of the charge of the electron, because voltages are defined by a positive test charge. We are in a pickle similar to the one we saw with Benjamin Franklin’s positive charges. As long as we treat the potential relative to the pumped-in electron concentration, things work out. In a real circuit, where the number of electrons pumped out by the battery will be quite large—hundreds to thousands of trillions of electrons, depending on the resistance to electron flow—we must multiply our previous calculation by the total number of entering electrons. For example, if our flashlight draws 0.1 A, there will be 6.24 × 1017 electrons pumped into it by the battery per second, so you calculate the potential energy of all the new electrons together to be about 0.15 J/s. What about the potential energies of free electrons at other locations throughout the circuit, such as those found in the lamp filament, those in the positive wire, those in the negative wire, and so on? We can say that somewhere in the filament of the lamp, there is an electron that has half the potential energy of a fresh pumped-in electron emanating from the negative terminal of the battery. We attribute this lower energy to the fact that other free electrons up the line have lost energy due to collision mechanisms, which in turn yields a weaker electrical repulsive pressure (shoving action) that our electron in question experiences. In fact, in our flashlight circuit, we attribute all loss in electrical pressure to be through the lamp filament as free-electron energy is converted into heat and light. FIGURE 2.8 In regard to potential energies of free electrons within the conductors leading to and from the battery, we assume all electrons within the same conductor have the 14 PRACTICAL ELECTRONICS FOR INVENTORS same potential energy. This assumes that there is no voltage difference between points in the same conductor. For example, if you take a voltmeter and place it between any two points of a single conductor, it will measure 0 V. (See Fig. 2.8.) For practical purposes, we accept this as true. However, in reality it isn’t. There is a slight voltage drop through a conductor, and if we had a voltmeter that was extremely accurate we might measure a voltage drop of 0.00001 V or so, depending on the length of the conductor, current flow, and conductor material type. This is attributed to internal resistance within conductors—a topic we’ll cover in a moment. 2.3.2 Definition of Volt and Generalized Power Law We come now to a formal definition of the volt—the unit of measure of voltage. Using the relationship between voltage and potential energy difference V = U/q, we define a volt to be: 1 volt = 1 joule 1J ,1V = J/C (Energy definition) 1 coulomb 1C (Be aware that the use of “V” for both an algebraic quantity and a unit of voltage is a potential source of confusion in an expression like V = 1.5 V. The algebraic quantity is in italic.) Two points with a voltage of 1 V between them have enough “pressure” to perform 1 J worth of work while moving 1 C worth of charge between the points. For example, an ideal 1.5-V battery is capable of moving 1 C of charge through a circuit while performing 1.5 J worth of work. Another way to define a volt is in terms of power, which happens to be more useful in electronics. Power represents how much energy per second goes into powering a circuit. According to the conservation of energy, we can say the power used to drive a circuit must equal the power used by the circuit to do useful work plus the power wasted, as in the case of heat. Assuming that a single electron loses all its potential energy from going through a circuit from negative to positive terminal, we say, for the sake of argument, that all this energy must have been converted to work—useful and wasted (heat). By definition, power is mathematically expressed as dW/dt. If we substitute the potential energy expression U = Vq for W, assuming the voltage is constant (e.g., battery voltage), we get the following: P= dq dW dU = =V dt dt dt Since we know that current I = dq/dt, we can substitute this into the preceding expression to get: P = VI (2.3) This is referred to as the generalized power law. This law is incredibly powerful, and it provides a general result, one that is independent of type of material and of the nature of the charge movement. The unit of this electrical power is watts (W), with 1 W = 1 J/s, or in terms of volts and amps, 1 W = 1 VA. Chapter 2: Theory 15 In terms of power, then, the volt is defined as: 1 volt = 1 watt 1W ,1V= = W/A 1 amp 1A The generalized power law can be used to determine the power loss of any circuit, given only the voltage applied across it and the current drawn, both of which can easily be measured using a voltmeter and an ammeter. However, it doesn’t tell you specifically how this power is used up—more on this when we get to resistance. See Fig. 2.9. FIGURE 2.9 Example 1: Our 1.5-V flashlight circuit draws 0.1 A. How much power does the circuit consume? Answer: P = VI = (1.5 V)(0.1 A) = 0.15 W Example 2: A 12-V electrical device is specified as consuming 100 W of power. How much current does it draw? Answer: I= 2.3.3 P 100 W = = 8.3 A V 12 V Combining Batteries To get a larger voltage capable of supplying more power, we can place two batteries in series (end to end), as shown in Fig. 2.10. The voltage across the combination is equal to the individual battery voltages added together. In essence, we have placed two charge pumps in series, increasing the effective electrical pressure. Chemically speaking, if the batteries are of the same voltage, we double the number of chemical reactions, doubling the number of electrons that can be pumped out into the circuit. In Fig. 2.10, we use the notion of a ground reference, or 0-V reference, symbolized . Though this symbol is used to represent an earth ground (which we define a bit later), it can also be used to indicate the point where all voltage measurements are to be 16 PRACTICAL ELECTRONICS FOR INVENTORS FIGURE 2.10 referenced within a circuit. Logically, whenever you create a scale of measure, you pick the lowest point in the scale to be zero—0 V here. For most dc circuits, the ground reference point is usually placed at the negative terminal of the voltage source. With the notion of ground reference point, we also get the notion of a point voltage, which is the voltage measured between the ground reference and a specific point of interest within the circuit. For example, the single battery shown in Fig. 2.10 has a voltage of 1.5 V. We place a ground reference at the negative terminal and give this a 0-V point voltage, and place a 1.5-V point voltage marker at the positive terminal. In the center of Fig. 2.10, we have two 1.5-V batteries in series, giving a combined voltage of 3.0 V. A ground placed at the negative terminal of the lower battery gives us point voltages of 1.5 V between the batteries, and 3.0 V at the positive terminal of the top battery. A load placed between ground and 3.0 V will result in a load current that returns to the lower battery’s negative terminal. Finally, it is possible to create a split supply by simply repositioning the 0-V ground reference, placing it between the batteries. This creates +1.5 V and −1.5 V leads relative to the 0-V reference. Many circuits require both positive and negative voltage relative to a 0-V ground reference. In this case, the 0-V ground reference acts as a common return. This is often necessary, say, in an audio circuit, where signals are sinusoidal and alternate between positive and negative voltage relative to a 0-V reference. 2.3.4 Other Voltage Sources There are other mechanisms besides the chemical reactions within batteries that give rise to an electromotive force that pushes electrons through circuits. Some examples include magnetic induction, photovoltaic action, thermoelectric effect, piezoelectric effect, and static electric effect. Magnetic induction (used in electrical generators) and photovoltaic action (used in photocells), along with chemical reactions, are, however, the only mechanisms of those listed that provide enough power to drive most circuits. The thermoelectric and piezoelectric effects are usually so small (mV range, typically) that they are limited to sensor-type applications. Static electric effect is based on giving objects, such as conductors and insulators, a surplus of charge. Though voltages can become very high between charged objects, if a circuit were connected between the objects, a dangerous discharge of current could flow, possibly damaging sensitive circuits. Also, once the discharge is complete—a matter of milliseconds—there Chapter 2: Theory 17 is no more current to power the circuit. Static electricity is considered a nuisance in electronics, not a source of useful power. We’ll discuss all these different mechanisms in more detail throughout the book. 2.3.5 Water Analogies It is often helpful to use a water analogy to explain voltage. In Fig. 2.11, we treat a dc voltage source as a water pump, wires like pipes, Benjamin Franklin’s positive charges as water, and conventional current flow like water flow. A load (resistor) is treated as a network of stationary force-absorbing particles that limit water flow. We’ll leave it to you to compare the similarities and differences. FIGURE 2.11 Here’s another water analogy that relies on gravity to provide the pressure. Though this analogy falls short of being accurate in many regards, it at least demonstrates how a larger voltage (greater water pressure) can result in greater current flow. FIGURE 2.12 18 PRACTICAL ELECTRONICS FOR INVENTORS It’s not wise to focus too much attention on these water analogies—they fall short of being truly analogous to electric circuits. Take them with a grain of salt. The next section will prove how true this is. Example 1: Find the voltage between the various points indicated in the following figures. For example, the voltage between points A and B in Fig. 2.13a is 12 V. FIGURE 2.13 Answer: a. VAC = 0, VBD = 0, VAD = 0, VBC = 0. b. VAC = 3 V, VBD = 0 V, VAD = 12 V, VBC = 9 V. c. VAC = 12 V, VBD = 9V. VAD = 21V, VBC = 0 V. d. VAC = 3 V, VAB = 6 V, VCD = 1.5 V, VAD = 1.5 V, VBD = 4.5 V. Example 2: Find the point voltages (referenced to ground) at the various locations indicated in the following figures. FIGURE 2.14 Answer: a. A = 3 V, B = −3 V, C = 3 V, D = 3 V, E = 3 V, F = 3 V, G = 6 V, H = 9 V. b. A = 1.5 V, B = 0 V, C = 1.5 V, D = 1.5 V, E = −1.5 V, F = −3.0 V, G = 1.5 V, H = −1.5 V. 2.4 A Microscopic View of Conduction (for Those Who Are Interested) At a microscopic level, a copper conductor resembles a lattice of copper balls packed together in what’s called a face-centered-cubic lattice structure, as shown in Fig. 2.15. For copper, as well as other metals, the bonding mechanism that holds everything together is referred to as metallic bonding, where outermost valence electrons from the metal atoms form a “cloud of free electrons” which fill the space between the metal ions (positively charged atoms missing an electron that became “free”—see the planetary model in Fig. 2.15b). This cloud of free electrons acts as a glue, holding the lattice metal ions together. Chapter 2: Theory 19 FIGURE 2.15 (a) Copper nucleus composed of protons and neutrons held together by nuclear forces that is roughly 137 times stronger than the electromagnetic force. (b) Copper atoms, as viewed by the classic planetary model, consisting of valance electrons held in orbit by electric forces. Quantum mechanics is required to explain why electrons exist in discrete energy levels, and why they don’t fall into the nucleus or radiate electromagnetic energy as they orbit. (c) Copper lattice has a face-centered cubic packing arrangement. (d) Scanning tunneling electron microscope (STM) image of copper 100, courtesy of Institut für Allgemeine Physik, TU Wien. (e) Ball packing model of lattice, showing irregularities in lattice geometry, partly caused by impurities (other kinds of atoms). (f) Lattice view showing that lattice atoms vibrate due to external thermal interactions as well as interactions with free electrons. Free electrons move about randomly, at varying speeds and directions, colliding with other electrons and lattice ions. Under normal conditions, they do not leave the surface of the metal. Each free electron within the cloud of free electrons moves about in random directions and speeds, colliding and rebounding “off” metal ions and other imperfections (impurities in lattice and grain boundary transitions, etc.). It is important to realize that this is occurring in a chunk of copper, at room temperature, without any applied voltage. At room temperature, no free electrons ever leave the surface of the metal. A free electron cannot escape the coulomb (electric) attractive forces presented by the positive metal ions in the lattice. (We’ll see later that under special conditions, using unique mechanisms, it is possible for electrons to escape.) According to what’s called the free-electron model—a classical model that treats free electrons as a gas of noninteracting charges—there is approximately one free electron per copper atom, giving a copper conductor a free electron concentration of ρn = 8.5 × 1028 electrons/m3. This model predicts that, under normal conditions (a piece of copper just sitting there at room temperature), the thermal velocity v of electrons (or root-mean-square speed) within copper is about 120 km/s (1.2 × 105 m/s), but 20 PRACTICAL ELECTRONICS FOR INVENTORS depends on temperature. The average distance an electron travels before it collides with something, called the mean free path λ, is about 0.000003 mm (2.9 × 10−9 m), with the average time between collisions τ of roughly 0.000000000000024 s (2.4 × 10−14 s). The free-electron model is qualitatively correct in many respects, but isn’t as accurate as models based on quantum mechanics. (The speed, path, and time are related by v = λ/τ.) In quantum mechanics, electrons obey velocity-distribution laws based on quantum physics, and the movement of electrons depends on these quantum ideas. It requires that we treat electrons as though they were waves scattering from the lattice structure of the copper. The quantum view shows the thermal speed (now called Fermi velocity vF) of a free electron to be faster than that predicted by the free-electron model, now around 1.57 × 106 m/s, and contrarily, it is essentially independent of temperature. In addition, the quantum model predicts a larger mean free path, now around 3.9 × 10−8 m, which is independent of temperature. The quantum view happens to be the accepted view, since it gives answers that match more precisely with experimental data. Table 2.1 shows the Fermi velocities of electrons for various metals. TABLE 2.1 Condensed Matter Properties of Various Metals FERMI ENERGY E F (eV) FERMI TEMPERATURE (ë 104 K) Copper (Cu) 7.00 8.16 Silver (Ag) 5.49 Gold (Au) 5.53 MATERIAL Iron (Fe) Tin (Sn) Lead (Pb) Aluminum (Al) 11.1 8.15 9.47 11.7 FERMI VELOCITY (M/S) 2E F VF = C me C2 FREE-ELECTRON DENSITY qe (ELECTRONS/m3) WORK FUNCTION W (eV) 1.57 × 106 8.47 × 1028 4.7 6.38 1.39 × 106 5.86 × 1028 4.73 6.42 1.40 × 106 5.90 × 1028 5.1 1.98 × 106 17.0 × 1028 4.5 1.69 × 106 14.8 × 1028 4.42 6 28 13.0 9.46 11.0 1.83 × 10 13.2 × 10 4.14 13.6 2.03 × 106 18.1 × 1028 4.08 Note: 1 eV = 1.6022 × 10−19 J, me = 9.11 × 10−31 kg, c = 3.0 × 108 m/s Fermi energy and free electron density data from N.W. Ashcroft and N.D. Mermin, Solid State Physics, Saunders, 1976; work function data from Paul A. Tipler and Ralph A. Llewellyn, Modern Physics, 3rd ed., W.H. Freeman, 1999. Also, the surface binding energy (caused by electrostatic attraction) that prevents electrons from exiting the surface of the metal, referred to as the work function, is about 4.7 eV for copper (1 eV = 1.6022 × 10−19 J). The only way to eject electrons is through special processes, such as thermionic emission, field emission, secondary emission, and photoelectric emission. (Thermionic emission: increase in temperature provides free electrons enough energy to overcome work function of the material. The emitted electron is referred to as a thermoelectron. Field emission: additional energy from an electric field generated by a high-voltage conductor provides an attractive enough positive field to free electrons from the surface. This requires huge voltages [MV per cm between emitting surface Chapter 2: Theory 21 and positive conductor]. Secondary emission: electrons are emitted from a metallic surface by the bombardment of high-speed electrons or other particles. Photoelectric emission: electron in material absorbs energy from incoming photon of particular frequency, giving it enough energy to overcome work function. A photon must be of the correct frequency, governed by W = hf0, for this to occur [Planck’s constant h = 6.63 × 10−34 J-s or 4.14 × 10−14 eV; f0 is in hertz]). 2.4.1 Applying a Voltage Next, we wish to see what happens when we apply a voltage across the conductor— say, by attaching a thick copper wire across a battery. When we do this, our randomly moving free electrons all experience a force pointing toward the positive end of the wire due to the electric field set up within the wire. (The field is due to the negative concentration of pumped-in electrons at one end relative to the neutral [positive relative to negative] concentration at the other end.) The actual influence this force has on the motion of the random free electrons is small—the thermal velocity is so large that it is difficult to change the momentum of the electrons. What you get is a slightly parabolic deviation in path, as shown in Fig. 2.16. FIGURE 2.16 (a) Simplistic view of an electron randomly moving through a copper lattice, rebounding off lattice atoms and impurities. (b) An electron collides frequently with the ions and impurities in a metal and scatters randomly. In an electric field, the electron picks up a small component of velocity opposite the field. The differences in the paths are exaggerated. The electron’s path in an electric field is slightly parabolic. (c) Model illustrating current density, drift velocity, charge density, thermal velocity, and current. 22 PRACTICAL ELECTRONICS FOR INVENTORS Normally, the field present in the wire would create a net acceleration component in the direction of the force; however, the constant collisions electrons experience create a drag force, similar to the drag experienced by a parachute. The net effect is an average group velocity referred to as the drift velocity vd. Remarkably, this velocity is surprisingly small. For example, the voltage applied to a 12-gauge copper wire to yield a 0.100-A current will result in a drift velocity of about 0.002 mm per second! The drift velocity is related, determined by vd = J/(ρe e) where J is the current density—the current flowing through an area ( J = I/A), ρe is the free-electron density in the material, and e is the charge of an electron. Table 2.1 shows free-electron densities for various materials. As you can see, the drift velocity varies with current and diameter of the conductor. The drift velocity is so slow, only fractions of a millimeter per second, that it is worth pondering how a measurable current can even flow. For example, what happens when you flip the switch on a flashlight? Of course, we don’t have to wait hours for electrons to move down the conductors from the battery. When we throw the switch, the electric field of the incoming electron has a repulsive effect on its neighbor within the wire. This neighbor then moves away toward another neighbor, creating a chain of interactions that propagates through the material at near the speed of light. (See Fig. 2.17.) This reaction, however, really isn’t the speed of light, but a fraction less, depending on the medium. The free electrons spreading throughout the conductor all start moving at once in response—those nearest the switch, as well as those nearest the light filament or LED. A similar effect occurs in fluid flow, as when you turn on a garden hose. Because if the hose is already full of water, the outflow starts immediately. The force of the water at the faucet end is quickly transmitted all along the hose, and the water at the open end of the hose flows almost at the moment the faucet is opened. FIGURE 2.17 Illustration of how the electric field propagates down a wire as electrons are pumped into one end. In the case of alternating current, the field reverses directions in a sinusoidal fashion, causing the drift velocity component of electrons to swish back and forth. If the alternating current has a frequency of 60 Hz, the velocity component would be vibrating back and forth 60 times a second. If our maximum drift velocity during an ac cycle is 0.002 mm/s, we could roughly determine that the distance between Chapter 2: Theory 23 maximum swings in the drift distance would be about 0.00045 mm. Of course, this doesn’t mean that electrons are fixed in an oscillatory position. It means only that the drift displacement component of electrons is—if there is such a notion. Recall that an electron’s overall motion is quite random and its actual displacement quite large, due to the thermal effects. 2.5 Resistance, Resistivity, Conductivity As was explained in the last section, free electrons in a copper wire at room temperature undergo frequent collisions with other electrons, lattice ions, and impurities within the lattice that limit their forward motion. We associate these microscopic mechanisms that impede electron flow with electrical resistance. In 1826, Georg Simon Ohm published experimental results regarding the resistance of different materials, using a qualitative approach that wasn’t concerned with the hidden mechanisms, but rather considered only the net observable effects. He found a linear relationship between how much current flowed through a material when a given voltage was applied across it. He defined the resistance to be the ratio of the applied voltage divided by the resultant current flow, given by: R≡ V I (2.4) This statement is called Ohm’s law, where R is the resistance, given in volts per ampere or ohms (abbreviated with the Greek symbol omega, Ω). One ohm is the resistance through which a current of 1 A flows when a voltage of 1 V is applied: 1 Ω = 1 V/1 A The symbol is used to designate a resistor. Now, Ohm’s law isn’t really a law, but rather an empirical statement about the behavior of materials. In fact, there are some materials for which Ohm’s law actually doesn’t work. FIGURE 2.18 24 PRACTICAL ELECTRONICS FOR INVENTORS Ohm’s law can be applied only to ohmic materials—materials whose resistance remains constant over a range of voltages. Nonohmic materials, on the other hand, do not follow this pattern; they do not obey Ohm’s law. For example, a diode is a device that allows current to pass easily when the voltage is positive, but prevents current flow (creates a high resistance) when the voltage is negative. CURIOUS NOTE ABOUT OHM’S LAW Usually you see Ohm’s law written in the following form: V=I×R However, in this form it is tempting to define voltage in terms of resistance and current. It is important to realize that R is the resistance of an ohmic material and is independent of V in Ohm’s law. In fact, Ohm’s law does not say anything about voltage; rather, it defines resistance in terms of it and cannot be applied to other areas of physics such as static electricity, because there is no current flow. In other words, you don’t define voltage in terms of current and resistance; you define resistance in terms of voltage and current. That’s not to say that you can’t apply Ohm’s law to, say, predict what voltage must exist across a known resistance, given a measured current. In fact, this is done all the time in circuit analysis. 2.5.1 How the Shape of a Conductor Affects Resistance The resistance of a conducting wire of a given material varies with its shape. Doubling the length of a wire doubles the resistance, allowing half the current to flow, assuming similar applied voltages. Conversely, doubling the cross-sectional area A has the opposite effect—the resistance is cut in half, and twice as much current will flow, again assuming similar applied voltages. Increasing resistance with length can be explained by the fact that down the wire, there are more lattice ions and imperfections present for which an applied field (electric field instigated by added electrons pumped in by the source) must shove against. This field is less effective at moving electrons because as you go down the line, there are more electrons pushing back—there are more collisions occurring on average. Decreasing resistance with cross-sectional area can be explained by the fact that a larger-volume conductor (greater cross-sectional area) can support a larger current flow. If you have a thin wire passing 0.100 A and a thick wire passing 0.100 A, the thinner wire must concentrate the 0.100 A through a small volume, while the thick wire can distribute this current over a greater volume. Electrons confined to a smaller volume tend to undergo a greater number of collisions with other electrons, lattice ions, and imperfections than a wire with a larger volume. The concentration of free-electron flow, according to Benjamin Franklin’s convention, represents a concentration of conventional current flow in the opposite direction. This concentration of current flow is called the current density J—the rate of current flows per unit area. For a wire: J = I/A. Figure 2.19 demonstrates how the current density is greater in a thin 12-gauge wire than in a thicker 4-gauge wire. It also shows that the drift velocity Chapter 2: Theory 25 in the thick wire is less than the drift velocity in the thin wire—a result of a “decrease in electron field pressure” lowering the average “push” in the current flow direction. FIGURE 2.19 Effects of wire diameter on resistance. A thinner wire has more resistance per unit length than a thicker wire. 2.5.2 Resistivity and Conductivity We have left out the most important aspect of resistance that has nothing to do with the physical length or diameter of the material. How does the “chemistry” of the material affect the resistance? For example, if you have a copper wire with the same dimensions as a brass wire, which metal has the greater overall resistance? To answer this question, as well as provide a way to categorize materials, we adopt the concept of resistivity. Unlike resistance, resistivity is entirely independent of the dimensions of the material. Resistivity is a property unique to the material. The resistivity ρ is defined as follows: ρ≡ R A L (2.5) where A is the cross-sectional area, L is the length, and R is the overall resistance of the material, as measured across its length. The units of resistivity are ohm-meters (Ωm). For some, resistivity is too negative a concept—it tells you how “bad” something is at passing current. Optimists prefer the concept of conductivity—how “good” something is at passing current. Conductivity, symbolized σ, is simply the mathematical inverse of resistivity: σ≡ 1 ρ (2.6) The units of conductivity are siemens, S = (Ωm)−1. (Mathematical note: [Ωm]−1 = 1/[Ωm]). Both conductivity and resistivity contain the same important underlining information. Some prefer to play with equations that use the optimistic notion of conductivity (“glass half full”); others prefer the pessimistic notion of resistivity (“glass half empty”). In terms of resistivity and conductivity, we can rewrite Ohm’s law as follows: V = IR = ρ L I×L I= A σ×A (2.7) Table 2.2 shows the conductivities (resistivities, for the pessimists) of various materials. (Consult a technical handbook, such as The Handbook of Chemistry and 26 PRACTICAL ELECTRONICS FOR INVENTORS Physics, for a more complete list.) The conductivity of metals, such as copper and silver, is a factor of 1021 higher than that of a good insulator, such as Teflon. Though both copper and silver are great conductors, silver is simply too expensive for practical use. Though aluminum is a fairly good conductor and was actually used at one time in home circuitry, it quickly became apparent that it oxidized badly, inhibiting good electrical contacts and limiting current flow to channels of limited size. The result produced fire hazards. TABLE 2.2 Conductivity of Various Materials RESISTIVITY q (WM) CONDUCTIVITY r (WM)−1 Aluminum 2.82 × 10−8 3.55 × 107 Gold 2.44 × 10−8 4.10 × 107 Silver 1.59 × 10 −8 7 Copper 1.72 × 10 −8 7 Iron 10.0 × 10−8 1.0 × 107 5.6 × 10 −8 Platinum 10.6 × 10 −8 Lead 0.22 × 10−6 4.54 × 106 0.72 × 10 −6 6 100 × 10 −8 MATERIAL TEMPERATURE COEFFICIENT ` (°C−1) THERMAL RESISTIVITY (W/cm °C)−1 THERMAL CONDUCTIVITY K (W/cm °C) Conductors Tungsten Steel (stainless) Nichrome Manganin Brass 0.462 2.165 0.343 2.913 0.0038 0.240 4.173 0.0039 0.254 3.937 0.0050 1.495 0.669 7 0.0045 0.508 1.969 7 0.003927 2.915 0.343 6.757 0.148 (312) 0.820 1.22 0.686 1.457 (pure) 1.692 0.591 6.29 × 10 5.81 × 10 1.8 × 10 1.0 × 10 0.0039 1.39 × 10 7 0.1 × 10 0.0004 44 × 10−8 0.23 × 107 0.00001 −8 7 7 × 10 1.4 × 10 0.002 Semiconductors 3.5 × 10−5 2.9 × 104 -0.0005 Germanium 0.46 2.2 -0.048 Silicon 640 3.5 × 10−3 -0.075 Carbon (Graphite) Gallium arsenide Insulators Glass Neoprene rubber Quartz (fused) Sulfur Teflon 1010–1014 9 10 75 × 1016 10−14–10−10 10−9 10−16 15 10−15 14 10−14 10 10 An important feature of resistivity (or conductivity) is its temperature dependency. Generally, within a certain temperature range, the resistivity for a large number of metals obeys the following equation: ρ = ρ0[1 + α(T − T0)] (2.8) where ρ is the calculated resistivity based on a set reference resistivity ρ0 and temperature T0. Alpha α is called the temperature coefficient of resistivity, given in units Chapter 2: Theory 27 of 1/°C or (°C)−1. The resistivity for most metals increases with temperature because lattice atom vibrations caused by thermal energy (increased temperature) impede the drift velocity of conducting electrons. Are Water, Air, and Vacuums Considered Insulators or Conductors? These media require special mention. See comments presented in Table 2.3. TABLE 2.3 Resistivity of Special Materials MATERIAL Pure water Saltwater Human skin Air RESISTIVITY, q (WM) COMMENTS 2.5 × 105 Distilled water is a very good insulator—it has a high resistivity. The rather weak mechanism of conduction is one based on ion flow, not electron flow, as we saw in metals. Water normally has an autoionization at room temperature that gives rise to an amount of H3O+ and OH− ions, which number small in comparison to H2O molecules (1:10−7). If a battery of known voltage is connected to two copper electrodes placed apart within a bucket of distilled water, and a current is measured in the hardwire section of the circuit, using Ohm’s law, we find that the water presents a resistance of around 20 × 106 Ω/cm. Between the electrodes, H3O+ flows toward the negative electrode, and OH− flows toward the positive electrode. When each ion makes contact with the electrodes, it deposits an electron or accepts an electron, whereby the ion recombines in solution. ∼0.2 Adding an ionic compound in the form of common salt (NaCl) to water increases the ion concentration within solution—NaCl ionizes into Na+ and Cl−. A gram of salt added introduces around 2 × 1022 ions. These ions act as charge carriers, which in turn, effectively lowers the solution’s resistance to below an ohm per meter. If we use the solution as a conductor between a battery and a lamp— via electrodes placed in solution—there is ample current to light the lamp. ∼5.0 × 105 Varies with moisture and salt content. Considered an insulator since it is fairly void of free electrons. However, like liquids, air often contains concentrations of positive and negative airborne ions. The formation of an air ion starts out with an electron being knocked off a neutral air molecule, such as oxygen (O2) or nitrogen (N2), via naturally occurring bombardment with x-rays, gamma rays, or alpha particles emitted by decaying radon atoms. (There are about 5 to 10 ion pairs produced per second per centimeter at sea level; more around radon areas.) The positive molecule of oxygen or nitrogen rapidly attracts polar molecules (from 10 to 15 in number), mostly water. The resulting cluster is called a positive air ion. The liberated electron, on the other hand, will most likely attach itself to an oxygen molecule (nitrogen has no affinity for electrons). Note: air is considered neutral—ions are always formed in pairs, equal parts positive and negative. For current to flow through air, you must apply an electric field across the air— say, by using two parallel plates placed apart and set to different potentials (a voltage existing between them). At low voltage, the field strength is small and you may get movement of air ions between the plates, but since the concentration of free-floating ions is so small, there is practically no current. However, if you increase the field strength, it is possible to accelerate those free electrons (those liberated by natural processes) within the air to such high velocities (toward the positive plate) that these electrons themselves can have enough energy to collide with air molecules and generate more ion pairs (positive and negative). The breakdown field strength at which to instigate these ionizations is somewhere around 3 megavolts per meter between plane electrodes in air. Two metal plates 1 cm apart need about 30,000 V for ionization to take place between the plates. However, you can increase the strength of an electric field by replacing one of the plates with a sharp metal point or thin wire. The required voltage drops to a few kilovolts. What occurs can be classified into the following: (Continued ) 28 PRACTICAL ELECTRONICS FOR INVENTORS TABLE 2.3 Resistivity of Special Materials (Continued) MATERIAL Air RESISTIVITY, q (WM) COMMENTS Corona discharge: Ionization is limited to a small region around the electrode, where the breakdown field strength is exceeded. In the rest of the field, there is just a current of slow-moving ions and even slower-moving charged particles finding their way to the counter electrode (which may be an oppositely charged plate, or simply the wall of the room or the ground). Such a discharge may be maintained as long as the breakdown field strength is exceeded in some region. Spark discharge: May take place between two well-rounded conductors at different potentials, one of them often grounded. Like corona discharge, the discharge starts at a point where the breakdown field strength is exceeded. But in contrast to corona discharge, in a spark the ionization takes place all the way between the electrodes. The discharge is very fast, and the energy of the discharge is confined to a narrow volume. The voltage necessary to cause breakdown is called the breakdown voltage. For example, when you become charged by walking across an insulated floor (e.g., carpet) with insulated shoes and acquire a charge due to contact and friction, then touch a grounded object, charge will flow between you, even before you make physical contact— the spark. Few people notice discharges at voltages lower than about 1000 V. Most people start to feel an unpleasant effect around 2000 V. Almost everyone will complain when exposed to discharges at voltages above 3000 V. Brush discharge: In between the corona discharge and the spark, which may take place, for example, between a charged material and a normally grounded electrode with a radius of curvature of some millimeters. If a brush discharge is maintained over longer periods, it may appear as irregular luminescent paths. Almost all discharges from insulators are brush discharges, like the crackle heard as you pick up a charged photocopy or that you feel when you pull a sweater over your head. Vacuum 2.6 Considered a perfect insulator, since, by definition, it contains no free charges at all. However, this doesn’t mean it isn’t possible for charges to pass through it. Various mechanisms can eject electrons from a material into a so-called vacuum. (This applies for air, too.) Examples of such mechanisms include thermionic emission, where an increase in temperature provides free electrons enough energy to overcome surface potential barriers (the work function) of the material; field emission, whereby additional energy from an electric field generated by a high-voltage conductor provides an attractive enough positive field to free electrons from the surface, which requires huge voltages (MV per cm between emitting surface and positive conductor); secondary emission, where electrons are emitted from a metallic surface by the bombardment of high-speed electrons or other particles; photoelectric emission, where electrons are ejected from the surface of a material when a photon of a particular frequency strikes it (absorbed electron). Many of these mechanisms are employed in vacuum tube technology. However, without such mechanisms to source electrons, there will be no source of charge within the vacuum to support a current. Insulators, Conductors, and Semiconductors As we have seen, the electrical resistivities of materials vary greatly between conductors and insulators. A decent conductor has around 10−8 Ωm; a good insulator has around 1014 Ωm; a typical semiconductor from 10−5 to 103 Ωm—depending on temperature. What is the microscopic explanation for these differences? The answer to this question rests upon the quantum nature of electrons. In classical physics the energy of an electron in a metal can take on any value—it is said the energy values form a continuum. (Here, electron energy is considered zero at infinite Chapter 2: Theory 29 distance from the nucleus and becomes more negative in energy closer to the nucleus, relative to the zero reference state. Negative energy infers that there is electric attraction between the positive nucleus and the electron—it is electric potential energy.) However, a quantum description of electrons in metals shows that the energy values of electrons are quantized, taking on discrete values. This comes from the wavelike nature of electrons—analogous to standing waves on strings existing only at discrete frequencies. Figure 2.20 shows an energy diagram illustrating the possible energy levels of an electron (ignoring lattice influences). The diagram illustrates only the possible energy levels—electrons are not necessarily in each level. FIGURE 2.20 (Left) Energy diagram showing all possible energy levels of an electron in a solid; but it takes no account of the influence of an atomic crystalline lattice structure. (Right) Energy diagram that shows possible energy levels of an electron within a material made of a regular lattice of atoms. Electron energies are restricted to lie within allowed bands, and there is a large energy gap where no electrons are allowed. Even within the allowed bands, the possible electron energies are closely spaced discrete levels. When a set of atoms forms a regular background lattice, the possible energy values of the electrons are altered even further. We still have discrete energy regions, called allowed bands, but we now get what are called energy gaps. Energy gaps are forbidden regions to the electron, and represent regions where no traveling wave (electron) can exist when placed in the periodic electric potential of the metal’s positive lattice ions. These gaps are quite large in the scale of atomic physics—within electron-volts range. Again, energy levels presented in the band diagram specify only possible values of electron energies—they may or may not be occupied. Now, quantum physics has an interesting property, called the Pauli exclusion principle, which has a critical role in determining the properties of materials. The Pauli exclusion principle says that no two electrons in an atom can be in the same quantum state. The lowest common divisor of quantum states is the spin quantum number ms, which states that no more than two electrons with opposing spin (up or down) can be located in the same energy level. Now, if we consider a solid that has many free electrons, which is in an equilibrium state, electrons fill the lowest energy levels available in the allowed band, up to two in each level. Those electrons further down in energy are more tightly bound and are called innermost electrons. When all the electrons are 30 PRACTICAL ELECTRONICS FOR INVENTORS placed in the lowest energy state, we are left with two possible outcomes. In the first case, the highest level to be filled is somewhere in the middle of a band. In the second case, the electrons just fill one or more bands completely. We assume that the material is at low enough temperature to prevent electrons from jumping to higher energy levels due to thermal effects. Now if we add some energy to the free electrons by applying an electric field (attach a voltage source), for example, the electrons in the lower energy levels cannot accept that energy, because they cannot move into an already filled higher energy level. The only electrons that can accept energy are those that lie in the top levels, and then only if there are nearby empty levels into which they can move. Materials with electrons in only partly filled bands are conductors. When the top layer of their electrons moves freely into the empty energy levels immediately above, there is a current. The electrons that jump from a lower level to a higher level are said to be excited. The valance band is an allowed occupied band. The conduction band is an allowed empty band. The energy-band structure for conductors is shown in Fig. 2.21a and c. FIGURE 2.21 Four possible band structures for a solid: (a) Conductor—allowed band is only partially full, so electrons can be excited to nearby states. (b) Insulator—forbidden band with large energy gap between the filled band and the next allowed band. (c) Conductor—allowed bands overlap. (d) Semiconductor—energy gap between the filled band and the next allowed band is very small, so some electrons are excited to the conduction band at normal temperatures, leaving holes in the valence band. If the highest-energy electrons of a material fill a band completely, then a small electric field will not give these electrons enough energy to jump the large energy gap to the bottom of the next (empty) band. We then have an insulator (see Fig. 2.21b). An example of a good insulator is diamond, whose energy gap is 6 eV. In semiconductors, the highest-energy electrons fill a band (the valance band) at T = 0, as in insulators. However, unlike insulators, semiconductors have a small energy gap between that band and the next, the conduction band. Because the energy gap is so small, a modest electric field (or finite temperature) will allow electrons to jump the gap and thereby conduct electricity. Thus, there is a minimum electric field under the influence of which a material changes from insulator to conductor. Silicon and germanium have energy gaps of 1.1 eV and 0.7 eV, respectively, and are semiconductors. For semiconductors, an increase in temperature will give a fraction Chapter 2: Theory 31 of the electrons enough thermal energy to jump the gap. For an ordinary conductor, a rise in temperature increases the resistivity, because the atoms, which are obstacles to electron flow, vibrate more vigorously. A temperature increase in a semiconductor allows more electrons into the empty band and thus lowers the resistivity. When an electron in the valance band of a semiconductor crosses the energy gap and conducts electricity, it leaves behind what is known as a hole. Other electrons in the valence band near the top of the stack of energy levels can move into this hole, leaving behind their own holes, in which still other electrons can move, and so forth. The hole behaves like a positive charge that conducts electricity on its own as a positive charge carrier. An electron excited from the valence band to the conduction band is thus doubly effective at conducting electricity in semiconductors. Besides the intrinsic elemental semiconductors, such as silicon and germanium, there are hybrid compounds—compounds such as gallium arsenide. Other semiconductors are made by introducing impurities into a silicon lattice. For example, an atom in the chemical group of phosphorous, arsenic, and antimony can replace one of the silicon atoms in a lattice without affecting the lattice itself too much. However, each of these impurities has one more electron in its valence level than the silicon atom has; this extra electron, for which there is no room in the valence band, takes a place in the conduction band and can conduct electricity. A semiconductor with impurities of this sort is called an n-type semiconductor, and the extra electrons are called donor electrons. Atoms of elements in the same chemical group as boron, aluminum, and gallium have one less valence electron than silicon has. If an atom is added to a lattice of silicon as an impurity, there is one less electron than is needed to form a bond that holds the lattice together. This electron must be provided by the electrons of the valence band of the lattice material, and holes are created in this band. These holes act as positive charge carriers. The impurity atoms are called acceptors. A semiconductor with such impurities is called a p-type semiconductor. We will see later on how n-type and p-type semiconductors are used for making one-way gates for current flow (diodes) and voltage-controlled current switches (transistors). 2.7 Heat and Power In Sec. 2.3, we discovered the generalized power law, which tells us that if we can measure the current entering a device, as well as the voltage across the device, we know the power that is used by the device: P = VI (2.9) The generalized power law tells us how much power is pumped into a circuit but doesn’t say anything about how this power is used up. Let’s consider a two-lead black box—an unknown circuit that may contain all sorts of devices, such as resistors, lamps, motors, or transistors. If all we can do is measure the current entering the black box and the voltage across it—say, using an ammeter and voltmeter (or singularly, a wattmeter)—we could apply the generalized power law, multiply the measured current and voltage readings together, and find the power pumped into the 32 PRACTICAL ELECTRONICS FOR INVENTORS black box. For example, in Fig. 2.22, we measure 0.1 A entering when a voltage of 10 V is applied, giving us a total consumed power of 1 W. FIGURE 2.22 Knowing how much power is pumped into the black box is incredibly useful— it allows for quick power consumption measurements and often simplifies circuit analysis—as we’ll see later. But let’s say that we are interested in figuring out how much power is lost to heating (energy that goes into lattice vibrations, emissive radiation, etc.). We really can’t say, assuming we aren’t allowed to look inside the black box. There could be devices inside that take some of the initial energy and use it to do useful work, such as generating magnetic fields in the armature (rotor) and stator sections of a motor, causing the stator to rotate; or generating a magnetic field in a voice coil attached to a paper speaker cone that compresses air; or generating light energy, radio waves, and so on. There may be power converted into other weird forms not really coined as heat, such as driving chemical reactions, generating hysteresis effects, or eddy current in transformers. The only time we can say for certain that power is totally converted into heat energy is if we assume our black box is a perfect resistor (100 percent ohmic in nature). Only then can we substitute Ohm’s law into the generalized power equation: P = VI = V(V/R) = V 2/R (2.10) or P = VI = (IR)I = I 2R In this form, the power lost due to heating is often called Ohmic heating, Joule heating, or I 2R loss. Be careful how you interpret this law. For example, let’s consider our black box that drew 1 W of power. Given the power and the current—which we measure— it would be easy to assume that the resistance of the black box is: R= 1W P = = 100 Ω I 2 (0.01 A) Chapter 2: Theory 33 Accordingly, we would say the black box is a 100-Ω resistor generating 1 W of heat. As you can see, this is an erroneous assumption, since we have disregarded the internal workings of the black box—we didn’t account for devices that perform useful work. You’ll often see people treat any load (black box) as a resistor when doing circuit analysis and such. This will get you the right answer when solving for a particular variable, but it is an analysis trick and shouldn’t be used to determine how much heat is being generated,