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 York 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