Saturday, August 3, 2013

Beware of Prop Hub Cracks

Tip: Be sure to remove your props and inspect them carefully for cracks from time to time; especially after a crash, or even a seemingly minor prop strike. The DJI Phantom prop below doesn't appear to have suffered significant damage aside from superficial scratches (it hit a lightning rod at high speed, and the copter recovered attitude and continued flying without much of a hiccup):

Figure 1: This yellowish line on the DJI Phantom prop hub is finer than a hair and nearly invisible.

But notice the faint yellowish line on the prop hub, even finer than a hair. It doesn't look like anything to worry about, but apply some slight tension, and it becomes clear that it's actually a crack that runs 90% of the way across the hub:

Figure 2: Applying slight tension to the prop hub reveals that the fine line is actually a severe crack.

This crack will expand over time, until it reaches all the way across the prop hub. At that point the entire prop will likely break in two during some high throttle maneuver, and the quadcopter will fall out of the sky, perhaps to be severely damaged or destroyed on impact.

So I advise to remove your props regularly, and check carefully for hairline cracks, especially in the hub area. And after a crash or prop strike, check the props before flying again, and replace any that have even small hairline cracks.

Friday, July 19, 2013

New SplineNav Version 0.2 on a 63 km/h Tour of Chinese Lotus Pond


I've now finished coding up SplineNav version 0.2. It's almost a complete rewrite from version 0.1. Besides flying smoother and using processor resources more efficiently, it now restricts maximum speed to prevent lag. For example, if you're flying fast into a strong headwind, then altitude may get low due to insufficient downward thrust, and position may also start lagging target, resulting in corner cutting. SplineNav now tracks this, and continuously and smoothly adjusts target speed to allow the copter to keep up without major altitude loss. So it's now completely safe to crank up the speed settings and fly SplineNav really fast.

 

SplineNav Waypoints

I collected the waypoints for this video while flying FPV, and flipping the channel 8 switch at each point I wanted to record. Then I loaded the waypoints into Mission Planner, and made some small adjustments (Figure 1). I also checked them by flying SplineNav at low speed first, and watching via FPV how close it got to the trees.

Figure 1: Waypoints recorded during FPV flight and adjusted in Mission Planner


After the low speed check I felt comfortable to fly it at max speed, although it was still very nerve racking, because it was zipping by a few meters from those weeping willow trees at about 60 km/h. I'm not sure I could have reacted in time to prevent my copter going to the bottom of the pond had a GPS error caused it to brush the willow branches and careen out of control!

 

Flight Log Track

After the flight, I loaded the log data into Google Earth and exported a KML file to overlay on the map, using Mission Planner's handy KML Overlay feature (Figure 2).

Figure 2: Purple track is GPS recorded track during SplineNav flight


As you can see, the GPS track indicates it hit all the waypoints very precisely, expect it slightly missed waypoint 8, which I attribute to the copter having just flown right next to a large building which could have caused GPS signal reflections.

The waypoints had a range of altitudes set, for a more interesting flight. Here is the flight profile from the data logs, imported into Google Earth:

Altitude profile generated in Google Earth from flight log data

Hardware Used

Airframe: ArduPhantom (DJI Phantom case, stock motors, ESC, and battery)
Autopilot: 3DR APM 2.5
Gimbal: Hummer 2-axis brushless gimbal for DJI Phantom and GoPro 3
Camera: GoPro Hero 3 Silver
GPS: 3DR ublox LEA-6H
Telemetry: 3DR 433 MHz
R/C: FlySky TH9X(ER9X FW) + 2.4GHz FrSky DJT module + V8R7-II rx
FPV: ImmersionRC 5.8GHz 600mA + FatShark Predator goggles

 

Software

This test was done using the excellent new ArduCopter 3.0.1 release code, that I then modified to include and call the SplineNav code.

The latest SplineNav code, already integrated into my own branch of ArduCopter 3.0.1, is available here: https://github.com/mavbot/SplineNav

 

SplineNav 0.2 Firmware Installation

Warning: Only install SplineNav if your copter is already working well with ArduCopter Version 3.0.1, and if you're experienced enough to test fly it safely.

1. Download the code with this link: https://github.com/mavbot/SplineNav/archive/SplineNav-0.2.zip and extract the zip file.

2. In the special Ardupilot version of Arduino, go to File -> Preferences and set your sketch directory to the path of the "SplineNav-SplineNav-0.2" directory from the extracted zip archive.

3. Restart Arduino, and choose File -> Sketchbook -> ArduCopter from the menu.

4. From the ArduPilot menu, make sure your HAL Board is set correctly.

