Project Overview
Universal Controls is focused on flight-control development with a 3D-printable drone frame ecosystem. The project combines a custom STM32H743 flight-controller PCB, firmware, a Python tuning and bench-control app, and documentation for repeatable development.
The near-term goal is a minimal, understandable flight stack for quadrotor experiments. The longer-term goal is a developer kit that can support different quad builds, sensors, and standard ground-control interfaces without hiding the engineering.
Suggested replacement:
flight_controller_latest.pngUse a real photo or render of the current PCB revision.
Flight Controller Summary
| Item | Current value | Notes |
|---|---|---|
| MCU | STM32H743VIT6 | Main flight-control MCU. |
| IMU | ICM-20948 | Main onboard inertial sensor for minimal flight mode. |
| IMU level shifting | 74LVC1T45 level shifters | Between STM32 and 1.8 V IMU domain. |
| Main regulator | LM2675MX-3.3/NOPB | Main 3.3 V board supply. Final load rating still needs review. |
| Additional 5 V regulator | 5 V peripheral supply regulator | To power 5 V peripherals. |
| IMU regulator | XC6206P182MR | Local 1.8 V supply for the IMU domain. |
| CAN transceiver | SN65HVD230DR | Electrical interface for future DroneCAN work. |
| Secure element | ATECC608A-SSHDA-T | Present on board; firmware use is still TBD. |
| PCB stack | 2 copper layers, 1.6 mm | Extracted from the current KiCad PCB. |
| Approx board size | 75.43 mm x 53.00 mm | Extracted from current Edge.Cuts outline. |
Interfaces and Supported Peripherals
ESC1..ESC4
Four PWM signal outputs. The ESCs carry motor power externally; the FC connector outputs are command signals plus ground reference.
UART Interfaces
There are two UART interfaces. UART interface 1 is intended for the receiver. UART interface 2 depends on the selected flight mode and can be used for telemetry, bench connection, MAVLink/QGroundControl, or another supported serial role.
GPS / MAG
The GPS interface is aimed at M10-style 10-pin GPS/magnetometer connections, such as Holybro M10 10-pin modules.
I2C
3.3 V logic I2C expansion with different supply-header options. Peripheral compatibility should be configured explicitly in the app.
DroneCAN
CAN bus through an onboard transceiver for later DroneCAN experiments.
SWD / Debug
Programming, debug, SWO, and serial development paths remain central to the developer-kit workflow.
Software Summary
| Component | Purpose |
|---|---|
| Firmware | Real-time sensing, estimation, control, motor output, configuration, telemetry, and safety state machine. |
| Python GUI | Bench workflows, plotting, tuning, configuration, calibration, and event analysis. |
| Serial protocol | CSV telemetry from firmware, ASCII commands from GUI, and ACK/ERR/EVT responses back to GUI. |
| Flash config | Persistent vehicle/controller/estimator values stored in STM32 internal flash. |
| Event buffer | High-rate capture around fault or pilot disable for post-test analysis. |
Firmware State Machine
| State / concept | Meaning |
|---|---|
| RC_ONLY | Normal RC-driven flight/monitoring state. Pilot motor enable controls motor authority when safety gates pass. |
| Bench Control | GUI-controlled testbench mode. Motors require explicit bench arm and are used only for bench workflows. |
| Fault | Motor outputs forced off. Flight-event buffer can be fetched for analysis. |
| Telemetry package | The active CSV field set selected by the current GUI tab. |
| RAM config | Currently active firmware configuration. Changes take effect immediately but do not survive reset unless saved. |
| Flash config | Persistent configuration stored in STM32 flash and loaded on startup. |
Minimal Flight Mode
The current minimal flight mode is intended for early controlled tests without GPS. It uses the onboard ICM-20948, RC input, a hover-centered throttle curve, roll/pitch attitude commands, yaw rate damping, and event-buffer based post-test analysis.
| Input | Current role |
|---|---|
| Throttle stick | Low stick maps toward idle spin, mid stick maps near hover_thrust_norm, high stick maps toward max_motor_norm. |
| Roll stick | Roll attitude setpoint. |
| Pitch stick | Pitch attitude setpoint. |
| Yaw stick | Yaw-rate command. Heading hold is optional through att_yaw_kp. |
| Pilot motor enable | Primary flight motor enable / kill control. |
Communication Protocol
| Direction | Format | Use |
|---|---|---|
| Firmware to GUI | CSV telemetry | Live data packages and plots. |
| GUI to firmware | $CMD ASCII lines | Mode, telemetry, config, tuning, motor bench commands, event requests. |
| Firmware to GUI | $ACK, $ERR, $EVT | Command status, errors, state changes, event notifications. |
GUI Tab Reference
Each screenshot below is a full-width placeholder. Replace the PNG files in this folder with real screenshots using the same filenames.
Main Data
Main Data is the compact live flight overview. It confirms serial connection, firmware state, RC validity, pilot motor enable, battery status, attitude estimates, setpoints, yaw/heading, and throttle command. It is the first tab to check after connecting.
Vehicle Config
Vehicle Config contains physical vehicle and broad operating values such as mass, arm length, hover throttle, max motor command, idle spin, and attitude deadband. It supports local files, Apply To RAM, Restore From Flash, Save To Flash, and Clear FC Flash Config.
Flight Event
Flight Event fetches and plots the frozen firmware event buffer. It is used after faults, pilot-disable events, and suspicious instability to inspect attitude, controller outputs, motor commands, and loop timing.
Motor Control
Motor Control provides direct bench motor commands. It requires an explicit Bench Control session and should be used with props removed or with the vehicle safely restrained.
Motor Balancing
Motor Balancing drives one motor at fixed output levels and displays a firmware-computed vibration score. It is designed for practical balancing work where the user may stand away from the vehicle.
Motor Mixing
Motor Mixing shows how roll, pitch, yaw, and throttle become M1-M4 commands. It is used to validate motor numbering, sign conventions, yaw pairs, limits, and saturation behavior.
Orientation
Orientation contains detailed magnetic/body-vector diagnostics. It helps verify calibrated magnetometer vectors, body-frame projections, and heading behavior.
RC Link
RC Link displays raw and normalized RC channels. It should be used before flight tests to confirm channel order, range, direction, failsafe behavior, and pilot motor enable mapping.
Calibrate Magnetometer (ICM20948)
Calibrate Magnetometer supports collecting and fitting magnetometer calibration data for the onboard ICM20948. It is used to check heading consistency and calibration quality.
Control Tuning
Control Tuning is the manual tuning workspace for controller parameters. It combines live plots, a tuning table, RAM apply, flash save, restore, clear flash, and 5-second high-rate capture.
Estimator Tuning
Estimator Tuning selects the active estimator and displays estimator-specific parameters. It also supports gyro-only comparison and high-rate capture for diagnosing noise, drift, and slow attitude wander.
Development Plan
| Phase | Goal |
|---|---|
| 1 | Stabilize minimal ICM-only flight mode and document the basic safe test workflow. |
| 2 | Improve bench teststand and use repeatable flight-event captures for controller tuning. |
| 3 | Finalize config architecture for vehicle, controller, estimator, and peripheral choices. |
| 4 | Review the PCB, ratings, connectors, and power-tree before a next hardware revision. |
| 5 | Add direct MAVLink/QGroundControl basics: heartbeat, attitude, battery, status, modes, and parameters. |
| 6 | Package firmware, GUI, documentation, frame files, and teststand workflow as a developer kit. |