22 Signal Processing Essentials
22.1 Learning Objectives
After completing this chapter series, you will be able to:
- Trace the signal processing pipeline from anti-aliasing filter through ADC conversion to digital filtering, identifying the role of each stage
- Calculate appropriate sampling rates for IoT sensors by applying the Nyquist sampling theorem to real sensor specifications
- Select ADC resolution options (8-bit through 16-bit) that match sensor accuracy requirements using the bits-to-resolution decision rule
- Evaluate voice and audio compression codecs (Opus, Codec2, LPC) for bandwidth-constrained IoT applications
- Diagnose non-linear sensor behaviour and apply piecewise linearization techniques to thermistors, LDRs, and other common IoT sensors
Key Concepts
- Bandwidth defines the useful sampling rate: the sensor and the phenomenon set the maximum information content, not the ADC datasheet alone.
- Anti-aliasing and sampling must be designed together: filtering before conversion prevents high-frequency content from folding into the measured band.
- Resolution is only useful when it exceeds the noise floor by a sensible amount: more bits do not help if sensor noise or drift already dominates the measurement.
- Digital filtering is application-specific: median filters remove spikes, moving averages smooth slowly varying signals, and spectral methods help with vibration or audio.
- Compression and representation affect system feasibility: once audio or high-rate sensing enters the design, encoding choices determine whether the link and battery budget survive.
- Real sensors are not ideal math objects: response time, hysteresis, non-linearity, and calibration drift all shape what the downstream software can trust.
This series of chapters covers how IoT devices turn raw sensor signals into reliable digital data. If you have ever wondered how a fitness tracker knows your heart rate from a tiny light on your wrist, or how a smart thermostat reads temperature accurately despite electrical noise – that is signal processing at work. Start with the overview chapter and work through the series in order, as each chapter builds on the previous one.
22.2 Overview
Signal processing is fundamental to IoT systems—it bridges the gap between continuous physical phenomena and discrete digital data that computers can process. This series covers the complete signal processing pipeline from analog sensor output to digital transmission.
Total Reading Time: ~60 minutes | Lab Time: 60-90 minutes
22.3 Chapter Series
22.3.1 1. Signal Processing Overview
⏱️ ~20 min | ⭐ Foundational
What You’ll Learn:
- Why analog-to-digital conversion is necessary
- The Nyquist sampling theorem
- How to choose appropriate sampling rates
- Common pitfalls: oversampling waste vs undersampling aliasing
Key Topics: Analog vs digital signals, ADC pipeline, Nyquist theorem, sampling strategy
22.3.2 2. Aliasing and ADC Resolution
⏱️ ~15 min | ⭐⭐ Intermediate
What You’ll Learn:
- How undersampling causes aliasing distortion
- Calculating required ADC resolution
- Selecting ADC parameters (8-bit, 10-bit, 12-bit, 16-bit)
- Implementing digital filters (median, moving average, low-pass)
Key Topics: Aliasing prevention, quantization levels, filter selection, ADC trade-offs
22.3.3 3. Voice and Audio Compression
⏱️ ~14 min | ⭐⭐⭐ Advanced
What You’ll Learn:
- Toll quality baseline (64 kbps)
- Companding (μ-law and A-law) for better SNR
- Linear Predictive Coding (LPC) for 8-27× compression
- Practical codec selection for IoT applications
Key Topics: Voice compression, companding, source-filter model, codec comparison
22.3.4 4. Sensor Dynamics and Linearization
⏱️ ~15 min | ⭐⭐⭐ Advanced
What You’ll Learn:
- Why sensors don’t respond instantly (mass-spring-damper model)
- Understanding step response and bandwidth
- Matching sampling rate to sensor bandwidth
- Linearizing non-linear sensors (thermistors, LDRs)
Key Topics: Sensor dynamics, step response, bandwidth matching, linearization methods
22.3.5 5. Signal Processing Labs
⏱️ 60-90 min | ⭐⭐ Practical
What You’ll Do:
- Configure ESP32 ADC with different resolutions
- Compare median vs moving average filters
- Perform FFT frequency analysis
- Design multi-stage filter pipelines
Key Topics: Hands-on ESP32 simulation, practical filtering, FFT analysis, pipeline design
22.4 Learning Path Recommendations
22.4.1 Beginner Path
- Start with Overview - understand the basics
- Read Aliasing and ADC - grasp quantization
- Do Labs Exercise 1-2 - hands-on ADC and filtering
- Skip voice compression and sensor dynamics until needed
22.4.2 Standard Path
- Read all chapters in order (1-4)
- Complete all labs (chapter 5)
- Total time: ~3 hours including hands-on
22.4.3 Advanced Path
- Skim chapters 1-2 (review basics)
- Deep dive into chapters 3-4 (voice, sensor dynamics)
- Complete all labs
- Extend labs with custom projects
22.5 Prerequisites
Before starting this series, you should understand:
- Sensor Fundamentals: Types of sensors and their outputs
- Data Representation: Binary numbers and bit depth
- Basic electronics: Voltage, current, resistance (Ohm’s law)
22.7 Quick Reference: Key Formulas
Nyquist Theorem: \[f_s > 2 \times f_{max}\]
ADC Resolution: \[\text{Step Size} = \frac{V_{ref}}{2^{bits} - 1}\]
Voltage from ADC: \[V = \text{ADC Value} \times \frac{V_{ref}}{2^{bits} - 1}\]
Companding (μ-law): \[F(x) = \text{sgn}(x) \cdot \frac{\ln(1 + \mu |x|)}{\ln(1 + \mu)}\]
Sensor Bandwidth: \[BW = \frac{1}{2\pi\tau}\]
22.8 Chapter Statistics
- Overview: about 3,500 words, about 20 minutes, foundational.
- Aliasing and ADC: about 2,800 words, about 15 minutes, intermediate.
- Voice Compression: about 2,500 words, about 14 minutes, advanced.
- Sensor Dynamics: about 2,000 words, about 15 minutes, advanced.
- Labs: about 2,700 words, about 10 minutes of reading plus 60-90 minutes of hands-on work.
- Total: about 13,500 words and about 74 minutes of reading, plus 60-90 minutes of lab time.
22.9 Start Learning
If you are new to this module, start here:
- Best first step: Signal Processing Overview for the analog-to-digital story and the Nyquist rule.
- Best next step: Aliasing and ADC Resolution once you want to size sampling rates and ADC precision.
- Best practical follow-up: Signal Processing Labs if you learn fastest by trying ESP32-style examples.
If your project is audio-heavy, jump to Voice and Audio Compression after the overview. If your challenge is slow or non-linear physical sensors, go to Sensor Dynamics and Linearization next.
22.10 What’s Next
- Signal Processing Overview: foundational theory behind analog-to-digital conversion, the Nyquist theorem, and sampling strategy.
- Aliasing and ADC Resolution: undersampling, quantization, and practical filter choices.
- Voice and Audio Compression: companding, LPC, and codec trade-offs for constrained links.
- Sensor Dynamics and Linearization: bandwidth matching, sensor lag, and handling non-linear outputs.
- Signal Processing Labs: hands-on ADC configuration, filter comparison, FFT analysis, and pipeline design.
- Sensor Fundamentals: prerequisite background on sensor types, analog outputs, and measurement principles.