Page 1 of 1

MultiWii_dev_20120528

Posted: Tue May 29, 2012 10:50 am
by PatrikE
In MultiWii_dev_20120528
there's some rename PID values.
#define PIDVEL 4
Changed to
#define PIDPOS 4

Resulting in that LCD is broken. :cry:

/PatrikE

Re: MultiWii_dev_20120528

Posted: Tue May 29, 2012 1:03 pm
by nhadrian
Yes, all variables are renamed, and also, VEL doesn't exists anymore but there are new parameters for the new GPS code.
I had to debug the OLED_LCD part, because LCD.ino is still the older one. So I'm sure none of LCD will work with this code unless code is repaired by yourself......

Re: MultiWii_dev_20120528

Posted: Tue May 29, 2012 6:33 pm
by mbrak
hi

new dev wont compile with bmp085 and oled selected.

got some errors from lcd.ino

Code: Select all

LCD:766: error: 'lcd_param_text14' was not declared in this scope
LCD:766: error: 'PIDVEL' was not declared in this scope
LCD:767: error: 'lcd_param_text15' was not declared in this scope
LCD:767: error: 'PIDVEL' was not declared in this scope
LCD:768: error: 'lcd_param_text16' was not declared in this scope
LCD:768: error: 'PIDVEL' was not declared in this scope

Re: MultiWii_dev_20120528

Posted: Tue May 29, 2012 6:45 pm
by Alexinparis
Hi,

I'm going to fix it today.
PIDVEL will be reintroduced but not in GUI for the moment.
So that the current LCD code will still work.

Re: MultiWii_dev_20120528

Posted: Tue May 29, 2012 7:23 pm
by EOSBandi
Hi Alex,
this one is missing from the setup()
In Multiwii.ino around line 495 enter this (Its close to the end of setup() )

Code: Select all

  #if defined(I2C_GPS)
   GPS_Enable = 1;
  #endif


WIthout this, i2cgps is not enabled even when defined in config.h

I just flown a couple of packs with 20120528, controls and i2c gps code is working perfectly.

Re: MultiWii_dev_20120528

Posted: Tue May 29, 2012 8:06 pm
by copterrichie
Kudos!!!

Re: MultiWii_dev_20120528

Posted: Tue May 29, 2012 9:38 pm
by dramida
This is how dev20120528 works. Complete features video: Gps return-to-Home, GPS Position Hold, Altitude Hold, Magnetic Head Hold.
http://www.youtube.com/watch?v=952DYF3XV8s

Re: MultiWii_dev_20120528

Posted: Tue May 29, 2012 10:23 pm
by sismeiro
dramida wrote:This is how dev20120528 works. Complete features video: Gps return-to-Home, GPS Position Hold, Altitude Hold, Magnetic Head Hold.
http://www.youtube.com/watch?v=952DYF3XV8s

I don't know the other multicopter controllers out there but this seems very good to me, good altitude hold and good GPS positioning hold. I used to do geocaching so I understand well the error that GPS positioning have and how much the distances can vary. Thank you for your video.

Re: MultiWii_dev_20120528

Posted: Wed May 30, 2012 7:12 am
by nhadrian
Hi,

Another catch from Howard:
in IMU.ino, the magnetic declination is missing.

This part:

Code: Select all

  #if MAG
    // Attitude of the cross product vector GxM
    heading = _atan2( EstG.V.X * EstM.V.Z - EstG.V.Z * EstM.V.X , EstG.V.Z * EstM.V.Y - EstG.V.Y * EstM.V.Z  ) / 10;
  #endif


should be:

Code: Select all

   #if MAG
    // Attitude of the cross product vector GxM
//******************************************EOSBANDI - removed /10 to increase precision of decliniation calc   
    heading = _atan2( EstG.V.X * EstM.V.Z - EstG.V.Z * EstM.V.X , EstG.V.Z * EstM.V.Y - EstG.V.Y * EstM.V.Z  );
//******************************************EOSBANDI 
    //add declination
    //Heading is -180 - 180 had to wrap up accordingly
    heading = heading + (MAG_DECLINIATION * 10);

   heading = heading /10;               // /10 moved here from above
   
    if ( heading > 180)
       heading = heading - 360;
    else if (heading < -180)
       heading = heading + 360;
//***************************************************   
  #endif 


