Introduction: Debugging Guide of MWC Flight Controller MPU6050 HMC5883L
The engineers of ICStation R&D department introduce the steps about debugging guide of WMC flight controller in details. If you have never use the MWC flight controller,you can follow those seven steps to install the software and hardware, and then begin to debug.Hope this can help you a lot. If you have any question, welcome to leave the comment on this post.
1.Install PC side environment:arduino IDE, USB adapter driver, JAVA virtual machine.
2.Programming Bootloader: Programming Bootloader to the MCU of flight control and then make the flight controller write program
3.Connect hardware: connect the download cable and flight controller
4.Edit program: edit the program of MWC flight control and download to the flight controller board.
5.Flight control configuration:Before flying, use the MWC GUI upper computer configuration
6.Assemble the aircraft: install the flight control to the rack and then connect the related wires.
7.Outfield flight: During outfield flight, please use computer, bluetooth module and smart car to adjust the PID and other parameters.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Install PC Side Environment
Arduino IDE download link:http://arduino.cc/en/Main/Software
USB adapter driver:It depends on the type of the USB serial port.It is recommended to use the USB adapter developed by our company:http://www.icstation.com/product_info.php?products_id=3451 which is cost-effective and more stable to transmit data.
After installing the driver, you can look into the port number of the device from computer-manger-device manger
Download JAVA virtual machine:http://www.java.com/en/
Step 2: Programming Bootloader
When testing, we have already programmed Bootloader, so you can use it directly. If your Bootloader has been damaged, feel free to contact us and we can help you to solve it or you can programme Bootloader by yourself as follows:
1.Prepare a USB ISP: install the USB ISP driver and connect USB ISP and flight controller.
2.Open Arduino IDE: and click tool, board card should choose ICStation nano compatible with Arduino, processor should choose ATMEGA328, program should choose USB ASP. After finishing setting, click programming to introduce procedure and wait for the Bootloader programming completing.
Step 3: Connect Hardware
Step 4: Edit Program
The flight controller is not programmed, so user should configurate the program to the flight controller. Next , we will take 4 axises X mode as an example to introduce how to configurate program of flight controller.
Use Arduino IDE to open MWC source code( the code download link(compressed package with GUI):http://code.google.com/p/multiwii/downloads/list )
Here we use the program version is 2.2 and choose to open MultWii.ion. After opening, you will see a few source code text, we need to modify onfig.h mainly
Program modification method: in the front of statement should add “//”,it represents the annotation of program and sentence will become gray. It means that the sentence is invalid. If you want to make it valid, you need to remove the “//”
Note: Do not change the sentence you are not sure. Otherwise ,during the debugging, it will appear the problem, but you are not clear about the reason.
If you have set that let the motor begin to rotate after unlocking, the value will be the speed of motor rotating. Normally, the power should be set about 1100 and the motor can rotate slowly
we can upload the program to the flight controller and have a trial flight. Click tools, choose arduino nono in Boald, and the processor choose ATMEGA328, choose the corresponding port. And click to download the program to the flight controller.
Step 5: Flight Controller Configuration
Before flight, it needs to use GUI to observe and set the flight parameter.When the flight controller is powered by, please keep it balance as much as possible. The green LED will go out after a quick flash. It means that the initialization has been finished. And then open the file:MultiWii_2_2\MultiWiiConf\application.windows32\MultiWiiConf.exe
Calibration accelerometer and electronic compass:
After the programming of the flight control, you need to calibrate the calibration accelerometer and electronic compass. Otherwise the parameter which GUI displays will not right. Click Cable_ACC to calibrate accelerometer. The green LED will light, which means that is under calibrating and when the LED goes out, it means the calibration finished.
Click Cable_MAG to calibrate compass. After clicking , the LED will flash for 30 seconds and hold the flight controller to rotate along the X for a circle and then along Z to rotate for a circle. And then put the the flight controller flat, wait for the LED going out to finish the calibration of compass.
Set the channel direction, the neutral point and the channel traveling:
Connect the receiver and flight control board:
The channel 1 of receiver for rolling and connect D4 port of flight controller
The channel 2 of receiver for pitching and connect D5 port of flight controller
The channel 3 of receiver for throttle and connect D2 port of flight controller
The channel 4 of receiver for direction and connect D6 port of flight controller
At the same time provide the power supply for receiver.
From top to bottom is throttle,pitch,roll, direction, auxiliary 1-4.
Push up the throttle and PITCH rocker ,while the value of slider about THROT and PITCH will increase. And push down the throttle and PITCH rocker, while the value of slider THROT and PITCH will decrease. If it's not right, you should set corresponding channel reversely.
Drive direction to the left and rocker laterally ,While the value of slider about YAW and ROLL decrease. And drive the direction to the right and rocker laterally, While the value of slider about YAW and ROLL increase. if it's not right, you should set corresponding channel reversely.
There is no need to calibrate the neutral point of throttle channel. Ant the value of slider about the rocker of other channel should be close to 1500 as much as possible. If the error is too big, it may cause the instability of flight.
The rocker in the maximum and minimum of Pitch, roll, direction those three channels, the maximum of slider should be over 1900 and minimum should lower then 1100. If the value of channel have not been set well, it may cause the unlock or lock of the throttle, and the calibration sensor and the function of programming switch will have problem.
AUX1-4 are respectively corresponding to the four auxiliary channels on the remote control. Maybe there are not that too much or even no auxiliary channels on the remote control.If there is no auxiliary channel, you can set the functions that are needed well first before flying again.Because there are no switch modes in the process of flight
ARM： Unlock the throttle
ANGLE： Represent self steady mode( need the support of accelerograph). The rocker keep level in the center
HORIZON： The posture keep the self steady mode (need the support of accelerograph).
BARO: Set high pressure( need the support of barometer)
MAG：Electronic compass determine the direction (need the support of sensor)
HEADFREE：Headless mode.When start this mode, flight controller will keep the direction to head which is set before unlocking, regardless of how to change the direction. It is recommended that the beginner start this mode
HEADADJ: Redefine the direction of headless mode
Step 6: Assemble the Aircraft
Install the flight controller to the center of the rack, you should pay attention toe the direction of the flight controller and rack. Then install the motor and connect the motor to electronic speed controller. This step you can refer to this MWC website:http://www.multiwii.com/connecting-elements
The number on the engine arm represents the DX port on the flight controller board. You should pay attention the to the rotating direction of motor. If the direction is different form the picture shows, change the any two among three wires of electronic motor and electronic speed controller.
Step 7: Outfield Flight
When during outfield flight, please use computer, bluetooth module and smart phone and adjust PID and other parameters.
MWC Official website:http://www.multiwii.com/
MWC Source Code:http://code.google.com/p/multiwii/downloads/list
The MWC main thread of RCGroups forum
If you meet any problem, please feel free to contact us.We will provide you more details also some useful code