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
SquidgyB
Posts: 6
Joined: Wed Sep 17, 2014 4:24 pm

Re: Helicopter integration

Post by SquidgyB »

Has anyone tried this with a small CP heli, like an MCP-X?

I have a brushless main & tail MCP-X that I'm going to *try* and get working using an Orange RX (stripped of excess metal/case), Pro Mini and a GY-85...

I've got some testing and fiddly soldering to do before I get anywhere, but I'll try and keep this thread updated with anything pertinent.

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

Re: Helicopter integration

Post by Hamburger »

I do not know how small mcp-x is.
Gaui 200 fbl with 205mm blades is my smallest with nanowii+spektrum.sat+i2c.oled

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

Re: Helicopter integration

Post by RC Man »

MCPX has 135 blades, small for a multi wii, maybe integrate a mpu6050 on the 3in1 between the servos and the 3in1.
+ with 4 volts, I dont know how long you could fly. I had a hard time installing in this 450.
Attachments
IMG_1678.JPG

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

Re: Helicopter integration

Post by Hamburger »

that 450 looks interesting. Is it tuned for speed? Rotation of tail looks unusual?
Btw. why was it difficult to use MWii - on 450 space is available for regular rx+fbl and mwii should be comparable in size with any of the all in one boards?

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

Re: Helicopter integration

Post by RC Man »

If you look at the pic, the bottom frames are no longer there, No gyro mount,rx mount.
Had only room under the canopy behind the battery, next to the swashplate.
The tail rotates in reverse, as I dont need so much tail authority racing, Ive since then put my M/W fbl on the side burner,
still interested, but wanting to learn more about fbl and the PID settings, this will help me in understanding the M/W settings for the future.
Keep it up yall, we are going somewhere with this.

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

Re: Helicopter integration

Post by Alexinparis »

Hi,

About MultiWii on mini cp, you can follow this man:
https://www.youtube.com/channel/UCEtmuV ... OmnV27A7Hw
the result is apparently very good, and no problem to do fairly good 3D

According to the description he uses this board:
http://www.hobbyking.com/hobbyking/stor ... o_mag.html

This one should also be a good candidate with brushed output
http://www.hobbyking.com/hobbyking/stor ... rated.html

SquidgyB
Posts: 6
Joined: Wed Sep 17, 2014 4:24 pm

Re: Helicopter integration

Post by SquidgyB »

Ah, so someone's already done it :)

Mine will consist of a Pro Micro, Orange Rx like this one http://orangerx.com/tag/dsm2/ with CPPM, and a GY-85. All pins have been removed, I'll just be using magnet wire of some sort for connections.

Including the ESCs (which were put together and flashed a while ago now, but still have flashing connectors installed) the FC/Rx/ESC combo should be around 8-10g, which is well within the limits for a brushless MCP-X, I think.

I'm not looking to do much 3D flying, or any real "duration" flights. It's more of a learning experience in setting up MultiWii so I can be more confident in setting other things up with it in the future.

Bit of a deep end to jump off into I suppose, but I enjoy figuring stuff out as I go along.

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

Re: Helicopter integration

Post by RC Man »

Bit of a deep end to jump off into I suppose, but I enjoy figuring stuff out as I go along.

Thats what keeps most of us here going, Me included.
Doing things on the run, so to say.

keep up the good work, and keep us informed.

SquidgyB
Posts: 6
Joined: Wed Sep 17, 2014 4:24 pm

Re: Helicopter integration

Post by SquidgyB »

I looked at the wiring last night, seems simple enough - I'm going off Patrik's blog post so;

D12 = Nickservo
D11 = Left
D10 = Right
D9 = Main motor
D3 = Yaw motor (with corresponding change in config.h)

Am I right in thinking CPPM goes in on D2? (Along with the appropriate config.h modification) That'll save me from wiring up each channel separately. Ignore that, I have an R610 - I believe that's before they did CPPM. So I'm stuck with a set of wires. No biggie.

SDA and SCL from the sensor... go to what I assume are A4 and A5? The Pro Micro's I have are each a little different, some have A6/A7 pinouts, but all have A4/A5, albeit sometimes in different places.

The rest is mainly powertrain (5v supplied from the XP7A) and (very) fiddly soldering. I somehow managed to desolder the tiny servo connectors from the 3in1 board (without destroying them!) and I've set them up with a magnet wire power rail and lighter wire for the signals.

