Skip to content

Advanced Topics

Deep dives into embedded systems theory for students who want to go beyond the basics.


About This Section

These modules provide optional deeper learning for topics introduced in the lab courses. They are designed to:

  • Explain the "why" behind the "how"
  • Provide mathematical foundations
  • Cover industry-relevant theory
  • Prepare students for advanced courses and careers
Cross-Course Reference

These topics are referenced from multiple courses:

  • ES101 - Introduction to Embedded Systems
  • ES102 - Advanced Embedded Systems (planned)
  • ES103 - Real-Time Systems (planned)

Each module indicates which course topics connect to it.


Module Overview

# Module Topics After Tutorial
01 Sensor Theory Physics, noise, calibration, signal conditioning GPIO & Sensors
02 Real-Time Concepts Task models, scheduling, deadlines, jitter Ultrasonic & Timing
03 Control Theory PID, tuning methods, stability analysis Line Following
04 Sensor Fusion Complementary filter, Kalman, odometry Precise Turns
05 Communication & Data Protocols, logging, visualization Data Logging
06 Software Architecture Layers, events, defensive programming, testing HW Abstraction
07 Data-Driven Methods Regression, system ID, model validation State Machines
08 Abstraction Layers From Python to registers, I2C/SPI protocols, picobot internals HW Abstraction
09 Encoders & Speed Control Quadrature decoding, calibration, closed-loop speed Motor Control
10 ToF Lidar Radar VL53L1X ToF, servo sweep, SPAD multizone, PC visualization Ultrasonic & Timing
11 Motion Calibration Multi-sensor distance cal, motor profiling, validation Encoders & Speed
12 TFT Robot Eyes GC9A01 round TFT, eye animation, distance-reactive display OLED Display + Ultrasonic

Encoder-Based Control Track

A progressive track building from encoder basics to cascaded line following:

# Module Topics After Module
13 Encoder Fundamentals Hand-rotate, poll vs ISR, calibration methodology Motor Control
14 Drive Straight Dual-wheel speed matching, drift correction 13
15 Drive to Distance Odometry, trapezoidal velocity profiles, square challenge 14
16 Speed Control Lab CSV logging, matplotlib plotting, Kp tuning from data 15
17 Precise Turns with Encoders Differential kinematics, encoder vs IMU, sensor fusion 16
18 Closed-Loop Line Following Cascaded control, speed adaptation, fastest lap 17 + Line Following

How to Use These Modules

For ES101 Students

After completing each main lab, you'll see callouts like:

Want to go deeper?

See Advanced: Sensor Theory for optocoupler physics, noise analysis, and calibration methods.

These are optional. The main labs cover everything needed for EUR-ACE requirements.

For Self-Study

Each module includes: - Prerequisites - What you should know first - Theory - Concepts with intuitive explanations - Code examples - Ready to run on your hardware - Experiments - Hands-on exploration - Mini-project - Demonstrate mastery - Further reading - Academic and industry resources

For Advanced Courses

These modules serve as reference material for: - ES102 deep dives into specific topics - Capstone project background - Competition preparation


Modules

01 - Sensor Theory

Understanding your measurements

Every sensor lies. This module explains how and why, and what to do about it.

  • Optocoupler and ultrasonic physics
  • Noise sources and quantification (SNR)
  • Signal conditioning: averaging, median, EMA
  • Calibration: offset, gain, lookup tables

Mini-project: Characterize sensor response curves and build calibration routine.


02 - Real-Time Concepts

When timing is everything

Real-time doesn't mean fast—it means predictable. This module covers the theory behind task scheduling.

  • Hard vs soft real-time
  • Periodic task model (period, WCET, deadline)
  • Utilization analysis and schedulability
  • Cooperative vs preemptive scheduling
  • Jitter measurement and analysis

Mini-project: Build a cooperative scheduler with timing analysis.


03 - Control Theory

Making things behave

P-control works, but why? And when doesn't it? This module covers the full story.

  • P, I, D terms explained intuitively
  • Full PID implementation
  • Ziegler-Nichols tuning method
  • Stability and failure modes
  • Dead zones and practical issues

Mini-project: Implement full PID line follower with systematic tuning.


04 - Sensor Fusion

Combining imperfect information

