GithubHelp home page GithubHelp logo

iyedexe / arduino-quadcopter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from benripley/arduino-quadcopter

0.0 2.0 0.0 192 KB

Arduino Quadcopter Flight Controller

C 1.98% Arduino 17.31% C++ 55.09% Processing 25.62%

arduino-quadcopter's Introduction

Quadcopter

Arduino Quadcopter Flight Controller

I’ve decided to build a QuadCopter and in an effort to really learn, I have decided to design and implement the Flight Controller and IMU myself using an Arduino rather than purchasing an off-the-shelf flight controller.

Operation

In order to maintain stability, the quadcopter must continuously take measurements from the IMU sensors and make adjustments to the speed of each rotor to keep the aircraft level. Flight control is achieved by varying the relative thrusts of the individual rotors.

I am using a PID (proportional-integral-derivative) controller to calculate the output for each of the three axes. This uses the signals from the receiver as setpoints and compares them to the actual angle values measured by the IMU. The difference is fed back into the PID controller to calculate new output values. The calculated roll, pitch, and yaw values are mixed together to generate the relative output of each motor.

External libraries

Required external libraries have been included in the libraries folder of this repository. However, as with all Arduino libraries, you will need to copy them to the libraries folder of your Arduino installation before opening the sketch.

Flight Controller Board

I have been testing it on an Arduino Uno but it should work on any Arduino board with sufficient I/O. You will need at least 4 Input pins and 5 Output pins as well as I2C and a Serial output for debugging. Also, this firmware has been tuned for my Motors, ESCs, and frame. If you are using different components, you will need to specify different tuning parameters (especially in the PID section).

IMU Board

I am using the gyroscope and accelerometer from an ArduImu v3 board with custom firmware to provide orientation information. The data is transferred to the flight controller board over I2C. The IMU project is available as a separate project on GitHub.

More Info

For more info and videos, see the following: My Quadcopter Pages

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.