MultiWii as CP Helicopter FBL (or just stabilization)?

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

Postby dialfonzo » Fri Jan 20, 2012 12:41 pm

Thanks, but i don't want to use it wit FBL right now.
Just normal flybar to have "AutoLevel" feature.. ;)
User avatar
dialfonzo
 
Posts: 53
Joined: Sun Nov 20, 2011 3:18 pm
Location: Quebec, Canada

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

Postby PatrikE » Sun Jan 29, 2012 3:15 pm

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
PatrikE
 
Posts: 1683
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

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

Postby dialfonzo » Sun Jan 29, 2012 3:18 pm

Thanks..!
Need to re-assemble my 500 before trying
User avatar
dialfonzo
 
Posts: 53
Joined: Sun Nov 20, 2011 3:18 pm
Location: Quebec, Canada

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

Postby leadfeather » Wed Feb 15, 2012 11:57 pm

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
leadfeather
 
Posts: 7
Joined: Sat Feb 19, 2011 2:42 pm

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

Postby Hamburger » Thu Feb 16, 2012 1:07 am

Which sensor do you use? Some allow explicit filtering internally.
User avatar
Hamburger
 
Posts: 2400
Joined: Tue Mar 01, 2011 2:14 pm

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

Postby leadfeather » Thu Feb 16, 2012 1:11 am

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)
leadfeather
 
Posts: 7
Joined: Sat Feb 19, 2011 2:42 pm

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

Postby Hamburger » Thu Feb 16, 2012 10:15 am

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
User avatar
Hamburger
 
Posts: 2400
Joined: Tue Mar 01, 2011 2:14 pm

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

Postby leadfeather » Fri Feb 17, 2012 5:43 am

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
leadfeather
 
Posts: 7
Joined: Sat Feb 19, 2011 2:42 pm

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

Postby Reflex » Fri Feb 17, 2012 2:30 pm

Sub'd
watching with interest
Reflex
 
Posts: 12
Joined: Sat Sep 10, 2011 3:54 pm

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

Postby PatrikE » Fri Feb 17, 2012 3:17 pm

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
PatrikE
 
Posts: 1683
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

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

Postby PatrikE » Fri Feb 17, 2012 7:30 pm

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
PatrikE
 
Posts: 1683
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

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

Postby Hamburger » Tue Feb 21, 2012 10:21 pm

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.
User avatar
Hamburger
 
Posts: 2400
Joined: Tue Mar 01, 2011 2:14 pm

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

Postby PatrikE » Tue Feb 21, 2012 10:40 pm

I tested it on a airplane.
On a foamie it removed massive jitter on the servos.. 8-)

/Patrik
Last edited by PatrikE on Tue Mar 06, 2012 10:17 pm, edited 1 time in total.
PatrikE
 
Posts: 1683
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

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

Postby babak_ea » Sat Feb 25, 2012 10:05 am

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.
babak_ea
 
Posts: 1
Joined: Mon Feb 20, 2012 10:26 pm

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

Postby leadfeather » Mon Mar 05, 2012 2:50 pm

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

.
leadfeather
 
Posts: 7
Joined: Sat Feb 19, 2011 2:42 pm

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

Postby PatrikE » Mon Mar 05, 2012 6:57 pm

Hi leadfeather,

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

/Patrik
PatrikE
 
Posts: 1683
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

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

Postby leadfeather » Tue Mar 06, 2012 5:12 am

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.
leadfeather
 
Posts: 7
Joined: Sat Feb 19, 2011 2:42 pm

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

Postby crashlander » Tue Mar 06, 2012 9:29 pm

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
crashlander
 
Posts: 503
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

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

Postby PatrikE » Tue Mar 06, 2012 10:35 pm

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
PatrikE
 
Posts: 1683
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

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

Postby leadfeather » Wed Mar 07, 2012 4:39 am

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.
leadfeather
 
Posts: 7
Joined: Sat Feb 19, 2011 2:42 pm

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

Postby leadfeather » Thu Mar 08, 2012 10:51 pm

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
leadfeather
 
Posts: 7
Joined: Sat Feb 19, 2011 2:42 pm

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

Postby PatrikE » Wed Apr 18, 2012 5:26 pm

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.
PatrikE
 
Posts: 1683
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

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

Postby caall99 » Wed Sep 26, 2012 4:06 pm

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.
caall99
 
Posts: 3
Joined: Thu Jun 02, 2011 10:38 pm

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

Postby PatrikE » Wed Sep 26, 2012 4:51 pm

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.
PatrikE
 
Posts: 1683
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

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

Postby caall99 » Wed Sep 26, 2012 6:36 pm

can i expect a level of stability and features comparable to a multirotor?
caall99
 
Posts: 3
Joined: Thu Jun 02, 2011 10:38 pm

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

Postby PatrikE » Wed Sep 26, 2012 8:25 pm

There's another thread about Helickoter integration with more info.
viewtopic.php?f=8&t=1562&start=40
PatrikE
 
Posts: 1683
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

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

Postby Hamburger » Wed Sep 26, 2012 11:36 pm

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
User avatar
Hamburger
 
Posts: 2400
Joined: Tue Mar 01, 2011 2:14 pm

Next

Return to Ideas

Who is online

Users browsing this forum: No registered users and 1 guest