MultiWii v1.7 released

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

MultiWii v1.7 released

Post by Alexinparis »

differences with the previous 1.6:
there was really a huge work on this evolution


ALL: BARO is more precise, but still not perfect (1m to 2m amplitude). Note it's a code issue, not a baro component issue.

ALL: RC channels AUX2, CAM1 CAM2 added. only relevant for PPM SUM stream or MEGA boards.
    On the 328p with a standard receiver, only the first 5 channels are recognized.
    CAM1 and CAM2 controls are not yet implemented.
ALL: AUX1 and AUX2 switches are fully customizable via a 3 state position.
    We can activate/deactivate individually level mode (ACC), baro or compass (mag).
    It's a generic approach which lets other possibilities to control things in the future.
    With this principle, it's possible to activate permanently the options you want even if you have only 4 channels
    (replace the FORCE LEVEL option)
ALL: CAM triger option:
    a servo can be connected on digital pin A2 (pro mini) to activate the trigger of a camera
    the option can be activated or deactivated via the button configuration panel AUX1/AUX2
    #define CAM_SERVO_HIGH 2000 // the position of HIGH state servo
    #define CAM_SERVO_LOW 1020 // the position of LOW state servo
    #define CAM_TIME_HIGH 1000 // the duration of HIGH state servo expressed in ms
    #define CAM_TIME_LOW 1000 // the duration of LOW state servo expressed in ms
    the PIN on arduino mega is also A2, but this is not the final PIN mapping
ALL CAM stab (servo tilt) button option:
    the servo tilt option can be activated or deactivated via the button configuration panel AUX1/AUX2
ALL: BI COPTER is now a avatar style implementation.
    on a pro mini: 9 motor left, 10 motor right, 11 servo left, 3 servo right
    on mega: 3 motor left, 5 motor right, 6 servo left, 2 servo right
ALL: addition of Y4 (not tested)
    on a pro mini: motors 9,10,11,3
    on mega: motors 3,5,6,2
    REAR1 , FRONT R , REAR2 , FRONT L
ALL: addition of HEX6X (not tested)
    on a pro mini: motors 9,10,11,3,6,5
    on mega: motors 3,5,6,2,7,8
    REAR_R , FRONT_R , REAR_L , FRONT_L , RIGHT , LEFT
ALL: new level mode
    The level mode is completely redesigned with a coherent independent trim
    There a now a PI control loop for level mode based on angle estimation.
    The old auto level strength value was a sort of P only control loop.
    With the new code, the I term allows to refine the remaining angular error for a better angle positioning accuracy.
    With an RC rate = 1, the angle at full stick is around 45deg => a flip should never happen in this mode.
MAIN SOFT: software trim for stable mode
    It is now possible to adjust the trim of the level mode to match the same TX trim used for the acro mode.
    1) disarm the motors
    2) full throttle (must be >1900)
    3) full PITCH forward/backward and full ROLL left/right (2 axis possibilities) will trim the level mode according to
    the neutral angle you want to change. The status LED will blink to confirm each ticks.
MAIN SOFT: new calibration procedure
    The ACC calibration differs now from the gyro calibration.
    gyro calibration: it's still done at each power on. It's also possible manually as before: min throttle+full pitch
    backward+full yaw left.
    acc calibration: motor disarmed, full throttle up, full pitch backward+full yaw left.
MAIN SOFT: it was in 1.6 but not mentioned. it's possible to arm/disarm motors
    either via min throttle + full yaw stick or full roll stick.
MAIN SOFT: anti yaw jump modification for multi with 4 motors or more

MAIN SOFT: servo range for tricopter
    #define TRI_YAW_CONSTRAINT_MIN 1020
    #define TRI_YAW_CONSTRAINT_MAX 2000
MAIN SOFT: thanks to Ciskje, integration of L3G4200D gyro (this Gyro is present in PIPO ISU)

MAIN SOFT: HMC5883 compass integration

MAIN SOFT: compass lock now works
    the option can be activated or deactivated via the button configuration panel AUX1/AUX2
    the lock is activated 1s after the stick release
    the lock is maintained only if the YAW stick in centred +/- 50
    In some case, especially with the 5883, the mag must be calibrated otherwise, the direction is not good.
    The calibration procedure is not yet implemented.
MAIN SOFT: there was a bug on servo tilt (it came back to zero at around 45deg due to a variable overflow)

MAIN SOFT: thanks to Syberian, a bug was corrected to prevent ACC correction just before hovering.
    It could explain some odd flips when using autolevel at the beginning
MAIN SOFT: thanks to ziss_dm, a bug was corrected about the ITG3200: there was a variable
    overflow which occured only for high PITCH variation.
MAIN SOFT: thanks to mis_b (MIS), integration of failsafe code.
    Failsafe detect absence of RC pulse on THROTTLE channel (standard PPM receiver)
    If the pulse is OFF the failsafe procedure is initiated.

    After configurable FAILSAVE_DELAY time of pulse absence,
    the level mode is switched to ON (if ACC or nunchuk is available),
    PITCH, ROLL and YAW is centered and THROTTLE is set to FAILSAVE_THROTTLE value.
    This value is dependent from your configuration, AUW and some other params.

    Next, afrer configurable FAILSAVE_OFF_DELAY time,
    the copter is disarmed, and motors are stopped.
    If RC pulse coming back before reached FAILSAVE_OFF_DELAY time,
    after the small quard time the RC control is returned to normal.

    The fail-safe can be deactivated via #define
MAIN SOFT: thanks to ziss_dm, nunchuk alone integration (incompatible with WMP and seen as a standalone I2C ACC)

MAIN SOFT: bug correction the mag indication was reversed

MAIN SOFT: small bug correction in angle calculation (conversion rad->1/10 deg)

MAIN SOFT: added a small delay after ITG3200 init to have a better calibration

MAIN SOFT: thanks to zara,
    vbat code simplification + low pass filter.
    vbat activation via #define.
    coupling alarm with status LED
MAIN SOFT: reduce the PPM sum recognition delay between 2 sequences (5ms->3ms).
    might be the source of frsky PPM sum problem
GUI: 3D copter attitude visualization

GUI: ACC calibration. there is now a calibrate button to calibrate the ACC directly from the GUI
    (it resets the soft trim)
GUI: thanks to Eberhard, better display of serial ports on Mac OS X and Linux

GUI: the memory leak bug GUI is corrected

GUI and LCD: D is now positive (to avoid confusion in explanations)

LCD: all parameters are now customizable via the LCD thanks to the work initiated by Shirka.
    This first one is still P for both ROLL&PITCH as it is the most used.
LCD: implementation of TextStar LCD tanks to Hamburger & gtrick90 code

OSD: implementation of MIS code thanks to Rurek
    thanks to Rurek and mis_b, optimisation of OSD code Serial write is driven by a switchable interrupt,
    minimising delay to transmit data
SITE: http://www.multiwii.com was updated accordingly.

SPECIAL NOTE ABOUT THE PULL-UPS:
- they are now enable by default
- WARNING if you use I2C devices that don't support 5V.

- If you use a WMP alone: enable it in soft
- If you use a WMP + NK : enable it in soft
- If you use a WMP + BMP020 (5V friendly thanks to its LLC): enable it in soft
- If you use a WMP + (LLC + I2C devices): enable it in soft
- If you use a WMP + direct I2C bus connection I2C devices (not 5V friendly): disable it in soft and use external
pull-ups on 3.3V. note that most breakout boards are built with pullups already available.

The code is on the googlecode repository
http://code.google.com/p/multiwii/source/browse/tags
This code is as usual compatible with everything developed before
including the very low cost setup: WMP only + promini + standard 4ch receiver

sukalo
Posts: 11
Joined: Wed Jan 19, 2011 11:29 pm

Re: MultiWii v1.7 released

Post by sukalo »

Alex thanks, this is relay a big step forward!

JohnB36
Posts: 2
Joined: Thu Mar 31, 2011 3:28 am

Re: MultiWii v1.7 released

Post by JohnB36 »

Super release with an incredible number of enhancements and improvements!

didlawowo
Posts: 8
Joined: Tue Apr 05, 2011 12:42 pm

Re: MultiWii v1.7 released

Post by didlawowo »

thx for this important release, i 'm really interessing to test it in the following week :)

do you implement all modification code for syberian ?

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

Re: MultiWii v1.7 released

Post by Alexinparis »

didlawowo wrote:thx for this important release, i 'm really interessing to test it in the following week :)

do you implement all modification code for syberian ?


I will now have a serious look to the code supply by Syberian and ziss_dm (2 different approaches) about the angle calculation.
This step is not trivial and need more time.

JussiH
Posts: 39
Joined: Thu Jan 20, 2011 1:16 am

Re: MultiWii v1.7 released

Post by JussiH »

Alex....

The speed at which this keeps on progressing never ceases to amaze me.

Great work (as usual) :D Thanks for your continued dedication and Effort into the MultiWiiCopter!

One small issue though. HMC5883L axises are wrong. It seems that Honeywell in their infinite wisdom :roll: has chosen to swap the Y and Z axises compared to HMC5843.

I am sure this is something we can fix easily? And I am betting these are the lines concerned:

Code: Select all

