PID settings for EXT_MOTOR_RANGE

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

PID settings for EXT_MOTOR_RANGE

Post by crashlander »

Hello.
Question for those that are using EXT_MOTOR_RANGE! What are some workable PID settings for different kind of setups?
If I understand correctly we have now 2 different kinds of EXT_MOTOR_RANGE types: on ProMini we have 8bit PWM from 2 to 254 (252 steps(, and on mega we have 16bit PWM (??steps)?!

Regards
Andrej

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

Re: PID settings for EXT_MOTOR_RANGE

Post by ronco »

Hi,

in dev 225 there is just EXT_MOTOR_RANGE witch changes the signal range to near ~0 - 2ms. it can only be used with reflashed ESC's viewtopic.php?f=13&t=516

mega and promicro have some 11 & 16 bit timer active now but MWC uses just 11 bit intern (witch is enough) so



without EXT_MOTOR_RANGE

promini:
- motor 1-4 HW PWM 8bit (7used) = 125-250 (1-2ms) == 125 steps resolution
- motor 5-8 SW PWM 8bit (8used) = 5-245 (1-2ms) == 240 steps resolution <- isnt better then HW PWM eaven with higher resolution

promicro
- motor 1-4 HW PWM 11bit (10used) = 1000-2000 (1-2ms) == 1000 steps resolution
- motor 5-8 SW PWM 11bit (10used) = ~1040-~1960 (1-2ms) == ~920 steps resolution

mega
- motor 1-6 HW PWM 11bit (10used) = 1000-2000 (1-2ms) == 1000 steps resolution
- motor 7-8 HW PWM 8bit (7used) = 125-250 (1-2ms) == 125 steps resolution

with EXT_MOTOR_RANGE

promini:
- motor 1-4 HW PWM 8bit (8used) = 2-252 (~0-2ms) == 250 steps resolution
- motor 5-8 SW PWM 8bit (8used) = 5-245 (1-2ms) == 240 steps resolution

promicro
- no support for EXT_MOTOR_RANGE atm.

mega
- motor 1-6 HW PWM 11bit (11used) =16-2016 (~0-2ms) == 2000 steps resolution (MWC dont uses more then 1000 atm.)
- motor 7-8 HW PWM 8bit (8used) = 2-252 (~0-2ms) == 250 steps resolution


regards

Felix

Stalk
Posts: 49
Joined: Tue Apr 05, 2011 12:39 pm

Re: PID settings for EXT_MOTOR_RANGE

Post by Stalk »

And where we can define EXT_MOTOR_RANGE?
Thanks you for reply.
regards
Stanley

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: PID settings for EXT_MOTOR_RANGE

Post by Hamburger »

If and only if you have these reflasehd ESCs

Code: Select all

#define EXT_MOTOR_RANGE
in config.h
You can about double P for roll and pitch to start with.

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

Re: PID settings for EXT_MOTOR_RANGE

Post by ronco »

hi Stanley, you are right there is no entry in config.h for it ...

but you can do it with wirite

Code: Select all

#define EXT_MOTOR_RANGE


to it


regards

felix

p25o1
Posts: 33
Joined: Thu Mar 29, 2012 3:19 pm

Re: PID settings for EXT_MOTOR_RANGE

Post by p25o1 »

hi everyone,

i just have a question about the EXT_MOTOR_RANGE option,

i posted the same question here

viewtopic.php?f=8&t=2024

i missed this post.

i'm using a quadrino zoom rev 1e which is based on the Nano ATmega328

can it support the EXT_MOTOR_RANGE option, and if no why?

if i enable this option , do i need to re calibrate my escs?

thx everyone

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: PID settings for EXT_MOTOR_RANGE

Post by Hamburger »

ronco wrote:hi Stanley, you are right there is no entry in config.h for it ...

ah, but it is.
It is right at the beginning of section 7 in config.h

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: PID settings for EXT_MOTOR_RANGE

Post by Hamburger »

crashlander wrote:Hello.
Question for those that are using EXT_MOTOR_RANGE! What are some workable PID settings for different kind of setups?

Andrej,
as rule of thumb I found I can double the P for nick&roll when converting to mwii-esc. On my TRIs with mwii-esc flashed ESCs I have P at 7 to 8.

crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: PID settings for EXT_MOTOR_RANGE

Post by crashlander »

p25o1 wrote:hi everyone,

i just have a question about the EXT_MOTOR_RANGE option,

i posted the same question here

viewtopic.php?f=8&t=2024

i missed this post.

i'm using a quadrino zoom rev 1e which is based on the Nano ATmega328

can it support the EXT_MOTOR_RANGE option, and if no why?

if i enable this option , do i need to re calibrate my escs?

thx everyone


Hello, it seems somebody resurrected that old post :)
@p25o1 like it was said before you can use extended motor range ONLY WITH SPECIALY PROGRAMMED (REFLASHED) ESC, and of course than you don't need to calibrate ESC's because they are already calibrated.

Regards Andrej

p25o1
Posts: 33
Joined: Thu Mar 29, 2012 3:19 pm

Re: PID settings for EXT_MOTOR_RANGE

Post by p25o1 »

i have simon Flashed esc,,, will they do the job/work?

i enabled the option it but the motors didn’t work initially.

after applying full throttle they started to spin,

i'm asking since i see in the code

with EXT_MOTOR_RANGE
"promicro
- no support for EXT_MOTOR_RANGE atm."

i just wanted to know if this is a hardware limitation , or it will come in time/development .

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: PID settings for EXT_MOTOR_RANGE

Post by Hamburger »

simonk flashed ESC are fine, but do not work with EXT_MOTOR_RANGE. Set minthrottle as described in config.h.

p25o1
Posts: 33
Joined: Thu Mar 29, 2012 3:19 pm

Re: PID settings for EXT_MOTOR_RANGE

Post by p25o1 »

simonk flashed ESC work fine with my setup

but as you pointed out it will not work with EXT_MOTOR_RANGE ,
when I enable it with the same simonk flashed ESC , it only spins the motor when i give it full throttle.

no issues, i'll leave this option for now,

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

Re: PID settings for EXT_MOTOR_RANGE

Post by ronco »

p25o1 wrote:i have simon Flashed esc,,, will they do the job/work?

i enabled the option it but the motors didn’t work initially.

after applying full throttle they started to spin,

i'm asking since i see in the code

with EXT_MOTOR_RANGE
"promicro
- no support for EXT_MOTOR_RANGE atm."

i just wanted to know if this is a hardware limitation , or it will come in time/development .


its no HW limitation .. it is just not implementet yet .. i thought it wa snot needed because it has a quite high resolution in normal configuration .. but as alex said .. its also good for brushed motors .. so ill implement it soon :)

