MW328p i problem z GPS

FC oparte na Arduino

Moderatorzy: moderatorzy2014, moderatorzy

Awatar użytkownika
as1200
Posty: 230
Rejestracja: sobota 03 paź 2015, 23:27

MW328p i problem z GPS

Post autor: as1200 »

Witam,

Męczę się od tygodnia z uruchomieniem GPS'a na MultiWii 328p.
Schemat połączeń między modułami jakie wykonałem zamieszczam poniżej:

Obrazek

Po podłączeniu zasilania do koptera gdy mam tak podpiętego GPS'a, mruga mi niebieska dioda na MW328p.
Nie mozna wówczas uzbroić silników.
Po odłączeniu modułu I2C-GPS od MW328p, wszystko wraca do normy.
Nie wiem o co chodzi...

Proszę Was o ukierunkowanie mnie jakie mam wykonać kolejne kroki z uruchomieniem tego GPS'a?
Może znajdzie się ktoś cierpliwy i mnie oświeci w tym temacie :)

Zależy mi głównie aby GPS'em trzymać pozycję do filmowania, ewentulanie dodatkowo miec funkcję powrotu.

Pozdr.
Drony w moim hangarze: IFlight DC5 DJI, IFlight DC3 DJI, IFlight DC3, Purple 215, CineWhoop, Snapper 7
Filmoteka: http://www.youtube.com/user/as120000/videos
Awatar użytkownika
lotpawel
Posty: 918
Rejestracja: wtorek 31 gru 2013, 01:49
Lokalizacja: Ruda Śląska

Re: MW328p i problem z GPS

Post autor: lotpawel »

po pierwsze - czy sam gps łapie fixa? w domu, pod dachem może nie łapać. Podłącz gps do kompa i sprawdź,
po drugie - i2c-gpsnav czy masz wgrany dobry fw? z odpowiednimi ustawieniami, prędkością portu, rodzajem gps itp itd?
po trzecie - czy masz odblokowana funkcje gps i2c w multiwii?
Awatar użytkownika
as1200
Posty: 230
Rejestracja: sobota 03 paź 2015, 23:27

Re: MW328p i problem z GPS

Post autor: as1200 »

Dzięki lotpawel za podpowiedzi :)
po pierwsze - czy sam gps łapie fixa? w domu, pod dachem może nie łapać. Podłącz gps do kompa i sprawdź,
Tak, GPS łapie zasięg (sprawdzam na balkonie).
Podłączyłem go bez modułu I2C-GPS bezpośrednio po serialu do Arduino Uno i działał OK.
Komunikował się z UNO z prędkością 9600.
po drugie - i2c-gpsnav czy masz wgrany dobry fw? z odpowiednimi ustawieniami, prędkością portu, rodzajem gps itp itd?
Tego właśnie nie robiłem bo do tej pory nie miałem o tym wiedzy, że trzeba to skonfigurować :)
po trzecie - czy masz odblokowana funkcje gps i2c w multiwii?
Czy tak powinno być to zrobione jak w kodzie poniżej?

Kod: Zaznacz cały

/**************************************************************************************/
  /***********************                  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
Pozdr.
Drony w moim hangarze: IFlight DC5 DJI, IFlight DC3 DJI, IFlight DC3, Purple 215, CineWhoop, Snapper 7
Filmoteka: http://www.youtube.com/user/as120000/videos
Awatar użytkownika
as1200
Posty: 230
Rejestracja: sobota 03 paź 2015, 23:27

Re: MW328p i problem z GPS

Post autor: as1200 »

Gdy podłączam sam moduł I2C-GPS (bez płytki GPS'a) do MW328p, to po chwili błyska mi na płytce MW niebieski LED i rozwala mi się wszystko na MultiWiiConfig... zdjęcie poniżej...

Dzieje się to zarówno na oryginalnym sofcie jak i na dwóch innych które wgrywam.
Chyba blokuje się szyna I2C, tylko dlaczego?

Obrazek
Drony w moim hangarze: IFlight DC5 DJI, IFlight DC3 DJI, IFlight DC3, Purple 215, CineWhoop, Snapper 7
Filmoteka: http://www.youtube.com/user/as120000/videos
Awatar użytkownika
as1200
Posty: 230
Rejestracja: sobota 03 paź 2015, 23:27

Re: MW328p i problem z GPS

Post autor: as1200 »

Jeżeli ktoś z Was męczy się z tymi modułami I2C-GPS jak ja...
to nich sprawdzi czy są obydwie ścieżki w druku do kwarcu!

Mnie trafił się taki egzemplarz gdzie brakuje tej ścieżki:

Obrazek

Gdyby nie to, że grzebałem w FUSE BITACH i przyblokowałem procka to nie znalazłbym tego.
Przy próbie jego odblokowania właśnie to odkryłem, że nie jest podłączony zewnętrzny kwarc!

Pozdr.
Drony w moim hangarze: IFlight DC5 DJI, IFlight DC3 DJI, IFlight DC3, Purple 215, CineWhoop, Snapper 7
Filmoteka: http://www.youtube.com/user/as120000/videos
ODPOWIEDZ