This repo contains the embedded code on the Arduino MCUs which are hooked up to the CMFV encoder and stepper motor for closed loop control during engine static fires.
It expects to receive pressure data through Serial from some source (a frequency of 100Hz will likely be more than sufficient), and sends telemetry back through that connection at a rate which can be specified in the CommConfig struct of include/config.h.
The packet formats for the abovementioned Serial communication can be found in lib/modules/include/comm_handler.h.
Simply use PlatformIO's "Upload" function to upload the code onto the Arduino, and it will run if your hardware configuration is correct.
You can update various pins in include/config.h, and we are using the AMT22 Encoder for motor angle measurement as well as the Pololu High-Power Stepper Motor Driver 36v4 for driving our stepper motors.
The initial proportional and integral gains that came from modeling (Kp = 0.3, Ki = 0.1) resulted in non-runaway oscillations as shown.
Controller tuning was performed (using smaller Kp's and Ki's) to achieve stabler convergence as shown, validating closed loop control in non-cryogenic conditions.
More details can be found here.
Our closed loop controller showed impressive control capabilities, resulting in the settling of the controller system to pressure set points within <0.7s of controller handoff
Insufficient fuel tank pressure resulted in an unattainable fuel manifold pressure set point (~580 PSI). As part of FDIR procedures, due to the inability of the controller to manipulate the pressure to a redband around the set point within a set time after controller handoff, both controllers aborted into forced open loop.
Check in next time for the results of subsequent hotfires!
PlatformIO uses the Unity testing framework for unit tests, which we use. See test/README.md.
This code was jointly developed by Daniel Zhou and Teong Seng Tan, Controls Leads of UCLA Rocket Project, Ares (2025-2026).
The graphs and slides referenced in Achievements were created by Michael Ferrell, Project Lead of UCLA Rocket Project, Ares (2025-2026).





