Hi All!
I am twenty years old. I picked up my arduino for the first time this Christmas, and I've been keeping busy on my arduino applications so that I can bring you this instructable. I hope that it helps!!!

The purpose of this project was to build a stepping stone from remote controlled flight to completely autonomous flight. This initially seemed like a daunting process, but by breaking it up it becomes manageable. I think that if you have completed any kind of autonomous robot, and you have access to an RC airplane, you are in good position to take on autonomous flight. If you haven't done so already I would HIGHLY recommend visiting the site http://diydrones.com. There are TONS of relevant threads with many helpful members. Plus, plenty of inspiration. If you'd like,  please look me up; my username is waymond91.

You can buy a complete platform for developing your own autonomous flyer as well as download a complete code!!!
However, as is with many instructables members, funds are limiting, and there is limitless satisfaction trying to build it yourself from the ground up...

I had two primary objectives when beginning this project:
   1) Achieve sustained level flight using our autopilot program
   2) Ability to switch between radio controlled and arduino controlled flight

I strongly recommend that you already have some experience flying RC airplanes, otherwise you should look for your own plane and get some stick time. I will not be covering how to construct your own airplane, I am trying to focus on the autopilot. Maybe try and retrofit a plane you already have/

You will be at a great advantage if you already are familiar with:
   The arduino programing environment (I have fun using my ubuntu terminal to download and explore new arduino libraries)
   The arduino servo library
   The arduino wiring library (for I2C communication - if needed)
   Basic understanding of arrays and pointers

If these things are new to you, I hope my instructable is helpful. You should be able to figure it out anyways. There are lots of supplemental sites with great info!! You may want to consider trying a PING robot or a line follower :)
Otherwise plow on ahead!

We will be learning:
   How to clean and interpret data using PID loops and cascading PID loops.

All of the videos in this instructable are found in hyperlinks, I am sorry I couldn't get the embedding to work :(

Here is one of my first tests, as you can see, we still have some jittering to deal with:

Step 1: Sensors

We are using two sensors to help control our airplane: an accelerometer to determine the planes angular position, and a gyroscope to determine the planes angular velocity.
These are standard sensors when trying to construct your own IMU (inertial measurement unit). I used ossep brand sensors based off the ADXL345 accelerometer, and MPU 3050 gyroscope. http://osepp.com/learning-centre/start-here/gyroscope-sensor-module/ & http://osepp.com/learning-centre/start-here/accelerometer-sensor-module/

The Pros of using these sensors:
   Available at Frys
   Code available online
   I2C protocol makes wiring easy

   Headers are bigger than the actual circuit
   Electric motor easily induces noise on the sensor/wires (may not be due to this specific brand)
   Converting outputs to proper units took me a while

I will go over how to clean up sensor values a little later.

I do not think you should have to use I2C protocol to get this plane off the ground, it is just what was available to me at the time. There are lots of other good IMU units available online. Check Sparkfun!!

don't forget adafruit

While I am adding links... I have only tried the diavolino with some success but these small arduino compatibles look like they'd fit in a model plane nicely.

<p>Hi! Great instructable! Rally helps me a lot. Im working on an rc uav project and it would be great help if you could send me your codes... Thank you in advance :D My mail is armin.sutus@gmail.com</p>
<p>please can you send me the codes.. saha.anindya468@gmail.com</p>
<p>hi, very good job</p><p>i'm working on a small RC plane controlled with phone.</p><p>like others i couldn't download the codes.</p><p>it would be very appreciated if you could mail me the codes.</p><p>mn_nikpour@yahoo.com</p><p>thanks a lot for your help.</p>
<p>Email is rohanpaleja27@aim.com</p>
<p>Hi, </p><p>Your codes cannot be downloaded. I am doing something similar where I am using an arduino to code missions to send to an apm board. I was wondering if you could send me your codes and maybe give me some advice on this.</p>
<p>cool project. I've been working on mine but can seem to get the code right. Would you mind if I gave your code a try please?bassfishncliff@gmail.com</p><p>I'm gonna try integrating GPS with mine. Thanks and good work!</p>
<p>plxx mail me hazzaamrasheed14@gmail.com</p>
<p>can you please send me the arduino codes </p>
<p>Can you please send the code to dr3g14@soton.ac.uk</p>
<p>have u got the mail..?</p>
<p>n brother this was one of the awesome tutorials i would have came across,.....</p>
<p>can you please please please please send me the code..........prathameshmore47@gmail.com.</p>
<p>can you please send me the code at arthurhuangair@gmail.com.? thanks </p>
<p>Same as sammichael25. I can&acute;t download the code. I appreciate if you sent it to gpaulucci@hotmail.com. Thanks !</p>
<p>Did he get back to you?</p>
<p>Hi, I'm also having trouble downloading the code. Pease can you send it to dr3g14@soton.ac.uk</p>
<p>I wanted to look at the code you provided but when i try to download it says forbidden by server.....can you email it to me? sammichael25@gmail.com</p>
<p>are those photos form Lake Del Valle?</p>
They are!!! Beautiful up there.<br>How do you know the area??
I am very eager to like these items plz suggest me any ideas
<p>Hey I am trying to open the sample code files here but no luck. Could you re-upload them? </p><p>Great article by the way and good luck with the competition!</p>
<p>Hey, thanks for the PID write-up. It was actually easy to understand unlike all the other tutorials!</p>
<p>Hi, you have got some really great stuff here, but the link for the codes at the bottom are invalid.</p>
<p>hello.thank u for your help</p><p>i want to start but i do not know where to start.</p><p>Can you help me؟</p>
<p>Great project man</p>
<p>Great project man, I'm interested in building up an autopilot using the arduino due and this will be a great help. </p>
<p>Thanks for your guide! But there's some problem with the files, I can't download any of them because of a 403 Error, anyway this project is great!</p>
Congrats on a great project. I appreciate all of the links. I wish I could look at your code and am sad that I can't. I hope you can make your code available .
hey, the link says 403 forbidden by admin. i would love to see your sketch but it appears that you have locked it or something
Am I doing something wrong! I'm trying to view your code files just to get an idea of how to dealt with some things but I get &quot;Request forbidden by administrative rules.&quot;
are you the admin on your computer? <br>that could be the problem.
Hi, <br> <br>thanks for the great tutorial! How far are you right now in controlling the plane autonomously? <br> <br>Thanks for your reply, I'm very interested! <br> <br>-Phil
this is awesome!!

About This Instructable




Bio: Mechatronic Engineering
More by waymond91:Propeller Autopilot BeagleBone : Ubuntu OS & LXDE GUI Intro to Model Airplane Autopilot!!! 
Add instructable to: