The choice of platform for experiments with UAVs

Now there is plenty to choose a platform for experiments with UAVs. There are a lot of autopilots on the market, so first of all a small overview of the available devices will follow, and then we will consider the winner - Pixhawk (yes, yes, like that, right away, no intrigue).

Criterias of choice:

  • open architecture (software & hardware);
  • modern element base (everything disappears according to the * avr * pattern);
  • competent, beautiful architecture (* ardu * o and * Rasberi * templates disappear);
  • SIL / HIL simulation mechanisms;
  • ground station open source software.

Let's see what remains:

  1. Paparazzi Project

    • Classix
    • Lisa / MX V2.1
    • Navstik

  2. OpenPilot Project

    • CC3D
    • Revo

  3. Development Boards with IMU

    • Gumstix
    • Beagleboard
    • MiniPC

  4. Pixhawk Autopilot

    • Hardware part
    • Software part

The list is not complete, and the further review is very subjective.

1.Project Paparazzi




The project with the longest history (the first AVR versions of iron date back to 2003), so let's start with it. In 2010, the main developer of the Pascal Brisset project died, but the community survived. To date, there are more than a dozen autopilots based on Paparazzi.

A lot of things have accumulated in the source codes: there is an implementation of the integration of the Euler kinematic equations through a matrix of directing cosines, Euler angles, quaternions; in float and integers. There is an implementation of a simple Kalman filter with 6 variables to determine the orientation, and even UKF got into experimental branches - in general, there is something to see. All this wealth is configured for a specific device using xml files before compilation.

A partial list of project-based devices is here.. I will list from it several, in my opinion, the most interesting devices:

Paparazzi classix



The concept of 2008 on the basis of two LPC2148, which is why it is interesting. An autopilot code is executed on one of the MKs, while the other provides communication with servos and a manual receiver. The approach reduces the risk of losing the device when practicing autopilot. The manual control channel is independent, and autopilot failure does not threaten loss of control.

Paparazzi Lisa / MX V2.1

State-of-the-art STM32F4 meringue device. Contains a full range of sensors, with the exception of GPS. The price is about $ 200.



Paparazzi navstik

An interesting option with a modular structure. It consists of a very tightly arranged main board with STM32F4 and a full set of sensors (including GPS and dynamic pressure sensor) and a set of interface cards.



The set of sensors is specified upon ordering. The price of the main board in the full configuration is $ 212.



On the interface boards there is nothing that could not be placed on the main (connectors, fuses). But the possibility of docking with Gumstix (so that it is on OMAP3530) is very interesting:



In the photo, the shelf from Gumstix + NavStik + interface board. A very serious miniature device is obtained in terms of potential.

2.OpenPilot Project




The project has two hardware platforms: CC3D and Revo.

OpenPilot CC3D (STM32F1)


Small-sized scarf based on the MPU-6000 sensor and MK Cortex-M3. It has 6 outputs (PWM), 2 UART inputs, an input for connecting an RC receiver. Minimum bindings, no interface protection at all.

Between the autopilot and the hardware lies its own HAL, which, theoretically, can be implemented via FreeRTOS, but a lot of the actual code has been written under STM32Fx / win / posix. The main plus of the platform is the price of $ 30. Available both in the official store, and on alli , and even on hk (recognition !!!).

I must say especially about the official store. When accessing from the Russian Federation, you are greeted by a blank page with the friendly phrase “You cannot access this store from your country.”, Somehow not good, especially considering that the team has Russian-speaking developers. The administration at the forum is just as friendly (once I grabbed a ban for posting an announcement about a profile vacancy in a Russian branch, moreover, it’s not just that the user was blocked, but ip was blacklisted, that is, a) people are not lazy; b) a trigger on the topic of the Russian Federation is triggered).

OpenPilot Revo (STM32F4)



Device based on STM32F4. On board there is a pressure sensor and a modem at 433 MHz (for receiving interference directly from the controller since the screen is not spotted). The device was developed for a long time, but finally released. The documentation has not been published, so the Chinese have no clones yet, the official sellers have a price of $ 100-130 (see the remark about the home store above).

