Lets build an Arduino based flight controller that can do wireless PID tuning, Orientation lock and altitude hold and position lock with the help of A GPS. Ok So this DIY flight controller is an educational Arduino based module. It's simple to make, easy to program and is a great project for experienced hobbyist like me. The program is open source and easy to configure.

This Flight controller will have features like those of NAZA and APM the only difference here is the PID wherein you will need to be patient in getting your drone tuned. To make tuning easier I included a Bluetooth module to ease the tuning step with out the use of your computer.


You Will learn how to fabricate PCB's! Always check your connection.

Why make one?

Because, It is cheaper and you will understand how the flight controller works. And using your extra sensors you can make good use of it.

DIY vs Branded

The answer is Branded or at least the clone, because DIY will to a bulkier flight controller, compared to a 16$-32$ flight controller which is smaller and easier to use just like the Naze 32

Total cost?

I guess I'll cost this by the amount I've spent this week for this project only

1x pre-synthesized PCB 6x6cm almost 1.8$ here in the Philippines

3x 1mm Drill bit $1

1x Gizduino Mini $8.58 Or "Arduino Nanov3"

2x Pinheaders 1$

TOTAL 12.38$


Proceed to the next step for more price info

Step 1: Parts and Materials

As I started arduino 3 years ago I guess I've piled up some extra sensors such as the MPU6050 , BMP180, and the HMC5883L now getting frustrated of my old Flight controller for my quadcopter I decided to make my own similar to those of MULTIWII "CRIUS SE"

So here are the main parts

An Arduino mini.... or something similar like mine from our local electronics shop exclusive on in the Philippines

I got these sensors for 22.31$ only! 03/15/16 update~ "It is way cheaper nowadays"

1x MPU6050

1xBMP180 or 085

1x HMC5883L

--- 10 DOF IMUMPU6050 + HMC5883L + MS5611----- best price~


1x Bluetooth module HC 05 or HC02

1x TTL converter such as the FTDI programmer module

2x Pin headers 1x40

1x pre synthesized PCB 6x6cm

A lot of female to female wires~

TOOLS and Chemicals FOR PCB fabcrication

Mini Drill

1mm Drill bit

Ferric Chloride

Developer Solution


Exposure lamp or 10W florescent lamp

2x small Glass Plates "see through"

2x Containers big enough for the PCB and chemicals

Step 2: Understand the Connection

Important pins to enable Sensor communication the I2C pins "A4 asSDA" and A5 as "SCL"

As you connect your sensors you will need to connect each pin to the same pin on the arduino mini

Example "Sensor SDA" to "ARduino SDA A4" ... then Sensor SCL to Arduino SCL

Easy right? Just remember All sensors must connect all of their SDA and SCL pins to the proper terminals on the arduino mini


To enable Motors~

D3 for the 1st motor

D10 for the 2nd motor

D9 for the 3rd Motor

and D11 for the 4th motor


To enable controller inputs






AUX2 D12 (optional)



Do not use 7805 regulators USE a 5V UBEC

UBEC is an efficient Voltage regulator that can handle more than 7805

Connect the + and - to the respective terminals on the arduino board.

Step 3: Redesign the PCB If You'd Like

Download the RaR file and open up your eagle CAD if you are using a Legit Arduino mini cuz you will need to redesign the connection

If you live in the Philippines and you have the same parts just like mine feel free to skip this step.

NOTE for your MPU6050

Y AXIS is your forward direction!

Step 4: PCB Fabrication First

To Tell you the truth this is not the hard part of this build its actually easy as long as you follow the steps.

Prepare the following

Print out the PDF in HIGH Quality

Prepare the baby OIL

Prepare pre synthesized PCB 6x6cm

Prepare a container filled with ferric Chloride

Prepare a container with developer powder ... 3 tsp developer 1cup tap water (agitate until the powder dissolved)

Prepare 10 Florescent lamps


Lets start!

1.Cut out the PCB layout and apply a small amount of baby oil and gently spread the fluid around the paper.next gently remove any excess baby oil by wiping it with any cloth

2.Get your pre synthesized PCB 6x6cm, Remove the film and place the print side of the paper facing the green side of the PCB "that is important". Get your glass plate and stack the PCB and paper in between.

3.Get your florescent lamp and Elevate by at least 3 inch

4.Get your Phone-> clock and then Timer... Set it to 5 minutes

5. Place the GLass plate with the PCB under the Florescent lamp and immediately turn on the time and the lamp..Turn the lamp of as your phone rings.

6. Remove the glass and the paper go to the sink and run the exposed PCB with running water make sure the oil is removed.

7. Get your container with the developer solution dip the whole PCB "Copper side facing you" and agitate untill the ink is removed

8. Rinse the PCB again with water to remove the developer solution on it

9. Get your Container with Ferric Chloride and dip the PCB until unwanted copper is removed.

10. DONE!! all you have to do now is to drill the holes.

Step 5: PCB Done Whats Next?

Get your soldering Iron and start assembling duhh....

Step 6: Casing

Now printing a casing is highly suggested because your barometer sensor is sensitive to external factors like air and temperature.

1 Print a casing

2 Cut a small sponge and glue it near the Barometer sensor "do not glue the barometer sensor as is" apply hot glue on the sides only just to make the sponge act as a filter.

Step 7: Lets Start Testing!

Connect the following onto the flight controller. The HMC5883L, TTL converter, and might as well connect the wire to the receiver module.

To start initial testing connect your FC to your computer.... the Arduino mini should light up as well as the MPU 6050 after that its time download some stuff over the internet.

Multiwii arduino program and and Multiwii Config

And the latest ARDUINO IDE which you probably have.

1. Open the Multiwii.ino inside the Multiwii Folder once done go to the tabs within the arduino program and go to "config.h" this is where you will start

2. Scroll down and follow through from //#define QUADX to "#define QUADX only" removing the "//" uncomments the line

3. scroll down and uncomment #define MINTHROTTLE 1064 if you are using SimonK ESC and add // to the default setting which is #define MINTHROTTLE 1150 // (*) (**)

4. scroll down a little #define MAXTHROTTLE 2000

5. #define I2C_SPEED 400000L

6. Combined IMU Boards -> uncomment //#define GY_521 to #define GY_521

7 sroll down I2C barometer and uncomment //#define BMP085 to #define BMP085

8. I2C magnetometer uncomment //#define HMC5883 to #define HMC5883

9. Once done Go to Arduino Tools on the upper left -> Board -> Duemilanove or UNO depends on your arduino MCU.

10. Tools and then set your port where the Flight controller is connected.



Now that you are done uploading its time to use the Multiwii GUI

Open the MultiwiiConf folder

application.windows32 for Windows 64bit or 32bit do not use the application.windows64 since it is not working

Open MultiWiiConf.exe

1.select com port where the flight controller is connected and click on "start"

after that it should now have readings .

2. To make the dashboard move calibrate the Acc first by putting your FLight controller on a flat surface and hit the calibrate ACC leave it for 10 seconds or so and then calibrate your Magnetometers, After clicking CALIB_MAG you are given 30 sec to rotate your Flight controller in all axis make sure it reaches 360 rotation.

3. Once done explore the GUI and proceed to the next step.

Step 9: Replace That Old Flight Controller

Let lessen the detail and just get to the point here

Replace your old flight controller in my case CC3D

Install your DIY Flight controller

Position your Magnetometer somewhere on the frame wherein its not affected by the motors or battery.

For Bluetooth Programming replace the FTDI programmer with an HC 05 or HC 02 Bluetooth module Note that some BLuetooth modules need to be reconfigured to 115K baud for it to work

Step 10: Program Your Drone With Your Phone!

Wireless programming~

Programming with a Wire sucks lets go to the next level which is a lot better

Download this on your android phone

For apple devices try looking for some multiwii programs because I have no idea about apple~

This app is very useful, It eliminates all the drag of bringing a laptop and tuning it on the field and then testing the values all over and over again through a "cable and a laptop" ..that sucks. So here I wish you a safe flight and have nice day!

