MTK3329 - NEMA wasn't working... Works in MiniGPS tool..

This forum is dedicated to all issues and questions related to your individual setups and configurations
Post Reply
loknar28
Posts: 12
Joined: Wed Feb 11, 2015 1:14 am

MTK3329 - NEMA wasn't working... Works in MiniGPS tool..

Post by loknar28 »

OK,
I have most everything working on the bench. Although, I had been having trouble getting WINGUI to see any Satellites. So, I tried going back and forth with tweeks in config.h and still no luck. So I thought I should take the Multiwii out of the picture and hook it up directly through a Arduino Nano's TX/RX. This way I could use the MiniGPS app to verify if the GPS was actually working and it was. I had many Satellites popping up, so I verified TX/RX lines and made sure to use the same for the multwii serial 2 connection. here are the relevant bits from config.h

Code: Select all

 #define SERIAL0_COM_SPEED 115200
    #define SERIAL1_COM_SPEED 115200
    #define SERIAL2_COM_SPEED 115200
    #define SERIAL3_COM_SPEED 115200
       
    #define GPS_SERIAL 2         

    #define GPS_BAUD   57600  <----Does this have to match above?
   
    #define NMEA

    #define INIT_MTK_GPS       <----Seems this is supposed to be enable during initial config and disabled later. Is this your understanding?

    #define GPS_LED_INDICATOR
   
    #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
   
    #define MAG_DECLINATION  -10.59f   //(**)

    #define GPS_LEAD_FILTER                      // Adds a forward predictive filterig to compensate gps lag. Code based on Jason Short's lead filter implementation
   
    #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


Since it still was not working I figured I would try upgrading the firmware on the GPS itself to DIYDrone's --- MTK_binary_19 .
The upgrade finished successfully but still no luck on multiwii even after switching to #define MTK_BINARY19 in config.h

Of course since it is now binary the MiniGPS Application can't see anything either.
Am I missing something? Do I need to add any other config lines or add the libraries that DIYDrones had listed for their tech?
Frustrated.... I need help from the Wii-master Me thinks. :?

loknar28
Posts: 12
Joined: Wed Feb 11, 2015 1:14 am

Re: MTK3329 - NEMA wasn't working... Works in MiniGPS tool..

Post by loknar28 »

Does anyone have any idea why I am not seeing any data when the GPS is connected to the Multiwii pro?

QuadBow
Posts: 532
Joined: Fri Jan 04, 2013 10:06 am

Re: MTK3329 - NEMA wasn't working... Works in MiniGPS tool..

Post by QuadBow »

As to your questions:
loknar28 wrote:#define GPS_BAUD 57600 <----Does this have to match above?
No, it hasn't, because SERIAL2_COM_SPEED is only for the first initialisation, afterwards it will be overwritten by GPS_BAUD.

loknar28 wrote:#define INIT_MTK_GPS <----Seems this is supposed to be enable during initial config and disabled later. Is this your understanding?
The definition will not be disabled later, it is only used one time for initialisation.

loknar28 wrote:Does anyone have any idea why I am not seeing any data when the GPS is connected to the Multiwii pro?
My first idea would be wrong serial port, changed RX/TX pins, but you clarified, that you have already doublechecked this. But, try to change the RX and the TX pin, you will not damage anything.

Another idea would be the baud rate. It has to match with the baud rate selected for the GPS device via the MiniGPStool. Make shure to store the selected baud rate in the eeprom of your GPS device. Look here: http://www.multiwii.com/forum/viewtopic.php?f=8&t=1928

Next thing might be the appropriate mode. Since you have flashed the GPS device for binary mode, you have to disable NMEA and enable either MTK_BINARY16 or MTK_BINARY19 depending on your firmware's version.

Good luck!
Last edited by QuadBow on Thu Feb 19, 2015 9:24 pm, edited 1 time in total.

QuadBow
Posts: 532
Joined: Fri Jan 04, 2013 10:06 am

Re: MTK3329 - NEMA wasn't working... Works in MiniGPS tool..

Post by QuadBow »

Sorry for the additional post. The system just wanted to duplicate the recent post.

loknar28
Posts: 12
Joined: Wed Feb 11, 2015 1:14 am

Re: MTK3329 - NEMA wasn't working... Works in MiniGPS tool..

Post by loknar28 »

My first idea would be wrong serial port, changed RX/TX pins, but you clarified, that you have already doublechecked this. But, try to change the RX and the TX pin, you will not damage anything.
I have tried changing ports from 1-3 and one time even took into consideration that it was possible the board was mislabeled and that I should shift everything in config.h to the left to account for serial0

Another idea would be the baud rate. It has to match with the baud rate selected for the GPS device via the MiniGPStool. Make shure to store the selected baud rate in the eeprom of your GPS device. Look here: viewtopic.php?f=8&t=1928
I have been using 57600 in both places since that worked with NEMA in the tool.