5. Connect your copter's APM via USB, and from the Tools menu make sure the serial port is set correctly.

6. Click the Upload arrow button and wait for the code to compile and upload to your APM.

7. Set your waypoints (either with Mission planner or with the channel 7 or 8 switch), then go fly!

Note: Since there is not yet any SPLINENAV mode in Mission Planner, SplineNav for now just commandeers CIRCLE mode. So switch to CIRCLE mode on your transmitter when you're ready to fly your waypoints with SplineNav.

 

Parameters

Here are the speed and acceleration parameters I used for this video (set in Mission Planner):

WPNAV_SPEED: 2000 cm/s
My copter can't fly 2000 cm/s, but SplineNav correctly kept the speed adjusted to what my copter can actually handle, and according to the GPS data it reached a maximum velocity of 1760 cm/s (63 km/hour).

WPNAV_SPEED_UP: 350 cm/s
WPNAV_SPEED_DN: 450 cm/s
WPNAV_LOIT_SPEED: 2500 cm/s
WPNAV_ACCEL: 500 cm/s/s

Also, the following parameters are #defines in the splinenav.h source code, but hopefully they will eventually become configurable parameters:

SPLINE_TENSION: 1.4
Higher tension splines curve more tightly at waypoints, but straighter in between waypoints. A tension value of 2 makes it a Catmull-Rom spline. I found that slightly lower tensions tend to give nice loose curves for smooth aerial video.

SPLINE_JERK: 500.0 cm/s/s/s
Jerk is the maximum rate that SplineNav increases or decreases acceleration as it flies the curve.

SPLINE_LOOP: true
This makes SplineNav loop the waypoints forever until you exit out into another mode.


Friday, July 12, 2013

Review: Hummer Brushless Gimbal for DJI Phantom and GoPro Hero 3

Figure 1: Hummer brushless gimbal, straight out of the box before any modifications

The Hummer Brushless Gimbal is a 2-axis direct-drive brushless motor camera gimbal designed specifically for use with the DJI Phantom quadcopter and the GoPro Hero 3. It comes with everything you need, fully assembled and configured, right out of the box. No configuration, assembly, soldering, or balancing is required, making it a true plug-and-play system. However, in my testing I found a couple modifications that can be done to make it better.

Specifications:


Material: 2mm carbon fiber plate
Weight: 146 grams (includes cables)
Firmware: Alexmos 1.3B1 (preinstalled)
Power: 3S LiPo (JST connector preinstalled)
Current: 0.3 to 0.4 Amps
Tilt Range: 180 degrees
Roll Range: 60 degrees

Installation and Connection

The top plate of the Hummer gimbal assembly has two holes that precisely match the positions of the mount holes under the DJI Phantom. Two screws are included to secure the top plate to these mount holes. The rest of the gimbal assembly is suspended from this top plate via O-rings. Each O-ring has a chunk of yellow foam inserted to provide vibration damping and stabilization. The foam itself is worthless because it's too soft and easily compressible, but I rectified this by replacing it with small squares of 1/2-inch thick DuBro foam. 

Figure 2: The Hummer gimbal comes with these useful connector cables pre-soldered to the main board
Fortunately the Hummer gimbal comes with connector cables pre-soldered, instead of providing header pins to connect them yourself. There is so little extra space under the DJI Phantom body that having header pins sticking up out of the control board would be inadvisable due to space constraints.

These cables include white signal wires to adjust pitch and roll. Configure your transmitter to apply greater or less than 1500 PWM to move roll and pitch, and exactly 1500 PWM to lock in the adjusted roll or pitch setting. I only connected the pitch control wires, since I have no need for roll to be anything other than level with the horizon.

Also very convenient is that the Gimbal includes a built-in video-out/power cable for your GoPro Hero 3. The end with the servo connector plugs into most video transmitters' video out, GND, and +5V pins (if your video tx doesn't supply a +5V out sufficient to power a GoPro, or you want to power your GoPro from its own battery, then you can leave this red wire disconnected). See Figure 2.


Figure 3: Nuts added to either side of bearing to prevent it from slipping out

Note that the bearing opposite the tilt motor is not well installed, and tends to pop out of the hole in the carbon fiber plate that seats it. I resolved this by simply adding a nut on either side of the bearing to keep it in place (fortunately the shaft came already threaded for this purpose). See Figure 3.

Testing the Hummer Brushless Gimbal


Figure 4 below shows the Hummer brushless gimbal and GoPro 3 installed on the DJI Phantom. The GoPro fits into the gimbal by friction alone, so it's very easy to remove when you want to--no need to muck with unreliable velcro straps.

It's also very easy to remove the mount when you don't want to use it. Just unhook the O-rings from the mount and leave the top plate and O-rings attached to the copter, or remove the two screws holding the top plate on as well, if you wish.

In my tests I found the Hummer to be an excellent gimbal, perfectly suited for the Phantom and GoPro 3. The only major issues I had were the low-quality foam that came supplied with it, and the problem of the bearing popping out, both of which were easy fixes.

Figure 4: Hummer brushless gimbal installed on DJI Phantom airframe
My first use of the Hummer Gimbal was on my ArduPhantom, testing my SplineNav code:


But for a more extreme test in high winds, I made this video, flying the ArduPhantom in 25 km/h winds with very bouncy turbulence down among the treetops. Watch how the trees flail around, especially near the end of the video as the oncoming typhoon gains strength. The aircraft was bouncing around severely, but the Hummer gimbal reduced the movement significantly, although not completely, considering it can only stabilize pitch and roll, not yaw or linear motions:

Wednesday, June 19, 2013

PZ0420 600TVL Color Board Cams - only 19 left in stock

Only 19 left in stock of our second batch of PZ0420 600TVL Color Board Cams, the most popular FPV camera from SecurityCamera2000.com with a DIY filter kit included so you can run your camera and video transmitter off your 3S LiPo without needing a separate battery.

Includes diode to reduce voltage from 3S LiPo to the range required by the camera, and 105°C 303 µF capacitor and ferrite ring to make a filter to remove the interference lines from your motors and ESCs. Connect your V+ to the camera thru the diode to drop the voltage, and put the capacitor accross V+ and GND (the stripe on the cap and diode is the negative side). Wrap the V+ and GND power lines to your camera and transmitter through the ferrite coil at least 5 times. Check them out in our shop or click the pics to go to amazon.com's product page:

PZ0420 600TVL SONY SUPER HAD CCD D-WDR Color Board Camera with OSD Menu DNR

Saturday, June 15, 2013

Coding: Flying 3D Spline Curves between Waypoints with ArduCopter 3.0

Figure 1: Mission Planner waypoints and telemetry track after 3 spline circuits
I wanted my ArduCopter to fly smooth continuous curves between waypoints for some nicer aerial video, so I coded up this SplineNav class. Each spline segment is a cubic polynomial curve defined in 3D space, with 1st and 2nd derivatives continuous wherever two segments meet at a waypoint. This gives a nice smooth transition between curve segments during flight (Figure 1). It also saves time and battery, since abrupt speed and direction changes are avoided.
Figure 2: Autopilot logged track after 3 spline circuits
The SplineNav class, like CIRCLE mode, calls the loiter controller, which is what allows it to precisely control position along the curve using GPS and inertial navigation (thanks to the brand new ArduCopter 3.0 firmware). Unlike CIRCLE mode, in SplineNav the autopilot takes full control of setting altitude as well, so it can fly complex 3D curves. However, it also references your WPNAV_SPEED, WPNAV_SPEED_DN, and WPNAV_SPEED_UP parameter settings to avoid flying too fast, or climbing or descending too quickly.

For this video I wanted a slightly more wild ride, so I increased my WPNAV_SPEED_DN to 250 cm/s, and WPNAV_SPEED_UP to 350 cm/s. I left WPNAV_SPEED at 500 cm/s for now, but will try increasing it later. Figure 2 shows the 3D track in Google Earth. If you reduce these UP/DN speed parameters you will get the same 3D track for these waypoints, but at the steep up and down locations SplineNav will reduce its travel speed along the 3D curve.

Video

I shot this SplineNav demonstration video with my ArduPhantom. The GoPro is mounted on a Hummer 2-axis brushless gimbal designed for DJI Phantom.


Source Code

Here's the source code for developers and brave testers to test and suggest fixes and improvements. There's a .PDE file and an .H file, both of which go in your ArduCopter 3.0 sketch folder:

SplineNav.h
SplineNav.pde

Follow the directions in the SplineNav Readme to make the ArduCopter 3.0 code call SplineNav. Then compile with the special ArduPilot version of the Arduino IDE, and upload to your copter. Set your waypoints with Mission Planner, or with the channel 7 switch, and go test out SplineNav.

Warnings

Make sure your loiter is rock solid before you test, because SplineNav relies on the loiter controller. Also, the first time you test a new set of waypoints, you should probably keep WPNAV_SPEED low, perhaps just 200 cm/s or so. That way you'll have enough time to take over control in case the spline curve intersects any solid objects!