Aether-Lock is a high-precision, closed-loop electromagnetic suspension system designed with a Firmware-First and Model-Based engineering approach. It stabilizes an inherently unstable system (magnetic levitation) using a custom discrete PID controller running at 5kHz on an ESP32-S2.
Control parameters were derived analytically from physical modeling.
-
System Identification: The magnetic force law
$F \propto i/x^n$ was identified via MATLAB Regression Scripts on experimental data. -
Linearization & Tuning: PID gains were calculated via Pole Placement to ensure a damping factor
$\zeta \approx 0.707$ . - Theory Documentation: See Mathematical Model & Design.
The project enforces consistency across Firmware, Simulation, and Documentation.
project_config.json: The central registry for physical constants, pinouts, and safety limits.Tools/generate_config.py: A build script that auto-generates C++ headers and MATLAB variables from the JSON.
- Feedforward Compensation: Real-time cancellation of the sensor-coil electromagnetic coupling.
- Implementation: StateMachine.cpp
- Thermal Protection: A software-based thermal model estimates coil temperature.
- Implementation: ThermalGuard.cpp
The system is built on the ESP32 WROOM architecture, featuring a custom power stage for the solenoid and signal conditioning for the Hall sensor.
For detailed schematics, the complete Bill of Materials (BOM), and assembly instructions, please refer to the dedicated documentation:
👉 Read Hardware Design & Assembly Guide
The project follows a strict modular architecture separating Firmware, Hardware, and Simulation files.
The system was rigorously characterized before writing any control code. A complete Data Engineering pipeline was built to derive physical parameters from raw sensor data.
Raw data from the Hall Sensor was processed using R (Tidyverse) to filter outliers, quantify noise (
- View Sensor Analysis Report (Includes Linearity, Noise & Drift plots)
- View R Analysis Scripts
An experimental ramp test revealed that the coil's magnetic field interferes with the sensor reading (-355 ADC points at 100% PWM). This phenomenon was modeled and corrected via a Feedforward term in the control loop.
Detailed engineering reports and theoretical derivations are available in the Docs folder:
| Document | Description |
|---|---|
| Mathematical Model | Physical derivation, linearization, and Pole Placement design strategy. |
| Hardware Design & Assembly | Schematics, BOM, and wiring guide for the ESP32 and Power Stage. |
| Sensor & System Characterization | Full report on sensor calibration, noise analysis (R), and coupling. |
| System Parameters | Auto-generated table of current physical constants and controller settings. |

