multirotor control--a first look at flight controllers for quadcopters and other unmanned aerial...

24
Page 1 of 24 Multirotor Control: Zero to Sixty An Architectural Perspective Karl Mortensen 10 December 2013 Abstract Multirotor unmanned aerial vehicles are transitioning from the niche hobbyist domain to “the next big thing.” Until recently, price, component technology, software, and domain-specific expertise kept most people from experiencing multirotors directly. This is about to change. Price, hardware, software, and the technical expertise involved have combined to create a confluence of opportunity. While the potential multirotor field is vast, the technology is varied, compatibility issues abound, jargon runs wild, the literature is informal, and governmental regulation is uncertain. We leave government regulation discussions to others, instead focusing on the “brains” of a multirotor system— the flight controller. We discuss the pedigree, capability, and compatibility of contemporary flight controllers and explore the architecture of a modern, low- cost, open-source flight controller. We give a very brief “getting started with multirotors” checklist and demystify the lingo. Finally, we consider the future of the multirotor field. Multirotors are now within reach of the masses. Prospects for multirotors are very bright, and are poised to grow substantially.

Upload: spaceportkmort

Post on 08-Apr-2016

5 views

Category:

Documents


0 download

DESCRIPTION

Abstract:Multirotor unmanned aerial vehicles are transitioning from the niche hobbyist domain to “the ­­next big thing.” Until recently, price, component technology, software, and domain-specific expertise kept most people from experiencing multirotors directly. This is about to change. Price, hardware, software, and the technical expertise involved have combined to create a confluence of opportunity. While the potential multirotor field is vast, the technology is varied, compatibility issues abound, jargon runs wild, the literature is informal, and governmental regulation is uncertain. We leave government regulation discussions to others, instead focusing on the “brains” of a multirotor system—the flight controller. We discuss the pedigree, capability, and compatibility of contemporary flight controllers and explore the architecture of a modern, low-cost, open-source flight controller. We give a very brief “getting started with multirotors” checklist and demystify the lingo. Finally, we consider the future of the multirotor field. Multirotors are now within reach of the masses. Prospects for multirotors are very bright, and are poised to grow substantially.See www.thecoldheartofspace.com for more information.

TRANSCRIPT

Page 1: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 1 of 24

Multirotor Control: Zero to Sixty

An Architectural Perspective

Karl Mortensen 10 December 2013

Abstract Multirotor unmanned aerial vehicles are transitioning from the niche hobbyist domain to “the next big thing.” Until recently, price, component technology, software, and domain-specific expertise kept most people from experiencing multirotors directly. This is about to change. Price, hardware, software, and the technical expertise involved have combined to create a confluence of opportunity. While the potential multirotor field is vast, the technology is varied, compatibility issues abound, jargon runs wild, the literature is informal, and governmental regulation is uncertain. We leave government regulation discussions to others, instead focusing on the “brains” of a multirotor system—the flight controller. We discuss the pedigree, capability, and compatibility of contemporary flight controllers and explore the architecture of a modern, low-cost, open-source flight controller. We give a very brief “getting started with multirotors” checklist and demystify the lingo. Finally, we consider the future of the multirotor field. Multirotors are now within reach of the masses. Prospects for multirotors are very bright, and are poised to grow substantially.

Page 2: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 2 of 24

Contents Abstract ......................................................................................................................................................... 1 Introduction and Background ....................................................................................................................... 3 Analysis ......................................................................................................................................................... 5

Brief Survey of Low-Cost Flight Controllers .............................................................................................. 5

KK2 Flight Controller $30 ...................................................................................................................... 5 Naza-M-V2 Flight Controller $380 ........................................................................................................ 5 ArduPilot APM Flight Controller $100 .................................................................................................. 6 3DR Pixhawk Flight Controller $200 ..................................................................................................... 7 Crius All-In-One V2 Pro Flight Controller $80 ....................................................................................... 7 Black Vortex Flight Controller $220 ...................................................................................................... 8 MegaPirate/MultiWii V2 AIO Flight Controller (HK V2) $50 ................................................................. 9 MultiWii Pro Flight Controller $65 ...................................................................................................... 10 Flyduino AutoQuad 6 Flight Controller $490 ...................................................................................... 11 MegaPirate X $140 .............................................................................................................................. 11

Flight Controller Pedigree ....................................................................................................................... 13 MultiWii & MegaPirate V2 AIO Flight Controller Architecture ............................................................... 14

Simplified Block Diagram .................................................................................................................... 17

Bare Minimum Starting Point ................................................................................................................. 17

Jargon .................................................................................................................................................. 18

Future Development and Predictions ..................................................................................................... 19

Sensors ................................................................................................................................................ 19 Processors ........................................................................................................................................... 19 External RF Communication ................................................................................................................ 20 Costs .................................................................................................................................................... 20 Academics and Theory ........................................................................................................................ 20 Power .................................................................................................................................................. 20 Regulations.......................................................................................................................................... 20

Future Work and Conclusion ...................................................................................................................... 21

Future Work ............................................................................................................................................ 21 Conclusion ............................................................................................................................................... 21

References .................................................................................................................................................. 22

Text References....................................................................................................................................... 22 Photographs ............................................................................................................................................ 23

Appendix ..................................................................................................................................................... 24

