Friday, March 27, 2015

Putting Pixhawk aside

Micro APM mounted on standoffs on plywood base

Wider view

After many days of debugging Pixhawk problems with ESC calibration, channel mapping, poor stability.. I put it aside and went back to an APM 2.7 unit for the SK450 dead cat.  The pixhawk seems like a nice unit, but the factory support was mediocre, the warranty is 3 months, and it seems pretty finnicky about ESCs, powering, and such.  Online support from forums is usually helpful but not always and not in this case.

Removing the Pixhawk was reasonably easy but the APM was a pain as it is a micro unit and is not nicely packaged.  I mounted it on standoffs as shown and replaced the GPS with a known good unit as well, let's see what happens.

Friday, March 6, 2015

Drones Today = PC's in the Late 80's


I got the drone back up and running.  It turned out that Mission Planner, the PC software that interfaces with the drone, was loading quadcopter firmware with airplane parameters.  It could be that I mistakenly changed a drop down box that selects the default parameter file, or it could be that Mission Planner did not change the parameter file when I reset the drone software from drone to airplane to drone in order to get a "clean load" of drone software (this is the recommended method for resetting your APM/Pixhawk software).

In reflecting on all the hours spent debugging the problem, and the difficulty in identifying the problem, I think the "Drone Industry" is about where PCs were in the late 80's.  It is not a perfect comparison, but it is reasonably close, check out my table below:

CharacteristicDrones TodayLate 80's PCsPCs Today
Off The Shelf Complete UnitsYes (DJI, 3DR..), but many complaints about the white label productsYes (IBM PC, Apple MAC..), but many complaints about the white label productsAlmost all PCs bought off the shelf and work 1st time
HardwareSomewhat standardized, but incompatibilities are commonStandardized, but incompatibilities are commonPlug and Play for almost all hardware
SoftwareLots of variations, nice user interface over a command line operating system, lots of variables to customize, many bugsA few variations, nice user interface (Windows) over a command line operating system (DOS), lots of variables to customize, a few bugsA few variations, nice user interface (Win or OSX), a few variables to customize with wizards to help, few bugs
Growth RateVery highVery highShrinking as people use more mobile devices
Industry ParticipantsAll small companies (DJI, 3DR, Turnigy..), no leaderIBM, Apple, and Compaq are leaders, many small players as well (Packard Bell, Nortel, ..)A small number of huge well known companies: Apple, HP, Lenovo..

Photo credit: Flickr

Thursday, March 5, 2015

New Drone is Down, Debugging Now

The new Deadcat drone no longer works.  I cannot figure out why and have spent about 6 hours trying everything.  It seems to be related to the Pixhawk flight control unit interacting with the ESC (speed controllers).  Below is a summary of the problem that I sent to 3DR, the designers and manufacturers of the Pixhawk.  I will let you know what happens.

--------------------------------------------------------------------------------------------------------------------------
I might have a bad Pixhawk autopilot.  I bought it in December and it worked fine for about a month.

Here is my config:

SK450 frame
4 x Turnigy plush 30A ESC (red power lead is disconnected - Pixhawk is connected to signal and ground only)
4 x Turnigy Multistar 2216-800kv motors
Pixhawk
3DR GPS module
3DR battery sensing module
Spektrum DX6i Transmitter
Orange R615X receiver
Various turnigy 2200mah batteries
Mission Planner on a PC for ground station

It worked like a charm before, reference this Youtube video (excuse the lousy quality).  Deadcat SK450 Test Flight 1

No crashes, I was still test flying in the basement as it is 20 degrees outside with snow.  I was upgrading it as the R615X receiver has limited range.  So I  tried a new receiver, the Orange R800X, and never really got it to work, then I went back and did the following:

- reloaded arducopter 3.2.1 by first loading the plane software, then reloading the quadcopter software, also pressed the reset button on the pixhawk
- recalibrated all my ESC s manually one by one
- did many full setups: compass, accelerometer, radio, .. calibrations
- checked a lot of the parameters and adjusted them, then set them back if there was no improvement
- verified the radio was working by connecting servos to the receiver and also by doing the manual one by one calibration of the ESCs
- verified the pixhawk was seeing the radio inputs, and was putting out the correct outputs, such as increasing throttle on all 4 output channels when the radio throttle was advanced after arming

Here are the problems that I am seeing:

1. The USB connection fails 50% or more of the time.  I have to power cycle the pixhawk and/or plug and unplug the USB cable.  I tried two different USB ports on my laptop, no difference.  This is pretty consistent for the past 5 days.  It worked fine before.
2. The ESCs continuously complain that the initial throttle input coming from the Pixhawk is not low enough.  Here is a phenomenon I saw today regularly:
  1. I calibrate the ESC by connecting it directly to the throttle output of the receiver, and go through the calibration procedure.  The ESC responds with OK tones.  
  2. I try the motor still connected to the receiver, and it revs up and down with the throttle input.
  3. I move the ESC input over to the Pixhawk, arm the Pixhawk, and then the motor responds properly after arming.  Note that I did not power down the pixhawk or receiver.
  4. I power down the quad (radio, pixhawk etc.), and start it back up.  I get normal startup tones from pixhawk and the ESCs complain that they have no throttle input (this is normal as the safety switch is off)
  5. I turn on safety switch, arm the pixhawk and get OK tone, but the ESC complains that the throttle input is not low enough again.  Motors will not function.
  6. WEIRD!
  7. I also tried calibrating one ESC through the pixhawk instead of connecting to receiver (step 1).  The ESC seems to calibrate successfully.  I execute step 3 successfully.  I get the same problem at step 4.
3. Parameters do not seem to be reliably stored in the Pixhawk.  It keeps resetting the battery failsafe settings and sometimes when I try to write a parameter change via mission planner I get an error "Bad Number", which is not very useful.
4. Now, I cannot get the Pixhawk to connect to either receiver, the previously used and flown R615X or the new R800X.  The radio calibration screen shows no activity, but the receiver is definitely connected to the transmitter as I test it with a servo or connect it to an ESC and can throttle the motor up and down.

I am stumped.  If I had my trusty Tektronix oscilloscope from EE school, I would check the signal on the pixhawk ouputs but alas, I don't have one.