Sunday, September 14, 2014

Aerial Video from DIY Quadcopter Using DroidX Smartphone Camera

In my earlier post, I described how I built my quadcopter from scratch. After experimenting with different hardware and configuration options, I now have improved its controllability. I also attached my old DroidX smartphone and took aerial videos. Ultimately, I would like to use a sports action cam with better resolution and greater viewing angle. In this post I will discuss the changes I did to make the quadcopter more controllable.

First, the video I captured using the DroidX smartphone:

Changes for flight stability improvements

Although I was able to fly my quadcopter, it was not easily controllable. My primary concerns were oscillations and poor response during altitude and direction changes.  

I tried different configuration parameters for the MultiWii flight controller. The open source MultiWii project provides a user interface, which enables users to update configuration parameters including the PID (Proportional/Integral/Derivative) coefficients of the controller (see MultiWii Configuration Reference). 

My starting configuration parameters were somewhat ad hoc. After unsuccessfull attempts to optimize flight behavior by adjusting the parameters, I settled on the default parameter combination (reset to default by using the smartphone application). Using the default parameters improved controllability. Any changes beyond the default parameters did not lead to noticeable improvements. Please also note that, resetting parameters require recalibration of the sensors, re-trimming the auto-level mode and re-configuring modes of flight controlled by the transmitter.

I also recalibrated the ESC's which did seem to improve stability. With these settings, I trimmed the transmitter and the auto-level mode, which reduced drift. Also, after more flights, I noticed that the oscillations were somewhat predictable and I was able to control the quadcopter better by not overreacting to changes, and also by using the altitude hold mode rather than trying to maintain altitude using the throttle.

In addition, the barometer on the flight controller was exposed to outside and was prone to be affected by the propellers. I covered it with a piece of plastic while allowing air to pass through. 

Although not related to flight stability directly, I enabled the failsafe in the flight controller which slows down and shuts down the motors in case the quadcopter gets out of range of the transmitter.

Attempts that did not lead to improvements

Initially, I tried the following hardware changes but did not see noticeable improvements, so I decided to keep my original hardware.

I have been using Slow Flyer propellers which are somewhat flexible. In case these propellers would wobble at high speeds causing unpredictable and random changes in flight behavior, more rigid GWS style propellers intended for higher speeds could perform better. I tried GWS style propellers but they did not lead to any improvement.

The discharge rate on my battery, and the motor / propeller combination should be and probably are sufficient based on the motor data available (please see Motor Calculations). Also, I am able to take off and hover easily. I still wanted to rule out the possibility that I may need a higher discharge rate to handle peak current consumption, i.e. higher rate of acceleration during direction and altitude changes. I tried a higher-discharge-rate battery, but it did not lead to any improvement.
More powerful motors can be another option to try. However, based on the motor calculations, and the fact that I am able to take off and hover, the amount of thrust should be sufficient. Also, using more powerful motors would reduce flight time. So I decided not to try different motors at the moment. I may revisit this option in a future new iteration with possibly a different weight class.

Crash during tests

I had one crash during test flights and replaced the frame and a damaged ESC and motor. This happened at high altitude and from a distance the crash appeared to be due to a motor failure as one of the motors was physically damaged. However, in other test flights at low altitude, where I was able to see the motors in the air, I observed one motor shutting down during normal flight. Therefore, I am not able to distinguish whether a physical failure of a motor caused the crash, or an electronic motor shut down caused the crash and damaged the motor in the process.

Currently I suspect the crash was caused by a motor shut down due to a software and/or configuration error, and may be directly or indirectly related to specific flight modes as they appeared to be correlated. I need to research this further. I will at some point re-download the most recent firmware and try the firmware with minimal changes (see MultiWii Configuration Reference). I also came across this FAQ entry calling out ESC settings as a possible cause for motor shut down and will try the proposed solution of re-configuring the ESCs later. This may also improve the quadcopter response during flight. [Update 12/07/2014: Adjusting the ESC configuration eliminated the motor shutdown problem.]


I was able to get initial aerial video. After I have more flying experience and possibly trying a fresh install of the firmware with minimal changes, and troubleshooting possible motor shut down, I will try aerial video with a sports action cam.

I was able to make improvements by:
  1. Restoring default PID (and other configurable) settings.
  2. Calibrating ESCs.
  3. Trimming the transmitter.
  4. Trimming auto-level mode.
I also covered the barometer to prevent any affect from the propellers. Furthermore, I am now able to use the altitude hold feature more effectively rather than trying to maintain altitude manually.

The different propeller type and higher-discharge-rate battery did not help much in my attempts to make the quadcopter more controllable.


a) MultiWii Configuration Reference

If you are interested in the MultiWii flight controller firmware, the project home page, wiki and FAQ may be good starting points. Also, please refer to the links for Roll, Pitch and Yaw PID tuning and auto-level trimming. 

Trimming the transmitter is adjusting the throttle, yaw, roll and pitch trim buttons repeatedly in the opposite direction of undesired movement. For example, if during flight, the quadcopter is drifting to the right, you need to pull the roll trim button to left until the drift is eliminated. This needs to be done in acro mode, i.e. basic mode without the auto-level enabled. I performed this procedure by repeatedly taking off and landing while observing the drift. Once transmitter is trimmed, you can move on to auto-level trimming. 

Initially, for each configuration change, I needed to connect the controller to a USB port on my computer, update the parameters, disconnect and go outside and fly to test the changes. In order to streamline testing different flight controller parameters I attached a bluetooth adapter to the flight controller. This setup enabled me to update the flight controller parameters using an application (MultiWii EZ-GUI) running on my smartphone, testing changes much more quickly.

In addition to the configuration changes that can be made to the flight controller with the firmware already uploaded on to the microcontroller, there are some initial changes that can and need to be made in the firmware before uploading it to the microcontroller.

b) Motor Calculations

NTM-350 750 kV motors with 10x4.5 SlowFlyer propellers should be able generate over 2200g of thrust using a 3S (11.1V) battery, approximated from data on This should be sufficient for my quadcopter which weighs around 1200g. My calculation is approximate as the voltages and the specific types of propellers I am using are different than the data available, but it should be in the ballpark. 

Also, with the current setup I am able to fly around 8.5 minutes, measured in multiple flights. On a 2200 mAH battery, this corresponds to 15.5 A current draw for 4 motors, 3.9 A per motor. This calculation is also approximate but is a good sanity check against the FlyBrushless data which reports GWS HD 10x6 propellers/7.9V/3.95A with 326g thrust (approximately per-motor thrust that would be needed for hovering).