Difference between revisions of "MWC User Manual"

From Wiki
Jump to: navigation, search
(Created page with "本文中只是列举了接收机与电调连接在飞控板的方法,其他元器件的安装需要你参考另外的资料 If conditions permit, try to assemble the flight...")
 
Line 1: Line 1:
本文中只是列举了接收机与电调连接在飞控板的方法,其他元器件的安装需要你参考另外的资料
+
'''Overview'''
 +
 
 +
This article only describes the methods for connecting the receiver and ESC to the flight control board. You may need to refer to other materials for installation of other devices.
 +
 
If conditions permit, try to assemble the flight control board in a vibration-damping way. For example, use vibration-damping rubber or just fix the board on the frame with double-sided foam tape. If you really don't want to use screws to fix, make sure the angle is accurate when sticking the board. Otherwise the flight effects would be severely undermined.
 
If conditions permit, try to assemble the flight control board in a vibration-damping way. For example, use vibration-damping rubber or just fix the board on the frame with double-sided foam tape. If you really don't want to use screws to fix, make sure the angle is accurate when sticking the board. Otherwise the flight effects would be severely undermined.
Connect the flight control board and receiver:
+
 
根据各通道的功能,将接收机的CH1和飞控板D4连接起来,将接收机的CH2和飞控板D5连接起来,将接收机的CH3和飞控板D2连接起来,将接收机的CH4和飞控板D6连接起来,将接收机的CH5和飞控板D7连接起来,将接收机的CH6和飞控板D8连接起来,然后接收机用3M胶粘到机架下底板,可以用尼龙扎带把连接线束一束。线需要注意不能接错
+
'''Connect the Flight Control Board and Receiver'''
 +
 
 +
Connect the receiver and flight control board based on functions: CH1 of the receiver to D4 of the board, CH2 to D5, CH3 to D2, CH4 to D6, CH5 to D7, and CH6 to D8. Then stick the receiver to the bottom plate of the frame with 3M tape, and wrap the wires with nylon cable ties. Pay attention to wire them correctly.
 +
 
 
Receiver                  Flight Control Board
 
Receiver                  Flight Control Board
 
CH1       -     D4
 
CH1       -     D4
Line 12: Line 18:
 
“+”              -          “+”
 
“+”              -          “+”
 
“-”              -          “-”
 
“-”              -          “-”
+
 
Connect the flight control board and electronic speed controller (ESC):
+
Connect the flight control board and electronic speed controller (ESC)
 
Before the connecting, you should better first connect each ESC in turns to the throttle channel of the receiver for calibration. You are not advised to plug all the ESCs directly into the flight control board (though it seems nothing wrong). Connecting multiple ESCs to the power supply in parallel may cause malfunctions; if the power goes wrong, it can be dangerous! A way out is to directly insert the three-pin plug of one ESC into the flight control board (then that ESC is responsible for supplying the flight control board and receiver), and connect only the signal pin (S, usually leading a white wire) of the rest ESCs to the flight control board. Thus, the parallel connection of ESCs can be avoided.  
 
Before the connecting, you should better first connect each ESC in turns to the throttle channel of the receiver for calibration. You are not advised to plug all the ESCs directly into the flight control board (though it seems nothing wrong). Connecting multiple ESCs to the power supply in parallel may cause malfunctions; if the power goes wrong, it can be dangerous! A way out is to directly insert the three-pin plug of one ESC into the flight control board (then that ESC is responsible for supplying the flight control board and receiver), and connect only the signal pin (S, usually leading a white wire) of the rest ESCs to the flight control board. Thus, the parallel connection of ESCs can be avoided.  
 
It is extremely important to get the ESC connection sequence and motor rotation direction right. After connection is completed, hold the step of assembling the propellers for safety reason. The number on the motor indicates the corresponding output pin number on the flight control board. For example, "11" means the motor is connected to pin D11 on the board. So please connect all the motors, ESCs and servos according to the wiring diagram under a specific mode. After the connection is done, connect the flight control board with the FTDI device and PC again, and start the board. Then follow the settings below.  
 
It is extremely important to get the ESC connection sequence and motor rotation direction right. After connection is completed, hold the step of assembling the propellers for safety reason. The number on the motor indicates the corresponding output pin number on the flight control board. For example, "11" means the motor is connected to pin D11 on the board. So please connect all the motors, ESCs and servos according to the wiring diagram under a specific mode. After the connection is done, connect the flight control board with the FTDI device and PC again, and start the board. Then follow the settings below.  
The 4-axis X-mode/QuadcopterX MWC Lite/SE board is represented by "QUADX" in the file config.h. 以飞控板上的箭头方向作为飞机的前方,将左上角的电机连接在飞控板的D3,右上角的电机连接在D10,左下角的电机连接在D11,右下角的电机连接在D9.
+
The 4-axis X-mode/QuadcopterX MWC Lite/SE board is represented by "QUADX" in the file config.h. Take the arrow on the board as the aircraft front. Then connect the motor at the upper left to D3 of the board, that at the upper right to D10, the one at lower left to D11, and motor at lower right to D9.  
               
