DIY Arduino Controled Multiwii Flight Controller

78K23444

Intro: DIY Arduino Controled Multiwii Flight Controller

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!

33 Comments

And tell me which pins are placed in each one

Is this flight controller programmed from the MultiWii or from the Arduino IDE?

เฉพาะแผ่นวงจรdiyมีขายไหมครับ
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.
Hello.
The thing is old, from what I remember ... it's about ... not being armed, as protection against the handling of the model aircraft ... it is seen in GUY Multiwii that other commands work, only acceleration does not, to go you have to go to ARM to be green square. As in the attached image. And reinforcement must be set. I know that two sticks must be brought at the same time, in a certain position. But which ... I don't remember. Now I'm working on an autopilot for a fishing boat ... with the STM32 and the FS-i6 remote control.
Success.

Thank you so mach i was armed it and the problem was solved☺️☺️
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.
Did you solved the problem ? Same thing is happening with me
Hey! nice project can i implement it using Arduino UNO?
I don't see why not as long as the MultiWii is compatable with the UNO.
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.
HERE ARE THE FILES YOU NEEDED. COPY THEM ALL IN A FOLDER AND YOU ARE GOOD TO GO.

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.

Have any I2C error on GUI when you connect BMP180 sensor on your Flight Controller ?
No errors.
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
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.
can I add ultra sound distance finder, or do you know such open source firmware that has much sensor attachment capability??
More Comments