MultiWii UltraPWM

Post Reply
JFSebastian
Posts: 7
Joined: Sat Mar 10, 2012 7:26 pm

MultiWii UltraPWM

Post 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.

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: MultiWii UltraPWM

Post 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]

warthox
Posts: 65
Joined: Sat Jan 29, 2011 10:05 pm

Re: MultiWii UltraPWM

Post 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?

warthox
Posts: 65
Joined: Sat Jan 29, 2011 10:05 pm

Re: MultiWii UltraPWM

Post 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.

ronco
Posts: 317
Joined: Thu Aug 18, 2011 2:58 pm

Re: MultiWii UltraPWM

Post 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

warthox
Posts: 65
Joined: Sat Jan 29, 2011 10:05 pm

Re: MultiWii UltraPWM

Post by warthox »

thanks felix :)
will try it this afternoon.

User avatar
Bledi
Posts: 187
Joined: Sat Sep 10, 2011 6:36 pm

Re: MultiWii UltraPWM

Post by Bledi »

warthox wrote:thanks felix :)
will try it this afternoon.


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

warthox
Posts: 65
Joined: Sat Jan 29, 2011 10:05 pm

Re: MultiWii UltraPWM

Post 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 ;)

User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: MultiWii UltraPWM

Post by shikra »

Is that the one that helps you keep it level and stable? ;)

warthox
Posts: 65
Joined: Sat Jan 29, 2011 10:05 pm

Re: MultiWii UltraPWM

Post 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.

ronco
Posts: 317
Joined: Thu Aug 18, 2011 2:58 pm

Re: MultiWii UltraPWM

Post 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

warthox
Posts: 65
Joined: Sat Jan 29, 2011 10:05 pm

Re: MultiWii UltraPWM

Post 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.

nicodh
Posts: 44
Joined: Sun Apr 08, 2012 1:42 pm

Re: MultiWii UltraPWM

Post 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).

_int
Posts: 1
Joined: Wed Mar 07, 2012 5:01 am

Re: MultiWii UltraPWM

Post 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)

Post Reply