No single sensor is reliable. This module shows how to combine them intelligently.

  • Why gyroscopes drift (and accelerometers don't)
  • Complementary filter: simple and effective
  • Kalman filter concepts (without scary math)
  • Odometry and dead reckoning limitations

Mini-project: Implement complementary filter for stable heading.


05 - Communication & Data

Getting data in and out

Debugging embedded systems requires data. This module covers how to get it.

  • Serial protocols: UART, I2C, SPI comparison
  • Data logging strategies (buffer, circular, SD)
  • Protocol design: framing, checksums, CRC
  • PC-side visualization and analysis

Mini-project: Build data logger with PC visualization.


06 - Software Architecture

Building reliable systems

Spaghetti code causes disasters. This module covers professional embedded software structure.

  • Layered architecture: HAL, drivers, services, application
  • Event-driven design patterns
  • Defensive programming techniques
  • Testing embedded code with fakes/mocks

Mini-project: Refactor robot code into clean layered architecture.


07 - Data-Driven Methods

Learning from measurements

When physics is complex, let data speak. This module covers practical data-driven engineering.

  • Linear and polynomial regression
  • System identification from step response
  • Model evaluation: R², RMSE, cross-validation
  • Calibration strategies and adaptation

Mini-project: Build adaptive speed estimator from sensor data.


08 - Abstraction Layers

From Python to silicon

Every robot.forward(80) call triggers six layers of execution. This module traces the full path from your code to the hardware.

  • The layer cake: application, library, driver, HAL, registers, silicon
  • Communication protocols: I2C, SPI, UART comparison
  • Python vs C vs register-level GPIO and PWM
  • The cost of abstraction: ~200× overhead measured

Mini-project: Control motors and read IMU using direct register access.


09 - Encoders & Speed Control

Closing the loop on motion

Open-loop motor control drifts. This module adds quadrature hall encoders to measure actual wheel rotation, then builds a closed-loop speed controller.

  • Quadrature encoding: A/B channels and direction detection
  • Calibration: ticks per revolution, ticks to distance
  • Real-time speed measurement
  • P-controller for constant wheel speed

Mini-project: Build closed-loop speed controller and compare straight-line accuracy vs open-loop.


10 - ToF Lidar Radar

Seeing with laser light

Ultrasonic gives you one distance — ToF laser ranging gives you millimeter precision at 50 Hz with a multizone depth sensor. This module builds a sweeping radar with real-time PC visualization.

  • VL53L1X Time-of-Flight sensor: VCSEL laser, SPAD detector
  • Servo-swept radar with Pygame display over WiFi/UDP
  • 4×4 multizone SPAD scanning for spatial depth awareness
  • Servo calibration and tuning workflow

Mini-project: Build obstacle avoidance or room mapper using ToF radar data.


11 - Motion Calibration

Making your robot accurate

Every robot is different — gear ratios vary, motors have different friction, wheels wear unevenly, and batteries drain. This module builds a complete calibration pipeline.

  • Multi-method distance calibration (ruler, ultrasonic, opto track, ToF)
  • Per-motor dead zone and speed curve profiling
  • Statistical validation with pass/fail grading
  • Persistent per-robot calibration file

Mini-project: Calibrate your robot to drive within 2% distance accuracy.


12 - TFT Robot Eyes

Giving your robot personality

Mount a round 1.28" GC9A01 TFT display as a robot "eye" — draw animated irises, pupils, and eyelids that react to the world. Wire it to the ultrasonic sensor so the eye closes when objects approach.

  • GC9A01 round TFT: SPI interface, 240×240 pixels, 65K colors
  • Scanline-based circle drawing and layered eye anatomy
  • Eyelid animation with distance-reactive openness
  • EMA smoothing for organic-feeling motion
  • Dual-eye setup and emotion expressions

Mini-project: Build a two-eyed robot face with emotion expressions triggered by sensor input.


Learning Paths

Choose based on your interests:

Control Systems Focus

  1. 03 - Control Theory
  2. 04 - Sensor Fusion
  3. 02 - Real-Time Concepts

Software Engineering Focus

  1. 02 - Real-Time Concepts
  2. 06 - Software Architecture
  3. 05 - Communication & Data

Hardware/Sensors Focus

  1. 01 - Sensor Theory
  2. 05 - Communication & Data
  3. 04 - Sensor Fusion

Data Science Focus

  1. 07 - Data-Driven Methods
  2. 01 - Sensor Theory
  3. 05 - Communication & Data

Encoder-Based Control Focus

  1. 13 - Encoder Fundamentals
  2. 14 - Drive Straight
  3. 15 - Drive to Distance
  4. 16 - Speed Control Lab
  5. 17 - Precise Turns with Encoders
  6. 18 - Closed-Loop Line Following

Complete Track

All modules in order—ambitious but comprehensive!


Assessment

If your course offers credit for Advanced modules:

Deliverable Weight
Mini-project implementation 50%
Documentation/report 30%
Understanding demonstration 20%

Check with your instructor for specific requirements.


Prerequisites by Module

GPIO & Sensors      ─────► 01-Sensor Theory
Ultrasonic & Timing ─────► 02-Real-Time Concepts
Line Following      ─────► 03-Control Theory
Precise Turns       ─────► 04-Sensor Fusion
Data Logging        ─────► 05-Communication & Data
HW Abstraction      ─────► 06-Software Architecture
State Machines      ─────► 07-Data-Driven Methods
HW Abstraction      ─────► 08-Abstraction Layers
Motor Control       ─────► 09-Encoders & Speed Control
Ultrasonic & Timing ─────► 10-ToF Lidar Radar
Encoders & Speed    ─────► 11-Motion Calibration
OLED + Ultrasonic   ─────► 12-TFT Robot Eyes

Complete the prerequisite tutorial before starting the Advanced module.


Contributing

Found an error? Have a suggestion? These materials are continuously improved based on student feedback.


← Back to ES101