BTW For me the hardest part to tune here is the barometer or ALT HOLD PID nonetheless everything can be search through Youtube and Google for PID tuning tips and tutorials.

Step 11: Go FLY!

Fly safe guys dont fly your drones on streets or crowded areas, Tune your drone on an open area like a soccer field or something.

Step 12: Video~

commin right up

<p>hi, can you help me fly this thing? FC's ready, i don't know what to do after mag's calibration. I 've tried hitting &quot;write&quot; in GUI, unplugged the usb (i used nano v3) powered with Li-Po and tried stupid stick combinations (since i don't know how to arm ;D) and the escs never responded.</p><p>Please reply ASAP......</p>
<p>figured how to arm, the motors are responding good with respective to the sticks (channels), but i don't know how to tun pid etc, the motors are not responding at same time (at same throttle stick position) one motor starts at a point and the i keep increasing the throttle the rest of the motors start one by one </p>
<p>Hi everyone,</p><p>Please give me the schematic of connector from Arduino to MPU6050,<br>BMP180, HMC5883L</p>
<p>What ttl do you use? I am following your guide and is the last piece that I have to buy</p>
<p>sir, here where u used the hc-05 bluetooth module in the connection diagram</p>
sir is it possible in arduino Atmega 328 <br>
<p>Hi, is it possible to use a breadboard in place of the pcb for prototyping (assuming the drone is super powerful can carry the breadboard)?</p>
<p>it is possible, just make sure everything is secured &quot;absolutely secured&quot; </p>
Sir can this have altitude hold function
<p>here is air remote control with your smart phone right?</p>
Mail lại cho mình dc k bạn curly.saigonese@gmail.com
<p>Hey treyes4, thanks for the instructable, this is a very cool build and I think I may try and do something similar. I noticed the 3D printed case, have you provided the STL file for that design anywhere? If so I would be very interested in printing that out myself. Thanks</p>
<p>Hi, I have arduino based apm 2.8 flight controller.Onboard MPU6000 Gyro sensor not work.how can I use external Gyro board mpu6050 or others?</p>
<p>Who did, then please give me specific guidance</p>
<p>ducthien20021995@gmail.com</p><p>help me in detail with</p>
<p>hey guys can I use GSM module for wideing its range for its flight. As I need to make the quadcopter autonomous so we can give coordinates from phone and it goes there and makes the video of the area below it.</p>
<p>It is possible but I don't suggest you trying that since you are going to use this for Autonomous flight. Which is risky and might cause harm to the hobby if something goes wrong. With that you will probably need an APM flight controller.</p>
So can you guide as from where I should start and which micro controller I should use as I am really new to this thing and its basically my final year project at university.
<p>hey please can you help me whether i can use the bmp180 instead of bmp085</p>
<p>if i m using Arduino Nano/Uno, how to connect the Bluetooth?</p>
pls how to made arduino uno for drone with bluetooth ; all file and arduino program.pls show me.
I think u jst need to figure out the pin confic as pro mini n uno uses same 328P
Can i add the GPS L80 to it?
<p>So, come on guys, if I am here, is because I don't have cash and I don't can pay for wiew your pdf! Are you bad, guys?</p><p>I am registered for download the pdf, and after the registration I have read that I must pay 50 dollars?!?!?! but guys?!?!?!?!?</p><p>For the little part that I can see, seems a good work but.... It's a bad and wrong thinks (free already pdf, please).......</p>
<p>just click the link for ether the rar or the pdf just a bit down the page from the picture of it its free no need to pay anything</p>
<p>WTF are you talking about? The pdf is just a copy of the webpage you are already looking at. everything is already available for free, the pdf is just to download the instructable for offline viewing. Just screenshot it if you are that poor!</p>
<p>Hi <strong>treyes4</strong>, I wonder that can I use <em><strong>10 DOF IMU Sensor </strong></em>in order to replace the all of the sensors you indicate.If I can, could you plase tell me what to add or change in the multiwii code configuration and where to connect pins on the arduino mega/uno</p><p>Regards,</p><p>Here is the link of 10DOF-IMU <a href="http://www.waveshare.com/10-dof-imu-sensor-b.htm" rel="nofollow">http://www.waveshare.com/10-dof-imu-sensor-b.htm</a></p>
<p>Hi Kt6 !</p><p>I have the same sensor too. Do you have library of this sensor for Arduino ? I searched a lot but did not find anywhere. I have its stock library but unfortunately I dont know how to compile that with Arduino.</p><p>Kindly can you help me ?.</p>
<p>I want to develop an App to test each motor through bluetooth, how can I start only one of the four motors each time? </p>
<p>Did you use ESC( elektronik speed controller)?</p>
<p>Hey dude,</p><p>can u share to me source code flight controlller using a mpu6050?</p>
<p>Pareng Treyes4, taga pilipinas din ako. salamat dito sa post mo ang laki ng tulong. Pero ask ko lang yung about sa Position hold (GPS) kelan kaya lalabas yon ? :) thanks bro.</p>
<p>hay sir can use TTL converter PL2303 ?</p>
<p>the following is the error I am getting when I try to upload</p><p>please help me with it treyes4</p><p>Arduino: 1.6.8 (Windows 7), Board: &quot;Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)&quot;</p><p>C:\Users\damu\AppData\Local\Temp\build18491610cf751e556b2ffeb7956fae43.tmp/core\core.a(main.cpp.o): In function `main':</p><p>C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino/main.cpp:37: undefined reference to `setup'</p><p>C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino/main.cpp:47: undefined reference to `loop'</p><p>collect2.exe: error: ld returned 1 exit status</p><p>exit status 1</p><p>Error compiling for board Arduino/Genuino Mega or Mega 2560.</p><p>This report would have more information with</p><p>&quot;Show verbose output during compilation&quot;</p><p>option enabled in File -&gt; Preferences.</p>
<p>thank you</p>
If I'm to use the ARDUINO UNO ATMEGA328, do I still need the TTL converter?
<p>If your Arduino has a USB port you don't need the TLL converter</p>
Noted. Thanks.
<p>why you don't use wifi module ?</p>
<p>Thanks for a good starting off point. I will try to get something in the air.</p>
<p>when is the video coming out</p>
<p>Hi im having trouble hooking up the sensors to the arduino. All three sensors has to be hooked up to 3 different SDAs and SCLs corrrect? Could I use the the Arduino mini 328 for this project? </p>
<p>Hi, I'm having trouble editing the PCB layout to make it fit the Arduino Pro Mini. Please could someone help. (I have eagle cad and I have opened the file but I don't know what I need to do to it)</p>
<p>Hard to explain... better do some youtube tutorial for eagleCad ;)</p>
<p>Can i use the GY-87 board that has all three sensor built into it or do i have to get all three separately ?</p>
<p>Dear treyes4, your project is really cool and i like it,but i have some questions.I dont understand 7. step i mean the picture is not clear,so can you explain me the picture.Is the red cicruti board TTL converter? What is the small blue box next to big blue box?</p><p>What is the Black Cable on the left edge of the blue box? Can you help me how to put Bluetooth?</p>
<p>See the image. </p>
how will u add GPS for autonomous flight
<h4>i2c Gps nav~ module then just connect your GPS leads then since its i2c connect the SDA and SCL pins to the same thing on the arduino board SDA and SCL .... a little google will help im no longer a multiwii user im using APM 2.6+ </h4>
<p>Hi,</p><p>I plan to build a DIY APM 2.6+ did you manage to do it? I ordered an Arduino mega 2560 bouard which is the same Arduino as in APM, my plan is to upload ArduCopter there, add the MPU6050 sensor and a baro sensor and I could hav my cheap APM. Can it work? I have CH340 serial interface version by the way. I would need the pinout to know how to connect the modules same way as it is an APM.</p>

About This Instructable




Bio: Hello There! My name is Timothy and I am 18 years old and I love biking, Rc, arduino ,gadget hacking and 3D designing. I'm ... More »
More by treyes4:DIY Jigsaw Lamp  3D Printed Xiaomi FPV Camera saver [ExoYi]  Indoor FPV Drone [Setup,Design and 3D Printing] 
Add instructable to: