DIY Arduino Controled Multiwii Flight Controller

52,164

215

26

Introduction: DIY Arduino Controled Multiwii Flight Controller

About: A computer, drone, and Android savvy technician altruistically passionate about curing diseases as a future physician.

This project is to create a versatile yet custom multicopter drone logic-board based on Arduino and Multiwii.

Step 1: Hardware

An Arduino Nano was utilized for processing logic and a MPU-6050 was implemented for gyroscope and accelerometer input.

Step 2: Designing

Download Fritzing. It is a circuit designing software for smaller, simpler circuits. It is one of the most simple yet effective PCB designing software available.

My circuit design is available via the "myPCB.fzz" attachment.

If your sensor is not available in Fritzing by default, you can download the sensor's schematic (.fzz file) and drag the file into the workspace.

Step 3: Fabricating and Assembly

Their are two ways to go about making the PCB from your design. I used the first option while working on this project.

Fabricated the PCB Online

I used SeeedStudio with optimal results at a competitive price.

On Fritzing, export your project as a gerber file.

You can view the design by uploading the gerber file(s) here.

Then create an account on seeedstudio, drag your gerber files into SeeedStudio's fabricate page, and order to the desired specifications.

Assembly

Solder your components onto your PCB. Consider a 3D printed casing for the flight controller.

Step 4: Setting Up the Controllers Multiwii Code

MultiWii's code is free, easy to use, and it supports many (most) builds.

Download Multiwii and the Arduino IDE.

Connect the flight controller to your computer.

On the computer, open the already downloaded MultiWii folder and open the Arduino file called "MultiWii.ino".

Access to the tab "config.h" and delete the "//", selecting the desired type of multirotor.

Scroll down and enter the minimum and maximum values of your transmitter.

Uncomment the sensors used.

Next, follow the instructions commented throughout the file.

After that, on the top menu of the IDE, click on Tools, Boards, and select the Arduino micro-controller you're using.

Then, click on Tools, Port, and select the computer's port that your controller is on.

Upload the Multiwii code by clicking the button shaped like an arrow.

After uploading, text "uploaded successfully" should appear on IDE.

Step 5: Using the Multiwii GUI