Page 3: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 3 of 24

Introduction and Background Quadcopters, more generically known as multirotors, have been around since the 1920’s, but

they were far from the mainstream until the last four years. Controlling even fixed-wing aircraft from the ground is inherently difficult. There are many variables to keep track of all at once, and humans are left with only their sense of sight and sound to aid in this. Add to it the disorienting nature of incoming versus outgoing where left and right become opposite each other, and this makes unaided flying with a fixed-wing aircraft difficult at best. Now switch to the multirotor domain, adding four counter-rotating propellers operating in tandem to keep a craft balanced and level in the wind and through turns, and it quickly becomes a very complicated situation to deal with. While it is possible to fly a multirotor unaided, it is very difficult.

Improvements in component miniaturization, battery technology, manufacturing, and

reductions in cost have brought the multirotor screaming back into the forefront. In the modern multirotor era, people began mounting gyroscopes, accelerometers, and barometers to their hobbyist aircraft. They turned to discrete microcontrollers to help tie these components together. As the multirotor caught on more and more, individual flight controller boards were developed, each one adding incrementally to the command-and-control capability of the multirotor craft. Rather than discrete sensors, gyros, accelerometers, barometers and more were integrated into one board, with a microcontroller to control them, and drive the motors as commanded. The feedback from these sensors keeps a multirotor flying straight and level.

Several Multirotors of Varying Sizes. Photograph by Jose Julio.

Page 4: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 4 of 24

As one can see from the photograph above, there are varying sizes and styles of multirotors. As in any new field, there are also many names that describe the same idea: quadrotor, multirotor, quadcopter, and multicopter to name a few. There are also tricopters, hexacopters, octocopters, and many others. We treat all these rotor-based vehicles generically by using the term “multirotor” to describe this entire class of small Unmanned Aerial Vehicle (sUAV).

New uses for multirotors are dreamed up every day. Amazon, the web-based shopping

company, has announced plans to deliver small packages via multirotor, beginning in the next few years. Bradley speaks about multirotors working cooperatively to map out a collapsed building. In fact, the Federal Aviation Administration and the Department of Transportation are working together to “develop and implement operational and certification requirements for the operation of “public unmanned aircraft systems” in the NAS by the 4th Quarter of 2015” ("Integration of Civil Unmanned Aircraft Systems (UAS) in the National Airspace System (NAS) Roadmap"). Multirotors are certainly going to play a sizeable role in the future.

In his IEEE Spectrum article, Waibel extols the virtues of the multirotor: “Standard helicopters use complex mechanics to allow stable flight. Multirotors use fast onboard motor control to take care of stability. This mechanical simplicity is also their main attraction: multirotors can navigate in three dimensions using only four moving parts. And the high reliability of brushless motors makes them a simpler, more reliable alternative to many traditional flying platforms” (Waibel).

Most hobbyist flight controllers do not yet have cameras, radios, full INU, nor echo location

rangefinder integrated natively into them, but we predict they will in the next two to three years. The professional-grade flight controllers sometimes do, yet these boards can run from 10 to 20 times the cost of a hobbyist flight control board.

This paper discusses a sampling of low-cost, hobbyist flight controllers, and then dives into the

architecture of a specific flight controller. We show some simple steps to get a multirotor into the air, demystify the jargon surrounding this field, and finally conclude with predictions for the next generation of flight controllers.

Page 5: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 5 of 24

Analysis

Brief Survey of Low-Cost Flight Controllers Following are some low-cost flight controllers available for purchase today. The “ancient”

history of modern flight controllers is just over four years old at this point (2013). There is a broad spectrum of capability and cost in the hobbyist devices available today.

KK2 Flight Controller $30 The KK2 is a somewhat primitive flight controller that almost didn’t make the “modern” list, but

it was the starting point a few years ago. It is available for purchase today, but it really doesn’t do much compared with others today. It has a piezoelectric buzzer, a gyro, a small AVR microcontroller, and an LCD display. The LCD display will help with configuration, setup, and tuning, but this flight controller can barely auto-level a multirotor in flight. This leaves it severely underpowered compared to its competitors ("Hobby King KK2.1 Multi-rotor LCD Flight Control Board With 6050MPU And Atmel 644PA").

The KK2 runs custom firmware and uses the LCD display for tuning without needing external

software. It can be purchased for around $30.

The KK2 Flight Controller. Photograph by Hobby King Web.

Naza-M-V2 Flight Controller $380 The Naza-M is a professional-looking flight controller with a high price tag, but not that many

features. It has a 2-axis gyro as well as a microcontroller and built-in GPS. It has hover modes and failsafe modes, but doesn’t have as many integrated sensors as some modern, lower-cost flight controllers. While it is aesthetically pleasing, it costs more and delivers fewer features. Note that it is closed-source hardware, so modifying it is hard ("NAZA-M").

The Naza-M runs custom, closed-source firmware and software. It can be purchased for around $380.

Page 6: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 6 of 24

The Naza-M Flight Controller. Photograph by DJI Web.

ArduPilot APM Flight Controller $100 According to the creators of APM, “The APM was a tried and true champion and it was exploited

