📜 ⬆️ ⬇️

About the MultiWii flight controller (copters, airplanes and helicopters)

ATTENTION, the article is outdated, but it can still be used for informational purposes.
I wanted to suddenly tell more about the open and free project to control various aircraft (LA). Generally, until recently it was designed only for multirotone systems (copters), stabilization of the camera suspension and in the beta version was stabilization for the flying wing, but judging by the dev firmware, airplanes and helicopters will soon be added, and stabilization of the flight of the flying wing is already out from beta testing.

A little background


At the very beginning of the development of the project there was a big problem with sensors - they simply did not exist or were, but at incredibly high prices, therefore the Wii Motion Plus (WMP) from the Nintendo Wii console became the first sensor for this flight controller, and from here went prefix Wii in the title. But as time went on, sensors became cheaper and now very few people use controllers from the console to create their MultiWii controller.

Components


The main brain of the controller is the AVR processor, or rather, a simple Arduino shawl, to which various sensors cling to the I2C port. At the moment, to fly, you need any Arduino compatible board and a gyroscope , for example, ITG3205 is sawed (this is not slang, but I literally sawed out) from a Chinese clone of the WMP controller, but in this configuration it will be quite difficult to manage the copter parallel to the ground (and therefore eliminate the drift) will have to hands. And here comes the accelerometer , which always knows where the "bottom" comes to, i.e. land, and help keep the aircraft parallel to the ground. Thus, for a quiet and stable flight, Arduino and two three-axis sensors are needed: a gyroscope and an accelerometer.
')


Additionally, you can add sensors such as a magnetometer, a barometer and a GPS receiver.
The magnetometer (also known as compass) knows how the aircraft is rotated relative to the direction of the earth’s magnetic field and can help with heading, GPS navigation or carefree mode for beginners, when, regardless of the direction of the real nose of the device, the copter will fly from the pilot to the command “forward” "And to the pilot on the" back "command. The magnetometer is very negatively affected by magnetic fields from power sources, wires, motors and everything that electromagnetic waves can produce, so when designing an LA frame, this sensor should be located as far as possible from everything metallic and magnetized.
A barometer (also known as an atmospheric pressure sensor) may be useful for maintaining altitude, but it is worth considering that altitude retention directly depends on the sensor accuracy, for example, BMP085 (installed in many flight controllers) will give an accuracy of no more than + -1 meter, i.e. under the best of conditions, your aircraft will float at a height of 1 meter or more. More modern sensor MS5611 can give accuracy up to 10 cm. Any changes in pressure around the wind, wind or air flow from the propellers can influence the barometer, so it is recommended to put this sensor “under the hood” or stick a piece of foam rubber to it (as on microphones), but it is very important not to close the opening in the sensor (for example, filling there glue).
GPS receiver , useful and at the same time useless thing. On the one hand, it helps to include such good things as holding a position and returning to the starting point (returning home), and on the other, this very point is very approximate and depends on the accuracy of the receiver, the number of visible satellites or weather conditions, so hanging around the window of the women's locker room can turn out in a circle with a diameter of about 3-10 meters (and when adding a good barometer in a flattened ball).
At the time of this writing, there are attempts to add a sonar (ultrasonic range finder) and an optical displacement sensor (which are installed in mice). Sonar will allow you to achieve very accurate height retention (about 1 cm) at a low height (up to about 3 meters), but very much depends on the surface, for example, tall grass or mounds will give interference and abrupt height changes, i.e. the jumper will bounce or drop sharply. But an optical sensor can help a GPS receiver to more accurately hold a position.
The project boasts a large number of supported sensors for various purposes and with each release their number increases, and given the openness of the project, you can attach your own sensors.
Here is a list of them, officially supported in the MultiWii 2.0 firmware (and in the last in the develop firmware):
GyroscopesAccelerometersBarometersMagnetometers
Wmp
ITG3200
L3G4200D
(MPU6050)
MMA745
ADXL345
BMA020
BMA180
NUNCHACK
LIS3LV02
LSM303DLx_ACC
BMP085
MS561101BA
HMC5843
HMC5883
AK8975
MAG3110


Ready controller cards


