Pan & 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.
Comment by James F. on February 2, 2011 at 2:04pm
Comment by DaveyWaveyBunsenBurner on February 2, 2011 at 3:19pm
Comment by DaveyWaveyBunsenBurner on February 2, 2011 at 4:17pm
Comment by Ritchie on February 2, 2011 at 4:35pm Laser cutter is a friends in a school, 100w is all I actually know.
@DaveyWaveyBunsenBurner
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.
Comment by Jay Land on February 2, 2011 at 4:56pm Great project.... have you thought about having the GCS send commands to the mount in flight? Also what about using the mount and aircraft position data to caculate the location of an object you are viewing and being able to pass that data to the autopilot to "track to" or orbit over.
I am still in the baby steps for programming but would love to help if I can.
Good luck.
Comment by Ritchie on February 2, 2011 at 6:33pm @Randy :D
@Jay Land GCS commands is probably out of my league but Jason, Doug et al could probably knock it up in a few minutes being the genuises (is that right plural :D) that they are. The distance calculation is converting the location data into metres or feet which I have no idea how to do but the data is all the easily enough.
Thanks to some forward planning servos can be reversed and scaled. While the data used conforms to standard APM style and so has all the information similar ones have (all locations have lat, lon and alt etc). Thinking about Happy's awesome work I made sure to use separate variables where I could so uploading only needs to go to one place to change the focus (GPS_mark - imaginative name huh). Also the retraction happens automatically below 20m above home location.
Comment by Jay Land on February 3, 2011 at 12:38am
Comment by Ritchie on February 3, 2011 at 3:52am Ritchie,
I am just starting to sip my first cup of coffee of the morning, but.... Your code does not appear to account for the roll, pitch or yaw (heading) of the airframe. Without compensation for roll and pitch it cannot do a very good job of tracking a target. Without compensation for yaw of the airframe it is useless. Perhaps you are doing something with PITCH_CENTER that is not shown above?. You should take a look at the work Pete Hollands did for the UAVDevBoard and the work Joe Holdsworth is doing for APM.
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.1283 members
24 members
180 members
4 members
5 members
© 2013 Created by Chris Anderson.
Powered by

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