An embedded controls project for designing, implementing, and experimentally validating closed-loop velocity control of a brushless direct current (BLDC) motor.
The project combines a microcontroller, motor driver, rotor/speed sensing, embedded control firmware, telemetry, and a small host-side analysis stack. The finished system will command motor speed, measure the physical response in real time, reject disturbances, and produce repeatable plots and test results.
Build one complete bench-top BLDC control platform that demonstrates:
- reliable motor commutation through a suitable BLDC driver,
- measured rotor speed / position feedback,
- closed-loop velocity control,
- real-time telemetry,
- controller tuning and step-response characterization,
- disturbance-rejection testing,
- electrical and thermal measurements,
- documented experimental results.
This is intentionally not an open-ended attempt to build a production ESC. The end state is a documented experimental controls platform with reproducible tests.
velocity setpoint
|
v
+------------------+
| MCU Controller |
| PID / control |
+--------+---------+
|
PWM / command
|
v
+------------------+
| BLDC Driver |
+--------+---------+
|
3-phase power
|
v
+------------------+
| BLDC Motor |
+--------+---------+
|
encoder / Hall feedback
|
+--------------------> MCU
MCU telemetry --> USB/UART --> Python logger --> plots / analysis
- Select and document the motor, driver, MCU, sensor, and power supply.
- Bring up the hardware safely in open loop or driver-native commutation mode.
- Acquire speed or position feedback.
- Implement a fixed-rate velocity-control loop.
- Stream timestamped telemetry to a host computer.
- Tune and validate the controller using repeatable test profiles.
- Measure step response and steady-state tracking.
- Perform at least one repeatable disturbance-rejection experiment.
- Record current/power and temperature where practical.
- Publish final plots, results, limitations, and reproducible instructions.
- custom high-power inverter PCB,
- production certification,
- sensorless startup research,
- full vehicle propulsion,
- multi-axis robotics,
- custom motor winding,
- advanced FOC unless added only after the baseline project is complete.
The exact parts may change during bring-up. Prefer a low-voltage bench system with a supported BLDC driver/ESC, an MCU development board, and a sensored motor or external encoder.
The repository keeps hardware-specific decisions in hardware/ so the controls and analysis work remain cleanly separated.
.
├── README.md
├── LICENSE
├── .gitignore
├── requirements.txt
├── docs/
│ ├── 00_project_scope.md
│ ├── 01_system_requirements.md
│ ├── 02_control_architecture.md
│ ├── 03_test_plan.md
│ └── 04_final_report_template.md
├── hardware/
│ ├── README.md
│ ├── bom.csv
│ └── wiring.md
├── firmware/
│ ├── README.md
│ ├── include/
│ │ ├── controller.h
│ │ ├── sensors.h
│ │ └── telemetry.h
│ └── src/
│ ├── controller.c
│ ├── main.c
│ ├── sensors.c
│ └── telemetry.c
├── host/
│ ├── README.md
│ ├── logger.py
│ └── plot_run.py
├── simulation/
│ ├── README.md
│ └── velocity_loop.py
├── experiments/
│ ├── README.md
│ └── test_matrix.csv
├── data/
│ └── README.md
└── results/
└── README.md
The project is complete when a clean checkout contains documentation and code to reproduce the following demonstration:
Command at least three motor-speed setpoints, log measured speed and controller output, quantify tracking performance, apply a repeatable load disturbance, show recovery, and summarize electrical/thermal behavior in a final report.
Minimum final artifacts:
- hardware BOM and wiring diagram,
- compilable firmware,
- host telemetry logger,
- raw CSV data from final experiments,
- plots for step response, tracking error, and disturbance rejection,
- controller gains and sample period,
- test matrix with pass/fail results,
- final engineering report,
- short demo video/GIF linked from this README.
| # | Milestone | Deliverable |
|---|---|---|
| 01 | Scope & architecture | Requirements, block diagram, hardware shortlist |
| 02 | Modeling | Simple motor/velocity-loop simulation |
| 03 | Hardware bring-up | Motor spins safely; sensor values verified |
| 04 | Telemetry | Timestamped host logging works |
| 05 | Closed-loop control | Stable velocity controller |
| 06 | Characterization | Step-response and tracking experiments |
| 07 | Robustness | Disturbance and operating-range tests |
| 08 | Finalization | Results, report, demo, reproducible release |
The project should answer concrete questions rather than simply make a motor spin:
- How does controller gain selection affect rise time, overshoot, and settling time?
- How accurately can the system track velocity across its usable operating range?
- How quickly does it recover from a repeatable external load?
- Where do saturation, sampling, sensor noise, and deadband become important?
- How do current draw and temperature change with speed and load?
- Which limitations arise from the controller versus the physical plant?
MIT. See LICENSE.