Step 8: Flight Controller Overview

The flight controller is a system that uses a microcontroller to control the quadcopter. It needs to take inputs from the user via a RC radio receiver, input from a accelerometer and gyroscopic sensor. Its outputs are to the four ESCs.

The sensors being used are the BMA180 3-axis accelerometer, and the ITG-3200 3-axis gyro. Both of these are available in a breakout-board format from SparkFun so you don't have to solder the chips. Note that both of these are digital sensors, this means they both have internal analog-to-digital converters (ADC) that perform better than the integrated ADCs of most microcontrollers. Both of these sensors use the I2C bus, which means only two wires are required to interface both sensors. The I2C bus can run at 400 KHz.

The RC radio receiver will have 6 or more channel signal pins, each signal will be connected to one pin on the microcontroller. These signals will be pulse width modulated signals, so the microcontroller will measure the width of each pulse to take input from the user.

The ESCs each expect a pulse width modulated signal. One pin on the microcontroller will be connected to one ESC. The microcontroller will output pulses to each ESC to control their individual speeds.

Although an ordinary Arduino would have enough performance as the microcontroller, I decided to use an ATmega644P in my design so I have more memory and more pins to experiment with. My design still uses 16 MHz, uses the Arduino bootloader, and it is compatible with the Arduino IDE.

The ATmega runs at 5V because 5V is required at 16 MHz, this 5V power supply will be provided by the ESCs since they all have a built-in 5V voltage regulator.

