Developer

figuring out the Antenna Tracker

3691139590?profile=originalNot many people know but we have an piece of open source software for controlling an Antenna Tracker.  It's been built by Tridge (Arduplane lead developer) for use in the outback challenge.

Sadly we have no documentation and, as far as I know, nobody except Tridge has used it.  Still given Tridge's track record on building great software I suspect it works well and if it doesn't, I'm sure we can fix it.  So to not let this piece of code go to waste, I'd like some help from people who are interested to give it a try and help me figure out how it works.

Here's the little that I know:

  • It runs on any of our supported board (APM1, APM2, PX4, Pixhawk, Flymaple and perhaps VRBrain)
  • For APM1/APM2 users building the code is as easy as opening our hacked ArduinoIDE and selecting File > SketchBook > Tools > AntennaTracker and then building in the normal way.  For PX4/Pixhawk, our autobuilder doesn't automatically build a binary but I can provide one if people are interested.
  • It can control a Pan and Tilt gimbal like this or this found on servocity.com.
  • It may or may not require a GPS
  • It must somehow receive vehicle position updates from the ground station which has the telemetry radio that is connected to the vehicle. Maybe through a USB cable.  Tridge probably uses the python ground station, MAVProxy, to passthrough the vehicle position data to the AT but perhaps we can get MichaelO to build out a similar feature in Mission Planner.
  • I imagine this antenna tracker could also be used to keep a camera focused on the vehicle which might be good for easing the burden on creating videos of our vehicles.

So if you want to give it a try please do and stick any findings, questions or issues below. Alternatively Issues can go into the issues list.