Servos are being pushed at 5v, they should be 4.2v techincally - though they always worked before (the 3in1 had 5v supplied by the XP-7A) so we'll see how they go. Spares are cheaper to pick up than they used to be, too.

I was thinking of swapping D3 with D8 by software, but I'm not sure of the capabilities of D8 compared to D3 - I just wanted to tidy up the wiring so both motors (and servos) are all connected down one end of the board. Having looked into what's required within the code I'm not so sure that's a good idea - it's one thing to change a definition or something in config.h, but I'm not quite ready to go hunting through the code swapping out each reference to D3/D8 to get that sorted. A little extra wire will have to do.

As for vibration isolation/damping, I'll play around with what I set up previously - a plectrum with some double sided foam. I might play around with different solutions to that issue.

SquidgyB
Posts: 6
Joined: Wed Sep 17, 2014 4:24 pm

Re: Helicopter integration

Post by SquidgyB »

I've soldered everything together, and to my delight all LEDs lit up nicely on the first try.

ESCs, FC, sensor, Rx and battery wire together come to ~12g. A little heavy, but not too bad, and definitely flyable.

I've uploaded MultiWii, now I'm just having noobish issues with sensor orientation... I'm searching everywhere for any info on GY-85 orientation but I can't find much. I thought setting GY-85 as the sensor trying different orientations out with a calibration inbetween would get me the right way by trial and error - but i'm flummoxed. Every which way I try it looks to me like some sensors are inverted or on the wrong axis.

On the plus side, servos are responding to movements.

e: Following on from that - I've sorted the orientation, I think I was just being an idiot and probably had it set up correctly from the start - I went over the expected outputs and all was good.

...but... now it seems only 3 of the 5 channels are coming through. I get Pitch, Yaw and Aux1 coming through fine, but Throttle and Roll are stuck at 1500 just like Aux2/3/4. can't see anything obvious in my soldering, but it gets pretty fiddly in there, I've cut the Rx board with a dremel to save weight (just the +ive and -ive rails) and tacked power onto the corresponding PCB traces. I might just get me a CPPM Rx to save all the hassle, but while this is here I'll try and get it sorted one way or another.

I thought it might have something to do with a Pro Mini specific configuration option in config.h, but I can't see anything in there that actually makes a difference.

SquidgyB
Posts: 6
Joined: Wed Sep 17, 2014 4:24 pm

Re: Helicopter integration

Post by SquidgyB »

I decided to scrap the orange Rx - I managed to find an old TFR4 which to my surprise boasts CPPM! So I've re wired the layercake, and now I have all channels responding as expected.

Now to actually make the buzzy little bastard flight worthy.

sachiho
Posts: 3
Joined: Sun Oct 05, 2014 1:38 pm

Re: Helicopter integration

Post by sachiho »

Hi
I am working to fly miniCP by MWC. (Thanks Alexinparis for noticing me)

I was helped very much by this thread. But I'm sorry, I had not fed back my result yet.

I'm using hobbyking nanoWii controller, orange satellite RX, Dual brushless motors and 2S battery.
Here is my recipe (google translated, sorry it is written in Japanese)
https://translate.google.co.jp/translat ... edit-text=


I added the code which improves the tail hold on a pitch pump, and the code of piro optimization to the original MWC code.
Below has the code which I changed.
https://code.google.com/p/multiwii-helimod/


Although I was using 1S battery in early stages, the MWC does not operate correctly on the voltage which is much less than 4V.
When 1S battery was used, two batteries for motors and for MWC needed to be stacked.

1S movie
https://www.youtube.com/watch?v=2iuijpw79OI

After that, I shift to 2S battery and am continuing the try to realize a 3D controller like AS3X.

2S movie
https://www.youtube.com/watch?v=uq7EG7NTdbE

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

Re: Helicopter integration

Post by Hamburger »

Hello sachiho,

thank you for your contribution. For easier reading I made a diff against v2.3

Code: Select all

diff -BbwE -r -u MultiWii_2_3/MultiWii/MultiWii.cpp multiwii-helimod/MultiWii/MultiWii.cpp
--- MultiWii_2_3/MultiWii/MultiWii.cpp   2013-11-07 23:56:18.000000000 +0100
+++ multiwii-helimod/MultiWii/MultiWii.cpp   2014-10-06 20:26:31.000000000 +0200
@@ -1335,6 +1335,19 @@
     //-----calculate total PID output
     axisPID[axis] =  PTerm + ITerm + DTerm;
   }
