MR60

Calling All Custom Multi-Copter Pilots!

I plan to do what is called a "pull" to made changes to the custom code regarding custom shaped copters.  

This change in code would only impacts irregular shaped quads, hexas, and octas when the pilot specifically opts to go custom versus the default (the standard X or +).  You have a custom quad if the:

o aspect ratio <> 1 (length is different than width).

o rotors are non symmetric around the

   - forward axis (y) going through the center of gravity (CG)

   - sideways axis (x) going through the CG

   - vertical axis (z) going through the CG

o has a front that is more open for a camera

o deviates from the pictures of a a + or X for the quad, hexa, or octa

o this includes ships described as spider, V, H, U, 88--88, C, etc.

o motor spin direction(s) are different than the pictures

o your CG is pushed somewhere else besides the centroid of the motors.

The advantages of going custom is that the motor factors will be tuned to the coordinate/spin system of your copter versus the coordinate/spin system of the regular copter.  They will fly better.  Pilots will probably not notice small deviations nor would they see significantly improved flight times.  Large deviations might be noticed and provide noticeable changes in flight duration.

Please reply with the motor number (the out-pin number on the APM), coordinates of the motor, and rotation direction of each rotor.  For example,

3691049292?profile=original

the owner of this copter would reply (motor number, x, y, CCW/CW):

o 1 (400, 200) CCW 

o 2 (-250, -200) CCW

o 3 (-400, 200), CW

