Page 1 of 2

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Fri Jan 20, 2012 12:41 pm
by dialfonzo
Thanks, but i don't want to use it wit FBL right now.
Just normal flybar to have "AutoLevel" feature.. ;)

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Sun Jan 29, 2012 3:15 pm
by PatrikE
The code is now updated to latest version. r486.

More info in the aeroplane thread.
http://www.multiwii.com/forum/viewtopic.php?f=8&t=364&p=8312#p8312

/Patrik

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Sun Jan 29, 2012 3:18 pm
by dialfonzo
Thanks..!
Need to re-assemble my 500 before trying

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Wed Feb 15, 2012 11:57 pm
by leadfeather
Hi Guys,

I've been working on using the MultiWii code and a Criuss flight control board on a 450 helicopter. I'm using a brushless tail motor on this project. I've got everything working. The only issue I have left is that there is too much vibration from the chopper and the swash servos jitter way too much. I need to smooth the signal from the gyro's and acc's. I think the best way to smooth the signal would be to incorporate a moving average of the signal...that should eliminate the spikes from vibration.

Does anyone have the code writing skills to do this?

Here is the thread on rcgroups for my WiiChopper http://www.rcgroups.com/forums/showthread.php?t=1592666

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Thu Feb 16, 2012 1:07 am
by Hamburger
Which sensor do you use? Some allow explicit filtering internally.

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Thu Feb 16, 2012 1:11 am
by leadfeather
Hamburger wrote:Which sensor do you use? Some allow explicit filtering internally.


Here is the thread for the Crius flight board http://www.rcgroups.com/forums/showthread.php?t=1551599

Here is a list of the on-board guts:

·Dimensions 50 mm X 50 mm
·Standard Mk style mounting holes 45mm X 45mm
·Weigh 13.9g
·SMD component design with atmega328P
·ITG3205 TRIPLE AXIS GYRO
BMA180 ACCELEROMETER
BMP085 BAROMETER
HMC5883L MAGNETOMETER
·Design with servo output for Camera Pitch and Roll
·Separate 3.3v regulated supply for the sensors
·On board logic level converter

Lite Version (Gyro + Acc only)

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Thu Feb 16, 2012 10:15 am
by Hamburger
then you may start using this (from config.h) and check how far it gets you

Code: Select all

/* ITG3200 & ITG3205 Low pass filter setting. In case you cannot eliminate all vibrations to the Gyro, you can try
   to decrease the LPF frequency, only one step per try. As soon as twitching gone, stick with that setting.
   It will not help on feedback wobbles, so change only when copter is randomly twiching and all dampening and
   balancing options ran out. Uncomment only one option!
   IMPORTANT! Change low pass filter setting changes PID behaviour, so retune your PID's after changing LPF.*/
//#define ITG3200_LPF_256HZ     // This is the default setting, no need to uncomment, just for reference
//#define ITG3200_LPF_188HZ
//#define ITG3200_LPF_98HZ
//#define ITG3200_LPF_42HZ
//#define ITG3200_LPF_20HZ
//#define ITG3200_LPF_10HZ      // Use this only in extreme cases, rather change motors and/or props

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Fri Feb 17, 2012 5:43 am
by leadfeather
Thanks!

I was shown a section under the imu tab that smooths the yaw gyro. I mimicked this code for roll and pitch and increased the value of the smoothing constants and this seemed to work pretty good. This video demonstrates the difference with and without signal conditioning.

http://www.youtube.com/watch?v=MAQVesubv-Y

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Fri Feb 17, 2012 2:30 pm
by Reflex
Sub'd
watching with interest

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Fri Feb 17, 2012 3:17 pm
by PatrikE
leadfeather wrote: I was shown a section under the imu tab that smooths the yaw gyro. I mimicked this code for roll and pitch and increased the value of the smoothing constants and this seemed to work pretty good.


Is it this part?

Code: Select all

  #if defined(TRI)
    gyroData[YAW] = (gyroYawSmooth*2+gyroData[YAW]+1)/3;
    gyroYawSmooth = gyroData[YAW];
  #endif

In that case it could look like this for three axis.

Code: Select all

   #if defined(HELICOPTER)   
static uint8_t Smoothing[3]  = {3,3,2}; // How much to smoothen with per axis
static int16_t gyroSmooth[3] = {0,0,0};
   
for (axis = 0; axis < 3; axis++) {
    gyroData[axis] = (gyroSmooth[axis]*(Smoothing[axis]-1)+gyroData[axis]+1)/Smoothing[axis];
    gyroSmooth[axis] = gyroData[axis];
   }
  #endif


Can you verify that i can include it in the code?

/Patrik

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Fri Feb 17, 2012 7:30 pm
by PatrikE
Idid some tests on my crappy Belt CP.
It seems to work god.
I updated the branch with this mod.
http://code.google.com/p/multiwii/source/browse/#svn%2Fbranches%2FPatrikE

The Smoothing settings is placed in MultiWii. tab

/Patrik

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Tue Feb 21, 2012 10:21 pm
by Hamburger
I did add Gyro Smoothing for my FlyingWing (wmp+bma020) with [10, 10, 3] and it seems to really help.
The Wing is smallish 50cm wingspan foamie pusher, so sensors see a lot of noise.

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Tue Feb 21, 2012 10:40 pm
by PatrikE
I tested it on a airplane.
On a foamie it removed massive jitter on the servos.. 8-)

/Patrik

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Sat Feb 25, 2012 10:05 am
by babak_ea
PatrikE wrote:Idid some tests on my crappy Belt CP.
It seems to work god.
I updated the branch with this mod.
http://code.google.com/p/multiwii/source/browse/#svn%2Fbranches%2FPatrikE

The Smoothing settings is placed in MultiWii. tab

/Patrik


Hi
Thanks Patrik.
I Modify Gyro Mix On your Code For SJM Helicopter( 2 Servo front and 1 servo rear)
I Tested It On SJM Helicopter, That Install On 3 DOF (Pitch ,Roll,Yaw) bench. There are two Problems:

1- when start Rotation and increase Throttle, in Special position the Helicopter Has Vibration That It Feedback To Gyro and Increase Vibration. So, the P factor should Be Very low ( 1 or 2).

But in Multirotor The Vibration Was Very low. It didn't Have important Effect On Gyro.

2- Helicopter with flybar paddle Has weak Factor For Stabilizer System And Can Not Provide Strongly Force As Multirotor.

So According 1 & 2 The Stabilizer System on Helicopter with flybar Can Not effect Very Well, Do Correct This result?
Do Any one Test It With flybarless Heli?
Sorry For My Bad English
Babak.

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Mon Mar 05, 2012 2:50 pm
by leadfeather
Patrik,

The way you have written the smoothing mod is neater than my code...I'm not a programmer.

Here is a video showing the difference in servo jitter with and without smoothing.

http://www.youtube.com/watch?v=MAQVesubv-Y

Here is the first real test flight with the MultiWii, Flybarless 450 conversion.

http://www.youtube.com/watch?v=qfaKYuFnwLY

.

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Mon Mar 05, 2012 6:57 pm
by PatrikE
Hi leadfeather,

Nice to see..
Was this tests made with the code from my branch?

/Patrik

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Tue Mar 06, 2012 5:12 am
by leadfeather
I used the code I had written, I had some help with the syntax.

For the helicopter swash servos I had to use a lot of smoothing... a factor of 60 to get it working well. Because of the large numbers involved, it was recommended that some code was added to avoid numeric overflow. If you like, I can post the smoothing code I used in a couple of day after I get home.

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Tue Mar 06, 2012 9:29 pm
by crashlander
leadfeather wrote:I used the code I had written, I had some help with the syntax.

For the helicopter swash servos I had to use a lot of smoothing... a factor of 60 to get it working well. Because of the large numbers involved, it was recommended that some code was added to avoid numeric overflow. If you like, I can post the smoothing code I used in a couple of day after I get home.


Please submit the smoothing code!
I still have not painted the wall hit by the rotor blade from my first Multiwii to HK450 flybareless test. :D

Regards
Andrej

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Tue Mar 06, 2012 10:35 pm
by PatrikE
The code in the branch contains the smoothing.
And can be configured in the ConfigTab.
http://code.google.com/p/multiwii/source/browse/#svn%2Fbranches%2FPatrikE

Leadfeathers smoothing can be found here.
http://www.rcgroups.com/forums/showpost.php?p=20769728&postcount=35

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Wed Mar 07, 2012 4:39 am
by leadfeather
Patrick,

That code of mine that you've linked isn't up to date with the changes to avoid numeric overflow. I'll be home on Thursday and I can get to the computer that has my code. I'll post then.

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Thu Mar 08, 2012 10:51 pm
by leadfeather
Here is the smoothing code I'm currently using. It has some int32 (provided by timecop of rcgroups) stuff added to avoid numeric overflow. The red shows the changes I've made to the IMU tab of the code.

static int16_t gyroYawSmooth = 0;
static int16_t gyroRollSmooth = 0;
static int16_t gyroPitchSmooth = 0;


#if defined(TRI) || defined(VTOL_TAIL)

#define gyrorRollSmooth
#define gyrorPitchSmooth


// gyroData[YAW] = (gyroYawSmooth*2+gyroData[YAW]+1)/3;
gyroData[YAW] = (int16_t) ( ( (int32_t)((int32_t)gyroYawSmooth * 6)+gyroData[YAW]+1 ) / 7);
gyroYawSmooth = gyroData[YAW];
//gyroData[ROLL] = (gyroRollSmooth*59+gyroData[ROLL]+1)/60;
gyroData[ROLL] = (int16_t) ( ( (int32_t)((int32_t)gyroRollSmooth * 60)+gyroData[ROLL]+1 ) / 61);
gyroRollSmooth = gyroData[ROLL];
//gyroData[PITCH] = (gyroPitchSmooth*59+gyroData[PITCH]+1)/60;
gyroData[PITCH] = (int16_t) ( ( (int32_t)((int32_t)gyroPitchSmooth * 60)+gyroData[PITCH]+1 ) / 61);
gyroPitchSmooth = gyroData[PITCH];

#endif

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Wed Apr 18, 2012 5:26 pm
by PatrikE
I have made a few cahanges in the HeliMode.
The servosettings in made same way as for Airplane in config.h.
But is using Max and Min for servotravel.

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Wed Sep 26, 2012 4:06 pm
by caall99
is this code mature enough for me to use the MultiWii controller on a Blade 400 3D with a flybarless head conversion? I am hoping for auto level capabilities as well from the accelerometers.

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Wed Sep 26, 2012 4:51 pm
by PatrikE
It's fully flyable.
Yaw gyro have been reported to be unprecise.
But otherwise there's no strange behaviors as i know.

Hamburger have made some testflights with a converted 450.

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Wed Sep 26, 2012 6:36 pm
by caall99
can i expect a level of stability and features comparable to a multirotor?

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Wed Sep 26, 2012 8:25 pm
by PatrikE
There's another thread about Helickoter integration with more info.
viewtopic.php?f=8&t=1562&start=40

Re: MultiWii as CP Helicopter FBL (or just stabilization)?

Posted: Wed Sep 26, 2012 11:36 pm
by Hamburger
caall99 wrote:is this code mature enough for me to use the MultiWii controller on a Blade 400 3D with a flybarless head conversion?

That is something no one can answer but you.
I am hoping for auto level capabilities as well from the accelerometers.

it works for fbl heli for my two 325mm helis and yes, it gives level cap and whatever else MWii supplies (possibly no RTH with gps yet).

Follow Patrik's advice and link