The sensors run on 3.3V and thus our circuit will contain a 3.3V low-dropout voltage regulator that converts the 5V to 3.3V so we can safely interface with the sensors.
<p>Awesome explanation! We put together a little infographic to make it easier for people to visualize the difference too: </p><p>http://www.dollarhobbyz.com/blog/ask-dh-brushed-vs-brushless-motors/</p>
can I used the rc part of a old rc car?<br>
<p>The PCB is really making me difficult, do we have any other alternative please..</p><p>or can we get it in the market?</p><p>Thank You</p><p>Please Reply...</p>
<p>Yeah. Go spend 20 bucks and get you a KKV or CC3d and save yourself from wasting weeks of your life. This was a nice write up but why on earth would you want to re-invent the wheel? I like braggin rights but this is pushing it.</p>
<p>Hello,</p><p>I am trying to use Atmega32A instead of Atmega644. What do I need to change in the code? I am having troubles burning the bootloader</p><p>Ro4Copter_Boot_arduino.hex</p><p> I get the ERROR: address 0xf010 out of range at line 1</p><p>Is it a memory issue? Thank you for your reply</p>
Flawless instructable the best detailed instructable i've seen..thumbs up?
<p>if anyone has made it can you plz mail me the information how to make it in easier manner </p><p>mail me at deepak.electrical@gmail.com</p>
<p>Hai .. im memal raj i have same like helicopter . its not flying .. so anybody have technical idea pls give</p>
<p>hi there: is it possible to make the same project by using the pascal language .</p><p>i'm a delphi programer but i have never test this language in the electronics projects</p><p>finally thx.</p><p>with all kinds of regards: bravesofts.</p>
<p>how much weight it can lift..please give me ur mobile or mobile number i want more details i am going to do this for my finel year project...</p><p>my details</p><p>phone:9942497717 , 9655867717</p><p>call4karthikeyan@gmail.com</p>
<p>Hi,</p><p> i want to caliberate the flight control board with out remote. how to make the FCB belive that i'm using a remote by actually using an arduino.<br></p>
<p>Hi there I have a quad assembly and testing program, but after what I mean by a motor that is connected to port d 6 Flayt control engine speed when Tratel between 1750 and 1800 to 1200, but the rest are I Zhstnd parts:</p><p>Nano's control Flayt Speed Contra Emacs 30 Amps Fvtaba 6 channel radio control Emacs engine 2213 2200 mAh lithium-polymer battery 3Sl And the quad is x Engine and engine calibration, and I even got Flayt Test and again I had a problem like this in the links below to see video software Please help<a href="http://uplod.ir/9dvyai16anxg/arm...33.mp4.htm" rel="nofollow">http://uplod.ir/9dvyai16anxg/arm...33.mp4.htm</a>http://h1.asset.aparat.com/public/user_data/flv_video_new/685/909a206786b90312c1d2fe682f3d71532052749.mp4</p><p>hamzh.shahabadi@gmail.com or masih.azin@yahoo.com</p>
<p>How much did this project cost you?</p>
<p>hi i have an arduino uno how can i use that to make the quadcopter. i already bought the frame and cables but i havent bought any electical things i need to use the arduino </p>
<p>You can buy an ardupilot or similar system. Look up &quot;Arduino Quadcopter&quot;</p>
<p>At a mining mum you need a gyroscope and custom code. There are tutorials online.</p>
Great looking project. I was wondering if anyone has tried this basic design using shrouded or ducted fans in place of open propellers?
<p>Search edf quadcopter on YouTube.</p>
<p>Hi,</p><p>That's a great share. Thank you so much. I want to ask a question. I want to build a quadrotor with a camera. I want to control the angle of camera. Is it possible?</p>
<p>Search &quot;quadcopter gimbal&quot; on the internet. You can make one with servos.</p>
<p>Nice build! I'm thinking of building one but maybe using a prebuilt controller instead of the Arduino. However, as the final aim would be to lift a raspberry pi and digital point and shoot camera (total weight 400g) will the configuration you've made lift an additional 400g mass comfortably? Thansks! </p>
<p>It is possible, though you would want a light battery, possibly a 4 cell lipo, and larger props to improve power. I recommend the KK2.1 board for a prebuilt flight controller.</p>
<p>can you give me the working source code for quadcopter,because code given in github was wrong .....</p><p>if anybody have code for ATmega644PA please email me on yogeshmane153@gmail.com </p><p>thanks .....</p>
<p>you give some diagrams here but they are not clear . i can't read component names . i face difficulty to arrange components as shown in figures .they are very small . so can you provide neat and clean diagram frank sir plzzzzz</p><p>thanks</p>
<p>Hi Frank Sir</p><p>This article is very useful to make quadcopter. I read all steps and follow all instructions .</p><p>I buy all components mention in this step 9. but question is this how can i assemble solder connect all components. i don't have any complete circuit diagram.</p><p>so can you provide me a complete circuit diagram of quadcopter to join all components.</p>
<p>hi i have an arduino uno how can i use that to make the quadcopter. i already bought the frame and cables but i havent bought any electical things i need to use the arduino </p>
<p>this the video of the error i posted earlier <br>http://www.youtube.com/watch?v=Qoc4k1FEY6c</p>
<p>I am using a nanowii board for QUAD + with D2830-11 1000kv motors, turnigy plush 18 Amp ESC's and a zippy flightmax 3S1P 5000mah battery <br>the TX-RX is a turnigy 9x V2</p><p>I am able calibrate the throttle individually for all the ESC but when i arm them, 3 of them work fine but the 4th one keeps on doing 'beep'-'beep' with an interval of about 2 seconds</p><p>The rest 3 motors work according to the throttle but the third one(bottom one) keeps on making that noise no matter what i do</p><p>could anyone tell me what the problem is?</p>
i want to download this file but it is asking to create a pro account.my parents will not allow to do this.if it is free i am happy .I am requesting all members of instructables.com
<a href="http://download.instructables.com/ESD/4IGV/GP2DLGHA/RC-Quadrotor-Helicopter.pdf?Expires=1388330747&Signature=cGvfCm4kJEE-mEG1dz55Pbe6fUKd135Z-1ovISYwewdIPbrxIgdfKQz7L7jB6PjNnMC5g1eNXH026Lfg9xm7FMxBAFz7F62Yg6NwBW6USrb6J-RfzCzkA62iKW7wcazeaWfSxkBqZfxiWdy9M-ocqyjLlQ9~1xnn1UbujRji8u0_&Key-Pair-Id=APKAI44RD4FFAGO7EV3A" rel="nofollow">http://download.instructables.com/ESD/4IGV/GP2DLGHA/RC-Quadrotor-Helicopter.pdf?Expires=1388330747&amp;Signature=cGvfCm4kJEE-mEG1dz55Pbe6fUKd135Z-1ovISYwewdIPbrxIgdfKQz7L7jB6PjNnMC5g1eNXH026Lfg9xm7FMxBAFz7F62Yg6NwBW6USrb6J-RfzCzkA62iKW7wcazeaWfSxkBqZfxiWdy9M-ocqyjLlQ9~1xnn1UbujRji8u0_&amp;Key-Pair-Id=APKAI44RD4FFAGO7EV3A</a>
Thanks for your great instruction. But I wonder why you set OCR1n =pw*2? in step 13? Wont it immediately jump out of the loop? <br>And can you let me know what kind of logic analyzer you use? <br>Thanks a bunch! :) <br>
pw * 2 doesn't change pw at all, it only &quot;returns&quot; a number that is twice what pw was, but pw is not modified.<br><br>I use Saleae Logic as the logic analyzer.
This <a href="http://www.nitrotek.fr/helicopteres-rc.html" rel="nofollow">Quadcopter </a> is excellent. I had been really looking forward to if you would be so kind to tell me, where do you ask for the frame kit, fans and motors. I really want to do this job it's just my favorite one thanks for sharing.
Amazing :) wish I had that much talent
can we move the helicomper in the left and right direction
I have a Multiwii Microwii flight controller and I am able to arm the motors but not disarm them. <br> <br>Thanks for the quick response, <br>Nikhil
Hey Frank, <br> <br>I finally finished making the quadrotor but I was wondering how to turn it off. <br>It's kind of a stupid question but are you just supposed to unplug the battery or is it necessary to install a switch
Safety the quadcopter (it's a stick command). There is a LED that indicates safety. Once it's safe, unplug the battery.<br><br>A true kill switch that can handle that much current is not feasible
where do u put the 12 gauge sandard cord wire <br>
How do you use the battery monitor and battery charger ?
hi <br>i cant use avrdude is there any other program to use the bootloader and please if you can explain how to use avrdude and plz plz upload the docs in any site other than google code because i cant use google code if you can please email it to me
Frank <br>could i use Arduino mini for my flight controller instead of designing my own cause I dont understand how to design it at all <br> <br>Thank you <br>Please Reply <br> <br>
Yea, just look at AeroQuad Mini, or MultiWiiCopter, both of them actually use the Arduino Mini

About This Instructable




Bio: I am an electrical engineer. I graduated from U of Waterloo. I used to work for Adafruit Industries as an EE. Now I work for ... More »
More by frank26080115:LED Pocket Watch Easy Cord Wrapping Around Power Bricks Using SMD Components on Breadboards 
Add instructable to: