Helicopter integration

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
magmeinenseat
Posts: 3
Joined: Wed Nov 13, 2013 9:39 am

Re: Helicopter integration

Post by magmeinenseat »

Thank you!

By setting the LPF it works alot better. I haven't tried the P and I settings yet, but the tail is much to sensitive and is waving from side to side. What is your suggestion, more gyrosmoothing or changes on PID-settings?
What about the initial values of PID? Are thay more or less useable to have a starting point?

Greetz
Jörg

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

Re: Helicopter integration

Post by Hamburger »

For me the system default settings are pretty useless for my 200mm and 325mm helis.

magmeinenseat
Posts: 3
Joined: Wed Nov 13, 2013 9:39 am

Re: Helicopter integration

Post by magmeinenseat »

So what is the way to get a pretty much useable setup?
Startvalue for P?
I and D to a minimum?
Rising P till the Copter is beginning to oscillate. Decreasing P a bit. Then increase D till oscillation and a bit back. After that the same with I?
That is something I can adjust when flying is possible.

But what are initial values? My heli is not able to lift off the ground.
The tail is kicking from side to side and roll and nick beginning to oscillate when it is getting lighter. Is the oscillation on roll and nick a result of oversense on yaw?
Any suggestions?

Greets
Jörg

RC Man
Posts: 15
Joined: Sun Sep 29, 2013 7:58 pm

Re: Helicopter integration

Post by RC Man »

Happy NewYear to ya all.

The 6050 dosnt like the cold, I had my Heli 450 flying Super, tail gyro went crazy in the cold, changed it out to a Quark tail gyro, held like it was nailed to the sky, Than my heli went
like I gave it a lot of left cyc. but i didnt, I hit right ,and it kind of straightened out, but went back to hard left, gave more right, and it didnt react a whole bunch, started doing like a slow circle, crash was inevitable, hit TH, and down it was. No damage. :D
I learned to fly a cp heli, like 4 months ago. Hovering, and just moving around on my field, tail in, and sidewards, workin ok. But when something goes wrong; What the F..k is a newb.
supposed to do?
In the warmer months, it was fine as dandy, and now, it is like trying to fly in a 50km wind, but with no wind.
Im going to remove the wii, so I can fly in the winter temps, hovering, and maybe a bit of testing without a bailout sys. Snow will give me a bit of a softer landing :lol:
Unless Im inverted.

Frank
Yall keep it up in here, and when I find out anything, Ill keep ya all informed.

Spool up your helis on the floor as ya are building them, any vibs, get rid of them. I build mine piece for piece, testing every part I add on it. Using a good gyro, mounted to the frame.

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

Re: Helicopter integration

Post by Hamburger »

was asked several times, so here is my wiring diagram for a true nanoWii (_not_ the HK lookalike) with spektrum satellite and HW-PWM:
A3 - vbat
4 buzzer
9 right
10 left
5 yaw
6 motor
11 nick

Best verify servo signal freq with pwm meter - if servo is attached to motor output, then 490Hz motor signal sets servo on fire very quickly.

sqij
Posts: 2
Joined: Sat Jan 11, 2014 12:08 pm

Re: Helicopter integration

Post by sqij »

Thanks for that, Hamburger.
I have gotten the swash servos working, and have the CCPM mixing worked out.
But, now I can't get the NanoWii to arm. I have the YAW method enabled, but moving rudder to extent(s) doesn't arm, like with quads.
I have changed the THROTTLE travel to 125%, and even moved the trim all the way down, to make sure the throttle is at LOW. Still won't arm.

Any ideas?

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

Re: Helicopter integration

Post by PatrikE »

Try to calibrate ACC.

sqij
Posts: 2
Joined: Sat Jan 11, 2014 12:08 pm

Re: Helicopter integration

Post by sqij »

Ah, that did the trick! Thanks.

Romeo84
Posts: 16
Joined: Wed Aug 21, 2013 8:32 pm

Re: Helicopter integration

Post by Romeo84 »

Hello guys. I have tryed to setup my trex600 heli with multiwii 2.3 and board crius multiwii se v2.5. But unfortunately heli flies very bad and unstable no matter how i try to tune PIDs. My heli is all good because another my flybarless controller ZYX S 3 AXES GYRO works very well. Could You be so kind and please upload for me any complete multiwii code (any version) and values of PIDs parameters with adjusted autolevel for trex600 and board crius multiwii se v2.5 for easy and calm flight (not 3d).

PS Sorry for my bad English.. i am Russian.

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

Re: Helicopter integration

Post by Hamburger »

use gyro smoothing - start with 70,70,70

Sirod
Posts: 5
Joined: Mon Nov 11, 2013 4:52 am

Re: Helicopter integration

Post by Sirod »

"
Best verify servo signal freq with pwm meter -
if servo is attached to motor
output, then 490Hz motor signal sets servo on fire very quickly."

Hamburger, I have the same servo connections per your suggested diagram


But I noticed since changing to 2.3, the cyclic servos ran very hot, their
motors and lasted only few flights. They are are supposedly
digital(Turnigy 12.5 gm, HMB 11). These servos were suggested for HK250GT
FBL conversions.

I have no means to confirm actual frequency -what is 'pwm meter' btw ?

I had uncommented below defines

#define A32U4_4_HW_PWM_SERVOS
#define SERVO_RFR_RATE 120
#define SERVO_PIN5_RFR_RATE 50

Are there any other defines that I have missed out ?, I suspect my
servos are stilling running at 490 Hz.
Or are there bugs in 2.3 that does not allow above defines to
take effect

Sirod.

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

Re: Helicopter integration

Post by Hamburger »

sirod
Your config looks good to me.
Please find a servo database and. verify your digitals can run at >70Hz. Some cannot. Higher freq may induce more heat.
Or turn off hw.pwm. use different pins. Compare heat.

A pwm meter will show pwm rate 1000-2000 us and freq 50-490 Hz for rc typically.
Textstar lcd has pwm meter functionality as a welcome byproduct feature.

Metori
Posts: 18
Joined: Thu Jan 16, 2014 1:04 pm
Location: Russia, Vladivostok

Re: Helicopter integration

Post by Metori »

I trying to migrate my flybarred HK500GT (T-Rex 500 clone) to MW 2.3 on Crius AIO Pro v1.0.
A few days ago I configured swashplate servos, now I plan to set up tail servo and throttle singnal passing to Castle Creation Ice 75 speed controller working in "Set RPM" mode.

But now I have problem with setting Inolab 261HB tail servo. At 160Hz it starts to jitt and sounds very bad. But if I connect it directly to my Futaba receiver then it works okay at 160Hz, and if I connect it to Assan Gyro it works okay at 333Hz.
Checked with oscilloscope that servo signal from MW 2.3 have about 5v level and Futaba receiver have about 3.3v signal level (power voltage from receiver is 5v). Can high signal level be a reason of servo jitter? Any suggestions?

Metori
Posts: 18
Joined: Thu Jan 16, 2014 1:04 pm
Location: Russia, Vladivostok

Re: Helicopter integration

Post by Metori »

And can anyone suggest me a plan to test the MW 2.3 on my heli after setup? I dont want to crash my aircraft.
Test in passthru mode first? and switch to angle in the air?

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

Re: Helicopter integration

Post by Hamburger »

Your board is soft pwm. Refresh rate is not stable and varies depending on what else 328p has to do.
So best lower the refresh rate in mwii.

No passthru for heli that I know of. Setup horizon mode and assign to aux channel which you tie to bail out switch on tx.
Start with very low i values

Metori
Posts: 18
Joined: Thu Jan 16, 2014 1:04 pm
Location: Russia, Vladivostok

