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