Wednesday, October 30, 2013

New SplineNav 0.3: Smoother Yaw, and Manual Yaw Override


After a few months of hard work, SplineNav 0.3 is now ready to fly! This SplineNav release started with the goal of simply reducing the yaw jitter issues of SplineNav 0.2, but in the end it turned into a major rewrite of the code.

New Features:


  • Smoother Yaw: Updates x and y spline derivative calculations faster, in a separate loop, for a more precise yaw control. Uses a fast approximation of the atan2 function to compute the yaw angle from the spline derivative.
  • Features yaw rate smoothing for much smoother video, avoiding the small yaw "jerk" at each waypoint.
  • Allows manual override of yaw control, then takes back auto control of yaw if the pilot centers the stick when yaw is directed approximately in the direction of the spline curve.
  • Now enters SplineNav mode smoothly, without an initial jerk.
  • Uses it's own flight mode, so unlike SplineNav 0.2 it doesn't override your Circle mode. To use SplineNav 0.3, set one of your FLTMODE parameters to 14 in the Full Parameter List.

SplineNav Waypoints


We collected the waypoints for this video while flying FPV, and flipping the channel 8 switch at each point to record. Then we loaded the waypoints into Mission Planner, and made some small adjustments:

Waypoints recorded during FPV flight and adjusted in Mission Planner

The GPS track indicates it hit all the waypoints quite precisely, on each lap for a total of 3 laps (72 waypoints in total):

GPS track from dataflash log shows SplineNav hitting each waypoint precisely over 3 complete laps
The waypoints had a range of altitudes set, from 7 to 35 meters. Here is the flight profile from the autopilot logs, imported into Google Earth:

GPS flight profile from dataflash logs after 3 complete laps

Hardware Used:


Airframe: 3D Robotics Quad, with some modifications.
Autopilot: 3DR APM 2.6, with external compass/GPS module
Motors: T-Motor MT2216 KV800
Props: APC 11x4.7
Gimbal: WIND-1 two-axis brushless
Camera: GoPro Hero 3 Silver
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 + SecurityCamera2000 CMQ1993X
Also: These mods for longer range FPV.

SplineNav 0.3 Firmware Installation:

  1. First make sure your quad copter is flying well with ArduCopter version 3.0.1, since SplineNav 0.3 is based on this firmware version.
  2. Go to https://github.com/mavbot/SplineNav, and click the "Download ZIP" link.
  3. In the special Ardupilot version of Arduino, go to File -> Preferences and set your sketch directory to the path of the "SplineNav-SplineNav-0.3" directory from the extracted zip archive.
  4. Restart Arduino, then choose File -> Sketchbook -> ArduCopter from the menu.
  5. From the ArduPilot menu, make sure your HAL Board is set correctly.
  6. Connect your copter's APM via USB, and from Arduino's Tools menu make sure the serial port is set correctly.
  7. Click the Upload arrow button and wait for the code to compile and upload to your APM.
  8. Set one of your FLTMODE parameters to 14 in Mission Planner's Full Parameter List, Set your waypoints (either with Mission Planner or with the channel 7 or 8 switch), then go fly!
Note: If you have any special requirements, such as a frame or orientation other than quad X, remember to make those adjustments in the code before compiling. Or if you'd rather not compile yourself, please contact us to get a hex file you can upload directly via Mission Planner.

Parameters:


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

WPNAV_SPEED: 1350 cm/s
This should make SplineNav go about 49 km/h on straight segments.

WPNAV_SPEED_UP: 1000 cm/s

WPNAV_SPEED_DN: 650 cm/s

WPNAV_LOIT_SPEED: 1500 cm/s
Should be set higher than WPNAV_SPEED.

WPNAV_ACCEL: 180 cm/s/s
Nice low value for a smooth steady start.

Also, the following parameters are #defines in the splinenav.h source code, and can be changed at compile time:

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

SPLINE_CURVE_ACCEL_MULTIPLE: 2.0
This allows for twice the max curve acceleration as set in the WPNAV_ACCEL parameter. Added this parameter to allow for smooth slow starts without making tight curves overly sluggish.

SPLINE_JERK: 200.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, October 25, 2013

Facebook Page Promotion 'WIN a FREE Circular Wireless HELIAXIAL58 Helical Antenna with a $85 Retail Value'

Starting October 26, 2013 and ending November 2, 2013 (23:59 PST), MavBot is running a Facebook Page Promotion 'WIN a FREE Circular Wireless HELIAXIAL58 Helical Antenna with a $85 Retail Value' at http://bit.ly/16bc45q . This page contains this Promotion's Official Rules.



'WIN a FREE Circular Wireless HELIAXIAL58 Helical Antenna with a $85 Retail Value' Sweepstakes - OFFICIAL RULES

NOTE

This promotion is in no way sponsored, endorsed or administered by, or associated with, Facebook. Participants are providing information to MavBot and not to Facebook. The information provided will only be used for administering and communicating with participants about MavBot and the MavBot promotion they are participating in.

SWEEPSTAKES DESCRIPTION

Mavbot is giving away a FREE Circular Wireless HELIAXIAL58 Helical Antenna with a $85 Retail Value: 12dBi, 5645-5945MHz, right hand circular polarization, SMA female connector straight, plus three additional SMA adapters to connect the antenna in any position. Use the Entry Form below for a chance to win.

SWEEPSTAKES PERIOD

The Sweepstakes entry period begins at 20:30 p.m. PST on October 25, 2013 and ends at 11:59 p.m. PST on November 2, 2013 (the "Sweepstakes Period"). Winners will be randomly selected within 24 hours, from entries properly submitted and timely received during the Sweepstakes Period.

PRIZE DETAILS

Prize: Circular Wireless HELIAXIAL58 Helical Antenna with a $85 Retail Value.

Prize will be delivered free of charge to the participant's street address as submitted at registration for the Sweepstakes. Prize will not be replaced if lost or stolen, is not transferable and is not redeemable for cash. All taxes and other charges are responsibility of the winner. No substitutions are allowed. Prize is valid for redemption up till three (3) months after prize is drawn. If prize is not initially redeemed during this period then the prize shall be voided. All expenses not specifically mentioned herein are not included as part of any Prize package, and are solely the winner's responsibility.

ELIGIBILITY

MavBot (Sponsor) Facebook Page Sweepstakes (the Sweepstakes) is open only to legal residents of the fifty (50) United States and the District of Columbia over the age of 18 with access to the Internet at all times during the Sweepstakes and subsequent prize-award period. All employees of MavBot, Lizara Freezone N.V. or its subsidiaries, all associated agencies and each of their respective affiliates, sales representatives, distributors, licensees or agents (all of the foregoing, together with Sponsor, collectively referred to as Sweepstakes Entities), and their immediate family members (spouse, parent, child, sibling and their respective spouses) and those living in the same household of each (whether related or not), are ineligible to participate in the Sweepstakes. All applicable federal, state and local laws and regulations apply. Void where prohibited or restricted by law. Entry in the Sweepstakes constitutes full and unconditional acceptance of these Official Rules. No purchase is necessary to participate in the Sweepstakes and a purchase will not improve the chances of winning.

SWEEPSTAKES ENTRY INSTRUCTIONS

During the Sweepstakes Period, participant may submit an entry form online using the sweepstakes entry form located on MavBot's Facebook Sweepstakes tab. Limit one (1) online entry per email address.

PUBLICITY

As a condition of entry into the Sweepstakes, except where prohibited by law, each entrant, and each winner by accepting a prize, grants to Sponsor and its affiliates, legal representatives, assigns and licensees, all right, title and interest in to publicize, broadcast, display and/or otherwise use the Sweepstakes entrants name, city, state, and biographical material (collectively, Licensed Rights) in any media now or hereafter known throughout the world in perpetuity for advertising and publicity purposes, without additional review, compensation, permission or approval of the winner. Where necessary, the winner will be required to execute and return an Affidavit of Eligibility/Liability and Publicity Release within five (5) business days of attempted notification or the winner may be disqualified and an alternate winner selected.

SELECTION OF SWEEPSTAKES WINNERS/ODDS

