Camera Tracking

3689387855?profile=originalPan & Tilt with retraction running on Arduino 2560 (not APM) with some quick test code - 480i version


With Ardupilot Mega now in full swing and my brain going haywire thanks to the rubbish weather I have been taking distractions where I can (IR radar system for my computer desk, a segway for my action man, web enabled curtain opener and more).

Over a few hours I had my scribble pad out with some vernier calipers and a Cirrus CS301 servo. The result was a fairly small fully retractable camera system (at least in doodles). Wanting to create a quad from CF a friend offered his laser cutter (free of charge) but wanted a test subject to see how it cut. A few days later the doodle was CAD'd and then lasercut out of CF. I had three fit on a single sheet which leaves room for when I break it.


The entire mechanism is 120mm x 35mm x 35mm when "retracted" (these settings are yet to be finalised on plane) while when extended the assembly is  65mm below the plane. Unfortunately the camera must then be added to the bottom making it larger but as my camera (eBay keychain camera £4 each :D) is 34mm x 12mm x 55mm its quite nice.

Only thing left to do was the coding which I'd already started thinking about anyway. It uses lots of pre-existing code from within the APM sketches (so I know it works and if not I broke it). As long as the camera is on the bottom of the plane (level XY) it can be rotated in any direction (so if centered the camera will face right at 90°) and still track a GPS position. Using a few defines and a bit of math any limited movement servos can be used to track a GPS position.

As Ardupilot has been moving in this direction I undertook this myself with a hope of creating something worthy of general release later after I and the bosses had tested (why I haven't given out some details). This was saved to my drafts so it would not be published until I had finished writing the blurp explaining all of this but apparently "Save as Draft" means publish immediately. It is very flexible thanks to the variables changing servo output direction and matching center facing direction with flight bearing its limitation is just the level downwards mounting. That is my next task after testing this.

Edit: New code loaded with proof of concept spreadsheet. Here is hoping for some good weather.


E-mail me when people leave their comments –

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

Join diydrones


  • Laser cutter is a friends in a school, 100w is all I actually know.


    No idea of it built unless you call my idiot scribble a diagram.

    The pan and tilt is pretty much the same as everyone elses (meaning the code can be used with everyone elses - except pan and tilt channels may need to be switched).

    It is your retraction method that will be hard. I built mine to be a cuboid shape so I can cut the plane to shape easily. The two square-ish bits glue to the servo back and the airframe and after that its just round bits in round holes square bits in square holes.

    I'll post pictures in the initial post of it on the plane once its done.

  • Thats an amazing coincidence Ritchie, I've spent today designing almost exactly this! I want to be able to swing an FPV camera over the nose of an Easystar and back up for landing. Anyway I shall PM you!
  • Hi Ritchie,

    I think this is exactly what Im looking for but do you have a diagram of the built mount?

  • How did you manage to cut CF with a laser cutter? What laser cutter did you use?
This reply was deleted.