+
+    // pirouette optimization ( rotate horizontal error term )
+    // rescale gyrodata to radian:  gyrodata * (freq: cycletime/1000000) * (gyro2deg: 2000/8192) * (deg2rad: 2Pi/360)
+    double GyroToRad  = cycleTime * 0.000000004259;
+    double Sint = sin(-imu.gyroData[YAW] * GyroToRad);
+    double Cost = cos(-imu.gyroData[YAW] * GyroToRad);
+
+    errorGyroI[ROLL]  =  errorGyroI[ROLL]*Cost + errorGyroI[PITCH]*Sint;
+    errorGyroI[PITCH] = -errorGyroI[ROLL]*Sint + errorGyroI[PITCH]*Cost;
+    axisPID[ROLL]  =  axisPID[ROLL]*Cost + axisPID[PITCH]*Sint;
+    axisPID[PITCH] = -axisPID[ROLL]*Sint + axisPID[PITCH]*Cost;
+
+
 #else
   #error "*** you must set PID_CONTROLLER to one existing implementation"
 #endif
diff -BbwE -r -u MultiWii_2_3/MultiWii/Output.cpp multiwii-helimod/MultiWii/Output.cpp
--- MultiWii_2_3/MultiWii/Output.cpp   2013-09-09 23:41:40.000000000 +0200
+++ multiwii-helimod/MultiWii/Output.cpp   2014-10-06 20:26:31.000000000 +0200
@@ -1269,11 +1269,25 @@
     /* Throttle & YAW
     ******************** */
     // Yaw control is common for Heli 90 & 120
+    //servo[5] = (axisPID[YAW] * SERVODIR(5,1)) + conf.servoConf[5].middle + servo[7]<<7 + collective<<8;
+
+    // tail precomp from collective
+    if (abs(collective) > YAW_COLL_PRECOMP_DEADBAND ){
+      servo[5] = (axisPID[YAW] * SERVODIR(5,1)) + conf.servoConf[5].middle + (abs(collective)-YAW_COLL_PRECOMP_DEADBAND) * YAW_COLL_PRECOMP;
+    }else{
     servo[5] = (axisPID[YAW] * SERVODIR(5,1)) + conf.servoConf[5].middle;
-    #if YAWMOTOR
+    }
+
+    #if (YAWMOTOR || YAWSTOP)
       servo[5] = constrain(servo[5], conf.servoConf[5].min, conf.servoConf[5].max); // limit the values
-      if (rcCommand[THROTTLE]<conf.minthrottle || !f.ARMED) {servo[5] = MINCOMMAND;} // Kill YawMotor
+      if (rcCommand[THROTTLE] <= conf.minthrottle || !f.ARMED) {servo[5] = MINCOMMAND;} // Kill YawMotor
+      else{
+         if ( servo[5] < 1030) {  // don't stop tail motor
+          servo[5] = 1030;
+        }
+      }
     #endif
