Page 1 of 1

MultiWii UltraPWM

Posted: Sat Mar 10, 2012 7:34 pm
by JFSebastian
Has anyone tried MultiWii with UltraPWM as used by Xaircraft?

I plan to mount a MiniWii controller in my old X650 airframe, perhaps then it will handle like a real quad should.

XA UltraPWM ranges from 200ms to 1200ms, how do I change this in the code?

Thanks in advance


Sebastian.

Re: MultiWii UltraPWM

Posted: Tue Mar 13, 2012 11:56 am
by Alexinparis
assuming you have a quad:
in the file Output.pde,
in the section PROMINI, you have
OCR1A = motor[0]>>3; // pin 9
OCR1B = motor[1]>>3; // pin 10
OCR2A = motor[2]>>3; // pin 11
OCR2B = motor[3]>>3; // pin 3
basically, it converts a range [1000;2000] to [125;250]

just adapt it to convert the range [1000;2000] to [200x255/2000;1200x255/2000] = [25;153]

Re: MultiWii UltraPWM

Posted: Mon Apr 16, 2012 9:43 am
by warthox
i have some ultrapwm escs and thought of just changing min and max throttle to 200 and 1200.
if the regulation works relative to the set min/max throttle range it should work. will test it.

sebastian, have you tried it successfully?

Re: MultiWii UltraPWM

Posted: Wed Apr 18, 2012 9:56 pm
by warthox
Alexinparis wrote:assuming you have a quad:
in the file Output.pde,
in the section PROMINI, you have
OCR1A = motor[0]>>3; // pin 9
OCR1B = motor[1]>>3; // pin 10
OCR2A = motor[2]>>3; // pin 11
OCR2B = motor[3]>>3; // pin 3
basically, it converts a range [1000;2000] to [125;250]

just adapt it to convert the range [1000;2000] to [200x255/2000;1200x255/2000] = [25;153]


could u explain that?
theres no way i could understand this codesection :D

the simple change of min and maxthrottle didnt worked.

Re: MultiWii UltraPWM

Posted: Wed Apr 18, 2012 10:08 pm
by ronco
Hi warthox,

you can do this changes in output.pde.

replace this

Code: Select all

  #if defined(PROMINI)
    #if (NUMBER_MOTOR > 0)
      #ifndef EXT_MOTOR_RANGE
        OCR1A = motor[0]>>3; //  pin 9
      #else
        OCR1A = ((motor[0]>>2) - 250) + 2;
      #endif
    #endif
    #if (NUMBER_MOTOR > 1)
      #ifndef EXT_MOTOR_RANGE
        OCR1B = motor[1]>>3; //  pin 10
      #else
        OCR1B = ((motor[1]>>2) - 250) + 2;
      #endif
    #endif
    #if (NUMBER_MOTOR > 2)
      #ifndef EXT_MOTOR_RANGE
        OCR2A = motor[2]>>3; //  pin 11
      #else
        OCR2A = ((motor[2]>>2) - 250) + 2;
      #endif
    #endif
    #if (NUMBER_MOTOR > 3)
      #ifndef EXT_MOTOR_RANGE
        OCR2B = motor[3]>>3; //  pin 3
      #else
        OCR2B = ((motor[3]>>2) - 250) + 2;
      #endif
    #endif


with this

Code: Select all

  #if defined(PROMINI)
    #if (NUMBER_MOTOR > 0)
      #ifndef EXT_MOTOR_RANGE
        OCR1A = (motor[0]-800)>>3; //  pin 9
      #else
        OCR1A = ((motor[0]>>2) - 250) + 2;
      #endif
    #endif
    #if (NUMBER_MOTOR > 1)
      #ifndef EXT_MOTOR_RANGE
        OCR1B = (motor[1]-800)>>3; //  pin 10
      #else
        OCR1B = ((motor[1]>>2) - 250) + 2;
      #endif
    #endif
    #if (NUMBER_MOTOR > 2)
      #ifndef EXT_MOTOR_RANGE
        OCR2A = (motor[2]-800)>>3; //  pin 11
      #else
        OCR2A = ((motor[2]>>2) - 250) + 2;
      #endif
    #endif
    #if (NUMBER_MOTOR > 3)
      #ifndef EXT_MOTOR_RANGE
        OCR2B = (motor[3]-800)>>3; //  pin 3
      #else
        OCR2B = ((motor[3]>>2) - 250) + 2;
      #endif
    #endif


