MWC User Manual

From Wiki
Revision as of 09:29, 17 March 2017 by Root (Talk | contribs) (Resource)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.
Fsdaf.pngLigih1.jpg

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.

Flight2.png

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.

Multiwii.jpg

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:

Configfile.jpg

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.

Quax.jpg

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.

Throtte.jpg

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.

Throtte2.jpg

Step 6: Enable #define HK_MultiWii_SE_V2

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

HK123.jpg

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.

A0A1.jpg

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.

MWC12.jpg

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.

MWC13.jpg

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.

MWC14.jpg

Step 11: Enable "MOTOR_STOP"

If you want the motor to stop upon unlocking, enable "MOTOR_STOP".

MWC15.jpg

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.

MWC16.jpg

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.

MWC17.jpg

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

Resource

MultiWii_2_2.zipZIP.jpg