+
             
 
Connect the flight control board to PC
 
Connect the flight control board to PC
 
After the connection is done, connect the flight control board with the FTDI device and PC again, and start the board. Then follow the settings below.  
 
After the connection is done, connect the flight control board with the FTDI device and PC again, and start the board. Then follow the settings below.  
修改代码
+
Modify the code
下载MultiWii_2_2.zip,根据下面的步骤来修改代码
+
Download the MultiWii_2_2.zip and modify the code as follows.  
Step 1: Open the MultiWii.ino
+
Step 1: Open MultiWii.ino
Unzip the MultiWii_2_2.zip,Found the MultiWii.ino file, Here the version of MWC is 2.2. Click to open the MultiWii.ino file.
+
Unzip the MultiWii_2_2.zip, find the MultiWii.ino file. Here the version of MWC is 2.2. Click to open the MultiWii.ino.
+
 
Step 2: click to config.h file
+
Step 2: Click config.h  
 
Then you can see several source code tabs displayed in a new window. Generally, you only need to modify some statements in config.h. Switch to the config.h tab, as shown below:
 
Then you can see several source code tabs displayed in a new window. Generally, you only need to modify some statements in config.h. Switch to the config.h tab, as shown below:
+
 
  
 
How to modify statements:
 
How to modify statements:
 
If the mark "/*" or "//" exists on the left side of a line, it is displayed in gray, which means this statement is a comment and is invalid. If you want it to take effect, just delete "//". Then it will be in black, which means it is valid.
 
If the mark "/*" or "//" exists on the left side of a line, it is displayed in gray, which means this statement is a comment and is invalid. If you want it to take effect, just delete "//". Then it will be in black, which means it is valid.
You need to know the flight mode is assigned by program; but considering MWC hardware environment and different ESC matches, you need to modify other key statements. If you configure it wrong, it will cause the program upload failure or the flight control board failing to work properly. We will not explain all the statements here, but only those necessary to modify. Please note: do not modify too many statements that you are not sure; otherwise, it will cause problems and you may not find the reason.
+
You need to know the flight mode is assigned by program; but considering MWC hardware environment and different ESC matches, you need to modify other key statements. If you configure it wrong, it will cause the program upload failure or the flight control board failing to work properly. We will not explain all the statements here, but only those necessary to modify. Please note: DO NOT modify too many statements that you are not sure; otherwise, it will cause problems and you may not find the reason.
Step3: configuring the 4-axis mode
+
Step 3: Configure 4-axis mode
 
Here take configuring the 4-axis mode for example. Locate at ”SECTION 1 – BASIC SETUP” part first, delete the comment mark before the "#define QUADX" statement. Note that the SE standard version and Lite light weight version of MWC do not support the three modes (OCTO) of 8-axis, so these three lines are invalid.
 
Here take configuring the 4-axis mode for example. Locate at ”SECTION 1 – BASIC SETUP” part first, delete the comment mark before the "#define QUADX" statement. Note that the SE standard version and Lite light weight version of MWC do not support the three modes (OCTO) of 8-axis, so these three lines are invalid.
+
 
Step 4: set the idle speed of ESC
+
Step 4: Set the idle speed of ESC
 
Then go to the ”Motor minthrottle” area of the motor. Here you can set the idle speed of ESC. The standard ESC controls the motor by signals in the range of 1000~2000us.
 
Then go to the ”Motor minthrottle” area of the motor. Here you can set the idle speed of ESC. The standard ESC controls the motor by signals in the range of 1000~2000us.
 
  If you want the motor to start rotating slowly after unlocking the flight control, set a suitable idle speed signal value (The default value is 1100. Most ESCs start to output currents at this speed).
 
  If you want the motor to start rotating slowly after unlocking the flight control, set a suitable idle speed signal value (The default value is 1100. Most ESCs start to output currents at this speed).
 
  However, bet most of you do not like this, so you can set an approximate signal value that approaches the default value. For example, a value between 1050 and 1080. If you notice it does not conform to the requirement after uploading the program, you can modify it and upload again.
 
  However, bet most of you do not like this, so you can set an approximate signal value that approaches the default value. For example, a value between 1050 and 1080. If you notice it does not conform to the requirement after uploading the program, you can modify it and upload again.
