How to build an FPV Antenna tracker for use with Mission Planner

For anybody interested in improving the range of your FPV and the quality of the signal (and still stay FCC legal), and antenna tracking could be for you. After looking around for a 'stock' solution I decided to build one myself. Above is a photo of the final product.

I am using the 5.8Ghz band for my FPV configuration, and this keeps the antenna small and the entire package very compact and portable. There are two stock full-size servos and a servo base that I purchased from ServoCity.com.

I will not say that this solution is 'cheap', but it is very effective. I have yet to fly my plane out of range where I lose the  video so I cannot say what the exact range is, but I have not gone beyond 2 miles using a 500mw transmitter. The receiver antenna is a spiral RHCP (Right-hand-circularly polarized) antenna which has 16 turns! With this configuration the gain is 16dbi, which is excellent, but it's also very directional, and hence the need for the tracker. 

The total cost of this rig was about $280 (plus the work to assemble it).   Half the cost is the servo and the servo mounts and gears. The other half is the antenna and the Arduino. 

The link to the antenna is here (ReadyMadyRC). There are a number of other antennas that will work with this tracker as long as the footprint is not too big, but for 5.8ghz this is usually not an issue. To attach this antenna to the servo, I simply used a strip of Velcro so it can be easily removed. It is light enough that the Velcro holds it perfectly.

Here is the parts list for the servos: (ServoCity.com)

Qty  Description                             Unit                Amount
--------------------------------------------------------------------------------
1     (DDT500F) Direct Drive Tilt (Futaba)   $24.99              $24.99
       * Weight: 0.22 lbs. each

1     (SPG5485A-BM-36005U) Bottom Mount      $99.99              $99.99
         Servo Power Gearbox - 360 Degree
         Rotation
       * Weight: 0.62 lbs. each
       * Option: Servo is HS-5485HB          $24.99              $24.99
       * Option: Ratio is 5:1 Metal Gears
       * Option: Kit is Unassembled

1     (FUTM0718) (03.06.02) S3072HV Servo    $39.99              $39.99
       * Weight: 0.18 lbs. each

4     (91772A146) 6-32x3/8 inch  Pan Head    $0.17               $0.68
         Phillips Machine Screws (Stainless
         Steel)
       * Weight: 0.01 lbs. each

--------------------------------------------------------------------------------
     Total Shipment Weight: 1.23 lbs.   Subtotal:                $190.64
                                        Shipping & Handling:     $6.99
                                        Total:                   $197.63

You can choose different servos if you prefer to spend the money (or go on the cheap), if you can find them elsewhere, they are just standard size servos.  

You can also buy the kit with the servo included and pre-assembled, (additional $30 cost). Here is a link to the servo kit

If you are not good with a soldering iron, pay the extra. You will need to disassemble one of your servos, disconnect the potentiometer  wires, and re-solder them to the external one supplied in the gear box. The external feedback will allow your tracker to move 360 degrees in the azmuth. 

Also, I chose the 5:1 gear ratio, and this seems to work very well, even at full speed, there is no jerking and the tracker tracks the plane perfectly. A lower ration could make it jerky, but it may also work. 

Assembling the servo box is not too difficult but will take you about an hour (plus wiring if you buy the bare kit). I would suggest paying extra for the pre-assemble servo base as I found modifying the servo to be an 'advanced' activity, however I was able to pull it off without losing parts or damaging the servo.  All the instructions come with the kit, so I will not go into detail here on how to assemble the pan/tilt box.

The assembled serve pan/tilt will should look like this:

Part 2: The Arduino and Misson Planner communications to control the servos

Now comes the fun part. Controlling the servos. I am using a standard Arduino Uno board which you can purchase just about anywhere. Here is a sample link, Arduino Uno that cost $25. 

I also added the 'Servo Shield' to my Arduino, however I think it's possible to just wire the pins directly to the Uno without the shield, but the shield has the standard servo pins.  Here is the link to the servo shield.

To connect the servos to the Arduino, just use the standard connectors that come with the servo. No wiring necessary if you use the Servo Shield. You can pick any servo port on the Arduino, just take care to make sure the software is using the pins that you have selected to control the servos.

The ground wire on the servo (usually black or brown) should go toward the "G"  and the signal side (usually yellow) goes to the "S" label on the Servo Shield. If you do not use the shield, you will have to solder the wires or install your own plug on the Arduino.

For the servo power, I have chosen to use the power supplied by the Arduino through the USB port and for two standard size servos, this seems to work fine with a lightweight antenna. If the load becomes too big, you could trigger the on-board fuse, so in that case you may consider using an external power supply for the servos. So far, I have not had an issue with just using the power from the Arduino and the computer's USB port which will supply 500mA. 

Here is an image of the shield (use the digital servo ports shown labeled GVS):

Connected to the Arduino (and enclosed in a metal case), the assembled unit looks like this:

Part 3: Make it work with Mission Planner:

So after all this 'hardware' assembly, you will want to test it out to see if it works with mission planner. BUT you will need some software to run on the Arduino.  Here is the source code that I used:

ArduTracker.ino

Everything is done over the Arduino serial port when Mission Planner connects to the Arduino. I picked to hard-code a serial port baud rate of 57600.

There are two lines of code that determine which pins on your board will control the servos:

pan.attach(9);
tilt.attach(10);

On my board, I used pins 9 and 10 which end up being the first two servo ports on the Servo shield. 

There is one line of code that controls the pan calibration that I figured out using trial and error and some calculations to make the pan go 360 using the 5:1 gear ratio:

   interpVal = ((interpVal * 10) / 37) + 50;

   pan.write(interpVal);

   

   The inputs (interpVal) are PPM values sent by Mission Planner. The hard part is done in Mission Planner as it computes the PPM servo values from the GPS coordinates. To make it work with this setup, you will need to 'tweek' the values for your servos and the gear ratio of the pan gear box. If you duplicate the setup I have described, you should be able to load the firmware into the Arduino and simply connect the Mission Planner and it should work (in theory!). 

