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, 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.


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

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:

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.

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.

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 . This page contains this Promotion's Official Rules.

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


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.


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.


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: 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.


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.


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.


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.


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.


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.


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.


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.


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:

And in the schematic at, the upper left hand portion is this exact same circuit, with the capacitor and diode filtering the power for the camera.