+
 
Step 5: select frequency for I2C signals
+
Step 5: Select the frequency for I2C signals
 
As for how to select a frequency for I2C signals, go to the ”I2C speed” area. Most MWC versions support the 400Khz high speed mode well. Enable the line about "400000L", and uncomment the first line.
 
As for how to select a frequency for I2C signals, go to the ”I2C speed” area. Most MWC versions support the 400Khz high speed mode well. Enable the line about "400000L", and uncomment the first line.
+
 
Step 6: Directly enable #define HK_MultiWii_SE_V2
+
Step 6: Enable #define HK_MultiWii_SE_V2
Then the critical sensor type options setting:
+
Then the critical sensor type options setting: enable "#define HK_MultiWii_SE_V2"
Directly enable #define HK_MultiWii_SE_V2
+
 
+
 
Step 7: Enable A0 and A1 port as output
 
Step 7: Enable A0 and A1 port as output
 
Enable A0 and A1 port as output; the two ports are originally used to connect servos that make the mount stable. If you do not have any PPM SUM type receiver and still want SE and Lite flight control to support 6-axis, enable pin A0 and A1. Then the stabilization function for the mount will become invalid. On the other hand, if you want to use the 6-axis mode and enable stabilization function at the same time, you should use a PPM SUM receiver/JR satellite/S.Bus. receiver, or use a full-function PRO flight control.
 
Enable A0 and A1 port as output; the two ports are originally used to connect servos that make the mount stable. If you do not have any PPM SUM type receiver and still want SE and Lite flight control to support 6-axis, enable pin A0 and A1. Then the stabilization function for the mount will become invalid. On the other hand, if you want to use the 6-axis mode and enable stabilization function at the same time, you should use a PPM SUM receiver/JR satellite/S.Bus. receiver, or use a full-function PRO flight control.
+
 
 
Step 8: Enable D8 or D12 port
 
Step 8: Enable D8 or D12 port
Enable D8 or D12 port. The SE and Lite flight control have a MODE(AUX) port. You can control the state of sensors by three-way switch signals. If you still need the AUX2 port to control the state of sensors in a more detailed way, like using it as the mount stabilization switch or an unlocking switch, you can enable D8 or D12 port as signal input port of AUX2. Please note that you can enable only one of them.
+
Enable D8 or D12 port. The SE and Lite flight control have a MODE(AUX) port. You can control the state of sensors by three-way switch signals. If you still need the AUX2 port to control the state of sensors in a more detailed way, like using it as the mount stabilization switch or an unlocking switch, you can enable D8 or D12 port as signal input port of AUX2. Please note that you can enable ONLY ONE of them.
+
 
 
Step 9: Set MPU6050 low-pass filter (LPF)
 
Step 9: Set MPU6050 low-pass filter (LPF)
 
Set MPU6050 low-pass filter (LPF). If you cannot eliminate all the vibrations from the gyro, you can try to decrease the frequency of the LPF. Reduce one gear each time. Once the vibrations disappear, keep the current setting.
 
Set MPU6050 low-pass filter (LPF). If you cannot eliminate all the vibrations from the gyro, you can try to decrease the frequency of the LPF. Reduce one gear each time. Once the vibrations disappear, keep the current setting.
+
 
 
Step 10: Set the dead band width
 
Step 10: Set the dead band width
 