magADC[ROLL]  =   ((rawADC_HMC5883[4]<<8) | rawADC_HMC5883[5]); // note: manual calibration: +300
  magADC[PITCH] =  -((rawADC_HMC5883[0]<<8) | rawADC_HMC5883[1]); // +200
  magADC[YAW]   =  -((rawADC_HMC5883[2]<<8) | rawADC_HMC5883[3]); // +50
}


Do I just the swap the PITCH and ROLL denominations?

User avatar
Berkely
Posts: 29
Joined: Fri Jan 21, 2011 8:25 pm
Location: Belgium, coast

Re: MultiWii v1.7 released

Post by Berkely »

Hi Alex,

Congratulations with the new release! A lot of hard work can be found in this release. Also a big thanks to all guys who helped with rectifying bugs & adding new features.

I will do my best to keep the diagrams as much as possible updated :-) A new player, the Flyduino has been assigned a dedicated diagram. http://www.rcgroups.com/forums/member.php?u=291123
For now, I only have my doubts about the Hexa-X pinout, it's different then I made mine. I'm still in Singapore but will check this when I'm home.

Thanks & Best regards
B.

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

Re: MultiWii v1.7 released

Post by Alexinparis »

@Berkely,
Thanks for your schemes. I know they are very appreciated to help others to connect everything.

@Jussi,
The 5883L implementation should be good, because I use it connect with your last FFIMU ;) (with my manual calibration)
And it's true, the axis are different from the 5843.

you can see the differences in the code:

5843

Code: Select all

  magADC[ROLL]  =   ((rawADC_HMC5843[0]<<8) | rawADC_HMC5843[1]);
  magADC[PITCH] =   ((rawADC_HMC5843[2]<<8) | rawADC_HMC5843[3]);
  magADC[YAW]   = - ((rawADC_HMC5843[4]<<8) | rawADC_HMC5843[5]);


5883L

Code: Select all

  magADC[ROLL]  =   ((rawADC_HMC5883[4]<<8) | rawADC_HMC5883[5]);
  magADC[PITCH] =  -((rawADC_HMC5883[0]<<8) | rawADC_HMC5883[1]);
  magADC[YAW]   =  -((rawADC_HMC5883[2]<<8) | rawADC_HMC5883[3]);

User avatar
UndCon
Posts: 293
Joined: Mon Feb 21, 2011 2:10 pm

Re: MultiWii v1.7 released

Post by UndCon »

Good Job Alex and all others who helped.

//UndCon

schumixmd
Posts: 7
Joined: Sun Apr 10, 2011 4:13 pm

Re: MultiWii v1.7 released

Post by schumixmd »

thanks alex for this release. it is really amazing how was it grow. When I saw the project for first time it was on version 1.3 i think.. and at the moment I build it.. it is already 1.7.

by the way:
this being my first multiwii tri (i have kk one) i am not familiar with some behavior, and and think i have a problem.
when I am activating stable mode, pitch and roll is not working anymore. Motors are controlled by sensors but don't respond to stick movements. Is this ok? It is not possible to fly with multiwii copter in stable mode, just to hover?

thanks

spagoziak
Posts: 171
Joined: Thu Jan 20, 2011 1:18 am

Re: MultiWii v1.7 released

Post by spagoziak »

Alex, this thing is magic :)

Every time I show this controller to a fellow RC flyer, I become the center of attention. You've really created a work of genius!

JussiH
Posts: 39
Joined: Thu Jan 20, 2011 1:16 am

Re: MultiWii v1.7 released

Post by JussiH »

I completely agree....1.7 Rocks

I do of course (as usual) have a few suggestions:

1: can we have an option to also trim yaw in stable mode (same method as for pitch/roll) I always get a little yaw to the right when going to stable mode.

2: Level mode gets confused after flying forward for a while. When I let the sticks go after short period of forward flight the copter stays at the same forward attitude until I correct it with stick! I am guessing that the accel gets confused by the inertia of forward flight! I am thinking that the Pitch/roll axises of the magneto could be used to correct this....

3: Could you consider some form of Lowpass filter for the servo channels. On both my tris and the CamQuad I have servo jitter and noise that could probably be dealt with by a simple LP filter.....(There was a similar issue on the KK and that was solved with LP filter)

I will go out today and play with the barometer...20 degrees out!

Thanks

Jussi

BTW: can you change my user name to JussiH?

spagoziak
Posts: 171
Joined: Thu Jan 20, 2011 1:18 am

Re: MultiWii v1.7 released

Post by spagoziak »

JussiH wrote:I completely agree....1.7 Rocks
2: Level mode gets confused after flying forward for a while. When I let the sticks go after short period of forward flight the copter stays at the same forward attitude until I correct it with stick! I am guessing that the accel gets confused by the inertia of forward flight! I am thinking that the Pitch/roll axises of the magneto could be used to correct this....


Is it possible to identify this behavior in the acc code and repair it there, as needed? Using the magnetometer to address it would require having a mag. to solve it. While I certainly intend to get one, I'll have to wait for some $ to fall into my hands first, and that may be a while!

Felch
Posts: 9
Joined: Mon Mar 21, 2011 9:23 pm

Re: MultiWii v1.7 released

Post by Felch »

I noticed strange behavior since the release of ver. 1_7. Controller hangs after calibration. If commanded to calibrate from the GUI everything works ok. Is it a problem of my flight controller only?

spagoziak
Posts: 171
Joined: Thu Jan 20, 2011 1:18 am

Re: MultiWii v1.7 released

Post by spagoziak »

Felch wrote:I noticed strange behavior since the release of ver. 1_7. Controller hangs after calibration. If commanded to calibrate from the GUI everything works ok. Is it a problem of my flight controller only?


I've never had such an issue... sounds like something silly on your flight controller... is your acc running on appropriate voltage (both power & clocks)?

Felch
Posts: 9
Joined: Mon Mar 21, 2011 9:23 pm

Re: MultiWii v1.7 released

Post by Felch »

I have an ITG3200 gyro, BMA180 acc, magneto HMC5843 and BMP085 pressure sensor. All running from embedded 3,3V supply which looks ok on the scope. Anyway, calibration command from the GUI passes ok and sensors work.
Moving pitch to max and yaw right starts calibration, led blinks as usual and then everything freezes. With or without GUI connected.

Relevant lines of conf are as follows:

Code: Select all

#define TRI
..
#define YAW_DIRECTION -1

#define I2C_SPEED 100000L     //100kHz normal mode, this value must be used for a genuine WMP

#define PROMINI  //Arduino type

#define INTERNAL_I2C_PULLUPS

#define SERVO_TILT
...
//#define FAILSAFE                                  // Alex: comment this line if you want to deactivate the failsafe function

/* I2C gyroscope */
#define ITG3200

/* I2C accelerometer */
#define BMA180

/* I2C barometer */
#define BMP085

/* I2C magnetometer */
#define HMC5843

#define INTERLEAVING_DELAY 3000

#define NEUTRALIZE_DELAY 100000

#define MAXTHROTTLE 1850

#define SERIAL_COM_SPEED 115200

#define LCD_CONF

#define MOTOR_STOP

//****** end of advanced users settings *************


PS. I did not use the pressure sensor when testing earlier versions. Will check if this has some impact.

User avatar
Berkely
Posts: 29
Joined: Fri Jan 21, 2011 8:25 pm
Location: Belgium, coast

Re: MultiWii v1.7 released

Post by Berkely »

Hi Alex.

ALL: addition of HEX6X (not tested)

on a pro mini: motors 9,10,11,3,6,5
on mega: motors 3,5,6,2,7,8
REAR_R , FRONT_R , REAR_L , FRONT_L , RIGHT , LEFT


I just tested the Hexa X on my hexa, I turned the FC 90 degrees, connected roll / pitch original & it works.

Thank you very much, another option included!! :D

Felch
Posts: 9
Joined: Mon Mar 21, 2011 9:23 pm

Re: MultiWii v1.7 released

Post by Felch »

Felch wrote:I noticed strange behavior since the release of ver. 1_7. Controller hangs after calibration. If commanded to calibrate from the GUI everything works ok. Is it a problem of my flight controller only?


Ups, my mistake. This is a command for LCD configuration, not calibration. Sorry for troubling :oops:
Please delete the post.

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

MultiWii v1.7 possible bug

Post by Hamburger »

I found at least two variables for which value is used before set. So effectively this relies on the compiler to produce code that presets variable with zero.

Code: Select all

  static uint32_t serialTime = 0; // need to preset JS
  static uint32_t buzzerTime = 0; // need to preset JS

and

Code: Select all

  if (currentTime > serialTime + 20000) { // 50Hz
    serialCom();
    serialTime = currentTime;
  }

in worst case with different compiler settings/output, the code breaks i.e. never gets executed.
(still valid for latest dev version.)
Hamburger

skyracer
Posts: 4
Joined: Sat May 28, 2011 5:36 am

Re: MultiWii v1.7 released

Post by skyracer »

My Tri works with 1.4, and the AUX1 channel toogle on/off the stable mode. I wish to upgrade to 1.7, then i loaded software, run GUI and the WMP+NK values is shown ok, but the switch AUX1 (and AUX2, AUX3 are the same) doest´t toogle on/off the stable mode. Why?

Regards from Colombia.

-------------------------------------
MultiWii TRI
WMP+NK
Arduino Uno + 1.8 Shield

Post Reply