it shoud change the output PWM range from 1000-2000 to 200-1200 for the promini. but with this mod, min and max trottle must stay at 1000 and 1850-2000 because it its now both -800

regards

felix

Re: MultiWii UltraPWM

Posted: Thu Apr 19, 2012 12:28 pm
by warthox
thanks felix :)
will try it this afternoon.

Re: MultiWii UltraPWM

Posted: Thu Apr 19, 2012 1:05 pm
by Bledi
warthox wrote:thanks felix :)
will try it this afternoon.


Yes 3 weeks without a video !!! WHAT ARE YOU DOING ??? ;)

Re: MultiWii UltraPWM

Posted: Thu Apr 19, 2012 2:14 pm
by warthox
Bledi wrote:
warthox wrote:thanks felix :)
will try it this afternoon.


Yes 3 weeks without a video !!! WHAT ARE YOU DOING ??? ;)



im gettin old :D
no, seriously, there are many things im working at atm and also the weather is not the best for videos...
eg alex made a special code for me last year, this will be used soon ;)

Re: MultiWii UltraPWM

Posted: Thu Apr 19, 2012 2:24 pm
by shikra
Is that the one that helps you keep it level and stable? ;)

Re: MultiWii UltraPWM

Posted: Fri Apr 20, 2012 2:45 pm
by warthox
ronco wrote:Hi warthox,

you can do this changes in output.pde.

replace this

Code: Select all

  #if defined(PROMINI)
    #if (NUMBER_MOTOR > 0)
      #ifndef EXT_MOTOR_RANGE
        OCR1A = motor[0]>>3; //  pin 9
      #else
        OCR1A = ((motor[0]>>2) - 250) + 2;
      #endif
    #endif
    #if (NUMBER_MOTOR > 1)
      #ifndef EXT_MOTOR_RANGE
        OCR1B = motor[1]>>3; //  pin 10
      #else
        OCR1B = ((motor[1]>>2) - 250) + 2;
      #endif
    #endif
    #if (NUMBER_MOTOR > 2)
      #ifndef EXT_MOTOR_RANGE
        OCR2A = motor[2]>>3; //  pin 11
      #else
        OCR2A = ((motor[2]>>2) - 250) + 2;
      #endif
    #endif
    #if (NUMBER_MOTOR > 3)
      #ifndef EXT_MOTOR_RANGE
        OCR2B = motor[3]>>3; //  pin 3
      #else
        OCR2B = ((motor[3]>>2) - 250) + 2;
      #endif
    #endif


with this

Code: Select all

  #if defined(PROMINI)
    #if (NUMBER_MOTOR > 0)
      #ifndef EXT_MOTOR_RANGE
        OCR1A = (motor[0]-800)>>3; //  pin 9
      #else
        OCR1A = ((motor[0]>>2) - 250) + 2;
      #endif
    #endif
    #if (NUMBER_MOTOR > 1)
      #ifndef EXT_MOTOR_RANGE
        OCR1B = (motor[1]-800)>>3; //  pin 10
      #else
        OCR1B = ((motor[1]>>2) - 250) + 2;
      #endif
    #endif
    #if (NUMBER_MOTOR > 2)
      #ifndef EXT_MOTOR_RANGE
        OCR2A = (motor[2]-800)>>3; //  pin 11
      #else
        OCR2A = ((motor[2]>>2) - 250) + 2;
      #endif
    #endif
    #if (NUMBER_MOTOR > 3)
      #ifndef EXT_MOTOR_RANGE
        OCR2B = (motor[3]-800)>>3; //  pin 3
      #else
        OCR2B = ((motor[3]>>2) - 250) + 2;
      #endif
    #endif


it shoud change the output PWM range from 1000-2000 to 200-1200 for the promini. but with this mod, min and max trottle must stay at 1000 and 1850-2000 because it its now both -800

regards

felix



didnt work. the motor doesnt spin when board is disarmed, good.
but when i arm it and slide throttle stick from 0-100% its like the throttle range is present arround 3 times.
means: throttle stick from 0-30% - one complete throttle range of the board. a bit higher throttle stick set will cause motor stop and again a full throttle range from throttle stick range 30-60%. and again. pretty strange behavior.

Re: MultiWii UltraPWM

Posted: Fri Apr 20, 2012 2:54 pm
by ronco
warthox wrote:
ronco wrote:Hi warthox,

you can do this changes in output.pde.

replace this

Code: Select all

  #if defined(PROMINI)
    #if (NUMBER_MOTOR > 0)
      #ifndef EXT_MOTOR_RANGE
        OCR1A = motor[0]>>3; //  pin 9
      #else
        OCR1A = ((motor[0]>>2) - 250) + 2;
      #endif
    #endif
    #if (NUMBER_MOTOR > 1)
      #ifndef EXT_MOTOR_RANGE
        OCR1B = motor[1]>>3; //  pin 10
      #else
        OCR1B = ((motor[1]>>2) - 250) + 2;
      #endif
    #endif
    #if (NUMBER_MOTOR > 2)
      #ifndef EXT_MOTOR_RANGE
        OCR2A = motor[2]>>3; //  pin 11
      #else
        OCR2A = ((motor[2]>>2) - 250) + 2;
      #endif
    #endif
    #if (NUMBER_MOTOR > 3)
      #ifndef EXT_MOTOR_RANGE
        OCR2B = motor[3]>>3; //  pin 3
      #else
        OCR2B = ((motor[3]>>2) - 250) + 2;
      #endif
    #endif


with this

Code: Select all

  #if defined(PROMINI)
    #if (NUMBER_MOTOR > 0)
      #ifndef EXT_MOTOR_RANGE
        OCR1A = (motor[0]-800)>>3; //  pin 9
      #else
        OCR1A = ((motor[0]>>2) - 250) + 2;
      #endif
    #endif
    #if (NUMBER_MOTOR > 1)
      #ifndef EXT_MOTOR_RANGE
        OCR1B = (motor[1]-800)>>3; //  pin 10
      #else
        OCR1B = ((motor[1]>>2) - 250) + 2;
      #endif
    #endif
    #if (NUMBER_MOTOR > 2)
      #ifndef EXT_MOTOR_RANGE
        OCR2A = (motor[2]-800)>>3; //  pin 11
      #else
        OCR2A = ((motor[2]>>2) - 250) + 2;
      #endif
    #endif
    #if (NUMBER_MOTOR > 3)
      #ifndef EXT_MOTOR_RANGE
        OCR2B = (motor[3]-800)>>3; //  pin 3
      #else
        OCR2B = ((motor[3]>>2) - 250) + 2;
      #endif
    #endif


it shoud change the output PWM range from 1000-2000 to 200-1200 for the promini. but with this mod, min and max trottle must stay at 1000 and 1850-2000 because it its now both -800

regards

felix



didnt work. the motor doesnt spin when board is disarmed, good.
but when i arm it and slide throttle stick from 0-100% its like the throttle range is present arround 3 times.
means: throttle stick from 0-30% - one complete throttle range of the board. a bit higher throttle stick set will cause motor stop and again a full throttle range from throttle stick range 30-60%. and again. pretty strange behavior.


hmm... i will check the range on my oszi tomorrow .. but i dont know how this can happen .. maybe thay dont like 488hz?

regards felix

Re: MultiWii UltraPWM

Posted: Fri Apr 20, 2012 9:15 pm
by warthox
ronco wrote:hmm... i will check the range on my oszi tomorrow .. but i dont know how this can happen .. maybe thay dont like 488hz?
regards felix


they are advertised as ultrapwm 500hz escs.

Re: MultiWii UltraPWM

Posted: Fri Apr 27, 2012 7:29 pm
by nicodh
Hi, I also hve xaircraft esc ultrapwm. I managed to change the scale, but on startup motor spin really fast, as it was send a command to it. Is this normal? else it seems to work, but this way is unusable (too dangerous).

Re: MultiWii UltraPWM

Posted: Thu May 03, 2012 11:07 am
by _int
Hello.
Try this for MultiWii 1.9:
http://translate.google.ru/translate?hl ... ost3180670
Sorry for google translate (i have some trouble with English)