PPMsum channels 9~11 > Direct passthrough to A0~A2?

Post Reply
Sven
Posts: 32
Joined: Mon Feb 27, 2012 10:11 am

PPMsum channels 9~11 > Direct passthrough to A0~A2?

Post by Sven »

As my multicopter has a few fancy features, I would like to have my multiwii board distribute all functions,
since my receiver does not have enough analog ports to handle all of it, plus it would look sloppy.
So thats why I want to use PPMsum to get everything in, then distribute 3 channels out again through the servo ports.
More specifically; I want channels 9 through 11 to get passed through to servo pins A0 through A2.

What ive done sofar is find the mixer table in Output.cpp and added the last 3 lines:

Code: Select all

  #elif defined( Y6 )
    motor[0] = PIDMIX(+0,+4/3,+1); //REAR
    motor[1] = PIDMIX(-1,-2/3,-1); //RIGHT
    motor[2] = PIDMIX(+1,-2/3,-1); //LEFT
    motor[3] = PIDMIX(+0,+4/3,-1); //UNDER_REAR
    motor[4] = PIDMIX(-1,-2/3,+1); //UNDER_RIGHT
    motor[5] = PIDMIX(+1,-2/3,+1); //UNDER_LEFT
    servo[0] = rcData[9]; //Passes channel 9 through to A0
    servo[1] = rcData[10]; //Passes channel 10 through to A1
    servo[2] = rcData[11]; //Passes channel 11 through to A2


And I assume they would only work if activated, so I appended my coptertype in def.h:

Code: Select all

#if defined(BI) || defined(TRI) || defined(FIXEDWING) || defined(HELICOPTER) || defined(SINGLECOPTER)|| defined(DUALCOPTER)|| defined(Y6)
  #define COPTER_WITH_SERVO
#endif


Should this work as expected, or did I miss something important? :mrgreen:

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: PPMsum channels 9~11 > Direct passthrough to A0~A2?

Post by PatrikE »

You need to add servos to the model in def.h to.

Code: Select all

#elif defined(Y6) || defined(HEX6) || defined(HEX6X) || defined(HEX6H)
  #define NUMBER_MOTOR     6

  #define PRI_SERVO_FROM   1 // use servo from 1 to 2
  #define PRI_SERVO_TO     3

Otherwise it should be ok.

Sven
Posts: 32
Joined: Mon Feb 27, 2012 10:11 am

Re: PPMsum channels 9~11 > Direct passthrough to A0~A2?

Post by Sven »

Aha, excellent!
Are the servo[x] numbers also correct in my mixing table?
I keep seeing other tables using numbers for them that do not start at 0.

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: PPMsum channels 9~11 > Direct passthrough to A0~A2?

Post by PatrikE »

Your Mixtable looks correct..

Sven
Posts: 32
Joined: Mon Feb 27, 2012 10:11 am

Re: PPMsum channels 9~11 > Direct passthrough to A0~A2?

Post by Sven »

Im at the stage of testing this code now, but it appears nothing happens. :(
The RCdata of channels 9 and up do not seem to get passed through to the servo ports.

Does anyone have a clue as to why not?

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: PPMsum channels 9~11 > Direct passthrough to A0~A2?

Post by Plüschi »

What receiver do you have?

The receivers i know do pass 8 channels over PPM-SUM, not more. With 8 channels you have a 20ms rate, with 16 channels you would need 40ms rate. I dont know any receiver doing that. Speksat may pass up to 12 channels, but spek sucks due to frequent dropouts. Go with futabe / frsky SBUS and 16 channels is no problem AND its very reliable.

Sven
Posts: 32
Joined: Mon Feb 27, 2012 10:11 am

Re: PPMsum channels 9~11 > Direct passthrough to A0~A2?

Post by Sven »

I'm running an assan X8 module.
Assan sells 10 channel receivers, so Id be surprised if thats not what is coming out of PPM-SUM as well.
The receiver running in PPMSUM mode only has 6 analog outputs, but mwconfig shows 8 channels all operating properly.
Is there any way of seeing whats going on with channels beyond AUX4?

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: PPMsum channels 9~11 > Direct passthrough to A0~A2?

Post by Plüschi »

This
http://www.goodluckbuy.com/24m-8ch-usb- ... utput.html

Or this:
http://www.goodluckbuy.com/2-8-arm-pock ... scope.html

Or this:
http://www.goodluckbuy.com/pc-based-usb ... s205a.html

The first one is perfectly suited for your problem.
Image
You will see your assan has .... 8 channels :)

Sven
Posts: 32
Joined: Mon Feb 27, 2012 10:11 am

Re: PPMsum channels 9~11 > Direct passthrough to A0~A2?

Post by Sven »

First thing is only 8 channels and only analog, too, so that wouldn't tell me much I think.

The two oscilloscopes, they are neat, but spending 75 bucks on finding this out is a bit silly. ;)

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: PPMsum channels 9~11 > Direct passthrough to A0~A2?

Post by Plüschi »

First thing is only digital, 8 channels parallel and quite fast. Looking at ppm-sum is an easy job with that.
Installing may not be so easy ... those are clones. Took me 1/2 day to configure my cheapo board.

Sven
Posts: 32
Joined: Mon Feb 27, 2012 10:11 am

Re: PPMsum channels 9~11 > Direct passthrough to A0~A2?

Post by Sven »

I guess I dont understand what that first thing is then.
Its not just something you plug all your receiver channels into,
which then get displayed on your PC through the USB connection?
It doesn't appear to say anything about PPM-SUM input.

It doesnt really matter anyway, multiwii should be able to deal with it,
its just a matter of making it visual, like the AUX channels.

Someone mentioned writing rcValue[x] to debug[x] so you can actually see whats going on in multiwiiconfig,
but he didn't seem to know exactly how that should be done, so im still stuck. :(

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: PPMsum channels 9~11 > Direct passthrough to A0~A2?

Post by Plüschi »

Sven wrote:It doesnt really matter anyway, multiwii should be able to deal with it


You wont go very far.

Sven
Posts: 32
Joined: Mon Feb 27, 2012 10:11 am

Re: PPMsum channels 9~11 > Direct passthrough to A0~A2?

Post by Sven »

Why not?

It should be possible to cast rcValue[x] values to debug[x] output, so they show up in the multiwiiconf GUI.

Code: Select all

debug[0] = rcValue[8]; // 8 = channel 9,
debug[1] = rcValue[9];
debug[2] = rcValue[10];
debug[3] = rcValue[11];


Its just a matter of finding out where to put the code so it gets called frequently,
but nobody seems to want to help with that part. :(

Post Reply