to the fullest to bring us the richness of capabilities that let us do so much, but the 8 bit APM CPU is out of both memory and CPU performance which are necessary for future enhancement.” It uses the 8-bit ATmega 2560 microcontroller for control ("WHICH FLIGHT CONTROLLER? APM – PX4 – PIXHAWK").

The APM was great in its day, and still can work, but no future firmware builds will fit on it, as it

is very full. Features were added until the microcontroller was completely out of memory, at which point the designers simply built a bigger board called the Pixhawk. The APM flight controller is still available today and still quite capable, it just will not be running new versions of the open source ArduPilot and ArduCopter firmware and software in the future. There have been some small efforts to shrink the existing firmware to better fit the APM, but the days of the APM are numbered, as no more of the flight controllers will be manufactured ("APM Copter"). It can still be purchased for around $100.

ArduPilot APM Flight Controller. Photograph by ArduPilot Web.

Page 7: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 7 of 24

3DR Pixhawk Flight Controller $200 This flight controller is the next generation of the ArduPilot APM. It is a 32 bit CPU ARM Cortex

M4 running Nuttx RTOS. This CPU has a lot more memory, more and faster floating point calculations, and many general purpose I/O ports. Instead of just an open board, it has a nice protective case with silkscreened information, along with helpful indicator LEDs. Future ArduCopter firmware and software work will be based on this board alone, and we expect the price to come down in the near future ("WHICH FLIGHT CONTROLLER? APM – PX4 – PIXHAWK").

The Pixhawk runs open source ArduPilot and ArduCopter firmware and software, capable of utilizing the very biggest and latest firmware builds. It also comes with an SD card port to allow for easy logging of inflight data. This flight controller is brand new, and is expected to start shipping in the next week or two ("3DR Pixhawk"). It can be purchased for around $200.

Pixhawk Flight Controller. Photograph by ArduPilot Web.

Crius All-In-One V2 Pro Flight Controller $80 The Crius V2 AIO is a partial clone of the ArduPilot APM flight controller, with some updates and improvements. Recall the fatal flaw of the APM is the microcontroller is getting very full. The Crius uses this same microcontroller, but gets around the issue by fragmenting the firmware into functional pieces and asking the user to configure and build their own firmware with the Arduino toolset ("General Configuration"). This allows them to fit more of what the user wants onto the aging 8-bit microcontroller, without the overhead of things they don’t need. This will extend the life of the ATmega

Page 8: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 8 of 24

2560-based flight controllers for some time to come, as long as you can make the choices of what you really need in your firmware and have the capability to build and load it ("Crius AIOP Manual MWC").

The Crius V2 AIO is compatible with MegaPirateNG firmware and software, which is a fork of the open source ArduPilot APM firmware and software. MegaPirateNG continues to update to the latest firmware and software when APM releases something, but doing it in their functional-fragment method to keep overall firmware size to a minimum.

Having done more research and knowing what we know now, this is the flight controller board

the author would have chosen instead of the MegaPirate/MultiWii V2 that was actually purchased. This board has the best feature to price ratio of the flight controllers we researched found, with the most flexibility for adding on, as well as actual documentation available. It can be purchased for around $80 ("MegaPirateNG Documentation").

Crius AIO V2 Pro Flight Controller. Photograph by Gaza07.

Black Vortex Flight Controller $220 The Black Vortex is a near-clone of the ArduPilot APM with the major difference being it has an

integrated, onboard GPS module. It also has explicit connectors for XBee radios. Other than that, it is essentially an off-brand APM that costs more ("BLACK VORTEX FLIGHT CONTROLLER BOARD FOR RC MODELS").

Page 9: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 9 of 24

The Black Vortex is also compatible with MegaPirateNG firmware and software, which again, is

an APM fork. It can be purchased for around $220.

Black Vortex Flight Controller. Photograph by CSG Shop Web.

MegaPirate/MultiWii V2 AIO Flight Controller (HK V2) $50 This board is also known as HK V2, since Hobby King is the only supplier for the board. It is a clone of the Crius V1.1, which was a clone of the ArduPilot APM. The same basic components are on the Crius and the HK V2. While it is closely related to the Crius, it still is different enough to merit documentation of its own. Instead, the board’s creators point to the Crius V1.1 documentation. This really is insufficient for inexperienced users. There are silkscreened names on the board that are somewhat similar to the Crius, and some traces on the board one can follow, and from this one can derive which each part is and correlate with the Crius V1.1 documentation, but it is more difficult than it needs to be ("MegaPirate/MultiWii V2 AIO Flight Controller").

As with all APM clones, the HK V2 is compatible with MegaPirateNG firmware and software, which again, is an APM fork. The HK V2 can also run a completely separate firmware/software baseline called MultiWii. The author selected MegaPirateNG as the firmware of choice moving forward, as it is better developed and more commonly used. The HK V2 can be purchased for around $50 ("MegaPirate/ArduCopter Setup").

Page 10: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 10 of 24

MegaPirate/MultiWii V2 AIO Flight Controller. Photograph by Hobby King Web.

MultiWii Pro Flight Controller $65 The MultiWii Pro is another ATmega 2560 flight controller, but it is not a clone of the Crius. It has very similar features, plus comes with an integrated GPS module, but has an elongated board to allow easier wiring and connecting of peripherals. It is not compatible with MegaPirateNG firmware and software. The firmware and software for the MultiWii board are called “MultiWii”. It was originally written to control a Nintendo Wii controller, but then was repurposed to control a multirotor, as both have similar attitude and motion sensors onboard. ("MultiWii") It can be purchased for around $65 ("MultiWii PRO Flight Controller w/MTK GPS Module").

MultiWii Pro Flight Controller. Photograph by Hobby King Web.

Page 11: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 11 of 24

Flyduino AutoQuad 6 Flight Controller $490 The Flyduino AutoQuad 6 is the next generation MultiWii Pro, refactored to fit common stack

standoffs, and updated with a new CPU, a 32-bit Cortex M4 CPU. It has built-in GPS, micro SD card, and 2.4 GHz radio receiver, as well as EMI hardening. It is very full-featured and nice, but it is expensive ("Flyduino Mega , a MultiWii/Ardupirates/Aeroquad based aerial video platform FC").

The AutoQuad 6 is open source firmware and software but closed source hardware. It can run

both the MegaPirateNG firmware and the MultiWii firmware. It can be purchased for around $490 ("Autoquad 6 Flight Controller").

Flyduino AutoQuad 6 Flight Controller. Photograph by Goofy23.

MegaPirate X $140 Contrary to the name, the MegaPirate X is not compatible with MegaPirateNG firmware and software. It uses custom firmware and software only available via DropBox. The datasheet was also only available from DropBox. This, along with other factors, spooked the author a bit and additional research on this device was halted. It looks as if someone is trying to make money with an inferior board off people who think that “MegaPirateNG” is a specific piece of hardware, rather than the firmware and software that it actually is. All the other flight controllers that are compatible with MegaPirateNG make it clear that “MegaPirateNG” is the name of the firmware and software port, not the product they are selling. The MegaPirate X does use a 32-bit Cortex M4 CPU, so we assume it is a very rough first cut at cloning the pre-release Pixhawk test boards. This flight controller looks a bit hard to use, and indeed, the

Page 12: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 12 of 24

website says “Please read the manual thoroughly before using this complicated device!” ("Megapirate X"). This one is a bit of a mystery that will not be investigating further at this time.

MegaPirateX Flight Controller. Photograph by MegaPirateX Web.

Page 13: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 13 of 24

Flight Controller Pedigree The figure below shows families of multirotor flight controllers on the horizontal axis and time

on the vertical axis. Hardware baselines are represented by arrows. The length of the arrows indicates approximately how far from the source hardware it is. As an example, the Black Vortex is further from the ArduPilot APM base than the Crius Pro V1 is. The figure also indicates firmware and software family baselines with colored backgrounds. Flight controllers sharing a colored background run the same baseline firmware and software. Note that several run multiple baselines.

Major Product Lines

Custom FW & SW

MegaPirateNGFirmware

and Software

KK Custom Firmware

Naza CustomFirmware

Multi Wii Firmware and Software

ArduCopter APM Firmware and Software

KK

3DR Pixhawk

HK V2

NazaCrius Pro V1

ArduPilot APM MultiWii Pro

Black Vortex

MegaPirate XFlyduino

AutoQuad 6

Tim

e

Pre Pixhawk Interim Test

Board

Crius Pro V1.1

Crius Pro V2

KK2

Naza M

Arrows represent hardware inheritance

Colored background represents firmware and software compatibility

FWSW

While it has not been considered in this study, many of the flight controllers covered above also function for fixed wing aircraft, usually by changing the firmware running on the board to a similar but slightly different firmware. For example, the ArduPilot APM can run the ArduCopter firmware, which is specifically for helicopter sUAVs, or it can run ArduPlane, which is a very closely related firmware from the same source, intended for fixed-wing vehicles. This will not be covered further in this study, but could be an important factor in flight controller choice in the future.

Page 14: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 14 of 24

MultiWii & MegaPirate V2 AIO Flight Controller Architecture The MultiWii & MegaPirate V2 AIO Flight Controller is informally known as the “HK V2”, since it

comes from Hobby King, and is the second revision of the board. The documentation for the HK V2 is sadly lacking. The author was unable to find a data sheet or user manual for this flight controller. Had this been known prior to purchasing, a different board would have been selected. Over three weeks of searching revealed an acceptable alternative. While there is no documentation for this board, the HK V2 was designed to be a lower-cost only-cosmetically-different version of the Crius V1.1 AIO board. With that knowledge in hand, one can utilize the user manual for the Crius V1.1, relying on the internet and hobbyist forums to fill in the gaps.

Hardware-wise, the HK V2 has almost everything the Crius has, the only exception being the HK

V2 does not have automatic battery level checking. As one can see from the image below, the HK V2 follows the same stack standoff as conventional multirotor boards. Note the labeled input and output pins and connectors. There are enough I/O pins that one must have substantial knowledge to be successful with this board.

HK V2 Flight Controller Board. Photograph by Hobby King Web.

In the photograph below, a GPS test is being run. The HK V2 is listening to the GPS and transmitting the results back to a PC base station over the RF link. There are no motors attached in this picture. If there were, the top left of the main board would be populated with many more wires.

Page 15: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 15 of 24

Testing the HK V2. Photograph by Hobby King Web.

The HK V2 is controlled by an Atmel ATmega 2560 microcontroller, which is an 8-bit microcontroller running at up to 16 MHz with a Harvard architecture, which means it is a RISC system. Data and instructions are stored in separate memories (“ATmega 2560”).

According to the datasheet, “Instructions in the program memory are executed with a single level pipelining. While one instruction is being executed, the next instruction is pre-fetched from the program memory” and most instructions on this microcontroller take one or two cycles ("ATmega 2560, 12").

The ATmega 2560 microcontroller is programmable via JTAG or USB with the FTDI USB-to-serial chip built into the flight controller board. The microcontroller has four 8-bit PWM channels and 12 16-bit PWM channels broken out into I/O headers on the board. It also has both I2C and SPI available. The I2C interface is broken out on the flight controller board and normally used for external GPS input. The other option for GPS is the serial UART, which is commonly used as well. The microcontroller uses 500 microamps at 1.8 volts when awake, and .1 microamp at 1.8 volts when asleep. It is a highly capable little microcontroller. It has 32 8-bit general purpose registers, and will multiply in two cycles. It has 4KB EEPROM, 8KB SRAM, and 256KB internal flash for storing the firmware. It has 16 10-bit ADC inputs, and four 2-wire serial UARTs. Interrupts can be set to trigger on I/O pin voltage level changes. Not all of these pins are broken out to I/O pins, but they could be if needed (“ATmega 2560" for the entire paragraph).

Page 16: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 16 of 24

The flight controller has a gyro and accelerometer sensor on a single chip. There is a 3-axis magnetometer which allows the flight controller to know how it is oriented in the earth’s magnetic field (e.g. which way is north) It also has a barometric altimeter with a resolution of around 10 cm height difference, as long as the pressure hasn’t changed since launching the multirotor. It has built in receiver inputs and outputs, which take command signals received via RF and translate that into rotor control. It does not have built in Lithium Polymer (LiPo) monitoring, which is a voltage divider connected to an ADC to help monitor battery levels. The Crius V1.1 has this feature.

The feature list below comes straight from the Hobby King website ("MegaPirate/Multi Wii V2 AIO Flight Controller”):

Supported MegaPirateNG and MultiWii firmware

Up to 8-axis motor output

8 input channels for standard receiver

4 serial ports for debug/Bluetooth Module/OSD/GPS/telemetry

2 servos output for PITCH and ROLL gimbal system

1 servo output to trigger a camera button

6 Analog output for extend device

A I2C port for extend sensor or device

Separate 3.3V and 5V LDO voltage regulator

ATMega 2560 Microcontroller

MPU6050 6 axis gyro/accel with Motion Processing Unit

HMC5883L 3-axis digital magnetometer

MS5611-01BA01 high precision altimeter

FT232RQ USB-UART chip and Micro USB receptacle

On board logic level converter

The on-board six-axis combination gyroscope and accelerometer, part number MPU6050, helps the multirotor know its orientation in pitch, roll, and yaw. It enables the vehicle to sense when it is not level and trigger changes to flight controls to level out. The gyroscope and accelerometer ADCs are 16 bits, and their full-scale values are user programmable, which means one can customize the ADCs to read values appropriate to various multirotor setups. The chip runs at around 20 MHz, which means that it can sleep between samples, conserving power while in the air. It runs at 2.16 volts with 100 microamps current draw ("MPU-6000 and MPU-6050 Product Specification").

The on-board magnetometer, part number HMC5883L, measures the direction of the earth’s magnetic field, adding yet another input to the multirotor’s state vector for attitude. The ADC is 12 bits, and full-scale values are user programmable for different setups. It runs at 1.8 volts, with 1 microamp current draw ("3-Axis Digital Compass IC").

The onboard altimeter’s (part number MS5611-01BA01) datasheet claims that it is sensitive up to 10 centimeters, but online reviews claim the sensitivity is closer to two meters instead of 10 centimeters. It uses a linear pressure sensor and a 24 bit ADC at 1.8 volts, and 20 MHz sampling ("MS5611-01BA01 PRESSURE SENSOR").

While GPS is used to find the actual latitude and longitude location of the unit, there is a lot more to it than just location. The gyro/accelerometer integrated with the magnetometer provide a nine-axis

Page 17: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 17 of 24

(X,Y,Z for each of gyro, acceleration, and magnetics) motion sensor at up to 1MHz running at 2.375 volts. This enables location and attitude awareness, which is critical to the safe operation of the multirotor.

The onboard FTDI chip, part number FT232RQ, converts USB to UART automatically, with appropriate level shifting. This enables programming the firmware for the microcontroller directly from a laptop with a USB cable, which is quite easy to do ("Future Technology Devices International Ltd. FT232R USB UART IC").

Simplified Block Diagram A simplified block diagram of the flight controller with its inputs and outputs is shown in the

figure below. Red indicates RF communications, yellow indicates general Input/Output pins that can be used for nearly any purpose one can dream up, green indicates power and inputs to drive the motors at the variable speeds required, and blue indicates control logic.

Altimeter

Electronic Speed

Controllers

Magnetometer Microcontroller

UART

Accelerometer and Gyros

FTDI

GPS Receiver

PWM GPIO

Digital GPIO

Power

I2CTrigger Control

Sensors

Comms

Motors & Power

GPIO

Control

While this simplified diagram neglects many details, it conveys the general idea of how things are interconnected on a typical flight controller board.

Bare Minimum Starting Point To get started with multirotors, the following is the bare minimum:

1) Air frame with motors and propellers 2) Flight Controller 3) Transmitter and Receiver for manual control 4) Battery and charger

