Skip to content

AMRC-DPG/Fixed_Wing_UAV_v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fixed_Wing_UAV_v2

Repository for AMRC & Dassault Systemes collaboration around "Verification and Validation of a Systems Engineering Model against a real-world artifact" - exact title TBC

Arduino code for running physical system among other files.

FixedWing

Physical Components used:

Example JSON Outputs:

Sample Live data JSON object, sent at 10hz

{
  "type": "live",
  "fan": {
    "pwm": 1100,
    "rpm": 0
  },
  "servo": {
    "pos": 89.8,
    "rpm": 0,
    "cur": 0,
    "vol": 6291,
    "tmp": 269,
    "stat": 1
  }
}

Sample CFG JSON object, mostly static data sent at 1hz to confirm config changes:

{
  "type": "cfg",
  "fan": {
    "min": 1125,
    "max": 1300
  },
  "servo": {
    "model": "LSS-HT1",
    "fw": "370",
    "stiff": -2,
    "hStiff": 2,
    "acc": 2000,
    "dec": 200,
    "maxSpd": 0,
    "led": 0,
    "gyre": 1
  }
}

Serial Command Protocol (Input)

The controller accepts a standardized, human-readable string protocol via the main USB Serial connection. This allows for direct manual control via a Serial Monitor or seamless integration with custom software (Python, MATLAB, etc.).

Connection Settings: 115200 Baud | Line Ending: Newline (\n)

Command Schema

Command Type Syntax Description Example
Fan Control F:<PWM> Sets the EDF thrust using precise 16-bit hardware PWM pulse widths (in microseconds). Bound by the LAB_SAFE_MAX firmware governor (1300µs limit). F:1200 (Sets fan to 1200µs)
Servo Control S:<Degrees>:<Time> Commands the LSS control surface to a specific angle over a defined duration (milliseconds). This built-in motion profiling prevents turbulent snapping. S:45.0:1000 (Sweeps to 45° smoothly over 1 second)
Dynamic Config C:<Type>:<Value> Adjusts LSS parameters on the fly without recompiling firmware. Types include AS (Angular Stiffness), AA (Accel), AD (Decel), etc. C:AS:2 (Sets Angular Stiffness to 2)
Emergency Stop STOP Hardware Kill-Switch. Instantly bypasses all motion profiles, drops EDF signal to arming state (1100µs), and sets the servo to limp mode. STOP

Dynamic Configuration (C: Command Reference)

The C: command allows you to tune the Lynxmotion Smart Servo (LSS) characteristics in real-time. This is particularly useful for adjusting how the control surface reacts to aerodynamic loads without needing to recompile or restart the flight controller.

Format: C:<Type>:<Value> (Note: Any changes made here will be immediately reflected in the 1Hz cfg JSON output loop).

Parameter (<Type>) LSS Function Description Acceptable Range Example
AS Angular Stiffness Controls how aggressively the servo tries to reach its moving target position. A higher value means a stiffer, punchier response. -4 to 4 (Default: 0) C:AS:2
AH Holding Stiffness Critical for aero loads. Controls how strongly the servo fights to hold its final position against the physical wind/thrust from the fan. -4 to 4 (Default: 0) C:AH:3
AA Acceleration The rate at which the servo ramps up to its maximum speed (Degrees/sec²). Lower values create a smoother, softer start. 0 to 10000 C:AA:2000
AD Deceleration The rate at which the servo ramps down as it approaches the target (Degrees/sec²). Lower values create a cushioned stop. 0 to 10000 C:AD:200
SD Maximum Speed Caps the absolute top speed of the servo in degrees per second. A value of 0 removes the cap. 0 to 1800 C:SD:60
LED LED Color Changes the physical LED color on the back of the LSS servo. Excellent for creating visual debug states during test routines. 0 (Off) to 7 (White) C:LED:3 (Blue)
GY Gyre Sets the direction of rotation. Useful if you need to quickly invert the control surface logic (e.g., swapping from an elevator to an aileron setup). 1 (CW) or -1 (CCW) C:GY:-1

About

Repo for the Fixed Wing Demonstrator - Arduino code in platformio

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages