Each REV brushless motor is controlled by a REV Robotics Spark MAX motor controller, with control inputs from a custom board. This board runs firmware to listen for commands, control the position of the TVC assembly, and relay telemetry to our ground station. The custom board consists of an ESP32 microcontroller, an Ethernet module breakout board (W5500), and logic level shifters.
<picture of board>
This board is fully integrated into our existing avionics and ground station through our Ethernet network. The TVC sequence is automatically initiated 1.5 seconds in to the burn, and TVC tracking telemetry is continuously logged to our database. TVC positioning / control telemetry is sent at 200Hz.
To keep track of the position of the TVC setup, we use 3-phase hall sensors as encoders. The setup is manually zero’d before we start procedures, and from thereon relative position to the zero is maintained by keeping track of incremental ticks. Control to a setpoint is achieved using a PI controller implemented in firmware - this ensures fast transient response and good steady-state tracking (see image). All positioning is done in a polar coordinates system, with the horizontal center being the origin. Our TVC firmware can be found at this repository (TVC branch), inside src/TVC.
Our firmware is responsible for all control & data acquisition on our test system, GSE, and flight vehicle. We use the Arduino framework, which allows us to take advantage of the wealth of libraries and support available online. All communications to our ground station is done over an Ethernet link. Our firmware can be found at this repository (main branch), and code for our ground station can be found here.