The potential Prize winners will be selected in a random drawing. Winners will be selected from entries received during the Sweepstakes Period who have not yet won a prize. Odds of winning will depend on the number of eligible entries received during the Sweepstakes Period prior to each drawing. The potential winner will be notified via email to the email address submitted with the potential winners entry within three (3) days after the drawing. The drawing will be conducted by Sponsor, the judge of the Sweepstakes, whose decisions on all matters relating to the Sweepstakes shall be final and binding. In the event that a potential winner is disqualified for any reason, Sponsor may, in its sole discretion, award the applicable prize to an alternate winner selected at random. Any return of prize notification or prize email as undeliverable will result in forfeiture of any prize and an alternate winner may, at Sponsor's discretion, be randomly selected.

GENERAL RULES

By entering or participating in the Sweepstakes, participants agree to be bound by these Official Rules, and by the decisions of Sponsor, which are final and binding in all respects. Sweepstakes Entities are not responsible for: (1) any incorrect or inaccurate information or technical failures of any kind, (2) unauthorized human intervention in any part of the entry process or the Sweepstakes; or (3) any other computer, network, technical, human or other error, problem or malfunction that may occur in connection with the administration of the Sweepstakes, the processing of entries, or the selection or notification of winners. Further, if, for any reason, the Sweepstakes is not capable of running as planned for reasons outside the control of the Sponsor which, in the sole opinion of Sponsor, may corrupt or affect the administration, security, fairness, integrity or proper conduct of the Sweepstakes (or portion thereof), Sponsor reserves the right, at its sole discretion, to cancel, terminate, modify or suspend the Sweepstakes (or portion thereof). Sponsor also reserves the right at its sole discretion to disqualify the Entry of any individual found to be (a) tampering or attempting to tamper with the entry process or the operation of the Sweepstakes or any website operated by the Sweepstakes Entities; (b) using any robotic, macro, automatic, programmed or like entry methods, which will void all such entries; (c) violating these Official Rules or the terms of service, conditions of use, and/or general rules of any Sponsor property or service; or (d) acting in an unsportsmanlike or disruptive manner, or with intent to annoy, abuse, threaten, or harass any other person. Sweepstakes Entities are not responsible for claims, injuries, losses or damages of any kind resulting, in whole or in part, directly or indirectly, from the awarding, delivery, acceptance, use, misuse, possession, loss or misdirection of the prize; participation in this Sweepstakes or in any activity or travel related thereto or from any interaction with, or downloading of, computer Sweepstakes information.

PARTICIPANT OBLIGATIONS

Participants in the Sweepstakes agree to be bound by these Official Rules and the decisions of Sponsor. By accepting the prize, the winner agrees to release and hold MavBot, Lizara Freezone N.V. or its subsidiaries, all associated agencies and each of their respective affiliates, harmless from and against any and all losses, damages, rights, claims, actions and liabilities of any kind in connection with the Sweepstakes or receipt or redemption of the prize. The winner assumes all liability for any injury, death, or damage caused, or allegedly caused, by participating in the Sweepstakes or use or redemption of the prize.

RULES/WINNERS LIST REQUESTS

To obtain a copy of these Official Rules or for a list of the winners, send a self-addressed stamped envelope to Sponsor. Requests for winners' lists must be received within three months after the end of the Sweepstakes Period.

SPONSOR

MavBot / Lizara Freezone N.V., Frankrijkstraat 13, Oranjestad, Aruba.

Monday, October 7, 2013

FPV Camera Wiring and Power Filtering

Here's a cable we made for our SecurityCamera2000 CMQ1993X FPV Camera (also works with the PZ0420). This cable powers the camera from a 3S LiPo battery, filters the power with a capacitor, diode, and ferrite choke, and sends signal and power to your OSD or Video Tx.

Make sure to get the wiring connections right: capacitors and diodes are polar devices. Also, they are heat sensitive, so make your solder joints quickly, before the devices have time to get super hot. Cover all solder joints and exposed wires with heat shrink to avoid a short that could shut down your whole aircraft and make it fall out of the sky, or even start a battery fire! Note also that power thru the diode in this circuit is only powering the camera; the diode should not be powering anything else besides the camera, as it may overheat and burn out.

1. Batt power (red) to positive (no white stripe) side of diode.
2. Negative (white stripe) side of diode to Positive (no white stripe) side of capacitor.
2. Negative (white stripe) side of capacitor to Batt GND.
3. Camera power (red) to Positive side of capacitor.
4. Camera GND (black) to Negative side of capacitor.
5. Camera signal (yellow) to OSD or Video Tx.
6. GND (black) from Negative side of capacitor to OSD or Video Tx GND reference (important: this wire runs straight to the OSD or Video Tx; don't use a ground reference coming via some other indirect connection that will result in a corrupted video image).

The resulting circuit is the same as the power filter for the camera in the project described here: http://www.rcmodelreviews.com/fpvbackpack02.shtml

And in the schematic at http://www.rcmodelreviews.com/filestore/Schematic.pdf, the upper left hand portion is this exact same circuit, with the capacitor and diode filtering the power for the camera.

Sunday, September 29, 2013

Longer Range FPV for Cheap

I've been experimenting with ways to improve FPV range inexpensively, and here's what I've come up with:

1. I replaced the 5.8 GHz clover leaf antenna on my FatShark goggles with a helical antenna (and learned to use my own head as an antenna tracker).

2. I boosted my 2.4 GHz radio control signal with a 2-Watt WiFi booster.

The Antenna


I used this 7-turn Right Hand Circular Polarized (RHCP) helical antenna from BEVRC. It's cheap (only about $16) and has a 10 dB gain. I found this works better than using a patch antenna because interference from reflected signal is less of a problem. Make sure the direction of polarization matches that of the cloverleaf antenna on your aircraft.
Cheap 5.8 GHz RHCP 7-turn helical antenna from BEVRC
This antenna gives excellent range as long as I point it directly at the aircraft and it has line-of-sight. Reception through trees is still quite poor. It takes some practice to get used to pointing your head at the aircraft while flying FPV, but soon it becomes second nature.

WiFi Signal Booster


This cheap 2-Watt WiFi signal booster works with any 2.4 GHz radio, just connect it between tx module and antenna with the included coax cable.

Cheap 2-Watt WiFi Signal Booster

The WiFi signal booster came with a wall adapter for power. I cut the output cord off the wall adapter and soldered it to the outputs of a SkyRC 10-Amp BEC, which in turn is powered from the 3S transmitter LiPo. I installed the signal booster and BEC to the back of my FlySky TH9X radio using zip ties:

WiFi signal booster and BEC installed on TH9X radio


Range Test


In order to test the FPV range, I took a flight up in the mountains. The quadcopter got 2.3 km away and 600 meters up from the launch point before its battery was half exhausted and I had to turn it back. But the video and RC control were still great at that distance, so I was unable to determine the absolute range of this setup. Enjoy the video recovered from the GoPro:




Other Hardware Used


Airframe: ArduPhantom (DJI Phantom case, stock ESC, props, and battery)
Motors: T-Motor MN2214 upgrade for DJI Phantom
Autopilot: 3DR APM 2.5 with ArduCopter 3.0.1 firmware
Gimbal: Hummer 2-axis brushless gimbal for DJI Phantom
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 tx + CL antenna, FatShark Predator goggles
Ground station: Mavbot Finder

Saturday, September 28, 2013

WIN a T-MOTOR 9*3 Carbon Fiber Prop Set for DJI Phantom

Starting September 28, 2013 and ending October 5, 2013 (23:59 PST), MavBot is running a Facebook Page Promotion 'Win a T-MOTOR 9*3 Carbon Fiber Prop Set for DJI Phantom' at http://bit.ly/1fS1BQn . This page contains this Promotion's Official Rules.


'Win a T-MOTOR 9*3 Carbon Fiber Prop Set for DJI Phantom' Sweepstakes - OFFICIAL RULES

NOTE

This promotion is in no way sponsored, endorsed or administered by, or associated with, Facebook. Participants are providing information to MavBot and not to Facebook. The information provided will only be used for administering and communicating with participants about MavBot and the MavBot promotion they are participating in.

SWEEPSTAKES DESCRIPTION

T-MOTOR will soon introduce a set of four 9*3 antiGravity! Carbon Fiber Props for DJI Phantom. Have a go at being the first to fly a set of these revolutionary, all-white props with a retail value of $89.90, by entering MavBot's Sweepstakes today!

SWEEPSTAKES PERIOD

The Sweepstakes entry period begins at 00:01 a.m. PST on September 28, 2013 and ends at 11:59 p.m. PST on October 5, 2013 (the "Sweepstakes Period"). Winners will be randomly selected within 24 hours, from entries properly submitted and timely received during the Sweepstakes Period.

PRIZE DETAILS

Prize: One T-MOTOR set of four, all white, 9*3 antiGravity! Carbon Fiber Props for DJI Phantom with a retail value of $89.90.

Prize will be delivered free of charge to the participant's street address as submitted at registration for the Sweepstakes. Prize will not be replaced if lost or stolen, is not transferable and is not redeemable for cash. All taxes and other charges are responsibility of the winner. No substitutions are allowed. Prize is valid for redemption up till three (3) months after prize is drawn. If prize is not initially redeemed during this period then the prize shall be voided. All expenses not specifically mentioned herein are not included as part of any Prize package, and are solely the winner's responsibility.

ELIGIBILITY

MavBot (Sponsor) Facebook Page Sweepstakes (the Sweepstakes) is open only to legal residents of the fifty (50) United States and the District of Columbia over the age of 18 with access to the Internet at all times during the Sweepstakes and subsequent prize-award period. All employees of MavBot, Lizara Freezone N.V. or its subsidiaries, all associated agencies and each of their respective affiliates, sales representatives, distributors, licensees or agents (all of the foregoing, together with Sponsor, collectively referred to as Sweepstakes Entities), and their immediate family members (spouse, parent, child, sibling and their respective spouses) and those living in the same household of each (whether related or not), are ineligible to participate in the Sweepstakes. All applicable federal, state and local laws and regulations apply. Void where prohibited or restricted by law. Entry in the Sweepstakes constitutes full and unconditional acceptance of these Official Rules. No purchase is necessary to participate in the Sweepstakes and a purchase will not improve the chances of winning.

SWEEPSTAKES ENTRY INSTRUCTIONS

During the Sweepstakes Period, participant may submit an entry form online using the sweepstakes entry form located on MavBot's Facebook Sweepstakes tab. Limit one (1) online entry per email address.

PUBLICITY

As a condition of entry into the Sweepstakes, except where prohibited by law, each entrant, and each winner by accepting a prize, grants to Sponsor and its affiliates, legal representatives, assigns and licensees, all right, title and interest in to publicize, broadcast, display and/or otherwise use the Sweepstakes entrants name, city, state, and biographical material (collectively, Licensed Rights) in any media now or hereafter known throughout the world in perpetuity for advertising and publicity purposes, without additional review, compensation, permission or approval of the winner. Where necessary, the winner will be required to execute and return an Affidavit of Eligibility/Liability and Publicity Release within five (5) business days of attempted notification or the winner may be disqualified and an alternate winner selected.

SELECTION OF SWEEPSTAKES WINNERS/ODDS

The potential Prize winners will be selected in a random drawing. Winners will be selected from entries received during the Sweepstakes Period who have not yet won a prize. Odds of winning will depend on the number of eligible entries received during the Sweepstakes Period prior to each drawing. The potential winner will be notified via email to the email address submitted with the potential winners entry within three (3) days after the drawing. The drawing will be conducted by Sponsor, the judge of the Sweepstakes, whose decisions on all matters relating to the Sweepstakes shall be final and binding. In the event that a potential winner is disqualified for any reason, Sponsor may, in its sole discretion, award the applicable prize to an alternate winner selected at random. Any return of prize notification or prize email as undeliverable will result in forfeiture of any prize and an alternate winner may, at Sponsor's discretion, be randomly selected.

GENERAL RULES

By entering or participating in the Sweepstakes, participants agree to be bound by these Official Rules, and by the decisions of Sponsor, which are final and binding in all respects. Sweepstakes Entities are not responsible for: (1) any incorrect or inaccurate information or technical failures of any kind, (2) unauthorized human intervention in any part of the entry process or the Sweepstakes; or (3) any other computer, network, technical, human or other error, problem or malfunction that may occur in connection with the administration of the Sweepstakes, the processing of entries, or the selection or notification of winners. Further, if, for any reason, the Sweepstakes is not capable of running as planned for reasons outside the control of the Sponsor which, in the sole opinion of Sponsor, may corrupt or affect the administration, security, fairness, integrity or proper conduct of the Sweepstakes (or portion thereof), Sponsor reserves the right, at its sole discretion, to cancel, terminate, modify or suspend the Sweepstakes (or portion thereof). Sponsor also reserves the right at its sole discretion to disqualify the Entry of any individual found to be (a) tampering or attempting to tamper with the entry process or the operation of the Sweepstakes or any website operated by the Sweepstakes Entities; (b) using any robotic, macro, automatic, programmed or like entry methods, which will void all such entries; (c) violating these Official Rules or the terms of service, conditions of use, and/or general rules of any Sponsor property or service; or (d) acting in an unsportsmanlike or disruptive manner, or with intent to annoy, abuse, threaten, or harass any other person. Sweepstakes Entities are not responsible for claims, injuries, losses or damages of any kind resulting, in whole or in part, directly or indirectly, from the awarding, delivery, acceptance, use, misuse, possession, loss or misdirection of the prize; participation in this Sweepstakes or in any activity or travel related thereto or from any interaction with, or downloading of, computer Sweepstakes information.

PARTICIPANT OBLIGATIONS

Participants in the Sweepstakes agree to be bound by these Official Rules and the decisions of Sponsor. By accepting the prize, the winner agrees to release and hold MavBot, Lizara Freezone N.V. or its subsidiaries, all associated agencies and each of their respective affiliates, harmless from and against any and all losses, damages, rights, claims, actions and liabilities of any kind in connection with the Sweepstakes or receipt or redemption of the prize. The winner assumes all liability for any injury, death, or damage caused, or allegedly caused, by participating in the Sweepstakes or use or redemption of the prize.

RULES/WINNERS LIST REQUESTS

To obtain a copy of these Official Rules or for a list of the winners, send a self-addressed stamped envelope to Sponsor. Requests for winners' lists must be received within three months after the end of the Sweepstakes Period.

SPONSOR

MavBot / Lizara Freezone N.V., Frankrijkstraat 13, Oranjestad, Aruba.

Friday, September 13, 2013

FPV Crash into Obstacle on RTL



This was the first time I've crashed while flying FPV. Crashes are usually caused by a series of mistakes, and this crash was no exception:

Mistake #1: Some of the hills around the flying area rose to at least 100 meters above the launch point, but I had the Return to Launch (RTL) minimum altitude set to only 50 meters above launch altitude. Note: I later realized that setting the RTL alt even higher wouldn't have helped anyway, because the current ArduCopter code foolishly limits RTL height to 80 meters).

Mistake #2: I flew behind the hill at such a low altitude that the forest cover on one of the hill's ridges came between me and the vehicle, thus scrambling my video signal (the 5.8GHz video is so high frequency that even vegetation can scramble the signal quite easily; whereas my RC control on 2.4GHz remained solid through the entire ordeal).

Mistake #3: Upon losing the video I did not back up or gain some altitude, but instead just kept going forward for a couple seconds, hoping video would come back. This just made the problem worse.

Mistake #4: When the video signal didn't come back, I switched into autopilot-controlled RTL mode, without gaining some altitude first. Thus the autopilot, already well above the set RTL minimum altitude, simply initiated a high speed beeline back towards the launch point...

RTL Code Change:

To help prevent this kind of accident happening again, I made a change to my local ArduCopter code to make it so that RTL always climbs first before heading back to launch, no matter what altitude that RTL is invoked at (although my code does provide for an absolute altitude limit if the Fence feature is turned on).

I've been using the code for a few weeks, and found that it makes FPV flying much safer, without having to set an inconveniently high RTL altitude; especially in high mountainous terrain or around tall trees. I submitted the code as the RTL Always Climb pull request to ArduCopter.

Hardware:

Airframe: ArduPhantom (DJI Phantom case, stock ESC, props, and battery)
Motors: T-Motor MN2214 upgrade for DJI Phantom
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 + 2W WiFi booster, V8R7-II rx
FPV: ImmersionRC 5.8GHz 600mA tx + CL antenna, FatShark Predator goggles + 11db patch antenna
Ground station: Mavbot Finder (first time actually used to find lost aircraft!)




Tuesday, August 20, 2013

In Stock: Two new T-Motor high-performance brushless electric motors for multi-rotor aircraft

These two new T-Motor high-performance brushless electric motors for multi-rotor aircraft are currently in stock in limited amounts. Available in our shop or click the product photos to go to amazon.com's product pages:

T-Motor MT2216 900KV Version 2.0 high-performance brushless electric motor for multi-rotor aircraft


Tiger Motors T-Motor MT2216 900KV is a high-performance brushless motor specifically designed for use on multi-rotor aircraft such as quadcopters and hexacopters. The all-new Version 2.0 of this motor now features EZO® Bearings from world renowned Japanese bearing manufacturer Sapporo Precision, Inc. Built with precision workmanship, T-motors are smooth running and well balanced right out of the box. This cuts down on vibrations that can negatively affect aerial video and autopilot inertial sensors. This MT2216 900KV motor is recommended for use with 3 to 4S LiPo and 10x3.8 to 11x4.7 props. See photo library above for detailed spec sheet and dimensional CAD drawing. T-Motors are backed by a two-year manufacturer's warranty on materials and workmanship.

T-Motor MT2212 980KV high-performance brushless electric motor for multi-rotor aircraft


Tiger Motors T-Motor MT2212 980KV is a high-performance brushless motor specifically designed for use on multi-rotor aircraft such as quadcopters and hexacopters. Featuring Japanese-made bearings and precision workmanship, T-motors are smooth running and well balanced right out of the box. This cuts down on vibrations that can negatively affect aerial video and autopilot inertial sensors. This MT2212 980KV motor is recommended for use with 3 to 4S LiPo and 8x3.8 to 10x4.7 props. See photo library above for detailed spec sheet and dimensional CAD drawing. T-Motors are backed by a two-year manufacturer's warranty on materials and workmanship

Tuesday, August 13, 2013

SecurityCamera2000 CMQ1993X SONY Super HAD CCD 600TVL D-WDR DNR Board Camera For FPV

Only 8 of these most popular FPV cameras from SecurityCamera2000.com, now with IR filter, are available in our shop, or by clicking the photo to amazon.com's product page:




The most popular FPV camera from SecurityCamera2000.com, now with IR filter. This is a 600TVL FPV board camera with Nextchip 2040 DSP, Samsung and Panasonic resistance components, and a Tantalum capacitor. It is installed with dual 850nm IR filters which block IR light, providing true-to-life image colors. This camera is very suitable for FPV. Mavbot has also added the DIY filter kit so you can run your camera and video transmitter off your 3S LiPo without needing a separate battery. Kit contains a diode to reduce voltage from 3S LiPo to the range required by the camera, and a 105°C 330µF capacitor and ferrite ring you can use to make a filter to remove the interference lines from your motors and ESCs. Solder your V+ to the camera thru the diode to drop the voltage, and solder 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 your video transmitter through the ferrite coil at least 5 times.

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!

Tuesday, April 9, 2013

Build Log: "ArduPhantom" APM ArduCopter in a DJI Phantom Airframe

The DJI Phantom has some nice air frame features: A sturdy plastic injection molded polycarbonate enclosure that keeps out light rain and resists hard impacts very well; Nice motors with simple, easy to use prop-mounts that are very unlikely to come loose in flight or get bent or broken in a crash; and very light-weight ESCs that have super bright LEDs on them for easy visual orientation at great distance, and superb night flying (Figure 1).
Figure 1: DJI Phantom Night Flying


I also wanted a very small, lightweight, and extremely rugged FPV platform that I could carry in my backpack when I go hiking. The DJI Phantom air frame seems perfect for this, as the propellers are extremely easy and fast to remove, and once removed the rest of the aircraft can be stuffed in my backpack as is, and is sturdy enough to not worry about it being damaged during the trip.

But, since I'm a fan of ArduPilot, and like to be able to perform complex auto missions and make modifications to the code, I decided to build a DJI Phantom air frame with an APM flight controller. The result was very successful, and I encourage you to do the same, following the instructions below.

Materials

For this build, you will need the following parts. Fortunately, the DJI replacement parts needed can all be purchased quite cheaply. My budget for this entire project was about $600.

1x DJI Phantom replacement case kit
1x DJI Phantom replacement screw kit
1x DJI Phantom connectors kit
2x DJI Phantom ESCs (green)
2x DJI Phantom ESCs (red)
4x DJI Phantom motors
2x DJI Phantom props (set of 1 CCW and 1 CW)
1x DJI Phantom landing gear
1x APM 2.5
1x 3DR Power Module
1x 3DR GPS module

Power System Wiring

First you'll need to mount the ESCs and motors in the case, and wire up the ESCs to the output side of the power module. When mounting the ESCs, be sure the green ones are at the front end of the aircraft (the battery door end), and the red ESCs in back. If you put the red ESCs in front instead, then the signal leads won't reach, because they are of different lengths.

There is not much space inside the case for a lot of wiring and connectors, so I just cut off the XT60 connector from the output side of the APM power module, and soldered the connection directly, insulating with heat shrink of course. If you plan to use an internal battery, make sure the wiring doesn't cross over the central area where the battery goes, because it will snag on the battery when you take it in or out, and it's already a fairly tight fit for the battery as is.

Also, be sure to keep all the wiring as low in the bottom of the case as possible, so the magnetic fields from high-current wires will not interfere with the autopilot's magnetometer (Figure 2).
Figure 2: Power Module and Power System Wiring

Mounting APM, GPS, and RC Receiver

At first I velcro mounted the autopilot, GPS, and receiver to a thin wood plate which I screwed on to the four screw bosses protruding from the case bottom. This held it high enough above the power wiring below to avoid magnetic interference. However, I found that this piece of wood was basically a sounding board for vibration. Even adding foam between it and the autopilot wasn't enough to reduce the vibration to a reasonable level to get good accelerometer readings (Figure 3).
Figure 3: How NOT to mount your APM


Later I found that a soft plastic cottage cheese lid made of Low-Density Polyethylene (LDPE) is a great way to mount the APM, since the soft flexible material helps to dampen vibrations (Figure 4).
Figure 4: APM mounted on LDPE food lid greatly reduces vibration

Once you get the case on you won't want to remove those 16 screws every time you need to upload the latest version of ArduCopter, or download a flight log. So you should probably make a short USB cable that permanently connects to the APM, as shown connected in figures 3 and 4 above.

LED Connection

You won't be able to see the status of the armed and GPS lock LEDs once the APM is enclosed in the case, so you'll want to connect a couple external LEDs that you can view through the tail light port on the Phantom case. Connect one LED to A4 and one to A6 (you can also connect a buzzer to A5 if you want). Signal goes to the + side of the LED, and ground to the - side. Remember to include resistors in series with each LED to drop the voltage to the proper level for the LEDs you are using (Figure 5).
Figure 5: Armed and GPS fix LEDs visible through tailight port
 You'll also need to go into Mission Planner and change the LED_MODE to 11 (the default is 9 for some reason).

Final Assembly

You can now put the top of the case on (attached with the twelve M2.5x5 and four M2.0x8 screws from your screw pack). Once you calibrate and configure everything in Mission Planner then you should be ready to bolt on the props and go fly (Figure 6).
  
Figure 6: Ready to Fly

Flight Testing

I added a GoPro, a 5.8 GHz video transmitter, and a 3DR telemetry module for some FPV flying during a Sunday hike in the mountains. Here's the results of the first test:


It flies very nicely, even in auto modes. The main issue is shakiness and vibration of the recorded video. Hopefully I can reduce that with some tuning, better camera mounting, and perhaps stiffer props.