regards felix

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

Re: PID settings for EXT_MOTOR_RANGE

Post by ronco »

.. i added it now .. its in r975

regards felix

p25o1
Posts: 33
Joined: Thu Mar 29, 2012 3:19 pm

Re: PID settings for EXT_MOTOR_RANGE

Post by p25o1 »

oh , cool ,

i'll give it a try anyways to see how the esc respond with it :-)

User avatar
polo_fly2
Posts: 34
Joined: Fri Aug 05, 2011 1:12 pm
Location: Munich - Bavaria

Re: PID settings for EXT_MOTOR_RANGE

Post by polo_fly2 »

Hi,

I´m just a bit confused about using Ext_Motor_Range or not. ??

Its a combo of Flyduino 25A - Simonk firmware ESCs connected to Nanowii (Promicro)

Actually Ext_Motor_Range is activated in my config.h , and the copter is running absolutely normal and fine ??

Hamburger wrote that the SimonK ESC do not work when Ext_Motor_Range is activated. ?

Is it better to remove this def ?

thank you
Georg

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: PID settings for EXT_MOTOR_RANGE

Post by Hamburger »

polo_fly2 wrote:I´m just a bit confused about using Ext_Motor_Range or not. ??
Its a combo of Flyduino 25A - Simonk firmware ESCs ...

I wrote
simonk flashed ESC are fine, but do not work with EXT_MOTOR_RANGE

what question is left?
for brushless ESCs: If and only if you have wii-esc flashed ESCs use EXT_MOTOR_RANGE. In all other cases, do not use it.

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

Re: PID settings for EXT_MOTOR_RANGE

Post by ronco »

polo_fly2 wrote:Hi,

I´m just a bit confused about using Ext_Motor_Range or not. ??

Its a combo of Flyduino 25A - Simonk firmware ESCs connected to Nanowii (Promicro)

Actually Ext_Motor_Range is activated in my config.h , and the copter is running absolutely normal and fine ??

Hamburger wrote that the SimonK ESC do not work when Ext_Motor_Range is activated. ?

Is it better to remove this def ?

thank you
Georg


that is because in all MWC versions before r975 EXT_MOTOR_RANGE has no effekt on a promicro..

regards felix

User avatar
polo_fly2
Posts: 34
Joined: Fri Aug 05, 2011 1:12 pm
Location: Munich - Bavaria

Re: PID settings for EXT_MOTOR_RANGE

Post by polo_fly2 »

hi and thanks, its clear now.. :-)

Georg

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: PID settings for EXT_MOTOR_RANGE

Post by Hamburger »

Ok. Have fun clying.
And simonk esc is good.

Post Reply