Model Airplane Autopilot using Arduino
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)
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.
For more detail: Model Airplane Autopilot using Arduino
JLCPCB – Prototype 10 PCBs for $2 (For Any Color)
China’s Largest PCB Prototype Enterprise, 600,000+ Customers & 10,000+ Online Orders Daily
How to Get PCB Cash Coupon from JLCPCB: https://bit.ly/2GMCH9w
This Post / Project can also be found using search terms:
- auto pilot system using arduino
- how to use arduino autopilot
- arduino airplane project
- rduino plane model