Load the Mission Planner and go to the "Initial Setup" tab, and select "Antenna Tracker" as shown below:

Using the default values shown here, (and your serial port), you should be able to connect and control the servos using the 'Trim' sliders. If everything is working ok, you should see the servos move to their extreme positions (pan = 360 deg), and (tilt = 90). The tilt will go from horizontal to the ground, to vertical straight up. 

If all is well, then you can try it in the field. Just plug it in, and connect, and Mission Planner does the rest.

Happy flying!

Views: 47007

Comment by Patrick Duffy on June 19, 2014 at 1:00pm

The servo kit includes everything already assembled. It's possible to build something similar home-made, but by the time you factor your time to build it, you have spent the money. 

Comment by Quint on August 25, 2014 at 10:37pm
I use a direct drive for pan movement, can you help me whit te sourcecode: interpVal = ((interpVal * 10) / 37) + 50;

What commandline should i use?
Comment by Patrick Duffy on August 26, 2014 at 11:37am

In that case, you don't need to account for the gear ratio. Since Mission Planner sends out a range of 1000 to 2000 (or whatever you set this to be, 1000 and 2000 are the default), you want 1500 to be the center for your servo.   The value that 'pan.Write' or 'tilt.Write' will be in the range 0 to N, where N is the value that makes your particular servo go to its max.  I would experiment with the value for 'N' to find out what your servo's range is by just creating a simple script that writes values to the servo port incrementally.

The value for 'interpVal' will be between 0 and 360 degrees before the calibration formula, so for example if your servo range is 0 to 100, the formula would be interpVal = (interpVal*100 / 360) + (offset).  The 'offset' is some number that will make your servo be in the middle when Mission Planner is showing the slider at 0.

Comment by Quint on August 28, 2014 at 3:31am
It's working! Thank you for the quick response! I used your code and 3dprinted the design DIY Rc EZantenna. The design is open at Thingiverse.
http://www.thingiverse.com/thing:421592
Comment by Patrick Duffy on August 28, 2014 at 10:24am

Glad to hear you got it working. I am modifying mine to use a different antenna (Ubiquity Nano M5), attached to a small tube, and on the UAV, a Rocket M5 transmitter. Using this configuration, I can send HD video (1280x720) using a Raspberry PI with an HD camera and the Telemetry over the same 5 ghz channel using a small serial-to-ethernet adapter.  This eliminates the need for a telemetry radio. For the goggles, I have a pair of FatShark HDs on order.  With this configuration, I think I can get 5km+ range. I would be interested to see your results. As soon as I get this all working, I'll be posting a video. 

Comment by Don Rann on October 4, 2014 at 9:52pm

Patrick, I have installed the software on my Arduino Uno with Servo Shield, but I need a method to bench test the unit with a couple of servos connected. Connecting the Arduino in the Initial Setup screen starts one servo clicking, but the sliders have no effect. None of the other servo ports show any activity. I have tried replaying a tlog in the Flight Data screen with the Arduino connected, but that makes no difference. I suspect that I am missing a vital piece of the puzzle. Is it possible to bench test the unit or do I have to test it with live telemetry data?  Any advice would be greatly appreciated.

Comment by Don Rann on October 6, 2014 at 8:21pm

Patrick, I worked out the answer to my own "Bench Testing" question.  The Arduino Uno program uses Servo Ports 9 and 10 on the Arduino Sensor/Servo Shield Board, not "the first two servo ports on the servo shield".  I discovered that using the Arduino Servo Example sketch "Sweep".  Having done that, it was a matter of finding a suitable tlog file to play on the MP Flight Data / Telemetry Logs screen, after setting the matching Tracker Home point in the MP Flight Planner screen. You cannot set Tracker Home in the Flight Data / Telemetry Logs screen, so you call up the matching map in the Flight Plan screen, then right click to insert the required Tracker Home, then go back to the Flight Data screen to play the test log.  My servos now react roughly as expected when playing the log.  I have not attempted any calibration.  I will leave that until I have the remainder of the required hardware from Servocity. Regards, Don.

Comment by Patrick Duffy on October 6, 2014 at 10:27pm

@Don,  glad to hear you got it working. My experience calibrating it is to start with the tracker  servo range is half-way where the azmuth slider in Mission Planner is at zero.  This will give you full range pointing north. This is the default setting, so the range will be  0 to 180 (west) to 0 to -180 (east).  If you want the range to be something else, move the slider in mission planner. For example, I fly mostly west of my area, so I move the slider 90 to the left on Mission planer, and then the full range is West = 0, 180 to -180 is due east. Let me know if you need any help.

 

Comment by Don Rann on October 6, 2014 at 11:43pm

Thanks Patrick.  It may be a few weeks.  I started my APM:Plane experience with Pixhawk, 5.8ghz video and MinimOSD.  Needless to say, the video quality is a bit variable.  My telemetry radios are due this week, so antenna tracking is the next logical step.

Comment by Don Rann on October 19, 2014 at 11:26pm

Patrick, My 3DR Telemetry Radios and ServoCity parts arrived quicker than expected.  The build worked as per your advice above.  I did adjust the Arduino parameters for lastTilt and lastPan to 100 and 95 to eliminate servo cable tangles on initial Arduino power-up.  I also changed the multiplier in the Tilt interpVal formula from 90 to 95 to make my tilt response non-linear.  I wasn't getting as much upward tilt as I wanted.  The non-linear calculation seems to have fixed that.  I have attached a pic of my tracker. Thanks for your post. Regards, Don

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service