Thanks for catching it!

BR
Adrian

Re: MultiWii_dev_20120528

Posted: Wed May 30, 2012 9:03 am
by nhadrian
And another one... :

With this I get false MAG calibration, N and S are ok, but E and W have 5-6 degrees error:

Code: Select all

    #if defined(HMC5883)
      magCal[ROLL]  =  1160.0 / abs(magADC[ROLL]);
      magCal[PITCH] =  1160.0 / abs(magADC[PITCH]);
      magCal[YAW]   =  1080.0 / abs(magADC[YAW]);
    #else


So I had to change to this for proper mag working:
magCal[ROLL] = 1000.0 / abs(magADC[ROLL]);
magCal[PITCH] = 1000.0 / abs(magADC[PITCH]);
magCal[YAW] = 1080.0 / abs(magADC[YAW]);

#else[/code]

I don't know why...

BR
Adrian

Re: MultiWii_dev_20120528

Posted: Wed May 30, 2012 6:46 pm
by Andix
Hi

in the GUI
green/red- on/off Button for AUX2 is not activ

and i can't see the Channel bars on the right side ?

andix

Re: MultiWii_dev_20120528

Posted: Wed May 30, 2012 6:58 pm
by Alexinparis
nhadrian wrote:And another one... :

With this I get false MAG calibration, N and S are ok, but E and W have 5-6 degrees error:

Code: Select all

    #if defined(HMC5883)
      magCal[ROLL]  =  1160.0 / abs(magADC[ROLL]);
      magCal[PITCH] =  1160.0 / abs(magADC[PITCH]);
      magCal[YAW]   =  1080.0 / abs(magADC[YAW]);
    #else


So I had to change to this for proper mag working:
magCal[ROLL] = 1000.0 / abs(magADC[ROLL]);
magCal[PITCH] = 1000.0 / abs(magADC[PITCH]);
magCal[YAW] = 1080.0 / abs(magADC[YAW]);

#else[/code]

I don't know why...

BR
Adrian


Could someone else could reproduce also this problem ?
It was changed thanks to this info:
viewtopic.php?f=8&t=1387&p=10658

Re: MultiWii_dev_20120528

Posted: Wed May 30, 2012 7:52 pm
by nhadrian
Hi,

after reading the link you posted and followed this method, now it works with 1160/1160/1080 :

- rotate yaw 360 degree (x,y calibration)
- rotate pitch 360 degree (y z calibration)
- point multicopter west
- roll 360 degree (x z calibration)

So, the code is OK, but the method I used till now (rotate the copter around all axes, but in level) may result false calibration, so the methon mentioned above must followed!!!

BR
Adrian

Re: MultiWii_dev_20120528

Posted: Wed May 30, 2012 8:20 pm
by schmuggler
Hallo
i tested airplane mode but all servos go crazy .
i have the same setup as in aero heli .
in the gui every think looks fine.
thanks jan

Re: MultiWii_dev_20120528

Posted: Wed May 30, 2012 9:50 pm
by sismeiro
[quote="mbrak"]hi

new dev wont compile with bmp085 and oled selected.

got some errors from lcd.ino

Code: Select all

LCD:766: error: 'lcd_param_text14' was not declared in this scope
LCD:766: error: 'PIDVEL' was not declared in this scope
LCD:767: error: 'lcd_param_text15' was not declared in this scope
LCD:767: error: 'PIDVEL' was not declared in this scope
LCD:768: error: 'lcd_param_text16' was not declared in this scope
LCD:768: error: 'PIDVEL' was not declared in this scope


I just commented the lines where the PIDVEL was used and compiled :

Code: Select all

#if BARO
  &lcd_param_text11, &conf.P8[PIDALT], &__P,
  &lcd_param_text12, &conf.I8[PIDALT], &__I,
  &lcd_param_text13, &conf.D8[PIDALT], &__D,
  //&lcd_param_text14, &conf.P8[PIDVEL], &__P,
  //&lcd_param_text15, &conf.I8[PIDVEL], &__I,
  //&lcd_param_text16, &conf.D8[PIDVEL], &__D,
#endif

Re: MultiWii_dev_20120528

Posted: Wed May 30, 2012 10:16 pm
by Alexinparis
nhadrian wrote:Hi,

after reading the link you posted and followed this method, now it works with 1160/1160/1080 :

