Drofly et gps

bonjour.

je possède cette carte DroFly MultiWii FC vole super stable d’ailleur!
http://www.drotek.fr/shop/107-255-large/drofly-multiwii-mpu6050-ms5611-hmc5883.jpg

je viens d’acheter le I2C GPS + LLC avec un FTDI UART/USB 3.3/5V
http://www.drotek.fr/shop/88-304-large/i2c-pa6c-gps-llc.jpghttp://www.drotek.fr/shop/65-169-large/multiwii-ftdi-arduino-uart-usb.jpg

j 'ai tlécharger arduino 1.0 et installer les pilote du FTDI (lien sur le site)

connecter les broches de cette façon:
GPS----FTDI
GND----GND
CTS----CTS
VCC----VCC
TX----RX j’ai méme tester TX----TX
RX----TX RX----RX
DTR----DTR

dans arduino je selectione mon port (il fonctionne je m’en sert pour la FC) la board pro or promini (5v.16mhz) w atmega328
j’ai toujours se resulta:

avrdude: stk500_getsync(): not in sync: resp=0x00
j’y ai passé la journée mais la …

maintenant sur la FC :
pour commencer j’ai fais un eeprom clear
puis

#define QUADX #define DROTEK_10DOF_MPU #define SERIAL_SUM_PPM ROLL,PITCH,THROTTLE,YAW,AUX1,AUX2,AUX3,AUX4,8,9,10,11 //For Robe/Hitec/Futaba (un seul fil entre Rx et FC) #define A32U4ALLPINS

voila c’est tout se que j’ai paramétrer pour le gps en plus il faut .

#define NMEA #define I2C_GPS
si je les active ça me donne

[quote]Taille binaire du croquis : 30 714 octets (d’un max de 28 672 octets)
processing.app.debug.RunnerException: Croquis trop gros ; vois arduino.cc/en/Guide/Troubleshooting#size pour des conseils de réduction.
at processing.app.Sketch.size(Sketch.java:1658)
at processing.app.Sketch.build(Sketch.java:1591)
at processing.app.Sketch.build(Sketch.java:1567)
at processing.app.Editor$DefaultRunHandler.run(Editor.java:1897)
at java.lang.Thread.run(Thread.java:619)
[/quote]

avez vous des idéés? pas compatible ? je suis largué
merci

Le compilateur donne une erreur sur la taille du code. Vous avez activé trop d’options dans le code et du coup le programme ne tient plus dans le mémoire de l’Atmega.
Essayez de supprimer ce qu’il peut l’être!

[quote=“drotek”]Le compilateur donne une erreur sur la taille du code. Vous avez activé trop d’options dans le code et du coup le programme ne tient plus dans le mémoire de l’Atmega.
Essayez de supprimer ce qu’il peut l’être![/quote]

comment alléger ?

#define QUADX #define DROTEK_10DOF_MPU
ils les faut bien , et si on veut le gps il faut bien aussi

quelqu’un a t’il réussi?

Bonsoir,
après avoir vérifié le code qu’utilise maccoa je suis curieux de voire ce qu’il peut virer de plus, car dans son cas il n’avait absolument rien activé qui soit optionnel pas même le failsafe… :frowning:

bon alors avec la version 2.1 ça passe mais pas avec la nouvelle.

[quote=“mac.rcnet”]Bonsoir,
après avoir vérifié le code qu’utilise maccoa je suis curieux de voire ce qu’il peut virer de plus, car dans son cas il n’avait absolument rien activé qui soit optionnel pas même le failsafe… :frowning:[/quote]

j’ai tout retiré aussi et la taille du sketch ne descend pas d 1 Octet !
(j’ai également retiré les onglets LED, LCD … mais toujours 28936 pour une taille maxi de 28672 … en choisissant “Arduino Leonardo” dans le type de carte :frowning:
Comprends pas tout …
@+

As tu essayé de repartir d’un code vierge?!

repartir d’un sketch d’origine ???
Oui ! et cela ne change rien … même après un Eeprom Clear.

Si quelqu’un à un sketch qui “rentre” dans la DROFLY avec le GPS I2C d’activé … Je suis preneur :wink:

@+

yep même problème ici trop gros sketch avec la version en dev de multiwii par contre ça fonctionne en 2.1

En 2.1 … C’est déjà critique !!!

j’ai retiré tout ce que j’ai pu dans config.h et en activant le GPS + la Gimbal … il faut oublier le Failsafe.

vraiment dommage car je ne vois pas l’avantage d’avoir intégré le buzzer, vbat et compagnie si cela ne tient pas dans la boite :frowning:

Avec le config.h suivant j’arrive à 28622 octets sur 28672 …

  /**************************    The type of multicopter    ****************************/

    #define HEX6X


  /****************************    Motor minthrottle    *******************************/

    #define MINTHROTTLE 1150

  /****************************    Motor maxthrottle    *******************************/
    /* this is the maximum value for the ESCs at full power, this value can be increased up to 2000 */
      #define MAXTHROTTLE 1850

  /****************************    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

  /**********************************    I2C speed   ************************************/
    #define I2C_SPEED 100000L     //100kHz normal mode, this value must be used for a genuine WMP
    //#define I2C_SPEED 400000L   //400kHz fast mode, it works only with some WMP clones



    /***************************    Combined IMU Boards    ********************************/
      #define DROTEK_10DOF_MPU//

      
/*************************************************************************************************/
/*****************                                                                 ***************/
/****************  SECTION  2 - COPTER TYPE SPECIFIC OPTIONS                               *******/
/*****************                                                                 ***************/
/*************************************************************************************************/

  /********************************    TRI    *********************************/
    #define YAW_DIRECTION 1
    //#define YAW_DIRECTION -1 // if you want to reverse the yaw correction direction
    /* you can change the tricopter servo travel here */
      #define TRI_YAW_CONSTRAINT_MIN 1020
      #define TRI_YAW_CONSTRAINT_MAX 2000
      #define TRI_YAW_MIDDLE 1500 // tail servo center pos. - use this for initial trim; later trim midpoint via LCD

   /********************************    ARM/DISARM    *********************************/
   /* optionally disable stick combinations to arm/disarm the motors.
     * In most cases one of the two options to arm/disarm via TX stick is sufficient */
    #define ALLOW_ARM_DISARM_VIA_TX_YAW
    #define ALLOW_ARM_DISARM_VIA_TX_ROLL

  /***********************          Cam Stabilisation             ***********************/
    /* The following lines apply only for a pitch/roll tilt stabilization system. Uncomment the first or second line to activate it */
    #define SERVO_MIX_TILT
    //#define SERVO_TILT
    #define TILT_PITCH_MIN    1020    //servo travel min, don't set it below 1020
    #define TILT_PITCH_MAX    2000    //servo travel max, max value=2000
    #define TILT_PITCH_MIDDLE 1500    //servo neutral value
    #define TILT_PITCH_PROP   10      //servo proportional (tied to angle) ; can be negative to invert movement
    #define TILT_ROLL_MIN     1020
    #define TILT_ROLL_MAX     2000
    #define TILT_ROLL_MIDDLE  1500
    #define TILT_ROLL_PROP    10

    /* camera trigger function : activated via Rc Options in the GUI, servo output=A2 on promini */
    //#define CAMTRIG
    #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

  /***********************          Flying Wing                   ***********************/
    /* you can change change servo orientation and servo min/max values here
       valid for all flight modes, even passThrough mode
       need to setup servo directions here; no need to swap servos amongst channels at rx */
    #define PITCH_DIRECTION_L 1 // left servo - pitch orientation
    #define PITCH_DIRECTION_R -1  // right servo - pitch orientation (opposite sign to PITCH_DIRECTION_L, if servos are mounted in mirrored orientation)
    #define ROLL_DIRECTION_L 1 // left servo - roll orientation
    #define ROLL_DIRECTION_R 1  // right servo - roll orientation  (same sign as ROLL_DIRECTION_L, if servos are mounted in mirrored orientation)
    #define WING_LEFT_MID  1500 // left servo center pos. - use this for initial trim; later trim midpoint via LCD
    #define WING_RIGHT_MID 1500 // right servo center pos. - use this for initial trim; later trim midpoint via LCD
    #define WING_LEFT_MIN  1020 // limit servo travel range must be inside [1020;2000]
    #define WING_LEFT_MAX  2000 // limit servo travel range must be inside [1020;2000]
    #define WING_RIGHT_MIN 1020 // limit servo travel range must be inside [1020;2000]
    #define WING_RIGHT_MAX 2000 // limit servo travel range must be inside [1020;2000]


  /**************************************************************************************/
  /********   Settings for ProMicro, Leonardo and other Atmega32u4 Boards     ***********/
  /**************************************************************************************/

    /*********************************    pin Layout     **********************************/
      /* activate this for a better pinlayout if all pins can be used => not possible on ProMicro */
      #define A32U4ALLPINS

    /**********************************    PWM Setup     **********************************/

      #define HWPWM6

    /**********************************    Aux 2 Pin     **********************************/

      #define RCAUX2PIND17




/*************************************************************************************************/
/*****************                                                                 ***************/
/****************  SECTION  5 - ALTERNATE SETUP                                            *******/
/*****************                                                                 ***************/
/*************************************************************************************************/

  /******                Serial com speed    *********************************/
    /* This is the speed of the serial interface */
    #define SERIAL_COM_SPEED 115200

    /* interleaving delay in micro seconds between 2 readings WMP/NK in a WMP+NK config
       if the ACC calibration time is very long (20 or 30s), try to increase this delay up to 4000
       it is relevent only for a conf with NK */
    #define INTERLEAVING_DELAY 3000

    /* when there is an error on I2C bus, we neutralize the values during a short time. expressed in microseconds
       it is relevent only for a conf with at least a WMP */
    #define NEUTRALIZE_DELAY 100000





/*************************************************************************************************/
/*****************                                                                 ***************/
/****************  SECTION  6 - OPTIONAL FEATURES                                          *******/
/*****************                                                                 ***************/
/*************************************************************************************************/

  /* Pseudo-derivative conrtroller for level mode (experimental)
     Additional information: http://www.multiwii.com/forum/viewtopic.php?f=8&t=503 */
    //#define LEVEL_PDF


  /********                          Failsave settings                 ********************/
    /* Failsafe check pulse on THROTTLE channel. If the pulse is OFF (on only THROTTLE or on all channels) the failsafe procedure is initiated.
       After FAILSAVE_DELAY time of pulse absence, the level mode is on (if ACC or nunchuk is avaliable), PITCH, ROLL and YAW is centered
       and THROTTLE is set to FAILSAVE_THR0TTLE value. You must set this value to descending about 1m/s or so for best results.
       This value is depended from your configuration, AUW and some other params.
       Next, afrer FAILSAVE_OFF_DELAY the copter is disarmed, and motors is stopped.
       If RC pulse coming back before reached FAILSAVE_OFF_DELAY time, after the small quard time the RC control is returned to normal.
       If you use serial sum PPM, the sum converter must completly turn off the PPM SUM pusles for this FailSafe functionality.*/
    //#define FAILSAFE                                  // uncomment  to activate the failsafe function
    #define FAILSAVE_DELAY     10                     // Guard time for failsafe activation after signal lost. 1 step = 0.1sec - 1sec in example
    #define FAILSAVE_OFF_DELAY 200                    // Time for Landing before motors stop in 0.1sec. 1 step = 0.1sec - 20sec in example
    #define FAILSAVE_THROTTLE  (MINTHROTTLE + 200)    // Throttle level used for landing - may be relative to MINTHROTTLE - as in this case








  /**************************************************************************************/
  /***********************                  GPS                **************************/
  /**************************************************************************************/

    /* GPS using a SERIAL port
       only available on MEGA boards (this might be possible on 328 based boards in the future)
       if enabled, define here the Arduino Serial port number and the UART speed
       note: only the RX PIN is used, the GPS is not configured by multiwii
       the GPS must be configured to output GGA and RMC NMEA sentences (which is generally the default conf for most GPS devices)
       at least 5Hz update rate. uncomment the first line to select the GPS serial port of the arduino */
    //#define GPS_SERIAL 2 // should be 2 for flyduino v2. It's the serial port number on arduino MEGA
    #define GPS_BAUD   115200
    
    //#define GPS_PROMINI_SERIAL    57600 // Will Autosense if GPS is connected when ardu boots
   
    /* I2C GPS device made with an independant arduino + GPS device
       including some navigation functions
       contribution from EOSBandi   http://code.google.com/p/i2c-gps-nav/ 
       You have to use at least I2CGpsNav code r33 */
    #define I2C_GPS

    /* I2C GPS device made with an indeedent ATTiny[24]313 + GPS device and
       optional sonar device.    https://github.com/wertarbyte/tiny-gps/ */
    /* get GPS data from Tiny-GPS */
    //#define TINY_GPS
    /* get sonar data from Tiny-GPS */
    //#define TINY_GPS_SONAR

    /* indicate a valid GPS fix with at least 5 satellites by flashing the LED? */
    #define GPS_LED_INDICATOR

    /* GPS data readed from OSD -- still need some more code to work */
    //#define GPS_FROM_OSD

    //#define USE_MSP_WP           		//Enables the MSP_WP command, which is used by WinGUI to display and log Home and Poshold positions
						//Uncomment it if you are planning to use WinGUI - Will cost +208 bytes of Flash
	
    //#define DONT_RESET_HOME_AT_ARM             // HOME position is reset at every arm, uncomment it to prohibit it (you can set home position with GyroCalibration)

    /* GPS navigation can control the heading */
    
    #define NAV_CONTROLS_HEADING       true      // copter faces toward the navigation point, maghold must be enabled for it
    #define NAV_TAIL_FIRST             false     // true - copter comes in with tail first 
    #define NAV_SET_TAKEOFF_HEADING    true      // true - when copter arrives to home position it rotates it's head to takeoff direction
    
    
    /* Get your magnetic decliniation from here : http://magnetic-declination.com/
       Convert the degree+minutes into decimal degree by ==> degree+minutes*(1/60)
       Note the sign on declination it could be negative or positive (WEST or EAST) */
    //#define MAG_DECLINIATION  3.96f              //For Budapest Hungary.
    #define MAG_DECLINIATION  0.0f
    
    #define GPS_FILTERING                        // add a 5 element moving average filter to GPS coordinates, helps eliminate gps noise but adds latency comment out to disable
    #define GPS_LOW_SPEED_D_FILTER               // below .5m/s speed ignore D term for POSHOLD_RATE, theoretically this also removed D term induced noise commnent out to disable
    #define GPS_WP_RADIUS              200       // if we are within this distance to a waypoint then we consider it reached (distance is in cm)
    #define NAV_SLEW_RATE              30        // Adds a rate control to nav output, will smoothen out nav angle spikes




    /********************************    Navigation     ***********************************/
    /* keys to navigate the LCD menu (preset to LCD_TEXTSTAR key-depress codes)*/
      #define LCD_MENU_PREV 'a'
      #define LCD_MENU_NEXT 'c'
      #define LCD_VALUE_UP 'd'
      #define LCD_VALUE_DOWN 'b'

      #define LCD_MENU_SAVE_EXIT 's'
      #define LCD_MENU_ABORT 'x'





  /********************************************************************/
  /****           battery voltage monitoring                       ****/
  /********************************************************************/
    /* for V BAT monitoring
       after the resistor divisor we should get [0V;5V]->[0;1023] on analog V_BATPIN
       with R1=33k and R2=51k
       vbat = [0;1023]*16/VBATSCALE
       must be associated with #define BUZZER ! */
    //#define VBAT              // uncomment this line to activate the vbat code
    #define VBATSCALE     131 // change this value if readed Battery voltage is different than real voltage
    #define VBATLEVEL1_3S 107 // 10,7V
    #define VBATLEVEL2_3S 103 // 10,3V
    #define VBATLEVEL3_3S 99  // 9.9V
    #define NO_VBAT       16 // Avoid beeping without any battery



    //#define POWERMETER_SOFT
    //#define POWERMETER_HARD
    /* the sum of all powermeters ranges from [0:60000 e4] theoretically.
       the alarm level from eeprom is out of [0:255], so we multipy alarm level with PLEVELSCALE and with 1e4 before comparing
       PLEVELSCALE is the step size you can use to set alarm */
    #define PLEVELSCALE 50 // if you change this value for other granularity, you must search for comments in code to change accordingly
    /* larger PLEVELDIV will get you smaller value for power (mAh equivalent) */
    #define PLEVELDIV 5000 // default for soft - if you lower PLEVELDIV, beware of overrun in uint32 pMeter
    #define PLEVELDIVSOFT PLEVELDIV // for soft always equal to PLEVELDIV; for hard set to 5000
    //#define PLEVELDIV 1361L // to convert the sum into mAh divide by this value
    /* amploc 25A sensor has 37mV/A
       arduino analog resolution is 4.9mV per unit; units from [0..1023]
       sampling rate 20ms, approx 19977 micro seconds
       PLEVELDIV = 37 / 4.9  * 10e6 / 18000  * 3600 / 1000  = 1361L
       set to analogRead() value for zero current */
    #define PSENSORNULL 510 // for I=0A my sensor gives 1/2 Vss; that is approx 2.49Volt
    #define PINT2mA 13 // for telemtry display: one integer step on arduino analog translates to mA (example 4.9 / 37 * 100





  /**************************************************************************************/
  /***********************     motor, servo and other presets     ***********************/
  /**************************************************************************************/
    /* motors will not spin when the throttle command is in low position
       this is an alternative method to stop immediately the motors */
    #define MOTOR_STOP

    /* some radios have not a neutral point centered on 1500. can be changed here */
    #define MIDRC 1500

  /***********************         Servo Refreshrates            ***********************/
    /* Default 50Hz Servo refresh rate*/
    #define SERVO_RFR_50HZ

    /* up to 160Hz servo refreshrate .. works with the most analog servos*/
    //#define SERVO_RFR_160HZ

    /* up to 300Hz refreshrate it is as fast as possible (100-300Hz depending on the cound of used servos and the servos state).
       for use with digital servos
       dont use it with analog servos! thay may get damage. (some will work but be careful) */
    //#define SERVO_RFR_300HZ
    



  /********************************************************************/
  /****           ESCs calibration                                 ****/
  /********************************************************************/

    /* to calibrate all ESCs connected to MWii at the same time (useful to avoid unplugging/re-plugging each ESC)
       Warning: this creates a special version of MultiWii Code
       You cannot fly with this special version. It is only to be used for calibrating ESCs
       Read How To at http://code.google.com/p/multiwii/wiki/ESCsCalibration */
    #define ESC_CALIB_LOW  MINCOMMAND
    #define ESC_CALIB_HIGH 2000
    //#define ESC_CALIB_CANNOT_FLY  // uncomment to activate

  /****           internal frequencies                             ****/
    /* frequenies for rare cyclic actions in the main loop, depend on cycle time
       time base is main loop cycle time - a value of 6 means to trigger the action every 6th run through the main loop
       example: with cycle time of approx 3ms, do action every 6*3ms=18ms
       value must be [1; 65535] */
    #define LCD_TELEMETRY_FREQ 23       // to send telemetry data over serial 23 <=> 60ms <=> 16Hz (only sending interlaced, so 8Hz update rate)
    #define LCD_TELEMETRY_AUTO_FREQ 667 // to step to next telemetry page 667 <=> 2s
    #define PSENSORFREQ 6               // to read hardware powermeter sensor 6 <=> 18ms
    #define VBATFREQ PSENSORFREQ        // to read battery voltage - keep equal to PSENSORFREQ unless you know what you are doing

@+

Le code MultiWii évolue tellement vite que la taille des proc ne suive plus. C’est la raison pour laquelle nous travaillons sur la Drfly Pro qui sera équipé d’un Atmega2560.
Cette FC devrait être dispo dans 2 semaines environ.

Bonjour,

Concernant le GPS, même après avoir suivi tout ce qui a été écrit ici précédemment , c’est comment dire … une grosse nébuleuse !

GPS Tools ne répond pas … et idem en vol, comme si le GPS n’existait pas :cry:
Ce qui est étrange, c’est que le “Return To Home” percute, mais pas le Position Hold !!!
Pas faute d’avoir cherché, mais il doit y avoir un truc qui m’échappe … Au secours !

@+

Quand tu branches le FTDI au GPS (en croisant Tx et Rx) et que tu ouvre le soft GPS Tool, qu’est ce qu’il se passe?

Il ne se passe Rien !

Mais j’ai cru comprendre que c’était normal … peut être me trompe-je ???

@+

Bien sur avant de faire ca il faut reflasher l’atmega avec le clearEeprom.
Quand tu ouvres une connexion avec GPS tools, as tu un point jaune qui clignotte sur l’écran?

J’ai tout refais une bonne 20 aine de fois en suivant le Tuto de Wareck… de A à Z !
à la 21 ème fois, j’ai bien mes coordonnées qui remontent dans GPS Tools (et pas de satellites, mais ça, ça doit être normal)
J’ai configuré le Sketch (et en l’ayant minimisé au maximum pour que ça passe… ) en activant le GPS I2C
mais rien dans la Multiwiiconf au niveau GPS (en 2.1)

J’ai ensuite tésté en vol … avec ou sans, c’est la même chose.

Pour faire simple, j’en suis rendu au même point qu’il y a 6 mois

@+

Et le lad verte sur le GPS clignote comment? De plus si tu ne vois pas les sat sur GPS tool c’est qu’il y a un prob quelque part!

Pour les Sat dans GPS tools … Déjà évoqué dans le post suivant il y a plusieurs mois.
drotek.fr/forum/viewtopic.php?f=9&t=39&start=50

Niveau led, ça me semble percuter correctement une fois le GPS placé dehors.
Je ne l’ai pas sous la main, mais de mémoire, la led Bleu du GPS clignote différemment après avoir accroché des satellites.

Mais sur la Drofly, le gps reste “sans voie”.
@+

Test dans … U-Center

y aurait-il une subtilité dans le Sketch pour que cela accroche en vol ???

@+

Salut !
Effectivement la drofly manque de mémoire, et le soft ne tiens pas si tu rentre toutes les options…
Tu utilise quelle version de multiwii ?
La version 2.2 tout fraichement sortie, à une otpimisation du code, et celui-ci est donc un peu moins lourd…
Le GPS est le truc le plus gourmand en memoire…