I'll start sticking things into the wiki as they become clear.

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

    • Palo,

      This firmware is very experimental and I have never tried running AT on APM1.4. The very fact that it actually does something is comforting. Although it may be a firmware issue I would start with the basics. At first read through the comments that are inside the code:

      // Need to configure your servo so that increasing servo_out causes increase in pitch/elevation (ie pointing higher into the sky,

      // above the horizon. On my antenna tracker this requires the pitch/elevation servo to be reversed
      // param set RC2_REV -1
      //
      // The pitch servo (RC channel 2) is configured for servo_out of -9000-0-9000 servo_out,
      // which will drive the servo from RC2_MIN to RC2_MAX usec pulse width.
      // Therefore, you must set RC2_MIN and RC2_MAX so that your servo drives the antenna altitude between -90 to 90 exactly
      // To drive my HS-645MG servos through their full 180 degrees of rotational range, I have to set:
      // param set RC2_MAX 2540
      // param set RC2_MIN 640
      //
      // You will also need to tune the pitch PID to suit your antenna and servos. I use:
      // PITCH2SRV_P 0.100000
      // PITCH2SRV_I 0.020000
      // PITCH2SRV_D 0.000000
      // PITCH2SRV_IMAX 4000.000000

      I have never used classic servos in AT but I would start with simple steps:

      1. Find the correct direction and MIN/MAX values for your pitch servo - to do that you should connect an RC Reveiver or a servo tester to APM's input ports (just like you would with plane or copter firmware). When you have it up and running (you should see some values in MP - rc1_in, rc2_in etc.). You should disconnect YAW servo, since it will behave erratically during pitch setup. When you are sure that your RC transmitter (or servo tester) is working fine you can change mode to "MANUAL". You can do it via MP. In MANUAL mode APM will simply copy input PWM to servo outputs and you will be able to control your PITCH manually. If it works (you can move PITCH manually via transmitter or servo tester) you can now begin calibration.

      Step 1: Move your stick (or servo tester) to middle position. Ideally it would be 1500us PWM (you can verify it in MP). If your PITCH axis is not horizontal (0 degrees) you should move it mechanically (adjust the servo itself) to make it as close to 0 degrees as possible. If you are unable to move it to exact position (but close) adjust your transmitter or servo tester. If your PITCH is horizontal look into MP rc2_in and write down the value (it should be close to 1500).

      Step 2: Move your transmitter stick all the way until PITCH points exactly up (90 degrees up). If it doesn't reach +90 degrees you may need to increase RC2_MIN and RC2_MAX, as well as increase the limits in your transmitter. You have RC2_MIN set to 1100 and RC2_MAX set to 1900 and it may be not enough - for calibration purposes you may set it to RC2_MIN=500 and RC2_MAX=2500. When you reach +90 degrees (pointing straight up) write down the PWM value that you see on rc2_in.

      Step 3: Do the same as in step 2 but facing -90 degrees (straight down).

      Step 4: Go into your parameters. Enter the value you wrote down in step 1 into "RC2_TRIM". Now compare values from step 2 and step 3. Which one is bigger?

      If value from step 2 is bigger than value from step 3, than you should set RC2_REV to 1. This would mean, that high PWM values result in PITCH facing up and low PWM values result in PITCH facing down. In such case you should enter value from step 2 into RC2_MAX and value from step 3 into RC2_MIN.

      If value from step 2 is smaller than value from step 3 you should set RC2_REV to -1, value from step 2 into RC2_MIN and value from step 3 into RC2_MAX.

      After this your PITCH should be calibrated properly. When you go into Advanced configuration and move the sliders PITCH should go from -70 do +70 without any problems. You may need to tune your PID settings - comment in the code mentioned above suggests some PID settings - these should be a good starting point.

      2. Switch back to MANUAL mode, connect RC Receiver or servo tester to rc1_in and connect YAW servo. You should be able to operate YAW servo with the stick - The more you "deflect" the stick from center position the faster it should rotate. There is a possibility, that your yaw servo is not working as it is supposed to.

      If your YAW servo is working fine in manual mode go back into servo_test mode (move the sliders in MP). If your YAW servo starts to move erratically change RC1_REV from -1 to 1. You can also change PIDs to something like this:

      YAW2SRV_D = 0
      YAW2SRV_I = 1
      YAW2SRV_IMAX = 4000
      YAW2SRV_P,1.5

      The easiest way to debug YAW is to use sliders in MP - value from slider is translated into angle from -180 to +180 so it should rotate the tracker accordingly.

      Try the above steps and report back.

      • Jakub, thanks for exhausting description, I really appreciate it and I hope it could be good guideline for everyone interested in antenna tracker setup.

        Anyway I have one problem with pitch servo - it is digital HS 5975HB. It has range only -45° +45°. You wrote that in middle/neutral position that is 1500ms antenna should point horizontally - that means 0° from level. But in that case I cann't achieve vertical position 90° :-(.  Is there a way how to set it up that in center position (1500ms) antenna will point 45° up ? Because actually I need range only 0°-90° where 0° (cca 1100ms pulse width) means antenna is leveled and 90° (cca 1900ms pulse width) antenna points upright.

        This servo is indeed programmable and the range could be increased to 180° but as it is obsolete product I cann't find any specifications for it.

        • It would of course be easier if you could reprogramm the servo.

          You can try setting TRIM value to PWM that gives you 0 degrees, MAX to 90 degrees and MIN to 0 degrees. I'm not sure this works but you can try

  • I tested my AT yesterday and the pitch was perfect but the yaw was off by 30 degrees. My AT using a hawk (like Randy's setup) and the v0.7 firmware. Is the yaw determined by GPS coordinates or compass or both? Since I see no parameter for adjusting the yaw offset, would a re-calibration of the compass affect the yaw offset? Thanks.

    • Hi, Grey I remember you had pitch problem after you upgrade from v0.5 to v0.7, Now I have same problem as yours tilt 45 degree no move, now you solve your pitch problem can you let me know how to solve this pitch problem? 

      • 45 degrees in pitch sounds like my custom firmware. This problem is visible only in some cases and I don't have a solution yet (the same firmware works fine in my tracker). Did you download firmware via MP or from my posts somewhere on this forum?

        • I download v0.71 via MP

          • Dick, I don't remember ever having a pitch issue. My original yaw issue was due to the servo reverse function being incorrect. I discovered it by pointing my AT 180 degrees away from the MRC. Now that you mention it, I probably still have v0.5 firmware in my AT. I remember seeing the changes Randy committed and thinking that that didn't affect any of my issues. I will upload the latest from MP and retest this weekend. I forgot to add the AT to my latest video on Triple Autonomous Flight using APM below. The AT was tracking the POI drone as one of two video downlinks.

            Triple Autonomous Flight 2 from Gregory Covey on Vimeo.

            This second test of our triple autonomous flight was at the CHIEFS field in Canandaigua, NY where the AMA District II Event will be held on August 15th & 16th. I modified the grid pattern to last 6 minutes and we had our video down links working which use 3-axis brushless gimbals and STorM32 controllers. The entire three flights were automated from take-off to landing.

            There was a 15mph wind from the West but the hexacopters had no issue. If the drone was pushed a bit, the APM: Copter v3.2.1 firmware would correct itself and continue the grid. After the 6-minute demo flight, all three MRCs returned to their home position and landed.

            • Very nice video though. One of the best demos of APM I have seen.

            • Greg,

              very impressive video. The only "unprofessional" stage of your flights is using RC transmitter for takeoff. This can be easily done without touching the transmitter - the procedure is simple:

              1. Turn on transmitter, set stabilize mode and move throttle just a tiny bit above minimum (1 or 2 marks)

              2. Via MP click "ARM" and when it gets armed change mode to AUTO.

              You always have an option of manual override (just cycle your RC Transmitter from stabilize to any different mode and back). You can also leave the transmitter in AUTO at the beginning, then from MP switch to stabilize, arm, switch back to auto. In case of emergency you would just need to switch back to stabilize to take over. You cannot arm in AUTO. The copter will not begin takeoff if the throttle is at minimum, thus the needed adjustment.

              Other than that very nice demonstration.

This reply was deleted.

Activity