SINS mathematics is implemented through EKF on 13/16 state variables. The filter is written in pure C using float. The code is optimized in some moments (matrix calculations), but not in others (normalization of a quaternion costs 4 divisions instead of multiplying by the inverse value). It is unclear why the filter settings are written directly in the code (it will not be easy to configure new sensors).

Due to the powerful controller (168 MHz with FPU), the device is much more suitable for experiments than the first one.

3.Boards with IMU





For some applications, a small ARM on board is not enough (even if it's an M4). Gumstix board on OMAP3530 (Cortex-A8) in conjunction with NavStik was already mentioned a little. It would be strange if Gumstix didn’t do something like that on its own.



Gumstix AeroCore expansion board . Another popular "layout" BeagleBone c SOC from TI. There is also a suitable scarf for it:



In the photo BeagleBone IMU Cape

And, finally, Intel with its Edison . There is no expansion card for it yet, but someone doubts what will happen?

It should be noted that the listed platforms hardly pass by the criterion of "openness", all hope was on I.MX6, in view of the completeness of the documentation, but its native SabreLight does not fit the form factor, and the rest of the implementations do not have the proper popularity (purely my opinion). So we are waiting for the promised I.MX6 with integrated Cortex-M4 and a new suitable breadboard.

To the squad of breadboards, I’ll also take various MiniPCs based on Android. Attractive, above all, at its price. For example, the Mk808 for $ 40 we have:

  1. RK3066 2 x Cortex-A9 1.6GHz;
  2. 1GB of RAM;
  3. 8GB Flash;
  4. WiFi
  5. SD connector
  6. UART on the board;

There are more modern devices on the RK3288, but the issue of having a Linux port requires further study.
A similar miniPC bolted through UART to any autopilot described here extends its capabilities up to VSLAM (SLAM based on technical vision).

It becomes possible to use full-fledged OSs
with add-ons in the form of ROS or even Simulink instead of the “micro OS" for MK described here .

4.Pixhawk Autopilot


Finally got to Pixhawk. Many saw beautiful videos with quadrocopters playing with a ball for table tennis, performing acrobatic stunts, a pack together worth something. The primary provider of this Content is ETH Zurich (Swiss Federal Institute of Technology Zurich). Pixhawk is their development of pixhawk.ethz.ch . Due to its academic nature, the project has a beautiful architecture, both in hardware and software. With the hardware and let's get started. Thanks to the openness, you can purchase a clone on Alliexpress, which I did:

Completeness:

  1. autopilot itself;
  2. GPS module with antenna, battery and magnetometer;
  3. button with integrated LED;
  4. DC / DC converter with current sensor;
  5. USB-> UART / I2C adapter;
  6. I2C splitter.

Total: $ 185 (6500r ... oh, there was a time).
The first question that arises is: how much is the Chinese clone “Chinese”. Well, open and see.

Hardware part

The main unit of the device is a small box with many connectors.



Case material - translucent dark polycarbonate.



The case consists of two halves. The body halves are fastened with four screws screwed into the stumps on the upper body half. To simplify the assembly / disassembly operations, the screws were immediately replaced with a piece of black electrical tape visible in the first photo. In the lower left corner you can see a small compartment covering the pressure sensor on the board. The walls of the compartment do not reach the board itself. According to Vooon, in the native device, a piece of foam is placed in the compartment, but in the clone it is somehow forgotten, it will be necessary to fix it yourself. Foam rubber damps pressure fluctuations and protects the sensor from light. (Thanks Alex22for indicating the photosensitivity of the sensor.)



The main components are mounted at the bottom of the board.



Above are the interface connectors, microSD slot and several indicator LEDs.
There are no complaints about the installation quality - everything is smooth, the flux is washed (except for the battery, it obviously was manually soldered after the stove). By the way, competitors do not have batteries (which means there is no real-time clock, more precisely, no GPS has been caught so far).
Plastic connectors have corresponding holes in the upper half of the case. There is a signature next to each connector. The mating connectors come in with some effort. To disconnect it is strictly forbidden to pull on the wire (it will come off). Act should be so :
On the table operation is straightforward, and in the field in 15C can apply the hack:

It makes sense to immediately stock up on spare cables in case of failure.

The included GPS module combines the SNA receiver with a battery and antenna and a magnetometer.



The need to take out a magnetometer with a GPS antenna arises because it is desirable to place it away from power conductors and magnetic materials. For example, on DJI, this is done as follows:



All inputs / outputs output to the connectors are protected against static, limiting resistors. Feed-through capacitors and protective diodes are installed on the power circuits.



For clarity, here is a photograph with the marking of parts of parts that provide protection.



Eventually:There are no complaints about the Chinese production, the board can be carefully varnished and fly! And if you add a metal case with the removed connectors, then the device will look on the background of much more expensive commercial autopilots.

And now let's recall the competitors from the beginning of the article in which the legs of the MK are directly connected to the connectors. The largest parts on the board are two MK. Large STM32F427 (168MHz, 256KB RAM, 2MB FLASH) and a smaller STM32F103 that performs the functions of a failsafe controller (machine control in case of a failure of the main autopilot algorithm). Those. We see the same architecture as in 2008 Paparazzi, but on a modern elemental base. It can be noted here that in modern SOC there is a tendency to embed small MKs (cores) to solve auxiliary tasks (as well as hard real-time problems), but it’s easier here - they set up a separate MK. I will not describe the installed sensors / displayed interfaces in detail, everything is on the project page .

Software part

The project is based on NuttX RTOS . NuttX is a small posix OS. The system has ROMFS support, which allows part of the settings to be made through configuration files during system operation (compare with the assembly via configuration xml for paparazzi).

SINS algorithms are based on EKF and are available as a separate InertialNav project . There are implementation options for various sets of sensors: for 21, 22, 23 and 24 state variables. The filter code is well documented and partially obtained by automatic generation from MATLAB. The project has source MATLAB files, archives with data - a complete set for experiments.

Working with the device “on the table” is extremely simple: when connected to USB, a new virtual COM port appears in the system that can be used to communicate with the autopilot (in a real device, instead of USB, there will be a radio channel connected via UART).

The project is compatible with the QgroundControl ground control station code . The interaction takes place through the open MAVLink protocol .



The control station allows you to configure the autopilot for a specific aircraft, set the rear flight and control the progress of its implementation, i.e., all that the user needs.

It’s enough for the user, but we will go further ...

Installing the development environment and loading the project is carried out in two clicks, even from under windows:

  1. download toolchain
  2. run PX4_Software_download.bat - the project is downloading;
  3. import the project into Eclipse.

That's all, we have Eclipse with a project:



Whoever had to configure Eclipse to work with ARM will appreciate simplicity.

Now it remains to fasten ST-LINK and you can start debugging ... but it will be in the next article which will appear only after the accumulation and awareness of the relevant experience.

References:


  1. www.pixhawk.org - an open platform project for UAVs;
  2. www.paparazziuav.org - an open platform project for UAVs;
  3. www.openpilot.org - an open platform project for UAVs;
  4. www.qgroundcontrol.org - open source software for ground control station;
  5. www.gumstix.com - manufacturer of miniature SBC;
  6. www.beagleboard.org/bone is the cheapest SOC based on TI's SOC.


Addition. Links to commercial autopilots for UAVs:


  1. NAZA-M-V2 autopilot from DJI;
  2. Micropilot is one of the first commercial manufacturers;
  3. UAVOS - Belarusian / Swiss platform;
  4. SWIFT AI - domestic platform for autopilot with an emphasis on FPV;
  5. AEROB - domestic platform from Skolkovo partner;
  6. AWAKS-GeoService AP-05 - a domestic platform withblackjack QNX, redundancy and RS-485;
  7. RUAV STA3x is a domestic platform with Simulink similar to a visual editor. “Boxed product” with documentation.

Also popular now: