Motor mapping

Can anyone help me learn how to map the motor out puts on this apm 2.6 board....while in flight out put 3 failed for some reason and down came the copter. Done some testing and found the pin is dead so I want to remap motor 3 to a diff out put...anyone help me. Please

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

Join diydrones

Email me when people reply –


  • Solved.

    Solution is here. In lower part. Glad to say, that current PX4+IO controller files and performing very well.

    PX4FMU + PX4IO + ArduCopter firmware + some VERY useful tricks.
    Technical dairy about computers and flying toasters.
  • AFAIG we have our VQuad mixers in this file.

    In particular this place:

    }else if( _flags.frame_orientation == AP_MOTORS_V_FRAME ) {

    // V frame set-up

    add_motor(AP_MOTORS_MOT_1, 45, 0.7981f, 1);

    add_motor(AP_MOTORS_MOT_2, -135, 1.0000f, 3);

    add_motor(AP_MOTORS_MOT_3, -45, -0.7981f, 4);

    add_motor(AP_MOTORS_MOT_4, 135, -1.0000f, 2);

    as we see here:

    // add_motor using just position and yaw_factor (or prop direction)

    void add_motor(int8_t motor_num, float angle_degrees, float yaw_factor, uint8_t testing_order);

    most obvious would be changing last function parameter, 3,4 to say 4,5 (which would move both live channels one pin further , for convenience of numeration, leaving 3-d channel alone).

    At this part I'm getting pretty tangled, because AP_MOTORS_MOT_4 seems pretty redundant for channel number to me.

    HELP! :)

    ArduPlane, ArduCopter, ArduRover source. Contribute to ArduPilot/ardupilot development by creating an account on GitHub.
  • According to this guy's logic right here, all I have to do is to change output channel in code, but it's too weary to compile everything from scratch each time.

  • Good point, same situation here.

    I was testing brand new copter frame when it slightly (intended) hit the wall. Power surge (unfortunately ESC had no OPTO isolation) seems have damaged third channel (coincidence?). Channel 3 is "no go" anymore.

    I'm asking if developers could pinpoint how to remap channel 3 output to, say, channel 5.

    I have a clue that it has to do something with editing mixer files (.mix) and putting these files on SD in some specific location. It would be nice to know where to take initial file and where to put it so system will load it instead of one built in.

    My system is PX4FMU + PX4IO, and there is a skim of getting PX4FLOW airborne too.

    p.s. additional question. Which magic should I use to direct PWM to PX4FMU outputs while having PX4IO attached?

    • As soon as there is no elegant solution so far, I've decided to use standalone FMU with IO board as power source only. For that I will retain only 1-4 pins of Expansion Bus.

      There is no direct connection between PPM pin on "Multi" port and PPM pin on expansion board, so in my case I have to stick with JST Multi port which sucks because I have to use JST plugs which I'm kinda short of.

      So far we have such picture:

      3702636431?profile=originalI guess I'll have to put OSD on telemetry (UART1) port.

      Having no current sensor is rather frustrating.

      • On top of all I have ground on 1st pin of MULTI port (should be VDD_5V).

        That's a bad thing that APM got dropped out of support. This board solved everything in couple of hours instead of having headache for days.

    • Important thing. Channel failed on PX4IO module.

This reply was deleted.


DIY Robocars via Twitter
RT @chr1sa: Just a week to go before our next @DIYRobocars race at @circuitlaunch, complete with famous Brazilian BBQ. It's free, fun for k…
DIY Robocars via Twitter
How to use the new @donkey_car graphical UI to edit driving data for better training
Nov 28
DIY Robocars via Twitter
RT @SmallpixelCar: Wrote a program to find the light positions at @circuitlaunch. Here is the hypothesis of the light locations updating ba…
Nov 26
DIY Robocars via Twitter
RT @SmallpixelCar: Broke my @HokuyoUsa Lidar today. Luckily the non-cone localization, based on @a1k0n LightSLAM idea, works. It will help…
Nov 25
DIY Robocars via Twitter
@gclue_akira CC @NVIDIAEmbedded
Nov 23
DIY Robocars via Twitter
RT @luxonis: OAK-D PoE Autonomous Vehicle (Courtesy of zonyl in our Discord:
Nov 23
DIY Robocars via Twitter
RT @f1tenth: It is getting dark and rainy on the F1TENTH racetrack in the @LGSVLSimulator. Testing out the new flood lights for the racetra…
Nov 23
DIY Robocars via Twitter
RT @JoeSpeeds: Live Now! Alex of @IndyAChallenge winning @TU_Muenchen team talking about their racing strategy and open source @OpenRobotic…
Nov 20
DIY Robocars via Twitter
RT @DAVGtech: Live NOW! Alexander Wischnewski of Indy Autonomous Challenge winning TUM team talking racing @diyrobocars @Heavy02011 @Ottawa…
Nov 20
DIY Robocars via Twitter
Incredible training performance with Donkeycar
Nov 9
DIY Robocars via Twitter
RT @JoeSpeeds: Sat Nov 6 Virtual DonkeyCar (and other cars, too) Race. So bring any car? @diyrobocars @IndyAChallenge…
Oct 31
DIY Robocars via Twitter
RT @JoeSpeeds: @chr1sa awesomely scary to see in person as our $1M robot almost clipped the walls as it spun at 140mph. But it was also awe…
Oct 29
DIY Robocars via Twitter
RT @chr1sa: Hey, @a1k0n's amazing "localize by the ceiling lights" @diyrobocars made @hackaday! It's consistently been the fastest in our…
Oct 25
DIY Robocars via Twitter
RT @IMS: It’s only fitting that @BostonDynamics Spot is waving the green flag for today’s @IndyAChallenge! Watch LIVE 👉…
Oct 23
DIY Robocars via Twitter
RT @IndyAChallenge: Congratulations to @TU_Muenchen the winners of the historic @IndyAChallenge and $1M. The first autonomous racecar comp…
Oct 23
DIY Robocars via Twitter
RT @JoeSpeeds: 🏎@TU_Muenchen #ROS 2 @EclipseCyclone #DDS #Zenoh 137mph. Saturday 10am EDT @IndyAChallenge @Twitch
Oct 23