Re: Helicopter integration

Post by Metori »

Crius AIO board have a Mega 2560 controller.

Why no passthru? I have a checkboxes in MultiWiiConf GUI named "passthru" and in this mode servos reacts only on stick movements on tx. I dont want to take off in gyro mode, because my heli is flybarred.

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

Re: Helicopter integration

Post by Hamburger »

Correction. Heli has passthru - I have never used it.
What benefit do expect for f lybar heli with/without passthru?

Metori
Posts: 18
Joined: Thu Jan 16, 2014 1:04 pm
Location: Russia, Vladivostok

Re: Helicopter integration

Post by Metori »

I think in flybarred heli gyro is not needed, because flybar working like mechanical gyroscope. I dont know what will happen when I take off FB heli with gyro mode on.

Hamburger, Does Mega 2560 based flight controllers with MultiWii 2.3 have all servo signals (needed for heli) drived by hardware PWM ?

Romeo84
Posts: 16
Joined: Wed Aug 21, 2013 8:32 pm

Re: Helicopter integration

Post by Romeo84 »

Hello. I used trex600 heli with multiwii 2.2. If i activate baro (altitude) mode nothing happens.... Is that program error at this feature doesn't work in heli mode?

Romeo84
Posts: 16
Joined: Wed Aug 21, 2013 8:32 pm

Re: Helicopter integration

Post by Romeo84 »

finally i solved that issue. i have rewrited some amount of code to do so. if anyone needs this - i'll share

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

Re: Helicopter integration

Post by Hamburger »

Metori wrote:I think in flybarred heli gyro is not needed, because flybar working like mechanical gyroscope. I dont know what will happen when I take off FB heli with gyro mode on.

I presume flybar and gyro will fight for control constantly
Hamburger, Does Mega 2560 based flight controllers with MultiWii 2.3 have all servo signals (needed for heli) drived by hardware PWM ?

I have only ever run 328p (cannot do hw.pwm) and 32u4 (now supports hw.pwm for heli) systems on my helis. Only code can tell but I do not currently have easy access to repository. My guess is heli on 2560 works and it will work with hw.pwm. But only one common refresh rate for all 4 servos.

pins for hw.pwm on 2560 are a clean implementation since v2.3, so I suggest you lookup the 2560 pins in config.h and wiki, enable hw.pwm and test.

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

Re: Helicopter integration

Post by Hamburger »

Romeo84 wrote:finally i solved that issue. i have rewrited some amount of code to do so. if anyone needs this - i'll share

care to share here for others to see? How well does it work?
We could drum up a lower and upper ceiling - aux switch activated - so heli would stay within, or jump back into height corridor.
For me this together with level-mode could have prevented some unintentional heli<->earth contact.

RC Man
Posts: 15
Joined: Sun Sep 29, 2013 7:58 pm

Re: Helicopter integration

Post by RC Man »

Hi yall,
Ohhh do I need some help, lol
I put together a multiwii heli using a minipro and a 6050, just got the collective pitch working, but on the other cyc. movements, I get movement on all 3 servos and left cyc. moves faster than right.
Where can I set this up, what part of the multiwii do I look into. Config h, output ? I have no idea. Would love to get this working, as I have been fiddling with it for 3 days.
Im using the multiwii from Patrik.

Thanks ;)

zwiebacksaege
Posts: 27
Joined: Thu Mar 07, 2013 10:14 am

Re: Helicopter integration

Post by zwiebacksaege »

Hi guys,

as far as I read this Topic it seems that MultiWii works only good with FBL Systems. Is there no Chance to take the FB of a traditional FB-head into account by decreasing the PID of roll/nick (so that Software doesn't fight against FB) and just realizing the leveling of the copter by the ACC-values?

My main Goal is to make a Logo 14 stable and self-leveling for FPV. There is absolutely no interest in 3D. Tail would be traditionally controlled by a 401 gyro just for convenience of using an established System in first approach.

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

Re: Helicopter integration

Post by PatrikE »

Hi RCman,

Use V2.3 Public
Adjust direction and throws In config.h

Code: Select all

    /* Servo mixing for heli 120
                         {Coll,Nick,Roll} */
    #define SERVO_NICK   { +10, -10,  0 }
    #define SERVO_LEFT   { +10, +5, +10 }
    #define SERVO_RIGHT  { +10, +5, -10 }


/Patrik

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

Re: Helicopter integration

Post by PatrikE »

On a FB heli you should decrease PID for Gyro.
How much i don't know but FB do the Gyro's work mechanically.

RC Man
Posts: 15
Joined: Sun Sep 29, 2013 7:58 pm

Re: Helicopter integration

Post by RC Man »

PatrikE wrote:Hi RCman,

Use V2.3 Public
Adjust direction and throws In config.h

Code: Select all

    /* Servo mixing for heli 120
                         {Coll,Nick,Roll} */
    #define SERVO_NICK   { +10, -10,  0 }
    #define SERVO_LEFT   { +10, +5, +10 }
    #define SERVO_RIGHT  { +10, +5, -10 }


/Patrik



I think I know why its not working right, as I tilt my gyro, it just moves ,and then goes back to level, even when the heli is tilted, I think the 6050 is shot, my Flymentor stays tilted till heli is back to level, and works flawlessly in flight.
Ill load up the 2.3 now, and give it another try, is using this the right one for the ITG MPU 6050?
//#define WMP
//#define ITG3200
//#define MPU3050
//#define L3G4200D
#define MPU6050 //combo + ACC
//#define LSM330

Thanks for the help Patrik :D

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

Re: Helicopter integration

Post by PatrikE »

RC Man wrote:I think I know why its not working right, as I tilt my gyro, it just moves ,and then goes back to level, even when the heli is tilted

That's how acro mode work!.
In Level modes Angle or Horizon swash will hold position like your Flymentor.

RC Man
Posts: 15
Joined: Sun Sep 29, 2013 7:58 pm

Re: Helicopter integration

Post by RC Man »

I know this sounds stupid, but how do I shut acro mode off? Is it in the gui? or do I have to program it out,
2,3 dosnt do anything when I load it after changing to heli 120, When I load 2,1, it works ok.

Metori
Posts: 18
Joined: Thu Jan 16, 2014 1:04 pm
Location: Russia, Vladivostok

Re: Helicopter integration

Post by Metori »

RC Man wrote:I know this sounds stupid, but how do I shut acro mode off? Is it in the gui? or do I have to program it out,
2,3 dosnt do anything when I load it after changing to heli 120, When I load 2,1, it works ok.

You can simply make angle mode always active by setting all angle checkboxes on in the gui. (squares below AUX captions).

BRIThelinoob
Posts: 2
Joined: Wed Feb 05, 2014 3:35 am

Re: Helicopter integration

Post by BRIThelinoob »

Hi guys I was thinking about using a my Multiwii Crius AIOP Board in my nitro heli. But can I still use my hh gyro. If so how do I hook it up, as it's on rudder channel 4 and the single wire on channel 5 (Switchable between rate mode and Heading hold, and what is a "NICK SERVO"

Mike..

RC Man
Posts: 15
Joined: Sun Sep 29, 2013 7:58 pm

Re: Helicopter integration

Post by RC Man »

BRIThelinoob wrote:Hi guys I was thinking about using a my Multiwii Crius AIOP Board in my nitro heli. But can I still use my hh gyro. If so how do I hook it up, as it's on rudder channel 4 and the single wire on channel 5 (Switchable between rate mode and Heading hold, and what is a "NICK SERVO"

Mike..


Hi Mike, you can use a separate tail gyro, no problems, the nick servo is the one that dosnt move when ya tilt the heli sideways, or, the back servo on a Trex.

BRIThelinoob
Posts: 2
Joined: Wed Feb 05, 2014 3:35 am

Re: Helicopter integration

Post by BRIThelinoob »

so you mean the nick servo is really the elevator one..

Mike..

gsenroc
Posts: 10
Joined: Mon Dec 30, 2013 11:45 pm

Re: Helicopter integration

Post by gsenroc »

Hamburger wrote:was asked several times, so here is my wiring diagram for a true nanoWii (_not_ the HK lookalike) with spektrum satellite and HW-PWM:
A3 - vbat
4 buzzer
9 right
10 left
5 yaw
6 motor
11 nick

Best verify servo signal freq with pwm meter - if servo is attached to motor output, then 490Hz motor signal sets servo on fire very quickly.

Hi Hamburger,

Does this pin layout also holds if I uncomment the line

Code: Select all

#define A32U4ALLPINS

Or should I just avoid this line?

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

Re: Helicopter integration

Post by Hamburger »

I think this gets activated automatically when you enable nanowii board? You can check in def.h

RC Man
Posts: 15
Joined: Sun Sep 29, 2013 7:58 pm

Re: Helicopter integration

Post by RC Man »

Mike,
The elevator servo, is the one that tilts the heli forward or backwards, I had to learn this as a heli noob in "83"
Now, the mixing channels do this stuff for us. Nick is the rear servo, but the two front servos move with it, in the opposite direction, if ya move the heli front to back (Side to side, it shouldnt move at all) The rear servo, that is.

Frank

gsenroc
Posts: 10
Joined: Mon Dec 30, 2013 11:45 pm

Re: Helicopter integration

Post by gsenroc »

Hamburger wrote:I think this gets activated automatically when you enable nanowii board? You can check in def.h

Yes you're right. I've just checked def.h, it's activated if nanowii is enabled.

There is another thing that makes me curious, the yaw output stays at around 1245 when the board is sitting still. Isn't it supposed to be around 1500 in the middle? I've already calibrated the acc.

Image
Attachments
QQ20140223-1.png
(7.82 KiB) Not downloaded yet

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

Re: Helicopter integration

Post by PatrikE »

gsenroc wrote:The yaw output stays at around 1245 when the board is sitting still. Isn't it supposed to be around 1500 in the middle?

Yaw I-term builds up in PID regulator.

gsenroc
Posts: 10
Joined: Mon Dec 30, 2013 11:45 pm

Re: Helicopter integration

Post by gsenroc »

PatrikE wrote:
gsenroc wrote:The yaw output stays at around 1245 when the board is sitting still. Isn't it supposed to be around 1500 in the middle?

Yaw I-term builds up in PID regulator.

Thanks Patrik, I guess I got it.

rcflyer24
Posts: 1
Joined: Fri Feb 28, 2014 12:51 am

Re: Helicopter integration

Post by rcflyer24 »

Hey all. I have read through this whole post and I still do not understand how to hook up the Helicopter to the Crius board and the receiver. Has someone posted a picture on how to do that? If so can someone point me in the right direction? I have been trying to get my setup going for a couple weeks now without any luck. Thanks so much! I have a Dynham Erazor 450, Crius AIO Pro V2.0 and the standard 6CH Dynham transmitter and receiver. If I missed something along the way I apologize for the duplication.

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

Re: Helicopter integration

Post by Hamburger »

Erazor is fbl nowadays?

gsenroc
Posts: 10
Joined: Mon Dec 30, 2013 11:45 pm

Re: Helicopter integration

Post by gsenroc »

I'm very close to finish setting up my nanowii hooked up with a barometer, but I have a question before test flight.

I've set the COLLECTIVE_PITCH control via channel AUX2, and I'm going to use a throttle curve which is flat and constant. As I'm going to use baro mode I'm now wondering which channel is going to control the ascend and descend in baro mode. Is that throttle or AUX2 in this case?

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

Re: Helicopter integration

Post by PatrikE »

Baro controlls Throtle.

gsenroc
Posts: 10
Joined: Mon Dec 30, 2013 11:45 pm

Re: Helicopter integration

Post by gsenroc »

PatrikE wrote:Baro controlls Throtle.

But that seems to be a problem for those who use a constant throttle. I only control the ascend and descend by changing the pitch, the throttle is always 80%. Does that mean that if I switch to baro, my constant 80% throttle will just make my heli climbing up and it won't stop?

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

Re: Helicopter integration

Post by PatrikE »

It will apply throttle until the correct altitude is reached.
But you could make a change in the code to move Baro control to Pitch channel.
In V2.3
Row 1166 - 1183.
Change all three apperances
of rcCommand[THROTTLE]
to rcCommand[COLLECTIVE_PITCH]
And in row 991

Note this is untested but should work.

gsenroc
Posts: 10
Joined: Mon Dec 30, 2013 11:45 pm

Re: Helicopter integration

Post by gsenroc »

PatrikE wrote:It will apply throttle until the correct altitude is reached.
But you could make a change in the code to move Baro control to Pitch channel.
In V2.3
Row 1166 - 1183.
Change all three apperances
of rcCommand[THROTTLE]
to rcCommand[COLLECTIVE_PITCH]
And in row 991

Note this is untested but should work.

Thanks very much Patrik, that seems to be the best solution. I'll have a try.

Romeo84
Posts: 16
Joined: Wed Aug 21, 2013 8:32 pm

Re: Helicopter integration

Post by Romeo84 »

Hamburger wrote:
Romeo84 wrote:finally i solved that issue. i have rewrited some amount of code to do so. if anyone needs this - i'll share

care to share here for others to see? How well does it work?
We could drum up a lower and upper ceiling - aux switch activated - so heli would stay within, or jump back into height corridor.
For me this together with level-mode could have prevented some unintentional heli<->earth contact.



OK. I shared. Its for 2.3 ver and crius 2.5 board. My code customizations labeled by 'testromeo' tag


It work normally on my 600 alighn heli Unfortunatelly last weekend when i was tuning PIDs for level mode and gyro smooth parameters my heli in instant go to oscillate and i broken tail blades. Soon i will get new one and will try futher to tune... Can anyone share own PIDs for this heli?
Attachments
MultiWii-RomeoCustom.rar
(131.5 KiB) Downloaded 100 times

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

Re: Helicopter integration

Post by Hamburger »

Always sad to crash during pid tuning. I had it happen several times when I started with 325mm helis. Later had good luck with 200mm. Next is stretched 465mm.
Be aware pids depend on gyro smoothing and acc filtering values.
I cannot currently read your archive. Did you set gyro.smoothing to about 70 70 50 to begin with. For level or horizon mode to work one must probably do acc filtering at 10hz

Helis have lots of disturbing vibrations

Romeo84
Posts: 16
Joined: Wed Aug 21, 2013 8:32 pm

Re: Helicopter integration

Post by Romeo84 »

Hamburger wrote:Always sad to crash during pid tuning. I had it happen several times when I started with 325mm helis. Later had good luck with 200mm. Next is stretched 465mm.
Be aware pids depend on gyro smoothing and acc filtering values.
I cannot currently read your archive. Did you set gyro.smoothing to about 70 70 50 to begin with. For level or horizon mode to work one must probably do acc filtering at 10hz

Helis have lots of disturbing vibrations


I started with gyro smoothing at 50 50 10, but when i set it to 20 20 10 heli suddenly started to oscillate. Now i am waiting tail blades from hobbyking... In Moscow unfortunatelly it is not exists at present time..

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

Re: Helicopter integration

Post by Hamburger »

I too found that yaw gyro needs high smoothing or oscillation is horrible. I think it is because of long tail boom which multiplies movement effects.

Post Reply