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 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 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


hi when i change the bmp085 adress inside the sketch (mine is 0x0D) multiwii gui software show i2c errors
i know that bmp085 is a replacement compatible ship for bmp180 but they don t have the same i2c adress (standard 0x77) maybe the manufucture put a wrong adress or this s a clone one
how can I use nrf24lo1 module and also brushed motor.please help me

The flight Controller is very simple and cost effective , however i just have one question. The MPU 6050 AND BMP 180 are both I2c devices so are You connecting their SCL AND SDA pins together to the Arduino's SCL AND SDA pins and then explicity accessing their address in the software to use them?

please tell me how to enable gimbal?
what i uncomment code?
Removing "//" from the beginning of the code line is known as uncommenting.
Hey, great post. If I wanted to do a hexacopter how would I wire this to the arduino?


Error during uploading

gizDuino mini ATmega 328

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xd3

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xd3

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xd3

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xd3

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xd3

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xd3

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xd3

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xd3

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xd3

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xd3

Problem uploading to board. See for suggestions.

Which OS do u use. Try with different versions of Arduino ide

Hi. I am a student of electricity from Iran and I have a question. I want to make changes to the control system of the basic codes of the quadcopter (I mean, the code is a quadcopter with Ardino) but I don't know which section should be changed. you can help me?Please send an answer to my email. Thank you

Can I use HC-06 bluetooth module instead of HC-05/02?

Bro.. i Can see.. You are Filipino because of The Gizduino..i am super noobs in Programming..can u help me? meron akong drone,may motor,emax 30amps,with chasis pero walang mcu..

Is their any way to add return to home fiction? By the way. Great build.

:||||||||| hi

I did all of this but I don't know how to start (run) the motors

I'm using bluetooth and android

Did U finish ur Drone ?

Hi everyone,

Please give me the schematic of connector from Arduino to MPU6050,
BMP180, HMC5883L

What ttl do you use? I am following your guide and is the last piece that I have to buy

sir, here where u used the hc-05 bluetooth module in the connection diagram

sir is it possible in arduino Atmega 328
More Comments