o 4 (250, -200 CW

[note:  no need to tell us your units of measure just so long as you are consistent in measuring; say mm or inches]

Please note:

o The center of gravity of any quad spider or V is not necessarily where the bars cross.  The bars typically cross behind the CG.  .

o The CG is the center of the coordinates or (0,0) where x=0 and y=0

If you decide to participate by replying, the idea is that you will be able to access your custom motor factors without having to compile firmware.  No promises at this point.  First we see what's out there.  But if you do reply, it's far more likely that your design will be implemented in the library.  

If you have any questions or difficulties in doing this, let me know so I can help.

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

Join diydrones

Email me when people reply –

Replies

  • Developer

    This has been on our list of things to do for a long time now. It is just a matter of getting it to the top of the list. Unfortunately there is only so much time in the day.

  • It would be Great to have the ability to easily define custom motor setups in MP.  I have my AP copters with standard layouts but my "fun" copters all have non traditional configurations.  My Fun copters all run flight controllers that easy to program custom mixes.  It would be nice to have them all running pixhawks.

    • Forrest, I have little time for the moment,so it can take some time before i have the V octo up and fly...

      Do you have the compiling manual ready? It could be nice too see how to do it :).

      But I do not want it being trouble for you, if it is a lot of work to complete the manual...

    • MR60

      It's done and turned into 3DR.

    • I have flashed octocopter to pixhawk and then I selected V in Mandatory-frametype but only

      a image of a v quad is visible.No image showing a v octo with prop rotation and which servo ouput

      to which motor.So how can I know prop rotation/Motor vs servoutput if I select V as I have done now?

      Is the purple field(your motor) in the motor layout section of the spredsheet. you made,the servo output

      on Pixhawk?Is this the same as the V config in mission planner?

      It feels like I have to compile and look at the code to be sure I actually have a V octo frame parameters

    • MR60

      V is for any V: quad, hex, or octa.  but they are specific to a particular layout.  so if you notice coupling between roll and yaw, think about modifying the code.

      Think of Octa as one switch and V (icon is a spider quad) as another AND switch.  Those two switches are picked up in nested code.

    • Ok.But how can I know the prop rotation/motor vs servo output?When it is no

      image of it? Is it the same as Octocopter image,so I have to think of it in 2 halves?

      And Is the Purple field(your motor) in the motor layout section of the spredsheet

      you made for me,the servo output on Pixhawk?

    • MR60

      We might be using different terms. Servo output is for controlling landing gear, etc., things that don't rotate props.  On the Pixhawk and APM there are motor output pins for controlling up to eight motors.

      In 3DR documentation, you will see drawings of all of the standard types of multicopters, the motor numbering scheme for each one, and the prop rotation (color coded green or blue).

      In Custom Octa CAD (used for designing octas) Custom Quad CAD (used for designing quads) and Custom Hex CAD (used for designing Hexes), the purple cells are always input cells where you define the size of the ship, your requirements, and design limitations.

       

    • 3702926051?profile=originalCan you give any link please,Were I can find any drawing of V octo? I can't find anything about motor number and prop rotation in 3DR docs.regarding v octo.

      The only thing I have found regarding v octocopter is this http://docs.megapirateng.com/documentation/connecting_components_co... But as I understand that is a different firmware?

      And I mean motor output sorry for that.

      So Is the Purple field(your motor) in the motor layout section of the spredsheet you made for me,the motor output on Pixhawk?

      see image red ring

    • MR60

      Well that was rude, documentation is now lacking in the V pictures.

      http://copter.ardupilot.com/wiki/initial-setup/assembly-instruction...

      In the file APP_Motors.cpp you will find down a bit, this code.  Note the paragraph that talks about V-Frame.

      // setup_motors - configures the motors for a octa
      void AP_MotorsOcta::setup_motors()
      {
      // call parent
      AP_MotorsMatrix::setup_motors();

      // hard coded config for supported frames
      if( _flags.frame_orientation == AP_MOTORS_PLUS_FRAME ) {
      // plus frame set-up
      add_motor(AP_MOTORS_MOT_1, 0, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 1);
      add_motor(AP_MOTORS_MOT_2, 180, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 5);
      add_motor(AP_MOTORS_MOT_3, 45, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 2);
      add_motor(AP_MOTORS_MOT_4, 135, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 4);
      add_motor(AP_MOTORS_MOT_5, -45, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 8);
      add_motor(AP_MOTORS_MOT_6, -135, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 6);
      add_motor(AP_MOTORS_MOT_7, -90, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 7);
      add_motor(AP_MOTORS_MOT_8, 90, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 3);

      }else if( _flags.frame_orientation == AP_MOTORS_V_FRAME ) {
      // V frame set-up
      add_motor_raw(AP_MOTORS_MOT_1, 1.0, 0.34, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 7);
      add_motor_raw(AP_MOTORS_MOT_2, -1.0, -0.32, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 3);
      add_motor_raw(AP_MOTORS_MOT_3, 1.0, -0.32, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 6);
      add_motor_raw(AP_MOTORS_MOT_4, -0.5, -1.0, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 4);
      add_motor_raw(AP_MOTORS_MOT_5, 1.0, 1.0, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 8);
      add_motor_raw(AP_MOTORS_MOT_6, -1.0, 0.34, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 2);
      add_motor_raw(AP_MOTORS_MOT_7, -1.0, 1.0, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 1);
      add_motor_raw(AP_MOTORS_MOT_8, 0.5, -1.0, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 5);

      }else {
      // X frame set-up
      add_motor(AP_MOTORS_MOT_1, 22.5, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 1);
      add_motor(AP_MOTORS_MOT_2, -157.5, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 5);
      add_motor(AP_MOTORS_MOT_3, 67.5, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 2);
      add_motor(AP_MOTORS_MOT_4, 157.5, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 4);
      add_motor(AP_MOTORS_MOT_5, -22.5, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 8);
      add_motor(AP_MOTORS_MOT_6, -112.5, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 6);
      add_motor(AP_MOTORS_MOT_7, -67.5, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 7);
      add_motor(AP_MOTORS_MOT_8, 112.5, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 3);
      }
      }

      In the file APP_MotorsHexa.cpp, note the lack of a  paragraph for a V.

      if( _flags.frame_orientation == AP_MOTORS_PLUS_FRAME ) {
      // plus frame set-up
      add_motor(AP_MOTORS_MOT_1, 0, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 1);
      add_motor(AP_MOTORS_MOT_2, 180, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 4);
      add_motor(AP_MOTORS_MOT_3,-120, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 5);
      add_motor(AP_MOTORS_MOT_4, 60, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 2);
      add_motor(AP_MOTORS_MOT_5, -60, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 6);
      add_motor(AP_MOTORS_MOT_6, 120, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 3);
      }else{
      // X frame set-up
      add_motor(AP_MOTORS_MOT_1, 90, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 2);
      add_motor(AP_MOTORS_MOT_2, -90, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 5);
      add_motor(AP_MOTORS_MOT_3, -30, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 6);
      add_motor(AP_MOTORS_MOT_4, 150, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 3);
      add_motor(AP_MOTORS_MOT_5, 30, AP_MOTORS_MATRIX_YAW_FACTOR_CCW, 1);
      add_motor(AP_MOTORS_MOT_6,-150, AP_MOTORS_MATRIX_YAW_FACTOR_CW, 4);
      }
      }

      The good news is that you can add a paragraph, specifically for your frame. So you have the honor of choosing the motor numbering scheme you like!

      }else if( _flags.frame_orientation == AP_MOTORS_V_FRAME ) {
      // V frame set-up

              add_motor_raw(AP_MOTORS_MOT_1,  1.000,-0.667, -1.000, 1);
              add_motor_raw(AP_MOTORS_MOT_2, -1.000,-0.667, -1.000, 2);
              add_motor_raw(AP_MOTORS_MOT_3,  0.667, 0.000, -1.000, 3);
              add_motor_raw(AP_MOTORS_MOT_4, -0.667, 0.000,  1.000, 4);
              add_motor_raw(AP_MOTORS_MOT_5,  0.333, 0.667,  1.000, 5);
              add_motor_raw(AP_MOTORS_MOT_6, -0.333, 0.667,  1.000, 6);

      Attached is the documentation showing how do add to and compile the code and the latest Custom Hexa CAD.

      Custom Hexa CAD.xlsm

      Custom Arduino Code Wiki Draft.docx

This reply was deleted.