- rotate yaw 360 degree (x,y calibration)
- rotate pitch 360 degree (y z calibration)
- point multicopter west
- roll 360 degree (x z calibration)

So, the code is OK, but the method I used till now (rotate the copter around all axes, but in level) may result false calibration, so the methon mentioned above must followed!!!

BR
Adrian


Just to understand:
Where did you read that the copter must be leveled while rotating the copter around all axes.

so the methon mentioned above must followed!!!

False: there is no need to respect a specific order as long as you cover all directions.

Re: MultiWii_dev_20120528

Posted: Thu May 31, 2012 6:06 am
by nhadrian
Hi, just to explain a bit. A time ago it was said that copter must turn into any direction. My idea was that in level I turned around yaw, roll, pitch axes while copter pointed to north, then when copter pointed to west. Theoretically I covered all directions. I thought.

But, I forgot to copy a sentence into my previous post:
- point to the north 3d in your zone (for europe point north and down, it is near 45 degree down to earth)

When I turn the copter around all axes in level, there will be some positions which are not covered as when the copter points to north 3D. (yaw axis)

So I would say previously that I got good calibration only when I made the turns while pointing to the real north 3D direction (to north and 45-50 degrees down).

Re: MultiWii_dev_20120528

Posted: Thu May 31, 2012 7:33 pm
by krzysztof21
Hello, Is there a mistake in recognizing WMP + NC. In version 2.0 works fine but there is no choice for WMP + NC.
While defining dev_20120528 added to WMP and NC, and now soft does not correctly detect this configuration.

What a pity :( there is Airplane mode

Re: MultiWii_dev_20120528

Posted: Fri Jun 01, 2012 5:52 am
by PatrikE
In the newest Dev wmp and nb is not default.
They must be defined as any other sensors.

It saves some memory if other sensors is used

Re: MultiWii_dev_20120528

Posted: Fri Jun 01, 2012 1:11 pm
by krzysztof21
Hi Patrik. I know that you need to define, but after defining WMP + NC can not read data from the sensors properly. Do DEV ran in this configuration? Can you paste the lines to activate the WMP + NC. Maybe it's me behaving badly ;)

Re: MultiWii_dev_20120528

Posted: Fri Jun 01, 2012 1:55 pm
by copterrichie
Personally I believe it is time to consider moving to an ATmega1280, ATmega2560 or something more radical like a ST32 processor. The Atmega328 has served this community well and deserve a proper retirement. :)

Re: MultiWii_dev_20120528

Posted: Fri Jun 01, 2012 3:29 pm
by Scotth72
I don't have access to pin 19 on my Mega, and I would like to use PPM sum. I used to use this code to move the ppm pin to pin 2, but I can't find the pin order in the new code.


changing this:
#define PPM_PIN_INTERRUPT attachInterrupt(4, rxInt, RISING); //PIN 19
#define MOTOR_ORDER 3,5,6,2,7,8 //for a quad+: rear,right,left,front //+ for y6: 7:under right 8:under left

to this:
#define PPM_PIN_INTERRUPT attachInterrupt(0, rxInt, RISING); //PIN 2
#define MOTOR_ORDER 3,5,6,9,7,8 //for a quad+: rear,right,left,front //+ for y6: 7:under right 8:under left

How would I achieve the same result in the new code?
Thanks.

Re: MultiWii_dev_20120528

