Giter VIP home page Giter VIP logo

heliflightcontroller's Introduction

Flight controller for an RC helicopter ๐Ÿš

This arduino sketch is a flight controller for a 4ch radio-controlled helicopter. It uses an MPU6050 IMU to stabilize the aircraft.

How it works

The pitch, roll and yaw axes are stabilized with a respective PID controller using the angular velocity as a proportional term. The yaw axis includes a counter-torque term that increases with throttle.

In general, the program only improves stability in the short-term and a pilot (or other control algorithm) is needed to stabilize the helicopter in the long-term. Despite this, the aircraft can maintain a steady hover without pilot input if the PIDs are tuned correctly (in the order of 5 seconds).

Receiver Inputs

The program is designed to receive 4 PWM inputs from an RC receiver and generates 3 PWM outputs. Two signals go to the cyclic servos and the third goes to the tail-servo or speed controller. Since it assumes that only two servos are used for the cyclic, only a 90-degree swashplate is supported. The code assumes the transmitter uses MODE 2, but MODE 1 can be used by swapping the arduino connections to the receiver.

Schematic

The sketch was written for an Arduino Nano but it should be compatible with other boards.

Note: replace the tail motor and speed controller with a servo if you're using a variable pitch rotor.

Dependencies

These libraries are needed to compile the code:

Example

This is the helicopter the code was initially writen for:

See: Flight video

heliflightcontroller's People

Contributors

rcmags avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

chenguoming1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.