FGPMMOPA6B GPS Module

Hi Guys
I try to get location information using 66 Channel FGPMMOPA6B GPS Module with MT3329 Chipset on the Arduino Fio I use below code but I cant get any information

// Test code for Adafruit GPS modules using MTK3329/MTK3339 driver
//
// This code shows how to listen to the GPS module in an interrupt
// which allows the program to have more 'freedom' - just parse
// when a new NMEA sentence is available! Then access data when
// desired.
//
// Tested and works great with the Adafruit Ultimate GPS module
// using MTK33x9 chipset
//    ------> http://www.adafruit.com/products/746
// Pick one up today at the Adafruit electronics shop 
// and help support open source hardware & software! -ada

#include <Adafruit_GPS.h>
#include <SoftwareSerial.h>

// If you're using a GPS module:
// Connect the GPS Power pin to 5V
// Connect the GPS Ground pin to ground
// If using software serial (sketch example default):
//   Connect the GPS TX (transmit) pin to Digital 3
//   Connect the GPS RX (receive) pin to Digital 2
// If using hardware serial (e.g. Arduino Mega):
//   Connect the GPS TX (transmit) pin to Arduino RX1, RX2 or RX3
//   Connect the GPS RX (receive) pin to matching TX1, TX2 or TX3

// If you're using the Adafruit GPS shield, change 
// SoftwareSerial mySerial(3, 2); -> SoftwareSerial mySerial(8, 7);
// and make sure the switch is set to SoftSerial

// If using software serial, keep this line enabled
// (you can change the pin numbers to match your wiring):
SoftwareSerial mySerial(9, 10);

// If using hardware serial (e.g. Arduino Mega), comment out the
// above SoftwareSerial line, and enable this line instead
// (you can change the Serial number to match your wiring):

//HardwareSerial mySerial = Serial1;


Adafruit_GPS GPS(&mySerial);


// Set GPSECHO to 'false' to turn off echoing the GPS data to the Serial console
// Set to 'true' if you want to debug and listen to the raw GPS sentences. 
#define GPSECHO  true

// this keeps track of whether we're using the interrupt
// off by default!
boolean usingInterrupt = false;
void useInterrupt(boolean); // Func prototype keeps Arduino 0023 happy

void setup()  
{
    
  // connect at 115200 so we can read the GPS fast enough and echo without dropping chars
  // also spit it out
  Serial.begin(115200);
  Serial.println("Adafruit GPS library basic test!");

  // 9600 NMEA is the default baud rate for Adafruit MTK GPS's- some use 4800
  GPS.begin(9600);
  
  // uncomment this line to turn on RMC (recommended minimum) and GGA (fix data) including altitude
  GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCGGA);
  // uncomment this line to turn on only the "minimum recommended" data
  //GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCONLY);
  // For parsing data, we don't suggest using anything but either RMC only or RMC+GGA since
  // the parser doesn't care about other sentences at this time
  
  // Set the update rate
  GPS.sendCommand(PMTK_SET_NMEA_UPDATE_1HZ);   // 1 Hz update rate
  // For the parsing code to work nicely and have time to sort thru the data, and
  // print it out we don't suggest using anything higher than 1 Hz

  // Request updates on antenna status, comment out to keep quiet
  GPS.sendCommand(PGCMD_ANTENNA);

  // the nice thing about this code is you can have a timer0 interrupt go off
  // every 1 millisecond, and read data from the GPS for you. that makes the
  // loop code a heck of a lot easier!
  useInterrupt(true);

  delay(1000);
  // Ask for firmware version
  mySerial.println(PMTK_Q_RELEASE);
}


// Interrupt is called once a millisecond, looks for any new GPS data, and stores it
SIGNAL(TIMER0_COMPA_vect) {
  char c = GPS.read();
  // if you want to debug, this is a good time to do it!
#ifdef UDR0
  if (GPSECHO)
    if (c) UDR0 = c;  
    // writing direct to UDR0 is much much faster than Serial.print 
    // but only one character can be written at a time. 
#endif
}

