Arduino based flight controller for a tricopter
Go to file
2024-02-07 20:07:16 +01:00
FlyTri.ino migrate 2024-02-07 20:07:16 +01:00
Readme.md migrate 2024-02-07 20:07:16 +01:00

Tricopter flight controller

This repository contains lightweight Arduino code for stabilizing and controlling a tricopter using a FlySky Fli 14+ receiver and a MPU6050 accelerometer and gyroscope module.

Overview

This Arduino sketch is designed to stabilize and control a tricopter using data from a FlySky Fli 14+ receiver for remote control input and a MPU6050 module for measuring the orientation of the tricopter. The sketch calculates PID control values to adjust motor speeds and tail servo angle in order to maintain the desired roll and pitch angles.

Features

  • Tricopter stabilization and control using PID control.
  • Uses FlySky Fli 14+ receiver to receive remote control signals.
  • Utilizes MPU6050 accelerometer and gyroscope for orientation measurement.
  • PID control for roll and pitch stabilization.
  • Arm and initialize ESCs for motor control.
  • Customizable PID constants for roll and pitch control.

Requirements

  • Arduino board compatible with the sketch (tested with Arduino Nano).
  • FlySky Fli 14+ receiver for remote control.
  • MPU6050 accelerometer and gyroscope module for orientation measurement.
  • Servo motors for controlling motor speeds and tail servo.

Getting Started

  1. Connect the FlySky Fli 14+ receiver to the Arduino board on RX pin
  2. Connect the MPU6050 module to the Arduino board.
  3. Connect ESCs for motor control and tail servo (pins 9, 10, 11, and 3 in the provided code).
  4. Adjust the PID constants (kpRoll, kiRoll, kdRoll, kpPitch, kiPitch, kdPitch) to tune the tricopter's stabilization performance.
  5. Upload the provided code to the Arduino board.
  6. Power on the tricopter and make sure it's on a stable surface.
  7. Observe the tricopter's behavior as it attempts to maintain the target roll and pitch angles.

Notes

  • Ensure that the ESCs are properly calibrated and the motors spin in the correct direction.
  • Make sure the tricopter is operated in a safe environment, away from people and obstacles.
  • Tune the PID constants to achieve stable and responsive flight performance.

License

This project is licensed under the GNU General Public License (GPL).