Hello and welcome to our community! Is this your first visit?
Register
Results 1 to 6 of 6
  1. #1
    Administrator AeroQuad Founder Mikro's Avatar
    Join Date
    Jun 2009
    Posts
    3,238
    Downloads
    4
    Uploads
    7
    Reputation Points (Add)
    9

    Camera Stabilization

    Camera Stabilization

    Camera Stabilization History

    Original release with AeroQuad 2.1 written by CupOfTea, modified by Mikro.
    A discussion by developers of how this came about may be found here and here.


    General Information

    To include support for the Camera Stabilization, you will need a camera mount on your copter with one, two, or three servos that move the camera around the copter's roll, pitch and yaw axes. These servos are in turn plugged into the appropriate pins on the FC for power and control. Although it may be used for many things, the primary use of this stabilization is to “lock” a camera's Field of View (FOV) at a particular point in space, and while the copter attempts to maintain its position in the wind, whether in “hold” mode or free flight, the camera
    mount tilts in whatever way necessary to make up for copter's movement.

    Most camera systems that provide articulation of the FOV do so by providing “pan” (left-right) and “tilt” (up-down). With a forward-looking camera mount, this would respectively translate to the yaw and pitch axes of a copter. However, since what is typically attempted is to keep the camera still while hovering, the camera mount usually provides correction for slight changes in the pitch and roll, leaving the operator to manually compensate for yaw. This is often due to camera mounts that provide automatic yaw correction usually end up with the landing gear or
    batteries in the FOV. In some camera mounts, only pitch correction is provided. Whether you use one, two, or three axis correction is only a function of how many servos you connect to the flight computer, although some platform shields may have limited support for servos.

    This module provides direct control over r/c type servos. These servos come in two flavors, analog and digital. Analog servos rely on a series of pulses from the FC that vary from 1 to 2 milliseconds in length, with 1.5 being the midpoint. The width of the pulse is directly proportional to the position of the servo arm. These pulses are typically sent at a rate of 50 Hz for analog servos, but may be sent faster to digital ones. This implementation assumes analog servos are being used.


    Configuration

    The easiest way to activate camera stabilization is to use the AeroQuad Uploader and select the appropriate options there.

    An alternative way is to upload the code manually. In UserConfiguration.h, find the lines that have “Camera Stabilization” in them as shown:

    Code:
    // *******************************************************************************************************************************
    // Camera Stabilization
    // Servo output goes to D11(pitch), D12(roll), D13(yaw) on AeroQuad v1.8 shield
    // If using v2.0 Shield place jumper between:
    // D12 to D33 for roll, connect servo to SERVO1
    // D11 to D34 for pitch, connect servo to SERVO2
    // D13 to D35 for yaw, connect servo to SERVO3
    // Please note that you will need to have battery connected to power on servos with v2.0 shield
    // *******************************************************************************************************************************
    //#define CameraControl
    Note the comment pertaining to pin assignments for the servo signal lines. Jumpers for users of the v2.0 Mega shield can be used to support the servo connectors on that shield. (See Hardware section below.) To include support for Camera Stabilization, uncomment (remove the //) in front of the last line above so it reads:

    Code:
    #define CameraControl
    This causes the compiler to include the necessary Camera Stabilization support. Further configuration can be easily done using the Configurator. Navigate to the "Camera Stabilization" screen in the upper-right flyout where you change all camera stabilization settings.




    To tune your camera gimbal, set mode to 1, and then change the Center pitch/roll/yaw until you're happy with how level it is (remember to do this with a well calibrated craft). Next is the scaling - pick up the craft and rotate it along all axes. If one of the axes doesn't move much, increase the scale for that axis. If one axis moves too much, decrease the scale. Ideally, the camera should stay level at all craft angles - set your scaling to reflect this. It's not uncommon to have scaling above 500, so if it seems like the servo just won't budge, keep bumping the scale up! Finally, you don't want to strain your servos or hit things with the gimbal, so set the servo min/maxes. A good rule of thumb is +/- 500 from where you set the center for that axis, and then just tweak from there to get the range of motion your gimbal is capable of.


    Hardware

    AeroQuad32 board

    AeroQuad32 v2

    On the AeroQuad32 v2 board, there are already pins including power supply for camera servos provided. These can be found in the lower right corner of the board marked as "Camera". Connect the pitch servo to pin "1", the roll servo to pin "2", and the yaw servo to pin "3" - white/yellow is signal, red is 5V, black/brown is ground. Power to the servo(s) is then provided from BECs of ESC No. 2.



    AeroQuad32 v1

    On the AeroQuad32 v1 board, there are already pins for camera servos provided. You may then connect the pitch servo signal to SVR1, the roll servo signal to SVR2, and the yaw servo signal to SVR3. Power to the servo(s) needs to be provided from an external source, e.g. the BECs of the ESCs.



    By default, camera stabilization servo updates run at 50Hz, but several users have tested this at 100Hz with good results. This speed increase is not currently in the code (as of Nov. 4, 2012), but can easily be done by moving the camera stabilization function calls from the 50Hz tasks to the 100Hz tasks in AeroQuad.ino.

    AeroQuad Shield v2.1

    On the AeroQuad shield v2.1 in particular, there are already pins for camera servos provided (marked as CAMERA). You may then plug in the pitch servo connector to CAM1, the roll servo to CAM2, and the yaw servo to CAM3.



    AeroQuad Shield v2.0

    On the AeroQuad shield v2.0 in particular, there are already pins for servos provided, but to use these you must place a jumper on the shield between pins D11 and D34, D12 and D33, and D13 and D35 as labeled on the Arduino board. These pins are passed up to the shield and may be jumpered there. You may then plug in the roll servo connector to SERVO1, the pitch servo to SERVO2, and the yaw servo to SERVO3.



    Camera Mounts


    Like most R/C servos, the center of travel for each servo arm should be set up to position the camera mount to point at the center of the camera's desired FOV. Below you see some pictures of a camera mount for a GoPro HD with stabilization along the pitch and roll axis.












    Additional information



    AeroQuad Configurator

  2. #2
    New Member
    Join Date
    Apr 2012
    Posts
    1
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    0

    Question No support for 1.8/1.9?

    Great article about Camera Stabilisation Mikro, although I'm quite confused about the write-up about the pins. You mentioned that D11, D12, D13 are used for Pitch, Roll and Yaw. However, when I uncomment the Camera line the Camera Stabilisation in the configurator still says "Not enabled". I'm using v1.8 which should be supported according to the Wiki, is this a mistake or am I doing something wrong? Would like to hear from someone, bought an HD Hero 2 for it. Would be a huge let down if camera stabilisation is not supported for v1.8.

  3. #3
    Senior Pilot wooden's Avatar
    Join Date
    Dec 2011
    Location
    Pacific Northwest
    Posts
    4,869
    Blog Entries
    1
    Downloads
    1
    Uploads
    0
    Reputation Points (Add)
    27
    Camera stabilization is not supported with the atmega328 processors - not enough pins.
    push the envelope, watch it bend

  4. #4
    Senior Pilot Sniperp's Avatar
    Join Date
    May 2012
    Location
    Virginia Beach, VA
    Posts
    684
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    2
    For the baloo board instead of the ESC's could I pull off the 5v header or since I have an xbee and gps running it will draw to much.

  5. #5
    Senior Pilot wooden's Avatar
    Join Date
    Dec 2011
    Location
    Pacific Northwest
    Posts
    4,869
    Blog Entries
    1
    Downloads
    1
    Uploads
    0
    Reputation Points (Add)
    27
    Definitely will draw too much, the Baloo 5V regulator can't handle a whole lot and servos tend to use a bunch of current when they're constantly twitching.
    push the envelope, watch it bend

  6. #6
    Senior Pilot Sniperp's Avatar
    Join Date
    May 2012
    Location
    Virginia Beach, VA
    Posts
    684
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    2
    Well I had a CC BEC no being used anymore so I'm using that to power my servos, besides then Incan push 6V to them and keep the speed nice and high on the servos.


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •