Applied Embedded Electronics

Book description

Embedded controller electronics are at the heart of virtually all modern electronic devices today with a market of more than $86 billion per year and growing. To serve the needs of designers creating products for this huge market, this practical book covers topics crucial for modern electronics design.

Author Jerry Twomey examines the methods necessary to help you create a trouble-free integrated system for your product, with an emphasis on hardware design. You'll explore topics from the perspective of real-world applications, including discussions about non-ideal components, noise, and methods for avoiding problematic scenarios.

Topics include:

  • Ideal versus actual connections, components, digital, signals
  • Architecting an embedded system
  • Digital interface selection by application, speed, distance
  • Multivoltage power supplies
  • High frequency power integrity
  • Battery and charging systems
  • EMI reduction and ESD protection
  • Driving and sensing peripherals
  • Digital feedback control
  • Optimization of power consumption and cost
  • Specialty systems: medical, industrial, aerospace
  • PCB design including manufacturability, yield, and low noise

This book guides you through all of the techniques listed, which are required for a reliable integrated system. Through extensive illustrations and minimal equations, anyone with an interest in electronics will quickly grasp the ideas discussed.

Publisher resources

View/Submit Errata

Table of contents

  1. Preface
    1. Why I Wrote This Book
    2. Who This Book Is For
    3. Evolving Design Methods: A Different Approach
    4. How This Book Is Organized
    5. Conventions Used in This Book
    6. O’Reilly Online Learning
    7. How to Contact Us
    8. Acknowledgments
  2. 1. Essential Concepts
    1. Basic Electronics
    2. Ideal Simplifications of Academia
    3. Interconnections
    4. Basic Components
      1. Capacitors
      2. Resistors
      3. Inductors
      4. Voltage Sources and Batteries
      5. Current Sources
      6. Switches and Relays
      7. Operational Amplifiers
      8. Voltage Comparators
    5. Nonideal Digital Devices
    6. Signal Integrity
    7. Summary and Conclusions
    8. Further Reading
  3. 2. Architecting the System
    1. Preliminary Ideas
      1. Simulate or Build
      2. Through-Hole/Leaded Components (Obsolete)
      3. Discrete Gate Logic (Obsolete)
    2. Modern Design Strategies
      1. Mostly Digital Design
      2. DSP Methods: Versatility and Limits
      3. Digital Control Methods: DCU, MCU, MPU, FPGA, CPLD, and ASIC
    3. Terminology in MCU and MPU Specifications
    4. Hardware Controllers
    5. Software Controllers
    6. Computers Versus Controllers
      1. Raspberry Pi (MPU) Versus Arduino (MCU)
      2. Multipurpose and Specialty MCUs
    7. Chip Set Methods
    8. System Architecture Options
      1. Determine Peripherals and Interconnects
      2. Avoid Serial Communication Bottlenecks
      3. Use Direct Memory Access for Data Transfer
      4. Determine DSP Methods
      5. Check for DSP Bottlenecks
      6. Improve DSP Speed
      7. Determine DCU Internal Features
    9. Physical Package Considerations
    10. Off-Chip Features and Support
    11. Pulling It All Together
    12. Picking a DCU Configuration and Your MCU/MPU
      1. Specialized Niche Function or Feature
      2. Multi-MCU Systems
      3. General-Use MCU Systems
      4. Picking a Specific MCU
    13. Summary and Conclusions
    14. Further Reading
  4. 3. Robust Digital Communication
    1. Digital Signals, Physical Considerations, and Connections
      1. Limitations of Ground-Referenced Digital Signals
      2. Low-Voltage Differential Signaling
      3. Organizing Interconnects for Speed and Signal Integrity
      4. Lumped Versus Distributed Networks
      5. Clock Distribution
    2. Digital Communication: Parallel Versus Serial Ports
    3. Clocking Methods for Serial Ports
      1. Starting Edge Synchronization
      2. Parallel Clock
      3. Manchester Code Self-Clocking
      4. Embedded Clock and Run Length Limited Codes
    4. Digital Communication: Features and Definitions
    5. Serial Data: Shared Ground, Low Speed
      1. Universal Asynchronous Receiver Transmitter
      2. Inter-Integrated Circuit and System Management Bus
      3. Serial Peripheral Interface
      4. Single-Wire Interfaces
    6. Serial Data: Shared Ground, High Speed
    7. Data Between Boards or Between Systems: Wired Methods
      1. RS-232: Serial Data over Cable
      2. RS-485: Differential Serial Data over Cable
      3. Controller Area Network
    8. Serial Data for Computer Systems
      1. Universal Serial Bus
      2. Serial Advanced Technology Attachment
      3. Peripheral Component Interconnect Express
      4. Ethernet
    9. Wireless Serial Interfaces
      1. WiFi
      2. Bluetooth
      3. Bluetooth Low Energy
      4. ZigBee
      5. Z-Wave
      6. Adaptive Network Topology
    10. Other Data Communication Methods
      1. Infrared
      2. Fiber-Optic Data: Go Fast, Go Far
      3. JTAG: PCB Access for Test and Configuration
    11. Summary and Conclusions
    12. Further Reading
  5. 4. Power Systems
    1. Split Phase AC Mains Power
    2. AC Power Safety: Defining the Problem
      1. High-Voltage and Low-Voltage Partitioning
      2. Safe Failure Methods and Single Fault Safe Scenarios
      3. Overcurrent Protection Methods and the Weakest Link
    3. AC/DC Conversion
      1. The Classic Approach: 60 Hz Transformers
      2. Off-line Switchers
    4. Multi-PCB Systems: The Need for Local Power Regulation
    5. DC/DC Conversion: Linear Versus Switching
      1. Linear Regulators: Conceptual
      2. Emitter Follower Regulators Versus LDO
      3. Switching Step-Down (Buck) Converter
      4. Switching Step-Up (Boost) Converter
      5. Switching Buck-Boost Converter
    6. Picking Regulators and Configuring a Power System
      1. Including Power Supply Monitors
      2. Power Bypass, Decoupling, and Filtering
      3. Radiated Noise Reduction: RC Snubbers, Ferrites, and Filters
      4. Power Output Noise Reduction: Damped LPF Networks and Cascaded Regulators
    7. Power Grid Current Surges Due to Digital Logic
      1. Low-Impedance Power and Ground Planes
      2. Power Supply Bypass Filtering: Distributed Stabilization
      3. Bypass Capacitors at High Frequencies
      4. Power Bypass Capacitor Value and Distribution
    8. Summary and Conclusions
    9. Further Reading
  6. 5. Battery Power
    1. Battery Basics: Definitions
      1. Decision Guidelines for Rechargeable or Single-Use Batteries
      2. Defining Power Requirements
      3. Battery Discharge Versus Functional Voltage Range
      4. Battery Types by Chemistry
      5. Discharging Behavior of Batteries
    2. Designing a Battery Set: Single Use and Multiple Cells
    3. Designing a Rechargeable Custom Battery Pack
    4. Charging Batteries
    5. Smart Batteries
    6. Regulations and Safety for Batteries
    7. Other Energy Storage and Access Methods
      1. Supercapacitors
      2. Hydrogen Fuel Cells
      3. Flow Batteries
      4. Wireless Power
      5. Solid State Batteries
    8. Summary and Conclusions
    9. Further Reading
  7. 6. Electromagnetic Interference and Electrostatic Discharge
    1. Preliminary Ideas
      1. Intrinsic Noise
      2. General Strategy Dealing with EMI
      3. Regulations and Requirements
      4. Visualizations of Noise Coupling
      5. Frequency Domain Analysis of EMI
    2. Grounding
    3. Reducing Conducted Emissions to AC Power Mains
    4. Cable Interconnect Strategies
    5. Reducing Noise Generation at the Source
      1. Slower Clocks and Softer Transitions
      2. LVDS for Digital Data to Reduce EMI
      3. Spread Spectrum Clocks to Reduce EMI
      4. EMI Reduction for Switched-Mode Power Supplies
      5. Unintentional EMI Antennas
      6. EMI Suppression on Motors
    6. Reducing Noise Coupling Between On-Board Devices
      1. Identifying the Big Talkers and Sensitive Listeners
      2. Floor-Planning the PCB for Noise
      3. Faraday Cage Methods to Contain or Protect from EMI
    7. Making Circuits Less Noise Sensitive
      1. Noise-Sensitive High-Impedance Nodes
      2. Noise Immunity of Differential Signals
      3. Noise Immunity Through Bandwidth Limiting
    8. Suppressing Noise into and Out of the System: Faraday Cage Techniques
    9. Electrostatic Discharge Protection
    10. Summary and Conclusions
    11. Further Reading
  8. 7. Data Converters: ADCs and DACs
    1. DAC Performance Basics
    2. ADC Performance Basics
    3. Antialiasing Filters for ADC Inputs
    4. Pulse Width Modulation DACs
    5. Arbitrary Waveform Generation by Direct Digital Synthesis
    6. Summary and Conclusions
    7. Further Reading
  9. 8. Driving Peripheral Devices
    1. Switched Driver Circuits
      1. High- and Low-Side Switching
      2. High-Power Load Isolation
      3. Drive Signal Strategies
      4. Power Transistor Selection
      5. Power Transistor Thermal Performance
      6. Driving LEDs and Buzzers
    2. Selection of Static Displays
    3. Streaming Video Output
    4. Driving Inductive Loads
      1. Transient Current in a Switched Inductor
      2. Driving Solenoids and Relays
    5. H-Bridge Drive Circuits
    6. Driving DC Motors
      1. Motor Selection
      2. Brushed DC Motor Driver Circuit
      3. Brushless DC Motors: Single and Three Phase
      4. Motors with Integrated Control Electronics
      5. Stepper Motors
      6. Voice Coil Motors
      7. Stall Currents and Protecting from Self-Destruction
    7. Audio Outputs
    8. Summary and Conclusions
    9. Further Reading
  10. 9. Sensing Peripheral Devices
    1. Sensors for Everything
    2. Sensor Output Types
    3. Sensor Data Capture and Calibration
      1. Data Capture Method
      2. Sensor Calibration
      3. Sensor Response Time
    4. Two-State Devices: Switches, Optical Interrupters, and Hall Sensors
    5. Position and Rotation Encoders
    6. Analog-Linear Sensors: A Closer Look
      1. Characteristics of Analog Sensors
      2. Signal Processing for Analog Sensors
      3. Sensor Calibration
      4. Current Sensing Methods
      5. Voltage Sensing
    7. Specific Sensor Applications
      1. Pressure Sensors
      2. Temperature Sensors
      3. Strain Gauges
      4. Sound and Microphones
      5. Image Sensors and Video Cameras
      6. Touch Panels
    8. Summary and Conclusions
    9. Further Reading
  11. 10. Digital Feedback Control
    1. Overview of Sequence and Feedback Control
    2. Digital Versus Analog Circuit Methods
    3. Preliminary Definitions and Concepts
      1. Transfer Functions, Block Diagrams, and Basic Feedback
      2. Transient Response Terminology
    4. DUC Performance Selection
    5. Sequence Control
    6. Select Topics in Analog Control Systems
      1. Linear Systems and Approximations
      2. Bode Plots for Stable Control Loops
      3. Bode Plots for Gain and Phase Response
      4. Bode Plots for Gain and Phase of a Control Loop
      5. Bode Plots for Integral and Derivative Response
      6. Bode Plots of Fixed Time Delays
    7. Transition to Digital Control
      1. Determine DUC Stability
      2. DAC Performance Requirements
      3. Accuracy of Control Math
      4. ADC Performance Requirements
      5. ADC Sampling Rate Determination
      6. Final Selection of ADC and DAC
      7. Dual-Clock Strategy for Improved Phase Margin
      8. Digital Trapezoid Integration
      9. Digital Integration: Limit Windup and Avoid Saturation
      10. Digital Derivative by Adjacent Samples
      11. Additive Time Delays in the DSP
    8. PID Control Implementation
      1. Response Variants: P, I, PI, and PID
      2. Typical Effects of Gain Adjustments
      3. Ziegler Nichols Tuning
      4. Chien–Hrones–Reswick Tuning
    9. Component Variance and Control Tuning
    10. Adaptive Control Methods
    11. Trajectory Control Methods
    12. Summary and Conclusions
    13. Further Reading
  12. 11. Schematic to PCB
    1. PCB Terminology
    2. PCB Design (EDA) Tools
    3. Getting Started
    4. Component Selection
      1. Selecting RLC Components
      2. Picking Connectors for Off-Board Wires
      3. Selecting IC Packages
      4. Checking Component End of Life and High-Quantity Availability
    5. Including Test Access and Interface Ports
    6. Schematics
      1. Schematic Sheets and General Organization
      2. Symbol Organization for Integrated Circuits
      3. Placeholders and “Do Not Populate” Components
      4. Provide Generous Commentary
      5. Avoid Ambiguity
      6. Call Out Items Requiring Special Attention
    7. Bill of Materials
    8. Defining Physical, Control, and Data Layers
    9. Defining a Component Footprint
    10. Mechanical Definition of a PCB
      1. Metric Versus Imperial Measurements
      2. PCB Mounting
      3. Electrical Grounding Through Mechanical Mounts
      4. Drilled Hole Spacing and Keep-Outs
      5. Cables to the PCB
      6. PCB Alignment References
      7. Conformal Coating
      8. Test Fixture Using Bed of Nails
    11. Defining the PCB Layer Stack-Up
    12. Interplane Capacitance
    13. Physical Design Rules
      1. High-Voltage Spacing Rules
    14. Component Placement Strategy
    15. General Interconnection Methods
      1. Easy Estimations of RLC Parasitics
      2. Maximum Trace Currents
      3. Determine Minimum Geometry Trace Requirements
    16. Vias and Micro-Vias
    17. Vias for Thermal Conduction
    18. Specialized Interconnection Methods
      1. Differential Signal Routing
      2. Microstrip Transmission Lines
      3. Stripline Transmission Lines
      4. Differential Microstrips and Striplines
      5. Kelvin Connections
    19. EMI and ESD Strategies
      1. Solid Ground Plane for Less EMI
      2. Flooded Signal Layer Grounds for Less EMI
      3. ESD Interconnect
      4. High-Frequency Power Bypass Methods
    20. Features for Manufacture and Assembly
      1. Consistent Copper Coverage
      2. Panelization and Break-Apart Methods
      3. Fabrication Notes
      4. Manufacturing (Gerber) Files
    21. Summary and Conclusions
    22. Further Reading
  13. 12. Software and Coding
    1. Coding Languages
    2. Operating Systems
      1. Picking an RTOS
      2. Additional RTOS Considerations
    3. Configuring Ports and Processors
    4. Device Drivers
      1. Problematic Portability
      2. Peripheral Communication
      3. Initiating Peripheral Communication
      4. Device Driver Features
      5. Modularity/Hierarchy for DD Code
      6. Testing the DD
    5. Defensive Coding Methods
      1. Preprocess Data Inputs (Invalid Data)
      2. Preprocess Data Inputs (Bandwidth Restrictions)
      3. Preprocess Data (Human Input)
      4. Background Reinitialization
      5. Watchdog Timers
      6. Multicontroller Coding
    6. Suggestions for Well-Organized Code
    7. Summary and Conclusions
    8. Further Reading
  14. 13. Special Systems and Applications
    1. Different Electronics for Different Priorities
    2. Design Priorities
      1. Product Cost
      2. Quality and Reliability
      3. Power Consumption
      4. Safety
      5. Backward Compatibility
      6. Ruggedness and User Abuse
      7. Capability for Repair
    3. Navigating the Regulatory Maze
    4. Risk Analysis
    5. Aviation Electronics (Avionics)
      1. Design Priorities
      2. Special Needs
      3. Regulations, Certifications, and Approvals
    6. Satellites and Spacecraft (Astrionics)
      1. Radiation
      2. Thermal Extremes
      3. Vibration, Shock, and Acceleration
      4. Vacuum Environments
      5. Component Selection and NASA-Approved Parts
      6. PCB Materials and Layout
      7. Limited Life of Spacecraft
      8. Regulations, Certifications, and Approvals
    7. Military Electronics
      1. Design Priorities and Unique Requirements
      2. Regulations, Certifications, and Approvals
    8. Medical Devices
      1. Regulations, Certifications, and Approvals
      2. Clean Functionality Throughout EMC Tests
      3. Special Needs
      4. Regulatory Requirements for Software and Firmware
    9. Automotive
      1. Typical Electronic Control Units
      2. Design Priorities and Special Needs
      3. Regulations, Certifications, and Approvals
    10. Consumer Electronics
      1. Design Priorities
      2. Special Interest Groups, Technology Coalitions, and Technical Standards
      3. Regulations, Certifications, and Approvals
      4. Restriction of Hazardous Substances
      5. Registration, Evaluation, Authorization, and Restriction of Chemicals (REACH)
    11. Industrial Automation
    12. Summary and Conclusions
    13. Further Reading
  15. 14. Creating Great Products
    1. Create Products That Solve Problems or Fulfill a Need
    2. Identify the Target Market
    3. Identify What the Customer Wants
    4. Examine Competing Products
    5. Define the Value Proposition
    6. Determine Viable Pricing
    7. Determine a Properly Timed Market Window
    8. Establish Coalitions and Strategic Partners
    9. Focus on Ease of Use
    10. Determine the Needed Resources
    11. Get Design Specification Consensus
    12. Minimal Design and Feature Creep
    13. Identify Obstacles Early
    14. Get User Feedback on Prototype Builds
    15. Make It Easy to Manufacture
    16. Summary and Conclusions
    17. Further Reading
  16. Glossary of Acronyms
  17. Index
  18. About the Author

Product information

  • Title: Applied Embedded Electronics
  • Author(s): Jerry Twomey
  • Release date: November 2023
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781098144791