Page 18: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 18 of 24

These are the bare minimum items to get up and flying. We suggest choosing a flight controller that is compatible with ArduPilot APM or a derivative such as MegaPirateNG, as they are both open source software and firmware. Many of the flight control boards that run these two hardware platforms are open source hardware.

When the parts are acquired, the general steps to begin are listed below. Note that a lot of details are intentionally left out, as these are only high-level steps.

1) Load firmware to the flight controller 2) Load tuning software to a PC 3) Program transmitter and receiver pair with PC software 4) Tune the multirotor so motors are controlled evenly by similar amounts of controller motion 5) Test fly at very low altitudes (inches, not feet) to ensure the multirotor balances appropriately

Once the multirotor is in the air and responding appropriately to commanded inputs, the next items to integrate are:

1) GPS for location data 2) Separate RF radio for data and control 3) Computer aided control via PC and RF link (potentially sending GPS waypoints) 4) Video with data link back to the base station 5) “Return to Base” functionality

From there, the sky is no longer the limit.

Crashes will be a fact of life until one has learned to fly well. As a mitigation strategy, one can actually purchase multirotors strapped inside small wire cages with bungee cords. Small wrecks in this configuration are not catastrophic and one can continue learning without spending a fortune.

Jargon The following acronyms are commonly used when discussing multirotors.

AIO All In One APM ArduPilot Mega ARF Almost Ready to Fly AV Audio/Visual BEC Battery Eliminator Circuit CPU Central Processing Unit DIY Do It Yourself EMI Electro-Magnetic Interference ESC Electronic Speed Controller IFF Identify Friend or Foe IMU Inertial Measurement Unit sensor INU Inertial Navigation Unit LiPo Lithium Polymer Battery MP Mission Planning OSD On-Screen Display PID Proportion Integration and Differentiation PWM Pulse Width Modulation

Page 19: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 19 of 24

RC Radio Control RF Radio Frequency RTB Return To Base RTF Ready To Fly RTL Return To Launch place SD Secure Digital sUAV small Unmanned Aerial Vehicle UAV Unmanned Aerial Vehicle VFR Visual Flight Range VTOL Vertical Take Off and Land

Future Development and Predictions The future of the low cost flight controller will likely involve integration of more onboard

sensors natively into the flight controller, standardization on an actual CPU instead of a microcontroller, and native integration of RF communications on board. Costs will come down as parts are standardized and mass-produced while quality will go up as production quantities grow. Cooperative machine theory will grow. Power technology will evolve, as will legal regulations.

Sensors There will very likely be more sensors integrated onto these boards. Right now GPS is an add-on

for many flight control boards. This is a big one that would be very nice to just be integrated with the flight controller, even if it isn’t onboard for EMI reasons. Sonic range finders in at least the six cardinal flight directions will also very likely be integrated natively (or at least specifically pinned-out on the board). Explicit camera pins that take signals from the attached camera and send them back to the base station over the radio will also likely be introduced, as well as standard onboard video encoding. Flash memory data logging will be very useful to have natively on the flight controller and is a likely next step. Microphones will become standard. Onboard temperature and humidity gauges will likely become the norm, as well as battery monitoring. Information from all these sensors will be wrapped up and logged or transmitted back to the base station natively. This will all come in one flight controller package, allowing much more flexibility for pilots. The flash memory that is used to log flight data and pictures could also hold files such as new software or firmware updates for the board. Multirotors will likely work cooperatively and quasi-intelligently with other multirotors, and will need a short-distance radio for communication. This could be Bluetooth embedded onto the flight control board, or some other RF technology.

Though a little scary, one could easily imagine a world where multirotors have headlights, digital displays (LCD-variety at first), fingerprint sensors, biometric eye scanners, infrared cameras, toxin detectors, loudspeakers, tasers, or other weapons. While we will not focus on the applicability of some of these items, there are myriad uses for multirotor sensors outside this scary future. Flight controllers are one of the big things that will make this happen. The technology is going to grow by leaps and bounds.

Processors Most flight controllers will move to a 32-bit ARM-based processor, as it is capable of low power

operation, vast memory access, and involved computation. This will enable more complex control and flight planning on board, without external supervision.

Page 20: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 20 of 24

External RF Communication There are several common flavors of RF that could be implemented on board: WIFI, GSM,

4GLTE, or 433 MHz, 900 MHz, or 2400 MHz standard radios. Medium-range communication technology would be helpful to future multirotor enthusiasts. Cellular communication is particularly interesting in that the multirotor and the control could theoretically be very far away from each other while still communicating, sharing video feeds. This does have the drawback of requiring a data plan

Costs Costs will come down and parts will become more standardized. At the moment, one can visit

over 30 websites and find 30 different types of multirotor airframes alone. We suggest much like the cars on the road today, airframes will begin to look similar in terms of dimensions, capabilities, and structure. The cosmetics will be different, but underneath the frames will become closer together.

Academics and Theory The cooperative machines, machine learning, and automated control fields will all see a big

