Page 1 of 1

No CAM STAB in MultiWii_dev_r1240

Posted: Sat Nov 17, 2012 10:22 pm
by Polleke
Hi all,

I switched from MultiWii 2.0 to MultiWii_dev_r1240.
Very nice ALT HOLD behavior… :D …… but now my Cam Stab isn’t working properly anymore. :(
However it did in the 2.0 version.
I (un)commented (on/off) following lines in the config.h:

#define GIMBAL (comment or uncomment, makes no difference)
#define SERVO_MIX_TILT (comment or uncomment, makes no difference)
#define SERVO_TILT (comment or uncomment, makes no difference)

I’ve turned on Cam Stab in the GUI.
The servo’s jitter and the roll(function) servo goes all in one corner. :shock:

What am I doing wrong???

Re: No CAM STAB in MultiWii_dev_r1240

Posted: Sun Dec 02, 2012 5:10 am
by eXc
Hello,

i've started testing different gimbal settings too and can recognize the same experience. On dev versions my servos are twitching too but also in unstabilized mode. Will test further and look where the diffences between both versions are.

best regards
Christian

Re: No CAM STAB in MultiWii_dev_r1240

Posted: Sun Dec 02, 2012 10:10 am
by Polleke
eXc wrote:Hello,

i've started testing different gimbal settings too and can recognize the same experience. On dev versions my servos are twitching too but also in unstabilized mode. Will test further and look where the diffences between both versions are.

best regards
Christian


Hi Cristian,

I've "solved" my problem by flashing my board with this config: MultiWii_2_1_NewBaroPIDVario4Final and my problem is gone :D
Its got a very good ALTHOLD also.
Perhaps it is something for you to try ;)

Best regards,
Paul

Re: No CAM STAB in MultiWii_dev_r1240

Posted: Sun Dec 02, 2012 11:55 am
by eXc
Hello,

that's right, have tested this version too but also want to be able to use the newest dev's with all their functions. All 2.1 Versions will work, but i have found the problem in my case. Perhaps you will give it a try. Find the following part in Output.ino (Line 55ff. in my case) and change the last values as i did.

Code: Select all

  #if defined(SERVO)
    #if defined(AIRPLANE)|| defined(HELICOPTER)
      // To prevent motor to start at reset. atomicServo[7]=5 or 249 if reversed servo
      volatile uint16_t atomicServo[8] = {8000,8000,8000,8000,8000,8000,8000,8000}; // last value now 8000 instead of 320
    #else
      volatile uint16_t atomicServo[8] = {8000,8000,8000,8000,8000,8000,8000,320}; // last value now 320 instead of 8000
    #endif
  #endif


Best regards
Christian

Re: No CAM STAB in MultiWii_dev_r1240

Posted: Sun Dec 02, 2012 1:49 pm
by Polleke
eXc wrote:Hello,

that's right, have tested this version too but also want to be able to use the newest dev's with all their functions. All 2.1 Versions will work, but i have found the problem in my case. Perhaps you will give it a try. Find the following part in Output.ino (Line 55ff. in my case) and change the last values as i did.

Code: Select all

  #if defined(SERVO)
    #if defined(AIRPLANE)|| defined(HELICOPTER)
      // To prevent motor to start at reset. atomicServo[7]=5 or 249 if reversed servo
      volatile uint16_t atomicServo[8] = {8000,8000,8000,8000,8000,8000,8000,8000}; // last value now 8000 instead of 320
    #else
      volatile uint16_t atomicServo[8] = {8000,8000,8000,8000,8000,8000,8000,320}; // last value now 320 instead of 8000
    #endif
  #endif


Best regards
Christian


In these lines, my values are at the moment: "volatile uint8_t atomicServo[8] = {125,125,125,125,125,125,125,5};"
and: "volatile uint8_t atomicServo[8] = {125,125,125,125,125,125,125,125};"

Before I change anything (because it is working fine now :D Gimbal AND ALThold), I want to ask you.
What is the purpose of changing these values?
BTW, I don't know anything about programming the Arduino....... ;)

Re: No CAM STAB in MultiWii_dev_r1240

Posted: Sun Dec 02, 2012 8:53 pm
by eXc
I don't really know where these values are for, but i have compared the two version 2.1, dev_1240 and dev_1277 and this was the only difference between these ones in case of cam stabilization.

Although i said that it worked for me, must not for everyone else. But perhaps you can give it a try to see if it is working.

Re: No CAM STAB in MultiWii_dev_r1240

Posted: Thu Dec 06, 2012 1:08 pm
by eXc
Polleke wrote:What is the purpose of changing these values?


Perhaps someone who knows can tell us that and explain every value.

Christian

Re: No CAM STAB in MultiWii_dev_r1240

Posted: Fri Dec 07, 2012 7:26 pm
by PatrikE
The values is there to center all servos at init.
The last value is different because you dont want to set throttle to 50% at startup!... :o
But only If plane or Heli is selected servo 7 is hardcoded as throttle!

Gimbal on A0 & A1 is controlled by the 2 first values.
For Pro Mini and other 328 based cards center is 125.
For mega and some other boards center is 8000.

/Patrik

Re: No CAM STAB in MultiWii_dev_r1240

Posted: Sat Jan 12, 2013 1:31 am
by defkom
Hi guys,
I am trying to get MultiWii_dev_r1240 runnning with camstab as a Y6.
I need to configure board orientation shift as well.
I followed eXc's hints for the output.ino put this did not change a thing.
Did anybody ever try this as well?
Cheers

PS: CAM Stab works fine, as soon as I flash my old 2.1 config (but this does not support board orientation shift)