Next thing might be the appropriate mode. Since you have flashed the GPS device for binary mode, you have to disable NMEA and enable either MTK_BINARY16 or MTK_BINARY19 depending on your firmware's version.

Since I switched the firmware on the MTK I have changed the Multiwii config.h to reflect the Binary19 protocol and commented out NEMA. I did not mention that earlier, since I was not getting the miniGPS tool to see anything after the firmware upgrade. Although, I am able to make the initial serial connection using the Nano328. I have and always do try swapping TX/RX anytime something is not working. It has saved me a couple of times. Maybe only NEMA works with that tool I certainly have no idea. /cry.

Here is my current config.h

Code: Select all

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

    /* GPS using a SERIAL port
       if enabled, define here the Arduino Serial port number and the UART speed
       note: only the RX PIN is used in case of NMEA mode, the GPS is not configured by multiwii
       in NMEA mode 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_PROMINI_SERIAL   // Will Autosense if GPS is connected when ardu boots.

    // avoid using 115200 baud because with 16MHz arduino the 115200 baudrate have more than 2% speed error (57600 have 0.8% error)
    #define GPS_BAUD   57600

   /* GPS protocol
       NMEA  - Standard NMEA protocol GGA, GSA and RMC  sentences are needed
       UBLOX - U-Blox binary protocol, use the ublox config file (u-blox-config.ublox.txt) from the source tree
       MTK_BINARY16 and MTK_BINARY19 - MTK3329 chipset based GPS with DIYDrones binary firmware (v1.6 or v1.9)
       With UBLOX and MTK_BINARY you don't have to use GPS_FILTERING in multiwii code !!! */

   
    //#define NMEA
    //#define UBLOX
    //#define MTK_BINARY16
    #define MTK_BINARY19
    //#define INIT_MTK_GPS        // initialize MTK GPS for using selected speed, 5Hz update rate and GGA & RMC sentence or binary settings

   
    /* 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
    // If your I2C GPS board has Sonar support enabled
    //#define I2C_GPS_SONAR

    /* GPS data readed from Misio-OSD - GPS module connected to OSD, and MultiWii read GPS data from OSD - tested and working OK ! */
    //#define GPS_FROM_OSD

    /* indicate a valid GPS fix with at least 5 satellites by flashing the LED  - Modified by MIS - Using stable LED (YELLOW on CRIUS AIO) led work as sat number indicator
      - No GPS FIX -> LED blink at speed of incoming GPS frames
      - Fix and sat no. bellow 5 -> LED off
      - Fix and sat no. >= 5 -> LED blinks, one blink for 5 sat, two blinks for 6 sat, three for 7 ... */
    #define GPS_LED_INDICATOR

    //#define USE_MSP_WP                        //Enables the MSP_WP command, which is used by WinGUI to display and log Home and Poshold positions

    //#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 declination 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_DECLINATION  3.96f              //For Budapest Hungary.
    #define MAG_DECLINATION  -10.59f   //(**)

    #define GPS_LEAD_FILTER                      // Adds a forward predictive filterig to compensate gps lag. Code based on Jason Short's lead filter implementation
   
    //#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_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

QuadBow
Posts: 532
Joined: Fri Jan 04, 2013 10:06 am

Re: MTK3329 - NEMA wasn't working... Works in MiniGPS tool..

Post by QuadBow »

loknar28 wrote:I have tried changing ports from 1-3 and one time even took into consideration that it was possible the board was mislabeled and that I should shift everything in config.h to the left to account for serial0
The default port is serial2, but you did it right in config.h.
loknar28 wrote:I have been using 57600 in both places since that worked with NEMA in the tool.
Is 57600 stored permanently?
loknar28 wrote:Although, I am able to make the initial serial connection using the Nano328.
Thus, your flight controller (FC) is a ATmega32U4-based nanowii. How do you connect your GPS device to that FC, since it only has one serial and one USB port, so serial2 is missed?
Which multiwii software do you use - 2.3? Recall that 2.4pre does not support any longer GPS on that flight controller.
loknar28 wrote:Here is my current config.h
It actually looks good.

loknar28
Posts: 12
Joined: Wed Feb 11, 2015 1:14 am

Re: MTK3329 - NEMA wasn't working... Works in MiniGPS tool..

Post by loknar28 »

I made a video that I hope will clarify the issues I am seeing. I have switched back to NEMA so I can see it working in the Minitool.

vtpete
Posts: 15
Joined: Sat Feb 21, 2015 7:09 pm

Re: MTK3329 - NEMA wasn't working... Works in MiniGPS tool..

Post by vtpete »