+
     if (!f.ARMED){
       servo[7] = MINCOMMAND;          // Kill throttle when disarmed
     } else {
diff -BbwE -r -u MultiWii_2_3/MultiWii/config.h multiwii-helimod/MultiWii/config.h
--- MultiWii_2_3/MultiWii/config.h   2013-11-08 00:00:00.000000000 +0100
+++ multiwii-helimod/MultiWii/config.h   2014-10-06 20:26:31.000000000 +0200
@@ -50,7 +50,7 @@
     //#define AIRPLANE
     //#define SINGLECOPTER
     //#define DUALCOPTER
-    //#define HELI_120_CCPM
+    #define HELI_120_CCPM
     //#define HELI_90_DEG
 
   /****************************    Motor minthrottle    *******************************/
@@ -60,16 +60,16 @@
     //#define MINTHROTTLE 1120 // for Super Simple ESCs 10A
     //#define MINTHROTTLE 1064 // special ESC (simonk)
     //#define MINTHROTTLE 1050 // for brushed ESCs like ladybird
-    #define MINTHROTTLE 1150 // (*) (**)
+    #define MINTHROTTLE 0 // (*) (**)
 
   /****************************    Motor maxthrottle    *******************************/
     /* this is the maximum value for the ESCs at full power, this value can be increased up to 2000 */
-    #define MAXTHROTTLE 1850
+    #define MAXTHROTTLE 1950
 
   /****************************    Mincommand          *******************************/
     /* this is the value for the ESCs when they are not armed
        in some cases, this value must be lowered down to 900 for some specific ESCs, otherwise they failed to initiate */
-    #define MINCOMMAND  1000
+    #define MINCOMMAND  0
 
   /**********************************    I2C speed   ************************************/
     #define I2C_SPEED 100000L     //100kHz normal mode, this value must be used for a genuine WMP
@@ -96,7 +96,7 @@
       //#define FREEIMUv035_BMP // FreeIMU v0.3.5_BMP
       //#define FREEIMUv04      // FreeIMU v0.4 with MPU6050, HMC5883L, MS561101BA                  <- confirmed by Alex
       //#define FREEIMUv043     // same as FREEIMUv04 with final MPU6050 (with the right ACC scale)
-      //#define NANOWII         // the smallest multiwii FC based on MPU6050 + pro micro based proc <- confirmed by Alex
+      #define NANOWII         // the smallest multiwii FC based on MPU6050 + pro micro based proc <- confirmed by Alex
       //#define PIPO            // 9DOF board from erazz
       //#define QUADRINO        // full FC board 9DOF+baro board from witespy  with BMP085 baro     <- confirmed by Alex
       //#define QUADRINO_ZOOM   // full FC board 9DOF+baro board from witespy  second edition
@@ -109,7 +109,7 @@
       //#define SIRIUS600       // Sirius Navigator IMU  using the WMP for the gyro
       //#define SIRIUS_AIR      // Sirius Navigator IMU 6050 32U4 from MultiWiiCopter.com           <- confirmed by Alex
       //#define SIRIUS_AIR_GPS  // Sirius Navigator IMU 6050 32U4 from MultiWiiCopter.com with GPS/MAG remote located
-      //#define SIRIUS_MEGAv5_OSD //  Paris_Sirius‚Ñ¢ ITG3050,BMA280,MS5611,HMC5883,uBlox  http://www.Multiwiicopter.com <- confirmed by Alex
+      //#define SIRIUS_MEGAv5_OSD //  Paris_Sirius? ITG3050,BMA280,MS5611,HMC5883,uBlox  http://www.Multiwiicopter.com <- confirmed by Alex
       //#define MINIWII         // Jussi's MiniWii Flight Controller                                <- confirmed by Alex
       //#define MICROWII        // MicroWii 10DOF with ATmega32u4, MPU6050, HMC5883L, MS561101BA from http://flyduino.net/
       //#define CITRUSv2_1      // CITRUS from qcrc.ca
@@ -199,7 +199,7 @@
 
       /* enforce your individual sensor orientation - even overrides board specific defaults */
       //#define FORCE_ACC_ORIENTATION(X, Y, Z)  {imu.accADC[ROLL]  =  Y; imu.accADC[PITCH]  = -X; imu.accADC[YAW]  = Z;}
-      //#define FORCE_GYRO_ORIENTATION(X, Y, Z) {imu.gyroADC[ROLL] = -Y; imu.gyroADC[PITCH] =  X; imu.gyroADC[YAW] = Z;}
+      #define FORCE_GYRO_ORIENTATION(X, Y, Z) {imu.gyroADC[ROLL] = Z; imu.gyroADC[PITCH] =  Y; imu.gyroADC[YAW] = X;}
       //#define FORCE_MAG_ORIENTATION(X, Y, Z)  {imu.magADC[ROLL]  =  X; imu.magADC[PITCH]  =  Y; imu.magADC[YAW]  = Z;}
 
       /* Board orientation shift */
@@ -220,13 +220,13 @@
      * 1 = evolved oldschool algorithm (similar to v2.2)
      * 2 = new experimental algorithm from Alex Khoroshko - unsupported - http://www.multiwii.com/forum/viewtopic.php?f=8&t=3671&start=10#p37387
      * */
-    #define PID_CONTROLLER 1
+    #define PID_CONTROLLER 2
 
     /* NEW: not used anymore for servo coptertypes  <== NEEDS FIXING - MOVE TO WIKI */
     #define YAW_DIRECTION 1
     //#define YAW_DIRECTION -1 // if you want to reverse the yaw correction direction
 
-    #define ONLYARMWHENFLAT //prevent the copter from arming when the copter is tilted
+//    #define ONLYARMWHENFLAT //prevent the copter from arming when the copter is tilted
 
    /********************************    ARM/DISARM    *********************************/
    /* optionally disable stick combinations to arm/disarm the motors.
@@ -281,7 +281,8 @@
 
   /***********************          Heli                           ***********************/
     /* Channel to control CollectivePitch */
-    #define COLLECTIVE_PITCH      THROTTLE
+    //#define COLLECTIVE_PITCH      THROTTLE
+    #define COLLECTIVE_PITCH      AUX2
 
     /* Limit the range of Collective Pitch. 100% is Full Range each way and position for Zero Pitch */
     #define COLLECTIVE_RANGE { 80, 0, 80 }// {Min%, ZeroPitch offset from 1500, Max%}.
@@ -300,6 +301,11 @@
        if inactive, throttle output will be treated as a motor output, so it can drive an ESC */
     //#define HELI_USE_SERVO_FOR_THROTTLE
 
+    // sachiho add for helicopter
+    #define    YAWSTOP                    1    // cut tail motor when throttle is zero :for brushless tail ESC driven by servo PWM signal
+    #define    YAW_COLL_PRECOMP           1.5  // increase tail thrust with respect to abs(collective pitch)
+    #define    YAW_COLL_PRECOMP_DEADBAND  120
+
   /***********************      your individual mixing     ***********************/
     /* if you want to override an existing entry in the mixing table, you may want to avoid editing the
      * mixTable() function for every version again and again.
@@ -343,7 +348,7 @@
          Spektrum Satellites are 3V devices.  DO NOT connect to 5V!
          For MEGA boards, attach sat grey wire to RX1, pin 19. Sat black wire to ground. Sat orange wire to Mega board's 3.3V (or any other 3V to 3.3V source).
          For PROMINI, attach sat grey to RX0.  Attach sat black to ground. */
-      //#define SPEKTRUM 1024
+      #define SPEKTRUM 1024
       //#define SPEKTRUM 2048
       //#define SPEK_SERIAL_PORT 1    // Forced to 0 on Pro Mini and single serial boards; Set to your choice of 0, 1, or 2 on any Mega based board (defaults to 1 on Mega).
       //**************************
@@ -354,7 +359,7 @@
       //   Normally use 3.3V regulator is needed on the power pin!!  If your satellite hangs during bind (blinks, but won't complete bind with a solid light), go direct 5V on all pins.
       //**************************
       //   For Pro Mini, the connector for the Satellite that resides on the FTDI can be unplugged and moved to these three adjacent pins.
-      //#define SPEK_BIND             //Un-Comment for Spektrum Satellie Bind Support.  Code is ~420 bytes smaller without it.
+      #define SPEK_BIND             //Un-Comment for Spektrum Satellie Bind Support.  Code is ~420 bytes smaller without it.
       //#define SPEK_BIND_GROUND 4
       //#define SPEK_BIND_POWER  5
       //#define SPEK_BIND_DATA   6
@@ -502,7 +507,7 @@
       //#define MPU6050_LPF_188HZ
       //#define MPU6050_LPF_98HZ
       //#define MPU6050_LPF_42HZ
-      //#define MPU6050_LPF_20HZ
+      #define MPU6050_LPF_20HZ
       //#define MPU6050_LPF_10HZ
       //#define MPU6050_LPF_5HZ       // Use this only in extreme cases, rather change motors and/or props
 
@@ -510,7 +515,7 @@
       /* GYRO_SMOOTHING. In case you cannot reduce vibrations _and_ _after_ you have tried the low pass filter options, you
          may try this gyro smoothing via averaging. Not suitable for multicopters!
          Good results for helicopter, airplanes and flying wings (foamies) with lots of vibrations.*/
-      //#define GYRO_SMOOTHING {20, 20, 3}    // (*) separate averaging ranges for roll, pitch, yaw
+      #define GYRO_SMOOTHING {60, 60, 1}    // (*) separate averaging ranges for roll, pitch, yaw
 
     /************************    Moving Average Gyros    **********************************/
       //#define MMGYRO 10                      // (*) Active Moving Average Function for Gyros
@@ -850,7 +855,7 @@
      * + want altitude readout and/or variometer
      * + do not use altitude hold feature
      * + want to save memory space */
-    //#define SUPPRESS_BARO_ALTHOLD
+    #define SUPPRESS_BARO_ALTHOLD
 
   /********************************************************************/
   /****           altitude variometer                              ****/
@@ -914,7 +919,7 @@
 
   /***********************         Servo Refreshrates            ***********************/
     /* Default 50Hz Servo refresh rate*/
-    #define SERVO_RFR_50HZ
+    //#define SERVO_RFR_50HZ
 
     /* up to 160Hz servo refreshrate .. works with the most analog servos*/
     //#define SERVO_RFR_160HZ
@@ -946,10 +951,10 @@
      * servo[5] = yaw   servo = pin  5
      * servo[6]  = right servo= pin  9
      */
-    //#define A32U4_4_HW_PWM_SERVOS
+    #define A32U4_4_HW_PWM_SERVOS
 
-    #define SERVO_RFR_RATE  50    // In Hz, you can set it from 20 to 400Hz, used only in HW PWM mode for mega and 32u4
-    //#define SERVO_PIN5_RFR_RATE  200    // separate yaw pwm rate.
+    #define SERVO_RFR_RATE  60    // In Hz, you can set it from 20 to 400Hz, used only in HW PWM mode for mega and 32u4
+    #define SERVO_PIN5_RFR_RATE  100    // separate yaw pwm rate.
                                           // In Hz, you can set it from 20 to 400Hz, used only in HW PWM mode for 32u4
 
 

But I think there is an error in the pirouette code here:

Code: Select all

    errorGyroI[ROLL]  =  errorGyroI[ROLL]*Cost + errorGyroI[PITCH]*Sint;
    errorGyroI[PITCH] = -errorGyroI[ROLL]*Sint + errorGyroI[PITCH]*Cost;
and here

Code: Select all

    axisPID[ROLL]  =  axisPID[ROLL]*Cost + axisPID[PITCH]*Sint;
    axisPID[PITCH] = -axisPID[ROLL]*Sint + axisPID[PITCH]*Cost;

In both cases, the second computation uses the result of xy[ROLL] from the previous line. This is not typical of applying rotation and maybe not intended?

sachiho
Posts: 3
Joined: Sun Oct 05, 2014 1:38 pm

Re: Helicopter integration

Post by sachiho »

Thanks Hamburger,

Oh, you are totally right.
I should write like

Code: Select all

    double errorGyroIROLL =  errorGyroI[ROLL]*Cost + errorGyroI[PITCH]*Sint;
    errorGyroI[PITCH] = -errorGyroI[ROLL]*Sint + errorGyroI[PITCH]*Cost;
    errorGyroI[ROLL]  =  errorGyroIROLL;


I will fix my SVN repository soon.
Thanks again.

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

Re: Helicopter integration

Post by Hamburger »

so did you experience any difference in behaviour with the correction to piroutte computation?

sachiho
Posts: 3
Joined: Sun Oct 05, 2014 1:38 pm

Re: Helicopter integration

Post by sachiho »

In fact, I was not able to feel the clear difference by fixed code.

Maybe it is because 100 sized heli can not pirouette perfectly at a point like large helis.
Even with piro compensation code, my heli moves to right in CCW pirouette.

Anyway, compared with original MWC which does not include compensation, a great improvement is seen about the pirouette of two or more times rotations.
https://www.youtube.com/watch?v=foMPmT-6b2g

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

Re: Helicopter integration

Post by Hamburger »

tail precomp is in r1726 now, even tunable via lcd (and possibly MWiiGui soon).
As I do not fly pid.conroller=2 I am hesitant to copy'n'paste that portion for piro optimization, sorry. Any volunteers to test fly?

ivars
Posts: 1
Joined: Fri Jul 31, 2015 6:43 pm

Re: Helicopter integration

Post by ivars »

I have a HK mini multiwii with dsm2 receiver controller and there is no D12 available for connecting the nick servo. Are there any other possibilities?

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

Re: Helicopter integration

Post by PatrikE »

ivars wrote:I have a HK mini multiwii with dsm2 receiver controller and there is no D12 available for connecting the nick servo. Are there any other possibilities?

Hi and welcome.
Assuming you use 2.4.
You can use A0 -A2 with some trix.
In def.h find this.

Code: Select all

#elif defined(HELICOPTER)

Change the row after to

Code: Select all

#define PRI_SERVO_FROM   1
This will activate all servo outputs.

In Output you need to transfer the data to correct servo port.
search for #ifdef HELI_

You need to add a line last in the mixer .
To use A2..

Code: Select all

servo[2] = servo[3];

Add it on a new line
Line 1426 if you use 120 swash
Line 1436 if you use 90 swash

Good luck
Patrik

Post Reply