Generally there can be a width deviation of 1 to 3us for signals from the receiver (we've tested that by our signal tester). To set an appropriate width of dead band would help you avoid such slight deviations, so the flight control board will not control movements by the error signals. But remember not to set a too large width. Otherwise, small movements near the joystick may be ignored by the flight control board, which on the contrary will reduce the flight control sensitivity. The default value of the width is 6.  
 
Generally there can be a width deviation of 1 to 3us for signals from the receiver (we've tested that by our signal tester). To set an appropriate width of dead band would help you avoid such slight deviations, so the flight control board will not control movements by the error signals. But remember not to set a too large width. Otherwise, small movements near the joystick may be ignored by the flight control board, which on the contrary will reduce the flight control sensitivity. The default value of the width is 6.  
+
 
Step 11: enable "MOTOR_STOP"
+
Step 11: Enable "MOTOR_STOP"
 
If you want the motor to stop upon unlocking, enable "MOTOR_STOP".  
 
If you want the motor to stop upon unlocking, enable "MOTOR_STOP".  
+
 
 
Upload the code to the flight control board
 
Upload the code to the flight control board
 
Till now the configuration of the flight control program is done. Open Arduino IDE. Select Tools -> Board -> Arduino Pro or Pro Mini (5V, 16MHz) w/ ATmega328.  
 
Till now the configuration of the flight control program is done. Open Arduino IDE. Select Tools -> Board -> Arduino Pro or Pro Mini (5V, 16MHz) w/ ATmega328.  
+
 
 
Then click Tools -> Serial Port and select the corresponding COM port. After the setting is completed, first save the modified sketch for later calling. Then upload the sketch. After upload is successful, a message "Done uploading" will appear.  
 
Then click Tools -> Serial Port and select the corresponding COM port. After the setting is completed, first save the modified sketch for later calling. Then upload the sketch. After upload is successful, a message "Done uploading" will appear.  
+
 
 
Try to Fly
 
Try to Fly
 
Before the flight, you need to use the GUI program to observe and make essential adjustments including the following items:
 
Before the flight, you need to use the GUI program to observe and make essential adjustments including the following items:
Line 73: Line 78:
 
Check whether the output signals from the sensor are correct (if something is wrong with the signals, it means the flight control board may be faulty);  
 
Check whether the output signals from the sensor are correct (if something is wrong with the signals, it means the flight control board may be faulty);  
 
Test whether movements controlled by the flight control board stay normal after motors are started.  
 
Test whether movements controlled by the flight control board stay normal after motors are started.  
具体的配置可以参考MultiWii GUI Parameter Configuration
+
For detailed configuration, refer to MultiWii GUI Parameter Configuration
(http://www.sunfounder.com/wiki/index.php?title=MultiWii_GUI_Parameter_Configuration)
+
http://www.sunfounder.com/wiki/index.php?title=MultiWii_GUI_Parameter_Configuration

Revision as of 09:35, 14 June 2016

Overview

This article only describes the methods for connecting the receiver and ESC to the flight control board. You may need to refer to other materials for installation of other devices.

If conditions permit, try to assemble the flight control board in a vibration-damping way. For example, use vibration-damping rubber or just fix the board on the frame with double-sided foam tape. If you really don't want to use screws to fix, make sure the angle is accurate when sticking the board. Otherwise the flight effects would be severely undermined.

Connect the Flight Control Board and Receiver

Connect the receiver and flight control board based on functions: CH1 of the receiver to D4 of the board, CH2 to D5, CH3 to D2, CH4 to D6, CH5 to D7, and CH6 to D8. Then stick the receiver to the bottom plate of the frame with 3M tape, and wrap the wires with nylon cable ties. Pay attention to wire them correctly.

Receiver Flight Control Board CH1 - D4 CH2 - D5 CH3 - D2 CH4 - D6 CH5 - D7 CH6 - D8 “+” - “+” “-” - “-”

Connect the flight control board and electronic speed controller (ESC) Before the connecting, you should better first connect each ESC in turns to the throttle channel of the receiver for calibration. You are not advised to plug all the ESCs directly into the flight control board (though it seems nothing wrong). Connecting multiple ESCs to the power supply in parallel may cause malfunctions; if the power goes wrong, it can be dangerous! A way out is to directly insert the three-pin plug of one ESC into the flight control board (then that ESC is responsible for supplying the flight control board and receiver), and connect only the signal pin (S, usually leading a white wire) of the rest ESCs to the flight control board. Thus, the parallel connection of ESCs can be avoided. It is extremely important to get the ESC connection sequence and motor rotation direction right. After connection is completed, hold the step of assembling the propellers for safety reason. The number on the motor indicates the corresponding output pin number on the flight control board. For example, "11" means the motor is connected to pin D11 on the board. So please connect all the motors, ESCs and servos according to the wiring diagram under a specific mode. After the connection is done, connect the flight control board with the FTDI device and PC again, and start the board. Then follow the settings below. The 4-axis X-mode/QuadcopterX MWC Lite/SE board is represented by "QUADX" in the file config.h. Take the arrow on the board as the aircraft front. Then connect the motor at the upper left to D3 of the board, that at the upper right to D10, the one at lower left to D11, and motor at lower right to D9.

Connect the flight control board to PC After the connection is done, connect the flight control board with the FTDI device and PC again, and start the board. Then follow the settings below. Modify the code Download the MultiWii_2_2.zip and modify the code as follows. Step 1: Open MultiWii.ino Unzip the MultiWii_2_2.zip, find the MultiWii.ino file. Here the version of MWC is 2.2. Click to open the MultiWii.ino.

Step 2: Click config.h Then you can see several source code tabs displayed in a new window. Generally, you only need to modify some statements in config.h. Switch to the config.h tab, as shown below:


How to modify statements: If the mark "/*" or "//" exists on the left side of a line, it is displayed in gray, which means this statement is a comment and is invalid. If you want it to take effect, just delete "//". Then it will be in black, which means it is valid. You need to know the flight mode is assigned by program; but considering MWC hardware environment and different ESC matches, you need to modify other key statements. If you configure it wrong, it will cause the program upload failure or the flight control board failing to work properly. We will not explain all the statements here, but only those necessary to modify. Please note: DO NOT modify too many statements that you are not sure; otherwise, it will cause problems and you may not find the reason. Step 3: Configure 4-axis mode Here take configuring the 4-axis mode for example. Locate at ”SECTION 1 – BASIC SETUP” part first, delete the comment mark before the "#define QUADX" statement. Note that the SE standard version and Lite light weight version of MWC do not support the three modes (OCTO) of 8-axis, so these three lines are invalid.

Step 4: Set the idle speed of ESC Then go to the ”Motor minthrottle” area of the motor. Here you can set the idle speed of ESC. The standard ESC controls the motor by signals in the range of 1000~2000us.

If you want the motor to start rotating slowly after unlocking the flight control, set a suitable idle speed signal value (The default value is 1100. Most ESCs start to output currents at this speed).
However, bet most of you do not like this, so you can set an approximate signal value that approaches the default value. For example, a value between 1050 and 1080. If you notice it does not conform to the requirement after uploading the program, you can modify it and upload again.

Step 5: Select the frequency for I2C signals As for how to select a frequency for I2C signals, go to the ”I2C speed” area. Most MWC versions support the 400Khz high speed mode well. Enable the line about "400000L", and uncomment the first line.

Step 6: Enable #define HK_MultiWii_SE_V2 Then the critical sensor type options setting: enable "#define HK_MultiWii_SE_V2"

Step 7: Enable A0 and A1 port as output Enable A0 and A1 port as output; the two ports are originally used to connect servos that make the mount stable. If you do not have any PPM SUM type receiver and still want SE and Lite flight control to support 6-axis, enable pin A0 and A1. Then the stabilization function for the mount will become invalid. On the other hand, if you want to use the 6-axis mode and enable stabilization function at the same time, you should use a PPM SUM receiver/JR satellite/S.Bus. receiver, or use a full-function PRO flight control.

Step 8: Enable D8 or D12 port Enable D8 or D12 port. The SE and Lite flight control have a MODE(AUX) port. You can control the state of sensors by three-way switch signals. If you still need the AUX2 port to control the state of sensors in a more detailed way, like using it as the mount stabilization switch or an unlocking switch, you can enable D8 or D12 port as signal input port of AUX2. Please note that you can enable ONLY ONE of them.

Step 9: Set MPU6050 low-pass filter (LPF) Set MPU6050 low-pass filter (LPF). If you cannot eliminate all the vibrations from the gyro, you can try to decrease the frequency of the LPF. Reduce one gear each time. Once the vibrations disappear, keep the current setting.

Step 10: Set the dead band width Generally there can be a width deviation of 1 to 3us for signals from the receiver (we've tested that by our signal tester). To set an appropriate width of dead band would help you avoid such slight deviations, so the flight control board will not control movements by the error signals. But remember not to set a too large width. Otherwise, small movements near the joystick may be ignored by the flight control board, which on the contrary will reduce the flight control sensitivity. The default value of the width is 6.

Step 11: Enable "MOTOR_STOP" If you want the motor to stop upon unlocking, enable "MOTOR_STOP".

Upload the code to the flight control board Till now the configuration of the flight control program is done. Open Arduino IDE. Select Tools -> Board -> Arduino Pro or Pro Mini (5V, 16MHz) w/ ATmega328.

Then click Tools -> Serial Port and select the corresponding COM port. After the setting is completed, first save the modified sketch for later calling. Then upload the sketch. After upload is successful, a message "Done uploading" will appear.

Try to Fly Before the flight, you need to use the GUI program to observe and make essential adjustments including the following items: Set the forward and reverse directions of each channel and calibrate the midpoint and endpoints of the channel; Set the sensor switch (AUX1/AUX2); Check whether the output signals from the sensor are correct (if something is wrong with the signals, it means the flight control board may be faulty); Test whether movements controlled by the flight control board stay normal after motors are started. For detailed configuration, refer to MultiWii GUI Parameter Configuration http://www.sunfounder.com/wiki/index.php?title=MultiWii_GUI_Parameter_Configuration