For what it's worth, I'm having the same problem with my MTK 3329GPS.
My story *might* help a bit. Last week I had it all working, but I wasn't using the 2.3 MultiWii software and as such couldn't use the INIT_MTK_GPS to change my baud from 115200 to 57600 because of errors in the MultiWii sketch with "SerialGPSPrint". After double checking, I realized that at some point I had downloaded a different version of MultiWii. Might have been less than 2.3, or it might have been 2.4. That much is lost to history.

So, I did a fresh install with an EEPRom wipe. I downloaded the 2.3 sketch, made the changes to my config.h and now have the same issues you're having. GPS doesn't want to talk to my firmware. The wiring is untouched and since it worked last week just fine, I'm not going to start trying to swap cords, etc.

I've got the MTK3329GPS unit on the MultiWii Pro (red) from Hobby King. I hope this thread continues with good information as I'd love to know why we can't get it to work.

-Pete

vtpete
Posts: 15
Joined: Sat Feb 21, 2015 7:09 pm

Re: MTK3329 - NEMA wasn't working... Works in MiniGPS tool..

Post by vtpete »

Well, it's a couple weeks later. The weather warmed up, so I grabbed my quad and plugged it in with a fresh battery.
GPS is not communicating again.
The only difference is that it sat on the shelf for a couple of weeks.
Reflashing firmware including resetting GPS doesn't help.

When powering on, the LED on the MTK 3329GPS is initially a bit brighter. Within a second, it dims down a bit.

I decided to check the voltage coming from the MultiWii's serial 2 port. It's only 3.9 volts. I read there's a problem with these boards in that regards.

But, then after futzing with it for a couple of hours I accidentally plugged the GPS serial connector in backwards. (Reversed the polarity.) After realizing this, I reconnected. The LED is lit, but did I kill the GPS board? Please tell me I did so that I can through these thing in the trash and be done with this maddening experience.

-Pete

QuadBow
Posts: 532
Joined: Fri Jan 04, 2013 10:06 am

Re: MTK3329 - NEMA wasn't working... Works in MiniGPS tool..

Post by QuadBow »

vtpete wrote:did I kill the GPS board? Please tell me I did so that I can through these thing in the trash
If you have swapped Vcc and Gnd it is likely, that the Gps board has been heavily damaged. If you only swap Rx and Tx, it will not harm.

vtpete
Posts: 15
Joined: Sat Feb 21, 2015 7:09 pm

Re: MTK3329 - NEMA wasn't working... Works in MiniGPS tool..

Post by vtpete »

You know, I said to myself, "nothing to lose". Read on, this is cool. For anyone with "MTK 3329 GPS doesn't work" issues, this will be very enlightening!

I started to read everything I could online about this combo of MultiWii Pro board and MTK 3329. The fact that the serial port wasn't outputting 5V bothered me.
I read that there was a design flaw in these boards that cause this to be the case.

I also read that the GPS receiver could run on 3 volts rather than 5. Well, the 3.9 I was getting from the MultiWii serial port was *pretty close* to 3 volts. Ha.
So, I grabbed some my soldering iron and removed the solder connecting the 5V trace. I then soldered a bridge on the 3v trace. I plugged it into my serial port, booted the MultiWii and *PRESTO*, blinking blue light! I then proceeded to change the baud rate on the board, etc. No problem at all. It was working perfectly again. Even the little LED light was now a consistent color.

I can't recommend this surgery to anyone because I frankly have no idea what sending 3.9 (unloaded) volts to the GPS board will do to it.

But, my old feeling that I had a power issue seems right! I took it out today and flew it through six batteries. I even once flew WAY too high and caught a thermal that made my copter basically fly away. BUT, I had programmed fail-safe and it came back to me just like it was supposed to! On the seventh battery I attempted to let it land itself. Don't do that. I broke three props. But, it was a great day!

QuadBow, tell me what I did was insanely stupid so other people don't try it!

-Pete

Winselstute
Posts: 5
Joined: Wed Mar 11, 2015 9:14 pm

Re: MTK3329 - NEMA wasn't working... Works in MiniGPS tool..

Post by Winselstute »

Hi Pete,

an old trick is to open the 3V short connection again and solder a normal diode (i.e. 1N4007) in flow direction on the pins. This diode reduces your 3.9V to 3,2V and you are in a save area with your power supply for the GPS receiver.

Greets Dirk

vtpete
Posts: 15
Joined: Sat Feb 21, 2015 7:09 pm

Re: MTK3329 - NEMA wasn't working... Works in MiniGPS tool..

Post by vtpete »

Great idea! I've probably got just the diode in one of my electronics kits.

But, hey, how is everyone making theirs work? I mean, isn't this one of those cases where the stock hardware shouldn't work?
In my frustration, I actually ordered another one when I thought I had fried it. I'm considering installing it into an F450 clone I have, but can't help but to think there should be a way this unit will work without having to pull out the soldering iron? How are people running this GPS receiver on only 3.9 volts?!?!?!!?

Post Reply