increase in interest as a result of multirotor proliferation. There will be fleets of multirotors working together to accomplish tasks. This requires immense self-awareness through sensors and software. The field of cooperative fleet management is going to see a big increase. Cooperation among multirotors is going to require more CPU horsepower on each multirotor going forward, which will drive flight controller capability increase.

Power Battery technology will also get a boost from this, as current battery technology is insufficient

for lengthy flights. Researchers will actively seek to develop better battery technology for small unmanned aerial vehicles.

Regulations In the United States, one cannot legally fly an sUAV as a service for money at this time, but “the

FAA expects to nail down the initial process to issue ‘operator certificates’ for companies flying larger drones for profit by 2014” (Gallagher).

Laws will be made to allow sUAVs to operate in the national airspace. Regulations will occur. Licensing will very likely occur. Radar will be implemented to track all these things, and IFF systems will likely be required. Ground location stations to assist GPS will likely be set up. Right now, it is the wild west of a brave new world. We expect within ten years, regulations will be in place similar to automobile regulations. We even imagine the concept of 3D volumes set up as air traffic lanes sUAVs.

More integrated sensors, more CPU horsepower, more standardization, better batteries, lower

cost, and FAA approval will all serve to make the multirotor more autonomous, available, and easier for the novice pilot to control.

Page 21: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 21 of 24

Future Work and Conclusion

Future Work It would be very useful to compare the MultiWii and MegaPirateNG firmware on the same multirotor platform and document the results. This would provide that head-to-head comparison many people on internet forums keep asking for. One could spend quite a bit of time analyzing in detail the various firmware/software combinations for each of the modern flight controllers. We only brushed the surface of the firmware/software analysis. We would like to have been able to integrate the multirotor parts purchased for this effort and actually fly the resulting multirotor, but this proved infeasible within the allotted timeframe.

Conclusion

Multirotors are moving to the forefront, as the technology, use cases, public awareness, and price combine to make them economical and acceptable. Expect to see many of them in daily use within the next five years. The flight control boards that enable them will only become more capable, robust, safe, and standardized from here. There are great changes coming very soon for the multirotor field, and the application of this technology will change the world in ways yet to be imagined.

Page 22: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 22 of 24

References

Text References "ATmega 2560." . Atmel, n.d. Web. 6 Dec 2013. <http://www.atmel.com/Images/doc2549.pdf>. Gallagher, Sean. "As deadline for drone rules nears, FAA issues roadmap for inclusion in the skies." . Ars Technica, 07 Nov 2013. Web. <http://arstechnica.com/tech-policy/2013/11/as-deadline-for-drone-rules-nears-faa-issues-roadmap-for-inclusion-in-the-skies/>. Bradley, Jeremy. "Tiny flying robots! Meet the quadrotor."CNN. CNN, 01 May 2013. Web. 6 Dec 2013. <http://www.cnn.com/2013/05/01/tech/innovation/flying-robots-quadrotors/>. "Integration of Civil Unmanned Aircraft Systems (UAS) in the National Airspace System (NAS) Roadmap." . US DOT & FAA, 07 Nov 2013. Web. 6 Dec 2013. <http://www.faa.gov/about/initiatives/uas/media/UAS_Roadmap_2013.pdf>. Waibel, Markus. "Quadcopter, Hexacopter, Octocopter ... UAVs." . IEEE. Web. 19 Feb 2010. <http://spectrum.ieee.org/automaton/robotics/robotics-software/quadcopter-hexacopter-octocopter-uavs>. "MPU-6000 and MPU-6050 Product Specification." . Invsense. Web. 6 Dec 2013. <http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Components/General IC/PS-MPU-6000A.pdf>. "3-Axis Digital Compass IC." . Honeywell. Web. 6 Dec 2013. <http://www51.honeywell.com/aero/common/documents/myaerospacecatalog-documents/Defense_Brochures-documents/HMC5883L_3-Axis_Digital_Compass_IC.pdf>. "MS5611-01BA01 PRESSURE SENSOR." . N.p.. Web. 6 Dec 2013. <http://www.csgshop.com/product.php?id_product=26>. "Future Technology Devices International Ltd. FT232R USB UART IC." . FTDI Chip, n.d. Web. 6 Dec 2013. <http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT232R.pdf>. "Hobby King KK2.1 Multi-rotor LCD Flight Control Board With 6050MPU And Atmel 644PA." . Hobby King. Web. 6 Dec 2013. <http://www.hobbyking.com/hobbyking/store/__49254__Hobbyking_KK2_1_Multi_rotor_LCD_Flight_Control_Board_With_6050MPU_And_Atmel_644PA.html?gclid=CN_E8d6jk7sCFSHNOgodHWQAIA>. "NAZA-M." DJI | NAZA-M Spec. N.p.. Web. 6 Dec 2013. <http://www.dji.com/tech-spec/naza-m-spec/>. "APM Copter." . APM Copter. Web. 6 Dec 2013. <http://copter.ardupilot.com/>. "WHICH FLIGHT CONTROLLER? APM – PX4 – PIXHAWK." . APM Copter. Web. 6 Dec 2013. <http://copter.ardupilot.com/wiki/build-your-own-multicopter/ "3DR Pixhawk." . 3D Robotics. Web. 6 Dec 2013. <http://store.3drobotics.com/products/3dr-pixhawk>.

