000 16880 a2200157 4500
005 20241116110901.0
008 241116b |||||||| |||| 00| 0 eng d
020 _a9789355428820
041 _aEnglish
100 _aTwomey J.
_9208660
245 _aApplied Embedded Electronics
_bDesign Essentials For Robust Systems
260 _bSPD
_c2024
300 _a568
520 _aTable of Contents Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix 1. Essential Concepts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Basic Electronics 1 Ideal Simplifications of Academia 4 Interconnections 4 Basic Components 9 Capacitors 9 Resistors 12 Inductors 14 Voltage Sources and Batteries 15 Current Sources 16 Switches and Relays 17 Operational Amplifiers 17 Voltage Comparators 18 Nonideal Digital Devices 19 Signal Integrity 23 Summary and Conclusions 25 Further Reading 26 2. Architecting the System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Preliminary Ideas 27 Simulate or Build 28 Through-Hole/Leaded Components (Obsolete) 28 Discrete Gate Logic (Obsolete) 28 Modern Design Strategies 29 Mostly Digital Design 31 DSP Methods: Versatility and Limits 33 vii Digital Control Methods: DCU, MCU, MPU, FPGA, CPLD, and ASIC 35 Terminology in MCU and MPU Specifications 36 Hardware Controllers 38 Software Controllers 39 Computers Versus Controllers 40 Raspberry Pi (MPU) Versus Arduino (MCU) 40 Multipurpose and Specialty MCUs 41 Chip Set Methods 42 System Architecture Options 44 Determine Peripherals and Interconnects 49 Avoid Serial Communication Bottlenecks 54 Use Direct Memory Access for Data Transfer 55 Determine DSP Methods 55 Check for DSP Bottlenecks 57 Improve DSP Speed 59 Determine DCU Internal Features 60 Physical Package Considerations 65 Off-Chip Features and Support 66 Pulling It All Together 68 Picking a DCU Configuration and Your MCU/MPU 68 Specialized Niche Function or Feature 68 Multi-MCU Systems 69 General-Use MCU Systems 69 Picking a Specific MCU 69 Summary and Conclusions 70 Further Reading 71 3. Robust Digital Communication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Digital Signals, Physical Considerations, and Connections 74 Limitations of Ground-Referenced Digital Signals 74 Low-Voltage Differential Signaling 75 Organizing Interconnects for Speed and Signal Integrity 77 Lumped Versus Distributed Networks 79 Clock Distribution 86 Digital Communication: Parallel Versus Serial Ports 91 Clocking Methods for Serial Ports 91 Starting Edge Synchronization 91 Parallel Clock 92 Manchester Code Self-Clocking 92 Embedded Clock and Run Length Limited Codes 93 Digital Communication: Features and Definitions 93 Serial Data: Shared Ground, Low Speed 97 viii | Table of Contents Universal Asynchronous Receiver Transmitter 97 Inter-Integrated Circuit and System Management Bus 98 Serial Peripheral Interface 99 Single-Wire Interfaces 101 Serial Data: Shared Ground, High Speed 101 Data Between Boards or Between Systems: Wired Methods 103 RS-232: Serial Data over Cable 103 RS-485: Differential Serial Data over Cable 105 Controller Area Network 107 Serial Data for Computer Systems 108 Universal Serial Bus 108 Serial Advanced Technology Attachment 110 Peripheral Component Interconnect Express 111 Ethernet 113 Wireless Serial Interfaces 115 WiFi 115 Bluetooth 116 Bluetooth Low Energy 117 ZigBee 118 Z-Wave 119 Adaptive Network Topology 120 Other Data Communication Methods 120 Infrared 120 Fiber-Optic Data: Go Fast, Go Far 120 JTAG: PCB Access for Test and Configuration 121 Summary and Conclusions 123 Further Reading 124 4. Power Systems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 Split Phase AC Mains Power 128 AC Power Safety: Defining the Problem 129 High-Voltage and Low-Voltage Partitioning 129 Safe Failure Methods and Single Fault Safe Scenarios 130 Overcurrent Protection Methods and the Weakest Link 131 AC/DC Conversion 133 The Classic Approach: 60 Hz Transformers 133 Off-line Switchers 134 Multi-PCB Systems: The Need for Local Power Regulation 135 DC/DC Conversion: Linear Versus Switching 135 Linear Regulators: Conceptual 136 Emitter Follower Regulators Versus LDO 136 Switching Step-Down (Buck) Converter 138 Table of Contents | ix Switching Step-Up (Boost) Converter 140 Switching Buck-Boost Converter 141 Picking Regulators and Configuring a Power System 142 Including Power Supply Monitors 146 Power Bypass, Decoupling, and Filtering 146 Radiated Noise Reduction: RC Snubbers, Ferrites, and Filters 147 Power Output Noise Reduction: Damped LPF Networks and Cascaded Regulators 148 Power Grid Current Surges Due to Digital Logic 148 Low-Impedance Power and Ground Planes 149 Power Supply Bypass Filtering: Distributed Stabilization 150 Bypass Capacitors at High Frequencies 151 Power Bypass Capacitor Value and Distribution 153 Summary and Conclusions 156 Further Reading 157 5. Battery Power. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Battery Basics: Definitions 160 Decision Guidelines for Rechargeable or Single-Use Batteries 164 Defining Power Requirements 165 Battery Discharge Versus Functional Voltage Range 166 Battery Types by Chemistry 167 Discharging Behavior of Batteries 171 Designing a Battery Set: Single Use and Multiple Cells 174 Designing a Rechargeable Custom Battery Pack 177 Charging Batteries 183 Smart Batteries 185 Regulations and Safety for Batteries 187 Other Energy Storage and Access Methods 188 Supercapacitors 188 Hydrogen Fuel Cells 188 Flow Batteries 190 Wireless Power 190 Solid State Batteries 192 Summary and Conclusions 193 Further Reading 194 6. Electromagnetic Interference and Electrostatic Discharge. . . . . . . . . . . . . . . . . . . . . . . 195 Preliminary Ideas 196 Intrinsic Noise 197 General Strategy Dealing with EMI 198 Regulations and Requirements 199 x | Table of Contents Visualizations of Noise Coupling 201 Frequency Domain Analysis of EMI 203 Grounding 209 Reducing Conducted Emissions to AC Power Mains 214 Cable Interconnect Strategies 215 Reducing Noise Generation at the Source 217 Slower Clocks and Softer Transitions 217 LVDS for Digital Data to Reduce EMI 218 Spread Spectrum Clocks to Reduce EMI 219 EMI Reduction for Switched-Mode Power Supplies 219 Unintentional EMI Antennas 221 EMI Suppression on Motors 221 Reducing Noise Coupling Between On-Board Devices 222 Identifying the Big Talkers and Sensitive Listeners 223 Floor-Planning the PCB for Noise 224 Faraday Cage Methods to Contain or Protect from EMI 226 Making Circuits Less Noise Sensitive 227 Noise-Sensitive High-Impedance Nodes 227 Noise Immunity of Differential Signals 228 Noise Immunity Through Bandwidth Limiting 229 Suppressing Noise into and Out of the System: Faraday Cage Techniques 231 Electrostatic Discharge Protection 234 Summary and Conclusions 241 Further Reading 243 7. Data Converters: ADCs and DACs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 DAC Performance Basics 246 ADC Performance Basics 251 Antialiasing Filters for ADC Inputs 254 Pulse Width Modulation DACs 255 Arbitrary Waveform Generation by Direct Digital Synthesis 260 Summary and Conclusions 261 Further Reading 262 8. Driving Peripheral Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 Switched Driver Circuits 264 High- and Low-Side Switching 264 High-Power Load Isolation 265 Drive Signal Strategies 266 Power Transistor Selection 267 Power Transistor Thermal Performance 272 Driving LEDs and Buzzers 275 Table of Contents | xi Selection of Static Displays 278 Streaming Video Output 279 Driving Inductive Loads 280 Transient Current in a Switched Inductor 280 Driving Solenoids and Relays 282 H-Bridge Drive Circuits 283 Driving DC Motors 286 Motor Selection 286 Brushed DC Motor Driver Circuit 288 Brushless DC Motors: Single and Three Phase 288 Motors with Integrated Control Electronics 289 Stepper Motors 290 Voice Coil Motors 292 Stall Currents and Protecting from Self-Destruction 293 Audio Outputs 294 Summary and Conclusions 296 Further Reading 297 9. Sensing Peripheral Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 Sensors for Everything 300 Sensor Output Types 300 Sensor Data Capture and Calibration 302 Data Capture Method 302 Sensor Calibration 303 Sensor Response Time 303 Two-State Devices: Switches, Optical Interrupters, and Hall Sensors 304 Position and Rotation Encoders 307 Analog-Linear Sensors: A Closer Look 308 Characteristics of Analog Sensors 309 Signal Processing for Analog Sensors 311 Sensor Calibration 312 Current Sensing Methods 315 Voltage Sensing 317 Specific Sensor Applications 318 Pressure Sensors 318 Temperature Sensors 319 Strain Gauges 322 Sound and Microphones 325 Image Sensors and Video Cameras 329 Touch Panels 332 Summary and Conclusions 337 Further Reading 338 xii | Table of Contents 10. Digital Feedback Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 Overview of Sequence and Feedback Control 340 Digital Versus Analog Circuit Methods 342 Preliminary Definitions and Concepts 344 Transfer Functions, Block Diagrams, and Basic Feedback 345 Transient Response Terminology 347 DUC Performance Selection 349 Sequence Control 354 Select Topics in Analog Control Systems 359 Linear Systems and Approximations 361 Bode Plots for Stable Control Loops 363 Bode Plots for Gain and Phase Response 365 Bode Plots for Gain and Phase of a Control Loop 367 Bode Plots for Integral and Derivative Response 370 Bode Plots of Fixed Time Delays 371 Transition to Digital Control 372 Determine DUC Stability 373 DAC Performance Requirements 374 Accuracy of Control Math 376 ADC Performance Requirements 376 ADC Sampling Rate Determination 377 Final Selection of ADC and DAC 378 Dual-Clock Strategy for Improved Phase Margin 378 Digital Trapezoid Integration 379 Digital Integration: Limit Windup and Avoid Saturation 380 Digital Derivative by Adjacent Samples 381 Additive Time Delays in the DSP 382 PID Control Implementation 382 Response Variants: P, I, PI, and PID 385 Typical Effects of Gain Adjustments 389 Ziegler Nichols Tuning 390 Chien–Hrones–Reswick Tuning 394 Component Variance and Control Tuning 396 Adaptive Control Methods 397 Trajectory Control Methods 399 Summary and Conclusions 404 Further Reading 406 11. Schematic to PCB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 PCB Terminology 408 PCB Design (EDA) Tools 411 Getting Started 411 Table of Contents | xiii Component Selection 411 Selecting RLC Components 412 Picking Connectors for Off-Board Wires 415 Selecting IC Packages 416 Checking Component End of Life and High-Quantity Availability 417 Including Test Access and Interface Ports 417 Schematics 418 Schematic Sheets and General Organization 418 Symbol Organization for Integrated Circuits 422 Placeholders and “Do Not Populate” Components 423 Provide Generous Commentary 423 Avoid Ambiguity 424 Call Out Items Requiring Special Attention 424 Bill of Materials 425 Defining Physical, Control, and Data Layers 425 Defining a Component Footprint 426 Mechanical Definition of a PCB 428 Metric Versus Imperial Measurements 428 PCB Mounting 429 Electrical Grounding Through Mechanical Mounts 430 Drilled Hole Spacing and Keep-Outs 430 Cables to the PCB 430 PCB Alignment References 431 Conformal Coating 432 Test Fixture Using Bed of Nails 432 Defining the PCB Layer Stack-Up 432 Interplane Capacitance 438 Physical Design Rules 439 High-Voltage Spacing Rules 443 Component Placement Strategy 444 General Interconnection Methods 447 Easy Estimations of RLC Parasitics 447 Maximum Trace Currents 448 Determine Minimum Geometry Trace Requirements 449 Vias and Micro-Vias 450 Vias for Thermal Conduction 454 Specialized Interconnection Methods 455 Differential Signal Routing 455 Microstrip Transmission Lines 455 Stripline Transmission Lines 456 Differential Microstrips and Striplines 457 Kelvin Connections 457 xiv | Table of Contents EMI and ESD Strategies 458 Solid Ground Plane for Less EMI 458 Flooded Signal Layer Grounds for Less EMI 459 ESD Interconnect 460 High-Frequency Power Bypass Methods 461 Features for Manufacture and Assembly 461 Consistent Copper Coverage 461 Panelization and Break-Apart Methods 462 Fabrication Notes 463 Manufacturing (Gerber) Files 464 Summary and Conclusions 466 Further Reading 467 12. Software and Coding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469 Coding Languages 470 Operating Systems 470 Picking an RTOS 471 Additional RTOS Considerations 474 Configuring Ports and Processors 475 Device Drivers 476 Problematic Portability 477 Peripheral Communication 477 Initiating Peripheral Communication 478 Device Driver Features 479 Modularity/Hierarchy for DD Code 480 Testing the DD 480 Defensive Coding Methods 480 Preprocess Data Inputs (Invalid Data) 481 Preprocess Data Inputs (Bandwidth Restrictions) 481 Preprocess Data (Human Input) 481 Background Reinitialization 482 Watchdog Timers 483 Multicontroller Coding 484 Suggestions for Well-Organized Code 485 Summary and Conclusions 487 Further Reading 488 13. Special Systems and Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 Different Electronics for Different Priorities 490 Design Priorities 490 Product Cost 490 Quality and Reliability 490 Table of Contents | xv Power Consumption 491 Safety 491 Backward Compatibility 491 Ruggedness and User Abuse 491 Capability for Repair 492 Navigating the Regulatory Maze 492 Risk Analysis 497 Aviation Electronics (Avionics) 499 Design Priorities 499 Special Needs 499 Regulations, Certifications, and Approvals 500 Satellites and Spacecraft (Astrionics) 500 Radiation 501 Thermal Extremes 502 Vibration, Shock, and Acceleration 502 Vacuum Environments 502 Component Selection and NASA-Approved Parts 503 PCB Materials and Layout 503 Limited Life of Spacecraft 504 Regulations, Certifications, and Approvals 505 Military Electronics 506 Design Priorities and Unique Requirements 507 Regulations, Certifications, and Approvals 507 Medical Devices 509 Regulations, Certifications, and Approvals 509 Clean Functionality Throughout EMC Tests 511 Special Needs 512 Regulatory Requirements for Software and Firmware 515 Automotive 516 Typical Electronic Control Units 516 Design Priorities and Special Needs 517 Regulations, Certifications, and Approvals 518 Consumer Electronics 521 Design Priorities 521 Special Interest Groups, Technology Coalitions, and Technical Standards 522 Regulations, Certifications, and Approvals 523 Restriction of Hazardous Substances 524 Registration, Evaluation, Authorization, and Restriction of Chemicals (REACH) 524 Industrial Automation 525 Summary and Conclusions 528 Further Reading 529 xvi | Table of Contents 14. Creating Great Products. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531 Create Products That Solve Problems or Fulfill a Need 532 Identify the Target Market 533 Identify What the Customer Wants 533 Examine Competing Products 534 Define the Value Proposition 535 Determine Viable Pricing 535 Determine a Properly Timed Market Window 535 Establish Coalitions and Strategic Partners 536 Focus on Ease of Use 536 Determine the Needed Resources 537 Get Design Specification Consensus 537 Minimal Design and Feature Creep 537 Identify Obstacles Early 538 Get User Feedback on Prototype Builds 538 Make It Easy to Manufacture 539 Summary and Conclusions 539 Further Reading 540 Glossary of Acronyms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551 Table of Contents | xvii
942 _cBK
999 _c359920
_d359920