Posted: Tue Jun 05, 2012 10:16 pm
by rbirdie001
I'm trying to compile MultiWii_dev_20120528 for flying wing stabilization and I want to use "old" Pro Mini 168 board+WMP for that. With attached config it compiles for 168 board without error saying "Binary sketch size: 14252 bytes (of a 14336 byte maximum)" but then doesn't work (servos locked in the endposition and doesn't connect to GUI).
The same set Pro Mini 168 + WMP worked well with 1.9 and the same build works on Pro Mini 328+the same WMP. Is there any explanation?
Additional questions:
-Are servo outputs for flying wing still using A0,A1 pins? Can it be easily remapped to another pins to allow using also gimbal at the same time?
-Is it planned that advanced parameters (like servo centrepoints) currently reachable only by LCD will be soon accessible via GUI?
Thanks!
Roman

Re: MultiWii_dev_20120528

Posted: Tue Jun 05, 2012 10:19 pm
by kos

Re: MultiWii_dev_20120528

Posted: Tue Jun 05, 2012 10:33 pm
by rbirdie001
Pro Mini 168 5V 16MHz. I used exactly the same source and settings, only 168 or 328.
Roman

Re: MultiWii_dev_20120528

Posted: Tue Jun 05, 2012 10:54 pm
by Hamburger
rbirdie001 wrote:-Is it planned that advanced parameters (like servo centrepoints) currently reachable only by LCD will be soon accessible via GUI?

confirmative maybe. I will probably do it together with the same task for helicopter - airplane and flying wing will come as a byproduct.

You can use the 'LCD configuration code' without an lcd or a smartphone by compiling it in (best use lcd.textstar) and then use the terminal from within the arduino.ide to connect to your arduino . Simply ignore some control characters.

about 168p - read up on the specs of this mcu what is different from 328p, that may help you identify the root of your problem. Way easier to invest in a 328p arduino, imho.

Re: MultiWii_dev_20120528

Posted: Tue Jun 05, 2012 11:06 pm
by kos
Hamburger wrote:about 168p - read up on the specs of this mcu what is different from 328p, that may help you identify the root of your problem. Way easier to invest in a 328p arduino, imho.


We have to support all different board and mcu .. i do not own any 168p , but i would gladly help if posible :geek:

Re: MultiWii_dev_20120528

Posted: Tue Jun 05, 2012 11:07 pm
by rbirdie001
thanks Hamburger,
from your post I understood that there is some way accessing advanced parameters using smartphone... As I have one (at least one smart :) ) I'll try to read more about it and use it. (Direct link could save me time...Thanks!).
About 168 - I agree with you and it's already a "retired" board, I was just curious what it can be. I believed that when it compiles without error, it must work in the board... O.K. -maybe I'm naive :)
Roman

Re: MultiWii_dev_20120528

Posted: Wed Jun 06, 2012 2:18 am
by robjames
Scotth72 wrote:I don't have access to pin 19 on my Mega, and I would like to use PPM sum. I used to use this code to move the ppm pin to pin 2, but I can't find the pin order in the new code.


changing this:
#define PPM_PIN_INTERRUPT attachInterrupt(4, rxInt, RISING); //PIN 19
#define MOTOR_ORDER 3,5,6,2,7,8 //for a quad+: rear,right,left,front //+ for y6: 7:under right 8:under left

to this:
#define PPM_PIN_INTERRUPT attachInterrupt(0, rxInt, RISING); //PIN 2
#define MOTOR_ORDER 3,5,6,9,7,8 //for a quad+: rear,right,left,front //+ for y6: 7:under right 8:under left

How would I achieve the same result in the new code?
Thanks.



I have a Mega with a 1280 chip . I haven't used PPM on it but my board has PIN 19 taken out to RX1 and
should be quite easy to use. I think it's the same on the 2560 version.

Re: MultiWii_dev_20120528

Posted: Wed Jun 06, 2012 2:36 am
by Scotth72
I have the old Flyduino, where pin 19 is out to that tiny jst connector. Makes it useless. I would like to use serial 2 or 3, which do have regular pins.

Re: MultiWii_dev_20120528

Posted: Wed Jun 06, 2012 6:21 pm
by robjames
Scotth72 wrote:I have the old Flyduino, where pin 19 is out to that tiny jst connector. Makes it useless. I would like to use serial 2 or 3, which do have regular pins.



You should have said that in the first place. I have the same Flyduino and it's very easy to solder a small wire on the jst connector for your signal and then plug in the power and ground wires on the servo lead to the nearby connector. See photo.

Re: MultiWii_dev_20120528

Posted: Wed Jun 06, 2012 7:33 pm
by copterrichie
Thank you Rob, I have the same board.

Re: MultiWii_dev_20120528

Posted: Thu Jun 07, 2012 2:32 am
by Scotth72
I know I could solder a wire to the connector, but I would like to do it in code. The gps has a #define for which serial port, why not for ppm?

Re: MultiWii_dev_20120528

Posted: Thu Jun 07, 2012 3:02 pm
by robjames
OK Scott. I don't know much about coding so I can't help you there. I can verify that the wiring does work and is easy to implement so
if you're looking to get it flying , try it. You're welcome Reverend .