void useInterrupt(boolean v) {
  if (v) {
    // Timer0 is already used for millis() - we'll just interrupt somewhere
    // in the middle and call the "Compare A" function above
    OCR0A = 0xAF;
    TIMSK0 |= _BV(OCIE0A);
    usingInterrupt = true;
  } else {
    // do not call the interrupt function COMPA anymore
    TIMSK0 &= ~_BV(OCIE0A);
    usingInterrupt = false;
  }
}

uint32_t timer = millis();
void loop()                     // run over and over again
{
  // in case you are not using the interrupt above, you'll
  // need to 'hand query' the GPS, not suggested :(
  if (! usingInterrupt) {
    // read data from the GPS in the 'main loop'
    char c = GPS.read();
    // if you want to debug, this is a good time to do it!
    if (GPSECHO)
      if (c) Serial.print(c);
  }
  
  // if a sentence is received, we can check the checksum, parse it...
  if (GPS.newNMEAreceived()) {
    // a tricky thing here is if we print the NMEA sentence, or data
    // we end up not listening and catching other sentences! 
    // so be very wary if using OUTPUT_ALLDATA and trytng to print out data
    //Serial.println(GPS.lastNMEA());   // this also sets the newNMEAreceived() flag to false
  
    if (!GPS.parse(GPS.lastNMEA()))   // this also sets the newNMEAreceived() flag to false
      return;  // we can fail to parse a sentence in which case we should just wait for another
  }

  // if millis() or timer wraps around, we'll just reset it
  if (timer > millis())  timer = millis();

  // approximately every 2 seconds or so, print out the current stats
  if (millis() - timer > 2000) { 
    timer = millis(); // reset the timer
    
    Serial.print("\nTime: ");
    Serial.print(GPS.hour, DEC); Serial.print(':');
    Serial.print(GPS.minute, DEC); Serial.print(':');
    Serial.print(GPS.seconds, DEC); Serial.print('.');
    Serial.println(GPS.milliseconds);
    Serial.print("Date: ");
    Serial.print(GPS.day, DEC); Serial.print('/');
    Serial.print(GPS.month, DEC); Serial.print("/20");
    Serial.println(GPS.year, DEC);
    Serial.print("Fix: "); Serial.print((int)GPS.fix);
    Serial.print(" quality: "); Serial.println((int)GPS.fixquality); 
    if (GPS.fix) {
      Serial.print("Location: ");
      Serial.print(GPS.latitude, 4); Serial.print(GPS.lat);
      Serial.print(", "); 
      Serial.print(GPS.longitude, 4); Serial.println(GPS.lon);
      Serial.print("Location (in degrees, works with Google Maps): ");
      Serial.print(GPS.latitudeDegrees, 4);
      Serial.print(", "); 
      Serial.println(GPS.longitudeDegrees, 4);
      
      Serial.print("Speed (knots): "); Serial.println(GPS.speed);
      Serial.print("Angle: "); Serial.println(GPS.angle);
      Serial.print("Altitude: "); Serial.println(GPS.altitude);
      Serial.print("Satellites: "); Serial.println((int)GPS.satellites);
    }
  }
}

Time: 0:0:0.0
Date: 0/0/200
Fix: 0 quality: 0
That’s output do you think either code or my pin connection wrong or something else.
Can you help me thanks.

Since GPSECHO is defined (the value doesn't matter), and data received from the GPS should be echoed to the Serial Monitor application. Your output doesn't show any data from the GPS, leading me to suspect that is not connected to the Arduino correctly.

Thanks for reply. But I dont understand. I just bought this module and it seems OK.

VCC 3v3 GND GND Rx D4 Tx D3

I try almost all of the Pin connection .

SoftwareSerial mySerial(9, 10);

If this is the code you're using, you should connect the GPS RX to Arduino pin D10, and GPS TX to Arduino pin D9.

Cheers, /dev

Thanks for reply. As I said tried almost every pin connection but it still dont answer me. I mean your point right 9,10 Tx Rx. but result same. I am sorry I will be crazy with that :)