Page 23: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 23 of 24

"MegaPirateNG Documentation." . MegaPirateNG.com. Web. 6 Dec 2013. <http://docs.megapirateng.com/>. "General Configuration." . MegaPirateNG.com. Web. 6 Dec 2013. <http://docs.megapirateng.com/documentation/general_configuration>. "Crius AIOP Manual MWC." Crius AIOP Manual. rctimer.com. Web. 6 Dec 2013. <http://www.rctimer.com/download/Crius_AIOP_Manual_MWC.pdf>. "BLACK VORTEX FLIGHT CONTROLLER BOARD FOR RC MODELS." . N.p.. Web. 6 Dec 2013. <http://www.csgshop.com/product.php?id_product=29>. "MegaPirate/Multi Wii V2 AIO Flight Controller ." . Hobby King. Web. 6 Dec 2013. <http://www.hobbyking.com/hobbyking/store/__31138__multiwii_and_megapirate_aio_flight_controller_w_ftdi_atmega_2560_v2_0.html>. "MegaPirate/Arducopter Setup." . diy multicopter. Web. 6 Dec 2013. <http://www.diymulticopter.org/?page_id=1031>. "MultiWii PRO Flight Controller w/MTK GPS Module." . Hobby King. Web. 6 Dec 2013. <http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=26588&gclid=CNatgMeik7sCFcQDOgodrRQAtg>. "MultiWii." . N.p.. Web. 6 Dec 2013. <http://www.multiwii.com/>. "Flyduino Mega , a MultiWii/Ardupirates/Aeroquad based aerial video platform FC." . N.p.. Web. 6 Dec 2013. <http://www.rcgroups.com/forums/showthread.php?t=1381577>. "Autoquad 6 Flight Controller." . N.p.. Web. 6 Dec 2013. <http://flyduino.net/Multcopter-FC>. "Megapirate X." . Mega Pirate X. Web. 6 Dec 2013. <http://megapiratex.com/index.php?id_product=8&controller=product&id_lang=1>.

Photographs HK V2 Minimal Setup. N.d. Photograph. Hobby King, Hong Kong. Web. 6 Dec 2013. <http://www.hobbyking.com/hobbyking/store/uploads/1034137329X942717X49.jpg>. HK V2 Board Image. N.d. Photograph. Hobby King, Hong Kong. Web. 6 Dec 2013. <http://www.hobbyking.com/hobbyking/store/uploads/375568553X945087X44.jpg>. Julio, Jose. Several Multirotors. 2010. Photograph. diydrones.com Web. 7 Dec 2013. <http://www.diydrones.com/profiles/blogs/indoor-fun-with-a-tiny>. KK2 Flight Controller. N.d. Photograph. Hobby King Web. 7 Dec 2013. <http://www.hobbyking.com/hobbyking/store/__49254__Hobbyking_KK2_1_Multi_rotor_LCD_Flight_Control_Board_With_6050MPU_And_Atmel_644PA.html?gclid=CN_E8d6jk7sCFSHNOgodHWQAIA>.

Page 24: Multirotor Control--A First Look at Flight Controllers for Quadcopters and other Unmanned Aerial Vehicles

Page 24 of 24

NAZA-M. N.d. Photograph. DJI Web. 7 Dec 2013. <http://www.dji.com/feature/naza-m-features/>. APM 2.5 and 2.6 Overview. N.d. Photograph. ArduPilot Web. 7 Dec 2013. <http://copter.ardupilot.com/wiki/common-apm25-and-26-overview/>. Overview of the Pixhawk Flight Controller. N.d. Photograph. ArduPilot Web. 7 Dec 2013. <http://copter.ardupilot.com/wiki/common-pixhawk-overview/>. Gaza07, . The Crius All In One Pro Flight Controller (AIOP) Multi Wii Manual rev 1.00 . N.d. Photograph. RC Timer Web. 7 Dec 2013. <http://www.rctimer.com/download/Crius_AIOP_Manual_MWC.pdf>. BLACK VORTEX FLIGHT CONTROLLER BOARD FOR RC MODELS. N.d. Photograph. CSG Shop Web. 7 Dec 2013. <http://www.csgshop.com/product.php?id_product=29>. MultiWii and Megapirate AIO Flight Controller w/FTDI (ATmega 2560) V2.0. N.d. Photograph. Hobby King Web. 7 Dec 2013. <http://www.hobbyking.com/hobbyking/store/__31138__Multiwii_and_Megapirate_AIO_Flight_Controller_w_FTDI_ATmega_2560_V2_0.html>. MultiWii PRO Flight Controller w/MTK GPS Module. N.d. Photograph. Hobby King Web. 7 Dec 2013. <http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=26588&gclid=CNatgMeik7sCFcQDOgodrRQAtg>. Flyduino Mega , a MultiWii/Ardupirates/Aeroquad based aerial video platform FC. 2011. Photograph. Goofy23 Web. 7 Dec 2013. <http://www.rcgroups.com/forums/showthread.php?t=1381577>. Megapirate X. N.d. Photograph. MegapirateX Web. 7 Dec 2013. <http://megapiratex.com/index.php?id_product=8&controller=product&id_lang=1>.

Appendix Please see the PowerPoint Slides in the file Multirotor Control.pptx.