As I wrote above, you can make your controller from the set of available sensors and Arduino, but it is easier (and often more profitable) to buy a ready-made shawl, which already has an AVR chip and a set of necessary sensors.
The most popular motherboard is the Crius MultiWii, available in two versions of Lite and Standart Edition, and a new version has just appeared, which differs only in the presence of a convenient I2C input and a smaller size.
Crius MultiWii Lite Edition has only 2 sensors on board: a gyroscope and an accelerometer. Standart Edition, besides Lite sensors, boasts a BMP085 barometer and a compass. The new version of the board has an I2C connector for connecting a GPS module, which is a UART GPS receiver and an AVR chip (Arduino), which acts as an intermediary between the GPS and MultiWii controller (and in the foreseeable future, will completely take over the GPS functionality to unload the main brain) .
In some online stores you can find other similar controllers, so if you come across something with 2 or 4 sensors and a 328p chip (or 1280/2560), then with a 99% probability this is a MultiWii controller.

Crius pin description and connection details

I hope you have already read my articles about copters and you know that the speed controllers and the remote control receiver are connected to the controller, and you can also attach the camera suspension stabilization control servos.

The picture highlighted connectors for connecting the above devices. As you can see, each connector combines 3 pins: S - signal, + - power (+ 5v) and G - ground. Also, the connectors have inscriptions of the form A digit and D digit - they are connected to the speed controllers, servos and sometimes additional channels of the radio control receiver (correspond to the outputs on the Arduino). Inputs marked as THR, ROLL, PITCH, YAW, MODE are designed to connect the corresponding outputs of the receiver.
From each speed controller (ESC) there are 3 wires, one of which is + 5v (red or orange in the middle), but you only need to power the Crius board from one of the ESCs, and you can (and even need) power the remaining consumers: receiver and servo suspension. To do this, you need to pull out the central wire of all (except one, which will power the board) speed controllers from the connector and connect them to consumers or isolate them.
To connect to other consumers, you can break off 2 contacts from the comb and solder them together:


And then connect the power wire from the speed controller with the power cord of the consumer and tighten them in shrink:


Similarly, you can do with unnecessary wires, folding the red wire in half and insulating it with heat shrink:


Included with the controller is a set of wires - they must be used to connect the receiver, it is enough to connect only the signal wires, one common contact (ground) and connect the power wire from one of the speed controllers.

The nuances of setting MultiWii


First of all, it is worth updating the firmware of the received controller, for this it is enough to download the firmware from the official MultiWii repository (please do not download the DEV version if you do not know what it is and why), upload it to the Arduino IDE , adjust the parameters of your aircraft and select a set of sensors in the config.h file, then load the resulting sketch into the controller by selecting one of the boards with the 328p chip in the settings (but not the arduino UNO).
With the version of MultiWii 2.0, Crius controllers appeared in the list of sensor sets:
//#define CRIUS_LITE // Crius MultiWii Lite
//#define CRIUS_SE // Crius MultiWii SE
Uncomment one of them that matches your controller type.
There are several very frequent problems for newbies (relevant for version 2.0):


Graphic Configurator


The graphical configurator is written in processing and is a cross-platform Java application, currently compiled for Linux, Windows and MacOS operating systems 32 and 64 bit architectures.


The appearance is a bit scary, but often you don’t have to climb here. Run the configurator after inserting the flight controller into the computer. In the upper left corner, select the controller port and press the START button - the curves on the graph and the numbers next to it should run (ideally, everything should be smooth).


To the right of the graph there is a volume model of your copter, as well as indicators of the compass and tilt of the device. If the device is parallel to the horizon, and in the picture PITCH and ROLL are tilted - press the CALIB_ACC button so that the controller remembers this position and always strives for it.


Above the graph, the PID controller settings, modes activation and some status data are located. To see the values, you need to press the READ button, to change them, click on the window with the number and move it with the mouse, and to save, click WRITE. Never change a few PID values ​​of a regulator for 1 time - otherwise you will not understand what has become better or worse. What and how to twist can be read here .

A more detailed description can be found on the official website of the MultiWii project or on my website airm.ru , where I try to keep the same information in Russian, as well as many additions and news about the project.

What, where, how much?


All described controllers can be easily found on ebay , aliexpress , goodluckbuy or rctimer
The price can vary from 25 to 100 dollars, depending on the store and arrogance.

Flying with GPS


More than a year ago, I promised to fly by GPS, along a route, and other navigation bonuses. So far, on the MultiWii controller it has been possible to test holding a position.

In general, not bad, the copter swam in a circle with a radius of about 7 meters (did not set anything up in advance), but then suddenly pulled somewhere far away from me and the tests were postponed.
But he began to gradually master the photo and video shooting from the air.

It turns out so-so, but still 2/3 of the summer ahead and a lot of plans, including a separate console for the operator.


Ask questions, if any, try to answer and supplement this article.

Source: https://habr.com/ru/post/146403/


All Articles