If you read this, you would know that you should also show or describe the entire setup. Do you also have the Xbee installed? A picture is best.

Specifically, how are you powering your setup? This GPS device requires 37-48mA in addition to that required by the Fio. A description or pic of your power source may help.

And have you read the special tips for the Fio?

Cheers, /dev

@/dev Thanks for everything. Actually I think Fio set up is not a main problem I mean I also try to work with UNO but it's not work as well. And to be honestly I did not how are you powering your setup? because I tried 3.3V and 5V but both of same result.

By the way my connection looks like(I used all combination of digital pins)

http://s3.postimg.org/kruf6mxjn/Ak_Lo_Ib_Xq_P98u_LVJuxmf_VQhz_Ryj_Hvy9f_Asep1t_Jl0_Qq_ZI.jpg

http://s24.postimg.org/g4ve52iqt/As6_Z_ZVno49_Tgj_W8_Qb_Fp_G6_DBU98q_Ve_z_Wp_Ak_Hc_Jeep_1.jpg

Thanks for the pics!

From the manual for this module:


2.5 Description of I/O Pin

VCC (Pin1)
The main DC power supply of the module, the voltage should be kept between from 3.2V to 5.0V.
The Vcc ripple must be controlled under 50mVpp (Typical: 3.3V)

ENABLE (Pin2)
Keep open or pull high to Power ON. Pull low to shutdown the module.
Enable (High): 1.8V<= Venable<=VCC
Disable (Low): 0V<= Venable<=0.25V

GND (Pin3)
Ground

VBACKUP (Pin4)
This is the power for GPS chipset to keep RTC running when main power is removed. The voltage
should be kept between 2.0V~4.3V. (Typical: 3.0V)
The pin must be connected for normal operation.


The first red sentence means you need a stable power supply. Using a USB port should be fine.

The second red sentence means, well, you must connect VBACKUP to 3.3V (not 5V!). Your photos show only 4 wires for Vcc, GND, TX and RX, so I assume you have not connected the VBACKUP pin yet. The manual says it must be connected. This is probably why nothing is echoed.

There may be a second problem with just the UNO. The UNO is a 5V device, while the Fio is a 3.3V device. The GPS manual says this:

FGPMMOPA6B DC characteristics.jpg

It is ok to connect 5V (from an UNO) to Vcc, becuase the GPS module has a regulator that passes 3V on to the GPS chip. It is also ok to connect 3.3V (from a Fio).

It is ok to connect the GPS TX to the UNO receive pin (barely) or the Fio receive pin 9 (definitely).

It is ok to connect the GPS RX to the Fio transmit pin 10, but…

It is not ok to connect GPS RX to the UNO transmit pin 10 because it is ~5V. This is more than the 2.8V allowed (See “RX TTL H level”). To bring the voltage down and use it with the UNO, you will need to use either (1) a level shifter module, or (2) a resistor divider.

If you buy a level shifter, you can also use it for the GPS TX connection. They are only a few bucks, and they would be required if you ever buy a 3.3V SPI or I2C module to use with the 5V UNO. Too handy!

If you have some resistors (or they’re easier to get), you can make a divider to scale the 5V down to 2.8V. The divider should scale the 5V by about 1/2, and have a total resistance somewhere between 2kΩ and 10kΩ. Some have suggested as low as 500Ω, but that will draw 10ma from that UNO pin.

You could connect one side of the first 1k resistor to the UNO D10, and the other side to the GPS RX and a second 1k resistor. The other side of the second 1k resistor goes to the shared GND. You could use almost any pair of equal resistors between 330 and 4.7k.

GPS RX ---- ±— 1k ---- UNO D10
1k
GND

Hopefully, the UNO didn’t damage the GPS RX pin!

Again, it is probably the VBACKUP line that is causing you trouble. And if you want to use this GPS module with the UNO, you need to reduce the voltage on the GPS RX pin.

Cheers,
/dev