Open your MultiWii folder, click on MultiwiiConf, application.windows32 (or the desired operating system's option), and finally open MultiWiiConf.exe.

On the top left of the window, select the port your flight controller is on and click on start. Sensor Values should show on the application.

On the right, select the sensor type. To calibrate the sensor, slowly move/tilt the flight controller as prompted.

A model of the desired drone should appear on the application. Its movements should mimic the movements of the flight controller.

Step 6: PID Tuning and Calibration Tips

Connect the flight controller to the multirotor to adjust PID values.

Set the PID values to default and ensure the multirotor's center of gravity is in the center.

Carefully hold the multicopter so that your gyroscope's readings in the GUI is flat. Then set the throttle to 50%.

Note: If the accelerometer's readings fluctuate exceedingly, that is in indication of excess vibration. Vibration dampeners may be required to reduce vibrations (I used Double Sided Tape as an alternative solution).

Now while carefully holding your rotor in a safe place, increase the throttle until the multirotor feels weightless.

Put pressure (lean) on each axis of the drone. You should feel resistance against that change. Change the P value until this resistance is notable.

With your hand, oscillate (tilt) the drone back and forth with your hand. On the application, increase the P value until the drone barely starts oscillating on its own. Now reduce the P value a bit. Repeat this process, this time oscillating the drone to the sides (to the left and right).

The calibrated values should be suitable for flight now.

For tuning tips for different types of flight, look at the "Advanced Tuning - practical implementation" section here.

Step 7: Fly!

Feel free to further experiment with the PID values with caution.

If you want to add additional features to your drone, you may consider adding a live stream using a Raspberry Pi or adding Bluetooth capabilities to it.

A special thanks to robobot3112 for aiding me in setting up my flight controller.

If you think this project deserves it, don't forget to vote, favorite, or subscribe.

Feel free to discuss other possible features, ask me a question, or share thoughts in the comment section below.

Have fun flying!

Circuits Contest 2016

Participated in the
Circuits Contest 2016

Be the First to Share

    Recommendations

    • Pi Day Speed Challenge

      Pi Day Speed Challenge
    • Trash to Treasure Contest

      Trash to Treasure Contest
    • Microcontroller Contest

      Microcontroller Contest

    26 Comments

    0
    atamanu
    atamanu

    2 days ago

    Hello ..
    Can you help me!. I did the assembly ... http: //electronoobs.com/eng_robotica_tut4.php ... but at the output to ESC, there is no PPM signal,, the signal is set to 1 ms, it does not change. I can't start the engine.

    Oscilo.jpg
    0
    atamanu
    atamanu

    Reply 16 hours ago

    Solved.

    0
    KartikP
    KartikP

    1 year ago

    Hey! nice project can i implement it using Arduino UNO?

    0
    DavidDrones
    DavidDrones

    Reply 9 months ago

    I don't see why not as long as the MultiWii is compatable with the UNO.

    0
    engineertk19
    engineertk19

    1 year ago

    I can not seem to find the multiwii.ino code for the arduino. could you please give me the code copied into a word file or PDF? that would be super helpful. Thank you.

    2
    Borya
    Borya

    4 years ago

    I made this board in summer 2015. Its do the job but my major mistake was I forgot to put diode on 5V line between Arduino input and ESC`s BEC, so if battery not connected to ESC they draw current from Arduino voltage regulator.

    NanoWii.jpg
    0
    Cương Lợi
    Cương Lợi

    Reply 1 year ago

    Have any I2C error on GUI when you connect BMP180 sensor on your Flight Controller ?

    0
    Borya
    Borya

    Reply 1 year ago

    No errors.

    0
    Cương Lợi
    Cương Lợi

    Reply 1 year ago

    otherwise, so many error i2c when i connect to my FC board, my board including MPU6050+arduino nano+BMP180, mutiwii ver 2.4, i connected to BMP180 sensor with 3.3v, too but on multiwii GUI display errors, i cant understand what problem in this case

    1
    JOogway
    JOogway

    1 year ago

    Good and neat concept with one major flaw.
    You cannot (or more like, should not) power Arduino with 5V on Vin pin, as its regulator need 7V-12V to down it to 5V. Giving 5V on vin will lead to not fully stable operation. If you want to power it with 5V, you should have connect it to 5V pin.

    0
    Naseef Ali PV
    Naseef Ali PV

    Question 2 years ago on Step 7

    My laptop will not open multiwii 32.only opens multiwii 64 . But when I select com port and star then the multiwii is closed. What the problem.

    0
    kolkoli
    kolkoli

    3 years ago

    can I add ultra sound distance finder, or do you know such open source firmware that has much sensor attachment capability??

    0
    Tarun Tom
    Tarun Tom

    3 years ago

    can i use an arduino uno insted of arduino pro mini

    0
    robobot3112
    robobot3112

    Reply 3 years ago

    As far as i know, you can use arduino uno. Just go by the connections, and do a test on the multiwii gui to see if it detects it.

    0
    Mohammed aslam nk
    Mohammed aslam nk

    3 years ago

    Can you plz help me with code and cicuit diagram of android controled wifi drone

    0
    DavidDrones
    DavidDrones

    Reply 3 years ago

    The diagrams are provided. Also, this project uses radio waves, not Wifi.

    0
    ghosalnilendu2
    ghosalnilendu2

    4 years ago

    hi, i am using only MPU6050 and my quad is in X configuration but after uploading the code and running the multiwii GUI I noticed a problem that my compass is rotating continuously can any one tell me what is the problem. I am using MULTIWII 2.4

    0
    DavidDrones
    DavidDrones

    Reply 4 years ago

    Perhaps your sensor is damaged? Did you wire it correctly?

    0
    DavidDrones
    DavidDrones

    Reply 3 years ago

    Did you calibrate your sensor?